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


C# IGlyphService.GetGlyph方法代码示例

本文整理汇总了C#中IGlyphService.GetGlyph方法的典型用法代码示例。如果您正苦于以下问题:C# IGlyphService.GetGlyph方法的具体用法?C# IGlyphService.GetGlyph怎么用?C# IGlyphService.GetGlyph使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IGlyphService的用法示例。


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

示例1: RegistryCompletionSource

 public RegistryCompletionSource(ITextBuffer buffer, IGlyphService glyphService)
 {
     _buffer = buffer;
     _versionGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphKeyword, StandardGlyphItem.GlyphItemPublic);
     _keyGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphClosedFolder, StandardGlyphItem.GlyphItemPublic);
     _dataTypeGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupStruct, StandardGlyphItem.GlyphItemPublic);
 }
开发者ID:Peter-Juhasz,项目名称:RegistryLanguageService,代码行数:7,代码来源:RegistryCompletionSource.cs

示例2: PkgdefCompletionSource

 public PkgdefCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, IGlyphService glyphService)
 {
     _buffer = buffer;
     _classifier = classifier.GetClassifier(buffer);
     _navigator = navigator;
     _glyphService = glyphService;
     _defaultGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupField, StandardGlyphItem.GlyphItemPublic);
     _snippetGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphCSharpExpansion, StandardGlyphItem.GlyphItemPublic);
 }
开发者ID:NotYours180,项目名称:ExtensibilityTools,代码行数:9,代码来源:PkgdefCompletionSource.cs

示例3: CmdCompletionSource

 public CmdCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, IGlyphService glyphService, ITextStructureNavigator textStructureNavigator)
 {
     _buffer = buffer;
     _classifier = classifier.GetClassifier(buffer);
     _keywordGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupVariable, StandardGlyphItem.GlyphItemPublic);
     _environmentGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphAssembly, StandardGlyphItem.GlyphItemPublic);
     _labelGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphArrow, StandardGlyphItem.GlyphItemPublic);
     _textStructureNavigator = textStructureNavigator;
 }
开发者ID:yannduran,项目名称:OpenCommandLine,代码行数:9,代码来源:CmdCompletionSource.cs

示例4: VsctCompletionSource

 public VsctCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, IGlyphService glyphService)
 {
     _buffer = buffer;
     _classifier = classifier.GetClassifier(buffer);
     _navigator = navigator;
     _glyphService = glyphService;
     _defaultGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupField, StandardGlyphItem.GlyphItemPublic);
     _builtInGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupProperty, StandardGlyphItem.TotalGlyphItems);
     _imageService = ExtensibilityToolsPackage.GetGlobalService(typeof(SVsImageService)) as IVsImageService2;
 }
开发者ID:japj,项目名称:ExtensibilityTools,代码行数:10,代码来源:VsctCompletionSource.cs

示例5: PyCompletion

 /// <summary>
 /// Constructor used by IPy declarations retrieved from the IPy engine
 /// </summary>
 internal PyCompletion(Declaration declaration, IGlyphService glyphService)
     : base(declaration.Title)
 {
     this.InsertionText = declaration.Title;
     this.Description = declaration.Description;
     this.IconSource = glyphService.GetGlyph(GetGroupFromDeclaration(declaration), GetScopeFromDeclaration(declaration));
 }
开发者ID:smartmobili,项目名称:parsing,代码行数:10,代码来源:PyCompletion.cs

示例6: JsCompletion

 internal static DynamicallyVisibleCompletion JsCompletion(IGlyphService service, MemberResult memberResult, bool quote) {
     return new DynamicallyVisibleCompletion(memberResult.Name,
         GetInsertionQuote(quote, memberResult.Completion),
         memberResult.Documentation,
         service.GetGlyph(GetGlyphGroup(memberResult), StandardGlyphItem.GlyphItemPublic),
         String.Empty
     );
 }
开发者ID:CforED,项目名称:Node.js-Tools-for-Visual-Studio,代码行数:8,代码来源:RequireCompletionAnalysis.cs

示例7: PythonCompletion

 internal static DynamicallyVisibleCompletion PythonCompletion(IGlyphService service, MemberResult memberResult) {
     return new DynamicallyVisibleCompletion(memberResult.Name, 
         memberResult.Completion, 
         () => memberResult.Documentation, 
         () => service.GetGlyph(memberResult.MemberType.ToGlyphGroup(), StandardGlyphItem.GlyphItemPublic),
         Enum.GetName(typeof(PythonMemberType), memberResult.MemberType)
     );
 }
开发者ID:KaushikCh,项目名称:PTVS,代码行数:8,代码来源:CompletionAnalysis.cs

