Commit Graph

6 Commits

Author SHA1 Message Date
Ryan Nowak 81904f579a Add definitions for Document Services
This change adds mock ups of the interfaces that we've been designing as
part of Razor FAR as well as the implementations. This isn't wired up to
anything yet in this PR, but the basic functionality here is stable
enough for us to stabilize and review.

For now we have the interface definitions in the Razor codebase until a
build of Roslyn is available with these definitions + IVT for us to use
them.
2018-10-22 20:47:31 -07:00
Ryan Nowak 4927525519 Fix a bug in the span mapping code
This wasn't quite doing the right thing, and it's simpler than we make
it to be.
2018-10-18 13:46:24 -07:00
N. Taylor Mullen f835291cb6 Allow identical DocumentSnapshot sources to trigger output changes.
- Prior to this project changes would trigger re-parses which would then be thrown away because source versions were identical.
- Added test to verify new SetOutput behavior.

aspnet/Razor.VSCode#184
2018-10-16 16:09:17 -07:00
N. Taylor Mullen d2d84d00f5 Allow GeneratedCodeContainer to accept initial output. 2018-09-10 16:14:25 -07:00
N. Taylor Mullen da935bfa95 Generated document output persists result to generated code container.
- Prior to this we had a `BackgroundDocumentGenerator` that would constantly be updating generated code containers. With this changes we've changed the details in how a `GeneratedCodeContainer` can be mutated. It can now be touched from any thread and is updated when an underlying `DocumentSnapshot` has available content. However, if a generated output comes through that's older then the last seen output we no-op.
- Removed `BackgroundDocumentGenerator` SetOutput logic.
- Updated tests to react to new behavior of `GetGeneratedOutputAsync`.
- Added new test to verify getting generated output results in the setting of the host documents output.
2018-09-10 15:24:35 -07:00
Ryan Nowak 13e13d7632 Add generated documents to workspace 2018-08-15 10:54:32 -07:00