本文整理汇总了C#中ExCSS.Model.TextBlocks.Block.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Block.ToString方法的具体用法?C# Block.ToString怎么用?C# Block.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExCSS.Model.TextBlocks.Block
的用法示例。
在下文中一共展示了Block.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParsePageSelector
private bool ParsePageSelector(Block token)
{
if (token.GrammarSegment == GrammarSegment.Colon || token.GrammarSegment == GrammarSegment.Whitespace)
{
return true;
}
if (token.GrammarSegment == GrammarSegment.Ident)
{
CastRuleSet<PageRule>().Selector = new SimpleSelector(token.ToString());
return true;
}
if (token.GrammarSegment == GrammarSegment.CurlyBraceOpen)
{
SetParsingContext(ParsingContext.InDeclaration);
return true;
}
return false;
}
示例2: ParseHexValue
private bool ParseHexValue(Block token)
{
switch (token.GrammarSegment)
{
case GrammarSegment.Number:
case GrammarSegment.Dimension:
case GrammarSegment.Ident:
var rest = token.ToString();
if (_buffer.Length + rest.Length <= 6)
{
_buffer.Append(rest);
return true;
}
break;
}
ParseSingleValueHexColor(_buffer.ToString());
SetParsingContext(ParsingContext.InSingleValue);
return ParseSingleValue(token);
}
示例3: ParseKeyframeText
private bool ParseKeyframeText(Block token)
{
if (token.GrammarSegment == GrammarSegment.CurlyBraceOpen)
{
_frame = null;
SetParsingContext(ParsingContext.InDeclaration);
return true;
}
if (token.GrammarSegment == GrammarSegment.CurlyBracketClose)
{
ParseKeyframesData(token);
return false;
}
if (token.GrammarSegment == GrammarSegment.Comma)
{
return true;
}
if (_frame == null)
{
_frame = new KeyframeRule();
_frame.AddValue(token.ToString());
CastRuleSet<KeyframesRule>().Declarations.Add(_frame);
_activeRuleSets.Push(_frame);
}
else
{
_frame.AddValue(token.ToString());
}
return true;
}
示例4: ParseKeyframeText
private bool ParseKeyframeText(Block token)
{
if (token.GrammarSegment == GrammarSegment.CurlyBraceOpen)
{
SetParsingContext(ParsingContext.InDeclaration);
return true;
}
if (token.GrammarSegment == GrammarSegment.CurlyBracketClose)
{
ParseKeyframesData(token);
return false;
}
var frame = new KeyframeRule
{
Value = token.ToString()
};
CastRuleSet<KeyframesRule>().Declarations.Add(frame);
_activeRuleSets.Push(frame);
return true;
}