示例8: CompletionCompiler

        public CompletionCompiler(IGlyphService glyphs)
        {
            Glyphs = glyphs;

            IconMappings = new Dictionary<SassCompletionValueType, ImageSource>
            {
                { SassCompletionValueType.Default, Glyphs.GetGlyph(StandardGlyphGroup.GlyphGroupUnknown, StandardGlyphItem.TotalGlyphItems) },
                { SassCompletionValueType.Keyword, Glyphs.GetGlyph(StandardGlyphGroup.GlyphKeyword, StandardGlyphItem.TotalGlyphItems) },
                { SassCompletionValueType.SystemFunction, Glyphs.GetGlyph(StandardGlyphGroup.GlyphGroupMethod, StandardGlyphItem.GlyphItemPublic) },
                { SassCompletionValueType.UserFunction, Glyphs.GetGlyph(StandardGlyphGroup.GlyphExtensionMethod, StandardGlyphItem.GlyphItemInternal) },
                { SassCompletionValueType.Mixin, Glyphs.GetGlyph(StandardGlyphGroup.GlyphGroupInterface, StandardGlyphItem.GlyphItemInternal) },
                { SassCompletionValueType.Variable, Glyphs.GetGlyph(StandardGlyphGroup.GlyphGroupVariable, StandardGlyphItem.GlyphItemInternal) },
                { SassCompletionValueType.Property, Glyphs.GetGlyph(StandardGlyphGroup.GlyphGroupProperty, StandardGlyphItem.TotalGlyphItems) }
            };
        }
开发者ID:profet23,项目名称:SassyStudio,代码行数:15,代码来源:CompletionCompiler.cs

示例9: Initialize

        public static void Initialize(IGlyphService glyphService, IIconService iconService)
        {
            var supportedGlyphGroups = new Dictionary<StandardGlyphGroup, string>
            {
                { StandardGlyphGroup.GlyphGroupError, "Error" },
                { StandardGlyphGroup.GlyphGroupDelegate, "Delegate" },
                { StandardGlyphGroup.GlyphGroupEnum, "Enum" },
                { StandardGlyphGroup.GlyphGroupStruct, "Struct" },
                { StandardGlyphGroup.GlyphGroupClass, "Class" },
                { StandardGlyphGroup.GlyphGroupInterface, "Interface" },
                { StandardGlyphGroup.GlyphGroupModule, "Module" },
                { StandardGlyphGroup.GlyphGroupConstant, "Constant" },
                { StandardGlyphGroup.GlyphGroupEnumMember, "EnumMember" },
                { StandardGlyphGroup.GlyphGroupEvent, "Event" },
                { StandardGlyphGroup.GlyphExtensionMethodPrivate, "ExtensionMethodPrivate" },
                { StandardGlyphGroup.GlyphExtensionMethodProtected, "ExtensionMethodProtected" },
                { StandardGlyphGroup.GlyphExtensionMethodInternal, "ExtensionMethodInternal" },
                { StandardGlyphGroup.GlyphExtensionMethod, "ExtensionMethod" },
                { StandardGlyphGroup.GlyphGroupMethod, "Method" },
                { StandardGlyphGroup.GlyphGroupProperty, "Property" },
                { StandardGlyphGroup.GlyphGroupField, "Field" },
                { StandardGlyphGroup.GlyphGroupOperator, "Operator" },
                { StandardGlyphGroup.GlyphReference, "Reference" }
            };

            var supportedGlyphItems = new Dictionary<StandardGlyphItem, string>
            {
                { StandardGlyphItem.GlyphItemPrivate, "Private" },
                { StandardGlyphItem.GlyphItemProtected, "Protected" },
                { StandardGlyphItem.GlyphItemInternal, "Internal" },
                { StandardGlyphItem.GlyphItemPublic, "Public" },
                { StandardGlyphItem.GlyphItemFriend, "Friend" }
            };

            foreach (var groupKvp in supportedGlyphGroups)
            {
                foreach (var itemKvp in supportedGlyphItems)
                {
                    string iconName = GetIconName(groupKvp.Value, itemKvp.Value);
                    StandardGlyphGroup localGroup = groupKvp.Key;
                    StandardGlyphItem localItem = itemKvp.Key;
                    iconService.AddIcon(iconName, iconName, () => glyphService.GetGlyph(localGroup, localItem));
                }
            }
        }
开发者ID:Rickinio,项目名称:roslyn,代码行数:45,代码来源:IconHelper.cs

