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


C# ITrackingSpan.GetText方法代码示例

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


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

示例1: UpperCaseSuggestedAction

 public UpperCaseSuggestedAction(ITrackingSpan span)
 {
     _span = span;
     _snapshot = span.TextBuffer.CurrentSnapshot;
     _upper = span.GetText(_snapshot).ToUpper();
     _display = string.Format("Convert '{0}' to upper case", span.GetText(_snapshot));
 }
开发者ID:Sunzhuokai,项目名称:VSSDK-Extensibility-Samples,代码行数:7,代码来源:UpperCaseSuggestedAction.cs

示例2: GetInsertionText

        public string GetInsertionText(CssTextSource textSource, ITrackingSpan typingSpan)
        {
            string text = DisplayText;
            bool needsQuote = text.IndexOf(' ') != -1;
            if (text == "Pick from file...")
            {
                return string.Empty;
            }

            if (needsQuote)
            {
                // Prefer to use single quotes, but if the inline style uses single quotes, then use double quotes.
                char quote = (textSource == CssTextSource.InlineStyleSingleQuote) ? '"' : '\'';

                if (typingSpan != null)
                {
                    // If the user already typed a quote, then use it

                    string typingText = typingSpan.GetText(typingSpan.TextBuffer.CurrentSnapshot);

                    if (!string.IsNullOrEmpty(typingText) && (typingText[0] == '"' || typingText[0] == '\''))
                    {
                        quote = typingText[0];
                    }
                }

                if (text != null && text.IndexOf(quote) == -1)
                {
                    text = quote.ToString() + text + quote.ToString();
                }
            }

            return text;
        }
开发者ID:kodybrown,项目名称:WebEssentials2013,代码行数:34,代码来源:FontFamilyCompletionListEntry.cs

示例3: LowerCaseSmartTagAction

 public LowerCaseSmartTagAction(ITrackingSpan span)
 {
     this.span = span;
     tsnapshot = span.TextBuffer.CurrentSnapshot;
     lower = span.GetText(tsnapshot).ToLower();
     display = "Convert to lower case";
 }
开发者ID:solondon,项目名称:VisualStudio2013andNETCookbookCode,代码行数:7,代码来源:LowerCaseSmartTagAction.cs

示例4: GenerateFieldSmartTagAction

 public GenerateFieldSmartTagAction(ITrackingSpan span)
 {
     trackingSpan = span;
     snapShot = span.TextBuffer.CurrentSnapshot;
     m_upper = span.GetText(snapShot).ToUpper();
     displayText = "生成属性";
 }
开发者ID:qianlifeng,项目名称:easyvsx,代码行数:7,代码来源:GenerateFieldSmartTagAction.cs

示例5: UpperCaseSmartTagAction

 public UpperCaseSmartTagAction(ITrackingSpan span)
 {
     this.span = span;
     snapshot = span.TextBuffer.CurrentSnapshot;
     upper = span.GetText(snapshot).ToUpper();
     display = "Convert to upper case";
 }
开发者ID:solondon,项目名称:VisualStudio2013andNETCookbookCode,代码行数:7,代码来源:UpperCaseSmartTagAction.cs

示例6: AttachAction

 public AttachAction(ITrackingSpan span, ITextView view, TodoTagger tagger, string display, string path, string filePath)
 {
     m_span = span;
     m_snapshot = span.TextBuffer.CurrentSnapshot;
     m_upper = span.GetText(m_snapshot).ToUpper();
     m_display = display;
     m_path = path;
     m_tagger = tagger;
     m_view = view;
     this.FileLocation = filePath;
 }
开发者ID:xoriath,项目名称:attachables,代码行数:11,代码来源:AttachAction.cs

示例7: CompleteDueByAction

        public CompleteDueByAction(ITrackingSpan span, TodoTagger tagger, string display, string filePath, Reminder reminder)
        {
            m_span = span;
            m_snapshot = span.TextBuffer.CurrentSnapshot;
            m_upper = span.GetText(m_snapshot).ToUpper();
            m_display = display;
            m_tagger = tagger;
            m_reminder = reminder;

            FileLocation = filePath;
        }
开发者ID:xoriath,项目名称:attachables,代码行数:11,代码来源:CompleteDueByAction.cs

示例8: DueByAction

 public DueByAction(ITrackingSpan span, TodoTagger tagger, string display, DateTime dueBy, string friendly, string filePath)
 {
     m_span = span;
     m_snapshot = span.TextBuffer.CurrentSnapshot;
     m_upper = span.GetText(m_snapshot).ToUpper();
     m_display = display;
     m_dueBy = dueBy;
     m_friendly = friendly;
     m_tagger = tagger;
     FileLocation = filePath;
 }
开发者ID:xoriath,项目名称:attachables,代码行数:11,代码来源:DueByAction.cs

示例9: PowerShellCompletionSet

 internal PowerShellCompletionSet(string moniker, string displayName, ITrackingSpan applicableTo, IEnumerable<Completion> completions, IEnumerable<Completion> completionBuilders, ITrackingSpan filterSpan, ITrackingSpan lineStartToApplicableTo)
     : base(moniker, displayName, applicableTo, completions, completionBuilders)
 {
     if (filterSpan == null)
     {
         throw new ArgumentNullException("filterSpan");
     }
     this.completions = new FilteredObservableCollection<Completion>(new ObservableCollection<Completion>(completions));
     FilterSpan = filterSpan;
     LineStartToApplicableTo = lineStartToApplicableTo;
     InitialApplicableTo = applicableTo.GetText(applicableTo.TextBuffer.CurrentSnapshot);
 }
开发者ID:vairam-svs,项目名称:poshtools,代码行数:12,代码来源:PowerShellCompletionSource.cs

示例10: SpellingEventArgs

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="span">The tracking span related to the event</param>
 public SpellingEventArgs(ITrackingSpan span)
 {
     this.Word = span.GetText(span.TextBuffer.CurrentSnapshot);
     this.Span = span;
 }
开发者ID:kazu46,项目名称:VSSpellChecker,代码行数:9,代码来源:SpellingEventArgs.cs


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