本文整理汇总了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));
}
示例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;
}
示例3: LowerCaseSmartTagAction
public LowerCaseSmartTagAction(ITrackingSpan span)
{
this.span = span;
tsnapshot = span.TextBuffer.CurrentSnapshot;
lower = span.GetText(tsnapshot).ToLower();
display = "Convert to lower case";
}
示例4: GenerateFieldSmartTagAction
public GenerateFieldSmartTagAction(ITrackingSpan span)
{
trackingSpan = span;
snapShot = span.TextBuffer.CurrentSnapshot;
m_upper = span.GetText(snapShot).ToUpper();
displayText = "生成属性";
}
示例5: UpperCaseSmartTagAction
public UpperCaseSmartTagAction(ITrackingSpan span)
{
this.span = span;
snapshot = span.TextBuffer.CurrentSnapshot;
upper = span.GetText(snapshot).ToUpper();
display = "Convert to upper case";
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}