提交 8f830802 编写于 作者: D Dustin Campbell

Add assert for HostType.Razor

上级 60ffcedb
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
...@@ -1052,6 +1053,8 @@ private int GetAdditionalIndentation(SyntaxNode root, SourceText text, TextSpan ...@@ -1052,6 +1053,8 @@ private int GetAdditionalIndentation(SyntaxNode root, SourceText text, TextSpan
private RazorCodeBlockType GetRazorCodeBlockType(int position) private RazorCodeBlockType GetRazorCodeBlockType(int position)
{ {
Debug.Assert(_hostType == HostType.Razor);
var subjectBuffer = (IProjectionBuffer)this.GetOpenTextBuffer(); var subjectBuffer = (IProjectionBuffer)this.GetOpenTextBuffer();
var subjectSnapshot = subjectBuffer.CurrentSnapshot; var subjectSnapshot = subjectBuffer.CurrentSnapshot;
var surfaceSnapshot = ((IProjectionBuffer)_containedLanguage.DataBuffer).CurrentSnapshot; var surfaceSnapshot = ((IProjectionBuffer)_containedLanguage.DataBuffer).CurrentSnapshot;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册