Add support for getting the output version
This was missed in an earlier PR.
This commit is contained in:
parent
4d44639a51
commit
e637e17d34
|
|
@ -60,6 +60,12 @@ namespace Microsoft.CodeAnalysis.Razor.ProjectSystem
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override async Task<VersionStamp> GetGeneratedOutputVersionAsync()
|
||||||
|
{
|
||||||
|
var (_, _, version) = await State.GetGeneratedOutputAndVersionAsync(ProjectInternal, this).ConfigureAwait(false);
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
public override bool TryGetText(out SourceText result)
|
public override bool TryGetText(out SourceText result)
|
||||||
{
|
{
|
||||||
return State.TryGetText(out result);
|
return State.TryGetText(out result);
|
||||||
|
|
@ -81,5 +87,17 @@ namespace Microsoft.CodeAnalysis.Razor.ProjectSystem
|
||||||
result = null;
|
result = null;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool TryGetGeneratedOutputVersionAsync(out VersionStamp result)
|
||||||
|
{
|
||||||
|
if (State.IsGeneratedOutputResultAvailable)
|
||||||
|
{
|
||||||
|
result = State.GetGeneratedOutputAndVersionAsync(ProjectInternal, this).Result.outputVersion;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = default(VersionStamp);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -37,6 +37,11 @@ namespace Microsoft.CodeAnalysis.Razor.ProjectSystem
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Task<VersionStamp> GetGeneratedOutputVersionAsync()
|
||||||
|
{
|
||||||
|
throw new NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
public override IReadOnlyList<DocumentSnapshot> GetImports()
|
public override IReadOnlyList<DocumentSnapshot> GetImports()
|
||||||
{
|
{
|
||||||
return Array.Empty<DocumentSnapshot>();
|
return Array.Empty<DocumentSnapshot>();
|
||||||
|
|
@ -81,5 +86,10 @@ namespace Microsoft.CodeAnalysis.Razor.ProjectSystem
|
||||||
{
|
{
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool TryGetGeneratedOutputVersionAsync(out VersionStamp result)
|
||||||
|
{
|
||||||
|
throw new NotSupportedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,14 @@ namespace Microsoft.CodeAnalysis.Razor.ProjectSystem
|
||||||
|
|
||||||
public abstract Task<RazorCodeDocument> GetGeneratedOutputAsync();
|
public abstract Task<RazorCodeDocument> GetGeneratedOutputAsync();
|
||||||
|
|
||||||
|
public abstract Task<VersionStamp> GetGeneratedOutputVersionAsync();
|
||||||
|
|
||||||
public abstract bool TryGetText(out SourceText result);
|
public abstract bool TryGetText(out SourceText result);
|
||||||
|
|
||||||
public abstract bool TryGetTextVersion(out VersionStamp result);
|
public abstract bool TryGetTextVersion(out VersionStamp result);
|
||||||
|
|
||||||
public abstract bool TryGetGeneratedOutput(out RazorCodeDocument result);
|
public abstract bool TryGetGeneratedOutput(out RazorCodeDocument result);
|
||||||
|
|
||||||
|
public abstract bool TryGetGeneratedOutputVersionAsync(out VersionStamp result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue