提交 d8279494 编写于 作者: H Heejae Chang

fixed assert where cshtml didn't get proper IVsHierarchy set

上级 46596cac
......@@ -72,12 +72,14 @@ internal sealed class ContainedDocument : ForegroundThreadAffinitizedObject, IVi
private readonly string _itemMoniker;
public AbstractProject Project { get { return _containedLanguage.Project; } }
public DocumentId Id { get; private set; }
public IReadOnlyList<string> Folders { get; private set; }
public TextLoader Loader { get; private set; }
public DocumentKey Key { get; private set; }
public bool SupportsRename { get { return _hostType == HostType.Razor; } }
public DocumentId Id { get; }
public IReadOnlyList<string> Folders { get; }
public TextLoader Loader { get; }
public DocumentKey Key { get; }
public IVsHierarchy SharedHierarchy { get; }
public ContainedDocument(
AbstractContainedLanguage containedLanguage,
SourceCodeKind sourceCodeKind,
......@@ -99,6 +101,8 @@ internal sealed class ContainedDocument : ForegroundThreadAffinitizedObject, IVi
var rdt = (IVsRunningDocumentTable)componentModel.GetService<SVsServiceProvider>().GetService(typeof(SVsRunningDocumentTable));
var filePath = rdt.GetMonikerForHierarchyAndItemId(hierarchy, itemId);
this.SharedHierarchy = hierarchy == null ? null : LinkedFileUtilities.GetSharedHierarchyForItem(hierarchy, itemId);
if (Project.Hierarchy != null)
{
string moniker;
......@@ -115,11 +119,6 @@ internal sealed class ContainedDocument : ForegroundThreadAffinitizedObject, IVi
_vbHelperFormattingRule = vbHelperFormattingRule;
}
public IVsHierarchy SharedHierarchy
{
get { return null; }
}
private HostType GetHostType()
{
var projectionBuffer = _containedLanguage.DataBuffer as IProjectionBuffer;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册