当前位置: 首页>>代码示例>>C#>>正文


C# IClassificationTypeRegistryService类代码示例

本文整理汇总了C#中IClassificationTypeRegistryService的典型用法代码示例。如果您正苦于以下问题:C# IClassificationTypeRegistryService类的具体用法?C# IClassificationTypeRegistryService怎么用?C# IClassificationTypeRegistryService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IClassificationTypeRegistryService类属于命名空间,在下文中一共展示了IClassificationTypeRegistryService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MarkdownCodeTest

 public MarkdownCodeTest(MarkdownEditorMefCatalogFixture catalogFixture) {
     _exportProvider = catalogFixture.CreateExportProvider();
     _crs = _exportProvider.GetExportedValue<IClassificationTypeRegistryService>();
     _ctrs = _exportProvider.GetExportedValue<IContentTypeRegistryService>();
     _cnp = _exportProvider.GetExports<IClassificationNameProvider, IComponentContentTypes>();
     _tbfs = _exportProvider.GetExportedValue<ITextBufferFactoryService>();
 }
开发者ID:Microsoft,项目名称:RTVS,代码行数:7,代码来源:MarkdownCodeTest.cs

示例2: JadeClassifierProvider

        public JadeClassifierProvider(IClassificationTypeRegistryService registryService,   
            ITextBufferFactoryService bufferFact,
            IContentTypeRegistryService contentTypeService,
            [ImportMany(typeof(ITaggerProvider))]Lazy<ITaggerProvider, TaggerProviderMetadata>[] taggerProviders,
            [ImportMany(typeof(IClassifierProvider))]Lazy<IClassifierProvider, IClassifierProviderMetadata>[] classifierProviders) {
            ClassificationRegistryService = registryService;
            BufferFactoryService = bufferFact;
            JsContentType = contentTypeService.GetContentType(NodejsConstants.JavaScript);
            CssContentType = contentTypeService.GetContentType(NodejsConstants.CSS);

            var jsTagger = taggerProviders.Where(
                provider =>
                    provider.Metadata.ContentTypes.Contains(NodejsConstants.JavaScript) &&
                    provider.Metadata.TagTypes.Any(tagType => tagType.IsSubclassOf(typeof(ClassificationTag)))
            ).FirstOrDefault();
            if (JsTaggerProvider != null) {
                JsTaggerProvider = jsTagger.Value;
            }

            var cssTagger = classifierProviders.Where(
                provider => provider.Metadata.ContentTypes.Any(x => x.Equals("css", StringComparison.OrdinalIgnoreCase))
            ).FirstOrDefault();
            if (cssTagger != null) {
                CssClassifierProvider = cssTagger.Value;
            }
        }
开发者ID:lioaphy,项目名称:nodejstools,代码行数:26,代码来源:JadeClassifierProvider.cs

示例3: WacomTranslationDatabaseHighlighter

		internal WacomTranslationDatabaseHighlighter(IClassificationTypeRegistryService registry)
		{
			_keyType = registry.GetClassificationType("wacom.tdb.key");
			_valType = registry.GetClassificationType("wacom.tdb.value");
			_sepType = registry.GetClassificationType("wacom.tdb.separator");
			_errType = registry.GetClassificationType("wacom.tdb.error");
		}
开发者ID:ben,项目名称:WacomTranslationDatabaseHighlighter,代码行数:7,代码来源:WacomTranslationDatabaseHighlighter.cs

示例4: FindResultsClassifier

        public FindResultsClassifier(
            IVscSettingsService settingsService,
            IVisualStudioEventsService vsEventsService,
            IClassificationTypeRegistryService typeRegistryService,
            IClassificationFormatMapService formatMapService,
            IVsFontAndColorStorage fontAndColorStorageService,
            DTE2 dte)
            : base(settingsService,
                  vsEventsService,
                  typeRegistryService,
                  formatMapService,
                  fontAndColorStorageService,
                  "find results")
        {
            this.Dte = dte;

            IsEnabled = true;

            AddClassificationType(ClassificationNames.FindResultsOutputMatch);

            OutputWindowTextClassificationOverride = ClassificationNames.OutputText;
            ShouldOverrideOutputWindowTextClassification = true;

            RefreshClassifications();
        }
