本文整理汇总了C#中Quote.Count方法的典型用法代码示例。如果您正苦于以下问题:C# Quote.Count方法的具体用法?C# Quote.Count怎么用?C# Quote.Count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quote
的用法示例。
在下文中一共展示了Quote.Count方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Visit
public void Visit(Quote code)
{
var inlineContainer = new InlineUIContainer();
SnuDomCategoryVisitor categoryVisitor = new SnuDomCategoryVisitor();
foreach (var item in code)
{
item.Accept(categoryVisitor);
}
if (categoryVisitor.Category == MarkdownCategory.PlainText && code.Count() == 1)
{
var plainTextVisitor = new SnuDomPlainTextVisitor();
foreach (var item in code)
item.Accept(plainTextVisitor);
inlineContainer.Child = new MarkdownQuote(plainTextVisitor.Result);
}
else
{
var fullUIVisitor = new SnuDomFullUIVisitor(_forgroundBrush);
//cant be null in this category
foreach (var item in code)
item.Accept(fullUIVisitor);
inlineContainer.Child = new MarkdownQuote(fullUIVisitor.Result);
}
if (_currentParagraph == null)
{
MaybeSplitForParagraph();
}
else
{
_currentParagraph.Inlines.Add(new Windows.UI.Xaml.Documents.LineBreak());
}
_currentParagraph.Inlines.Add(inlineContainer);
_currentParagraph.Inlines.Add(new Windows.UI.Xaml.Documents.LineBreak());
}
示例2: Visit
public void Visit(Quote code)
{
SnuDomCategoryVisitor categoryVisitor = new SnuDomCategoryVisitor();
UIElement result = null;
foreach (var item in code)
{
item.Accept(categoryVisitor);
}
if (categoryVisitor.Category == MarkdownCategory.PlainText && code.Count() == 1)
{
var plainTextVisitor = new SnuDomPlainTextVisitor();
foreach (var item in code)
item.Accept(plainTextVisitor);
result = new MarkdownQuote(plainTextVisitor.Result);
}
else
{
var fullUIVisitor = new SnuDomFullUIVisitor(_forgroundBrush);
//cant be null in this category
foreach (var item in code)
item.Accept(fullUIVisitor);
if (fullUIVisitor.ResultGroup != null)
{
result = new MarkdownQuote(fullUIVisitor.ResultGroup);
}
else
{
result = new MarkdownQuote(fullUIVisitor.Result);
}
}
DirectlyPlaceUIContent(result);
}