本文整理汇总了C#中LLSD.AsBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# LLSD.AsBoolean方法的具体用法?C# LLSD.AsBoolean怎么用?C# LLSD.AsBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSD
的用法示例。
在下文中一共展示了LLSD.AsBoolean方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SerializeNotationElementFormatted
private static void SerializeNotationElementFormatted(StringWriter writer, string intend, LLSD llsd)
{
switch (llsd.Type)
{
case LLSDType.Unknown:
writer.Write(undefNotationValue);
break;
case LLSDType.Boolean:
if (llsd.AsBoolean())
writer.Write(trueNotationValueTwo);
else
writer.Write(falseNotationValueTwo);
break;
case LLSDType.Integer:
writer.Write(integerNotationMarker);
writer.Write(llsd.AsString());
break;
case LLSDType.Real:
writer.Write(realNotationMarker);
writer.Write(llsd.AsString());
break;
case LLSDType.UUID:
writer.Write(uuidNotationMarker);
writer.Write(llsd.AsString());
break;
case LLSDType.String:
writer.Write(singleQuotesNotationMarker);
writer.Write(EscapeCharacter(llsd.AsString(), singleQuotesNotationMarker));
writer.Write(singleQuotesNotationMarker);
break;
case LLSDType.Binary:
writer.Write(binaryNotationMarker);
writer.Write("64");
writer.Write(doubleQuotesNotationMarker);
writer.Write(llsd.AsString());
writer.Write(doubleQuotesNotationMarker);
break;
case LLSDType.Date:
writer.Write(dateNotationMarker);
writer.Write(doubleQuotesNotationMarker);
writer.Write(llsd.AsString());
writer.Write(doubleQuotesNotationMarker);
break;
case LLSDType.URI:
writer.Write(uriNotationMarker);
writer.Write(doubleQuotesNotationMarker);
writer.Write(EscapeCharacter(llsd.AsString(), doubleQuotesNotationMarker));
writer.Write(doubleQuotesNotationMarker);
break;
case LLSDType.Array:
SerializeNotationArrayFormatted(writer, intend + baseIntend, (LLSDArray)llsd);
break;
case LLSDType.Map:
SerializeNotationMapFormatted(writer, intend + baseIntend, (LLSDMap)llsd);
break;
default:
throw new LLSDException("Notation serialization: Not existing element discovered.");
}
}