Beispiel #1
0
        internal static RazorSpanClassifier FromBuffer(ITextBuffer textBuffer)
        {
            RazorSpanClassifier razorSpanClassifier = ServiceManager.GetService <RazorSpanClassifier>(textBuffer);

            if (razorSpanClassifier == null)
            {
                razorSpanClassifier = new RazorSpanClassifier(textBuffer);
            }
            return(razorSpanClassifier);
        }
Beispiel #2
0
        IClassifier IClassifierProvider.GetClassifier(ITextBuffer diskBuffer)
        {
            IClassifier result = null;

            try
            {
                result = RazorSpanClassifier.FromBuffer(diskBuffer);
            }
            catch
            {
            }
            return(result);
        }
 internal static RazorSpanClassifier FromBuffer(ITextBuffer textBuffer)
 {
     RazorSpanClassifier razorSpanClassifier = ServiceManager.GetService<RazorSpanClassifier>(textBuffer);
     if (razorSpanClassifier == null)
     {
         razorSpanClassifier = new RazorSpanClassifier(textBuffer);
     }
     return razorSpanClassifier;
 }