开发者ID:orhanmaden,项目名称:VSCommands,代码行数:25,代码来源:FindResultsClassifier.cs

示例5: MarkdownClassifier

 public MarkdownClassifier(IClassificationTypeRegistryService registry)
 {
     _bold = registry.GetClassificationType(MarkdownClassificationTypes.MarkdownBold);
     _italic = registry.GetClassificationType(MarkdownClassificationTypes.MarkdownItalic);
     _header = registry.GetClassificationType(MarkdownClassificationTypes.MarkdownHeader);
     _code = registry.GetClassificationType(MarkdownClassificationTypes.MarkdownCode);
 }
开发者ID:joeriks,项目名称:WebEssentials2013,代码行数:7,代码来源:MarkdownClassifier.cs

示例6: VendorClassifier

 internal VendorClassifier(IClassificationTypeRegistryService registry, ITextBuffer buffer)
 {
     _registry = registry;
     _buffer = buffer;
     _decClassification = _registry.GetClassificationType(ClassificationTypes._declaration);
     _valClassification = _registry.GetClassificationType(ClassificationTypes._value);
 }
开发者ID:LogoPhonix,项目名称:WebEssentials2012,代码行数:7,代码来源:VendorClassifier.cs

示例7: SqlClassifier

 internal SqlClassifier(ITagAggregator<NaturalTextTag> tagger, IClassificationTypeRegistryService classificationRegistry)
 {
     this.tagger = tagger;
     keywordType = classificationRegistry.GetClassificationType("sql-keyword");
     functionType = classificationRegistry.GetClassificationType("sql-function");
     variableType = classificationRegistry.GetClassificationType("sql-variable");
 }
开发者ID:Test20130521,项目名称:SqlSyntaxHighlighting,代码行数:7,代码来源:SqlClassifier.cs

示例8: UvssClassifier

        /// <summary>
        /// Initializes a new instance of the <see cref="UvssClassifier"/> class.
        /// </summary>
        /// <param name="registry">The classification registry.</param>
        /// <param name="parserService">The UVSS language parser service.</param>
        /// <param name="buffer">The text buffer that contains the text being classified.</param>
        internal UvssClassifier(IClassificationTypeRegistryService registry, ITextBuffer buffer)
        {
            this.registry = registry;
			this.buffer = UvssTextBuffer.ForBuffer(buffer);
            this.buffer.CommentSpanInvalidated += (obj, span) =>
                RaiseClassificationChanged(new SnapshotSpan(this.buffer.Buffer.CurrentSnapshot, span));
        }
开发者ID:RUSshy,项目名称:ultraviolet,代码行数:13,代码来源:UvssClassifier.cs

示例9: DothtmlClassifier

 /// <summary>
 /// Initializes a new instance of the <see cref="DothtmlClassifier"/> class.
 /// </summary>
 public DothtmlClassifier(IClassificationTypeRegistryService registry, ITextBuffer buffer)
 {
     tokenizer = new DothtmlTokenizer();
     this.buffer = buffer;
     bindingBrace = registry.GetClassificationType(DothtmlClassificationTypes.BindingBrace);
     bindingContent = registry.GetClassificationType(DothtmlClassificationTypes.BindingContent);
 }
开发者ID:ElboNet,项目名称:dotvvm,代码行数:10,代码来源:DothtmlClassifier.cs

示例10: GetClassificationSpans

        public static IList<ClassificationSpan> GetClassificationSpans(SnapshotSpan snapshotSpan, IClassificationTypeRegistryService registry)
        {
            //            string fileContent = snapshotSpan.Snapshot.GetText(0, snapshotSpan.End.Position);
            string fileContent = snapshotSpan.Snapshot.GetText();
            var gherkinListener = new SyntaxColoringListener(snapshotSpan, registry);

            I18n languageService = new I18n("en");

            try
            {
                Lexer lexer = languageService.lexer(gherkinListener);
                lexer.scan(fileContent, null, 0);
                return gherkinListener.Classifications;
            }
            catch //(Exception ex)
            {
            /*
                var errorClassificationType = registry.GetClassificationType("error");
                int startIndex = 0;
                if (gherkinListener.Classifications.Any())
                {
                    var last = gherkinListener.Classifications.Last();
                    startIndex = last.Span.Start + last.Span.Length;
                }

                gherkinListener.Classifications.Add(new ClassificationSpan(
                    new SnapshotSpan(snapshotSpan.Snapshot, startIndex, snapshotSpan.Snapshot.Length - startIndex),
                    errorClassificationType));
            */

                return gherkinListener.Classifications;
            }
        }
开发者ID:xerxesb,项目名称:SpecFlow,代码行数:33,代码来源:SyntaxColoringListener.cs

示例11: UsageClassifier

 public UsageClassifier(IClassificationTypeRegistryService classificationRegistry, ITextBuffer textBuffer)
 {
     _highlightOne = classificationRegistry.GetClassificationType(ClassificationTypes.HighlightOneName);
       _highlightTwo = classificationRegistry.GetClassificationType(ClassificationTypes.HighlightTwoName);
       _textBuffer = textBuffer;
       _textBuffer.Changed += (_, args) => UpdateUsageHighlighting(Enumerable.Empty<GotoInfo>());
 }
开发者ID:vestild,项目名称:nemerle,代码行数:7,代码来源:UsageClassifier.cs

示例12: OutputClassifier

        public OutputClassifier(IClassificationTypeRegistryService classificationRegistry)
        {
            this.classificationRegistry = classificationRegistry;
            this.messageTypeCharPosition = "[BuildEngine] ".Length;

            InitializeClassifiers();
        }
开发者ID:Powerino73,项目名称:paradox,代码行数:7,代码来源:OutputClassifier.cs

示例13: ClassificationFormatMapService

		protected ClassificationFormatMapService(IThemeService themeService, IEditorFormatMapService editorFormatMapService, IEditorFormatDefinitionService editorFormatDefinitionService, IClassificationTypeRegistryService classificationTypeRegistryService) {
			this.themeService = themeService;
			this.editorFormatMapService = editorFormatMapService;
			this.editorFormatDefinitionService = editorFormatDefinitionService;
			this.classificationTypeRegistryService = classificationTypeRegistryService;
			toCategoryMap = new Dictionary<IEditorFormatMap, IClassificationFormatMap>();
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:ClassificationFormatMapService.cs

示例14: SyntaxQuickinfoBuilderService

        public SyntaxQuickinfoBuilderService(IClassificationFormatMapService classificationFormatMapService,
                                             IClassificationTypeRegistryService classificationTypeRegistryService) {

            _classificationFormatMapService = classificationFormatMapService;
            _classificationMap              = ClassificationTypeDefinitions.GetSyntaxTokenClassificationMap(classificationTypeRegistryService);

        }
开发者ID:csharper2010,项目名称:Nav.Language.Extensions,代码行数:7,代码来源:SyntaxQuickinfoBuilderService.cs

示例15: MarkdownClassifier

        public MarkdownClassifier(ITextBuffer buffer, IClassificationTypeRegistryService classificationRegistry)
        {
            _classificationRegistry = classificationRegistry;
            _buffer = buffer;

            _buffer.Changed += BufferChanged;
        }
开发者ID:return,项目名称:MarkdownMode,代码行数:7,代码来源:Classifier.cs


注:本文中的IClassificationTypeRegistryService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。