From 8f8308025a0ba5375c6d52234ec8a638886e606d Mon Sep 17 00:00:00 2001 From: Dustin Campbell Date: Wed, 4 Mar 2015 14:30:27 -0800 Subject: [PATCH] Add assert for HostType.Razor --- .../Core/Def/Implementation/Venus/ContainedDocument.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs b/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs index 72dd9e87403..3d9d1a3485c 100644 --- a/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs +++ b/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -1052,6 +1053,8 @@ private int GetAdditionalIndentation(SyntaxNode root, SourceText text, TextSpan private RazorCodeBlockType GetRazorCodeBlockType(int position) { + Debug.Assert(_hostType == HostType.Razor); + var subjectBuffer = (IProjectionBuffer)this.GetOpenTextBuffer(); var subjectSnapshot = subjectBuffer.CurrentSnapshot; var surfaceSnapshot = ((IProjectionBuffer)_containedLanguage.DataBuffer).CurrentSnapshot; -- GitLab