示例10: PythonCompletion

        internal static Completion PythonCompletion(IGlyphService service, MemberResult memberResult)
        {
            StandardGlyphGroup group = memberResult.MemberType.ToGlyphGroup();
            var icon = new IconDescription(group, StandardGlyphItem.GlyphItemPublic);

            var result = new LazyCompletion(memberResult.Name, () => memberResult.Completion, () => memberResult.ToolTip, service.GetGlyph(group, StandardGlyphItem.GlyphItemPublic));
            result.Properties.AddProperty(typeof(IconDescription), icon);
            return result;
        }
开发者ID:TerabyteX,项目名称:main,代码行数:9,代码来源:CompletionAnalysis.cs

示例11: GetIconSource

 private ImageSource GetIconSource(IGlyphService glyphService, SpringCompletionType type)
 {
     switch (type)
     {
         case SpringCompletionType.Namespace:
         case SpringCompletionType.Class:
         case SpringCompletionType.Interface:
         case SpringCompletionType.Property:
         case SpringCompletionType.ConstructorArg:
         case SpringCompletionType.EnumMember:
         case SpringCompletionType.Boolean:
             return glyphService.GetGlyph(GetGroupFromDeclaration(type), GetScopeFromDeclaration(type));
         case SpringCompletionType.Snippet:
         case SpringCompletionType.Alias:
             return SpringLeafGlyph;
         default:
             return glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupClass, StandardGlyphItem.GlyphItemPublic);
     }
 }
开发者ID:koskedk,项目名称:spring-net-vsnet,代码行数:19,代码来源:SpringCompletion.cs

示例12: GetCompletions

        public IEnumerable<Completion> GetCompletions(ITextBuffer buffer, SnapshotSpan span, IGlyphService glyphService)
        {
            var semanticModel = GetSemanticModel(buffer);
            var identifiers = semanticModel.GetIdentifiers(span.Start);
            var contextSpan = semanticModel.GetContextSpan(span.Start);
            var prefix = contextSpan.Type == ContextType.Template ? "$" : "";

            return identifiers.Select(i =>
            {
                var imageSource = glyphService.GetGlyph(i.Glyph, StandardGlyphItem.GlyphItemPublic);
                var quickInfo = i.IsParent ? i.QuickInfo.Replace("$parent", contextSpan.ParentContext?.Name.ToLowerInvariant()) : i.QuickInfo;

                return new Completion(prefix + i.Name, prefix + i.Name, quickInfo, imageSource, null);
            });
        }
开发者ID:Kymeric,项目名称:Typewriter,代码行数:15,代码来源:Editor.cs

示例13: GetImageSource

 public static ImageSource GetImageSource(this Glyph glyph, IGlyphService glyphService)
 {
     return glyphService.GetGlyph(glyph.GetStandardGlyphGroup(), glyph.GetStandardGlyphItem());
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:4,代码来源:GlyphExtensions.cs

示例14: PaketCompletionSource

 public PaketCompletionSource(IGlyphService glyphService, ITextBuffer textBuffer, ITextStructureNavigator navigator)
 {
     this.textBuffer = textBuffer;
     this.navigator = navigator;
     glyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupVariable, StandardGlyphItem.GlyphItemPublic);
 }
开发者ID:dungpa,项目名称:Paket.VisualStudio,代码行数:6,代码来源:PaketCompletionSourceProvider.cs

示例15: GetCompletions

        public IEnumerable<Completion> GetCompletions(ITextBuffer buffer, SnapshotSpan span, IGlyphService glyphService)
        {
            var semanticModel = GetSemanticModel(buffer);
            var identifiers = semanticModel.GetIdentifiers(span.Start);
            var contextSpan = semanticModel.GetContextSpan(span.Start);
            var prefix = contextSpan.Type == ContextType.Template ? "$" : "";

            var completions = identifiers.Select(i =>
            {
                var imageSource = glyphService.GetGlyph(i.Glyph, StandardGlyphItem.GlyphItemPublic);
                var quickInfo = i.IsParent ? i.QuickInfo.Replace("Item", contextSpan.ParentContext?.Name) : i.QuickInfo;

                return new Completion(prefix + i.Name, prefix + i.Name, quickInfo, imageSource, null);
            });

            if (contextSpan.Type == ContextType.Template && contextSpan.Context.Name == nameof(File))
            {
                var imageSource = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupProperty, StandardGlyphItem.GlyphItemPublic);
                var codeBlock = new[]
                {
                    new Completion("${ }", "${\r\n}", "Insert a custom C# code block.", imageSource, null)
                };

                return codeBlock.Concat(completions);
            }

            return completions;
        }
开发者ID:ChinaJason,项目名称:Typewriter,代码行数:28,代码来源:Editor.cs


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