• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IClassificationTypeRegistryService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: PyClassifier

        internal PyClassifier(ITextBuffer textBuffer, IClassificationTypeRegistryService classificationRegistryService)
        {
            this.textBuffer = textBuffer;
            this.classificationRegistryService = classificationRegistryService;

            this.textBuffer.ReadOnlyRegionsChanged += new EventHandler<SnapshotSpanEventArgs>(textBuffer_ReadOnlyRegionsChanged);
        }
开发者ID:kageyamaginn,项目名称:VSSDK-Extensibility-Samples,代码行数:7,代码来源:PyClassifier.cs


示例17: SyntaxClassifier

 public SyntaxClassifier(
     IStandardClassificationService standardClassification,
     IClassificationTypeRegistryService classificationRegistry,
     ITextBuffer textBuffer)
 {
     _classificationTypes = new IClassificationType[]
       {
     standardClassification.WhiteSpace,
     standardClassification.Identifier,
     standardClassification.Keyword,
     standardClassification.PreprocessorKeyword,
     standardClassification.Operator,
     standardClassification.Other,
     standardClassification.NumberLiteral,
     standardClassification.CharacterLiteral,
     standardClassification.Comment,
     standardClassification.Comment,
     standardClassification.StringLiteral,
     classificationRegistry.GetClassificationType(ClassificationTypes.VerbatimStringName),
     classificationRegistry.GetClassificationType(ClassificationTypes.RecursiveStringName),
     classificationRegistry.GetClassificationType(ClassificationTypes.QuotationName),
     classificationRegistry.GetClassificationType(ClassificationTypes.QuotationBracesName),
     classificationRegistry.GetClassificationType(ClassificationTypes.ToDoCommentName),
     classificationRegistry.GetClassificationType(ClassificationTypes.BugCommentName),
     classificationRegistry.GetClassificationType(ClassificationTypes.HackCommentName),
       };
       _textBuffer = textBuffer;
       _textBuffer.Changed += TextBuffer_Changed;
 }
开发者ID:vestild,项目名称:nemerle,代码行数:29,代码来源:SyntaxClassifier.cs


示例18: RobotsTxtSyntacticParser

 public RobotsTxtSyntacticParser(IClassificationTypeRegistryService registry)
 {
     _commentType = registry.GetClassificationType(PredefinedClassificationTypeNames.Comment);
     _delimiterType = registry.GetClassificationType("RobotsTxt/Delimiter");
     _recordNameType = registry.GetClassificationType("RobotsTxt/RecordName");
     _recordValueType = registry.GetClassificationType("RobotsTxt/RecordValue");
 }
开发者ID:peterwie,项目名称:RobotsTxtLanguageService,代码行数:7,代码来源:RobotsTxtSyntacticParser.cs


示例19: DockerfileClassifier

 public DockerfileClassifier(IClassificationTypeRegistryService registry)
 {
     _keyword = registry.GetClassificationType(PredefinedClassificationTypeNames.Keyword);
     _comment = registry.GetClassificationType(PredefinedClassificationTypeNames.Comment);
     _string = registry.GetClassificationType(PredefinedClassificationTypeNames.String);
     _symbol = registry.GetClassificationType(DockerfileClassificationTypes.Keyword);
 }
开发者ID:venux,项目名称:WebEssentials2015,代码行数:7,代码来源:DockerfileClassifier.cs


