本文整理汇总了C#中IDataWriter.WriteString方法的典型用法代码示例。如果您正苦于以下问题:C# IDataWriter.WriteString方法的具体用法?C# IDataWriter.WriteString怎么用?C# IDataWriter.WriteString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataWriter
的用法示例。
在下文中一共展示了IDataWriter.WriteString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Save
public void Save(IDataWriter writer)
{
writer.WriteString(Action + "\r\n");
foreach (string key in mProperties.Keys)
{
writer.WriteString(string.Format("{0}: {1}\r\n", key, mProperties[key]));
}
writer.WriteString("\r\n");
}
示例2: Write
/// <summary>
/// Writes the string
/// </summary>
/// <param name="writer">Writer to write</param>
public void Write(IDataWriter writer)
{
writer.WriteString(Data);
}
示例3: Serialize
public override void Serialize(IDataWriter writer, SemVersion currentVersion)
{
writer.WriteString(Value);
}
示例4: WriteParts
private static void WriteParts(IEnumerable<string> parts, IDataWriter dataWriter)
{
foreach (var part in parts.TakeWhile(part => part.Length != 0))
{
dataWriter.WriteByte((byte)part.Length);
dataWriter.WriteString(part);
}
dataWriter.WriteByte(0);
}