示例20: ClassificationColorManager

        public ClassificationColorManager(ThemeManager themeManager,
            IClassificationFormatMapService classificationFormatMapService,
            IClassificationTypeRegistryService classificationTypeRegistryService)
        {
            _themeManager = themeManager;
            _classificationFormatMapService = classificationFormatMapService;
            _classificationTypeRegistryService = classificationTypeRegistryService;
            _themeColors = new Dictionary<VisualStudioTheme, IDictionary<string, Color>>();
            _lastTheme = VisualStudioTheme.Unknown;

            // Light / Blue theme colors
            var lightAndBlueColors = new Dictionary<string, Color>
            {
                { SemanticClassificationMetadata.PunctuationClassificationTypeName, Colors.Black },
                { SemanticClassificationMetadata.SemanticClassificationTypeName, Color.FromRgb(85, 107, 47) },
                { SemanticClassificationMetadata.PackOffsetClassificationTypeName, Colors.Purple },
                { SemanticClassificationMetadata.RegisterLocationClassificationTypeName, Colors.LightCoral },
                { SemanticClassificationMetadata.NamespaceClassificationTypeName, Colors.Black },
                { SemanticClassificationMetadata.GlobalVariableClassificationTypeName, Color.FromRgb(72, 61, 139) },
                { SemanticClassificationMetadata.FieldIdentifierClassificationTypeName, Color.FromRgb(139, 0, 139) },
                { SemanticClassificationMetadata.LocalVariableClassificationTypeName, Colors.Black },
                { SemanticClassificationMetadata.ConstantBufferVariableClassificationTypeName, Color.FromRgb(72, 61, 139) },
                { SemanticClassificationMetadata.ParameterClassificationTypeName, Colors.Black },
                { SemanticClassificationMetadata.FunctionClassificationTypeName, Color.FromRgb(0, 139, 139) },
                { SemanticClassificationMetadata.MethodClassificationTypeName, Color.FromRgb(0, 139, 139) },
                { SemanticClassificationMetadata.ClassIdentifierClassificationTypeName, Color.FromRgb(0, 0, 139) },
                { SemanticClassificationMetadata.StructIdentifierClassificationTypeName, Color.FromRgb(0, 0, 139) },
                { SemanticClassificationMetadata.InterfaceIdentifierClassificationTypeName, Color.FromRgb(0, 0, 139) },
                { SemanticClassificationMetadata.ConstantBufferIdentifierClassificationTypeName, Color.FromRgb(0, 0, 139) }
            };

            _themeColors.Add(VisualStudioTheme.Blue, lightAndBlueColors);
            _themeColors.Add(VisualStudioTheme.Light, lightAndBlueColors);
            _themeColors.Add(VisualStudioTheme.Unknown, lightAndBlueColors);

            // Dark theme colors

            var darkColors = new Dictionary<string, Color>
            {
                { SemanticClassificationMetadata.PunctuationClassificationTypeName, Colors.White },
                { SemanticClassificationMetadata.SemanticClassificationTypeName, Color.FromRgb(144, 238, 144) },
                { SemanticClassificationMetadata.PackOffsetClassificationTypeName, Colors.Pink },
                { SemanticClassificationMetadata.RegisterLocationClassificationTypeName, Colors.LightCoral },
                { SemanticClassificationMetadata.NamespaceClassificationTypeName, Colors.White },
                { SemanticClassificationMetadata.GlobalVariableClassificationTypeName, Color.FromRgb(173, 216, 230) },
                { SemanticClassificationMetadata.FieldIdentifierClassificationTypeName, Color.FromRgb(221, 160, 221) },
                { SemanticClassificationMetadata.LocalVariableClassificationTypeName, Color.FromRgb(220, 220, 220) },
                { SemanticClassificationMetadata.ConstantBufferVariableClassificationTypeName, Color.FromRgb(173, 216, 230) },
                { SemanticClassificationMetadata.ParameterClassificationTypeName, Color.FromRgb(220, 220, 220) },
                { SemanticClassificationMetadata.FunctionClassificationTypeName, Color.FromRgb(0, 255, 255) },
                { SemanticClassificationMetadata.MethodClassificationTypeName, Color.FromRgb(0, 255, 255) },
                { SemanticClassificationMetadata.ClassIdentifierClassificationTypeName, Color.FromRgb(173, 216, 230) },
                { SemanticClassificationMetadata.StructIdentifierClassificationTypeName, Color.FromRgb(173, 216, 230) },
                { SemanticClassificationMetadata.InterfaceIdentifierClassificationTypeName, Color.FromRgb(173, 216, 230) },
                { SemanticClassificationMetadata.ConstantBufferIdentifierClassificationTypeName, Color.FromRgb(173, 216, 230) }
            };

            _themeColors.Add(VisualStudioTheme.Dark, darkColors);
        }
开发者ID:Samana,项目名称:HlslTools,代码行数:59,代码来源:ClassificationColorManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IClient类代码示例发布时间:2022-05-24
下一篇:
C# IClassificationType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap