本文整理汇总了C#中Stream.WriteLine方法的典型用法代码示例。如果您正苦于以下问题:C# Stream.WriteLine方法的具体用法?C# Stream.WriteLine怎么用?C# Stream.WriteLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stream
的用法示例。
在下文中一共展示了Stream.WriteLine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteXmlHeader
protected override void WriteXmlHeader(Stream streamToFill)
{
streamToFill.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
streamToFill.WriteLine("<feed xmlns=\"http://www.w3.org/2005/Atom\" xmlns:g=\"http://base.google.com/ns/1.0\">");
streamToFill.WriteLine(String.Format("<title>{0}</title>", _feedTitle));
streamToFill.WriteLine(String.Format("<link rel=\"self\" href=\"{0}\"/>", _feedLink));
streamToFill.WriteLine(String.Format("<updated>{0}</updated>", getFormatedDate(DateTime.Now)));
streamToFill.WriteLine("<author>");
streamToFill.WriteLine(String.Format("<name>{0}</name>", _feedAuthor));
streamToFill.WriteLine("</author>");
streamToFill.WriteLine(String.Format("<id>{0}</id>", _feedId));
}
示例2: RenderCommand
public override void RenderCommand(Stream stream)
{
var header = string.Format("data {0}", _Bytes.Length);
stream.WriteLine(header);
stream.Write(_Bytes, 0, _Bytes.Length);
stream.WriteLineFeed();
}
示例3: WriteTo
public void WriteTo(Stream stream)
{
var line = string.Format("{0} {1} {2}", Version, (int)StatusCode, StatusDescription);
//Debug.WriteLine(line);
stream.WriteLine(line);
foreach (var pair in Headers)
{
if (pair.Key.ToLowerInvariant() == "proxy-connection")
continue;
line = string.Format("{0}: {1}", pair.Key, pair.Value);
stream.WriteLine(line);
}
//Debug.WriteLine(null);
stream.WriteLine();
//stream.Flush();
}
示例4: RenderCommand
public override void RenderCommand(Stream stream)
{
var command = CommandName;
if (!string.IsNullOrEmpty(Name))
command += " " + Name;
command += string.Format(" <{0}> ", Email);
command += FormatDate(Date);
stream.WriteLine(command);
}
示例5: RenderCommand
public override void RenderCommand(Stream stream)
{
stream.WriteLine(string.Format("reset {0}", Reference));
if (From != null)
{
stream.WriteString("from ");
From.RenderMarkReference(stream);
stream.WriteLineFeed();
}
}
示例6: RenderMarkCommand
protected void RenderMarkCommand(Stream stream)
{
if (MarkId != null)
{
var command = string.Format("mark :{0}", MarkId);
stream.WriteLine(command);
_HasBeenRendered = true;
}
}
示例7: WriteXmlHeader
protected override void WriteXmlHeader(Stream streamToFill)
{
streamToFill.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
streamToFill.WriteLine("<rss version =\"2.0\" xmlns:g=\"http://base.google.com/ns/1.0\">");
streamToFill.WriteLine("<channel>");
streamToFill.WriteLine(String.Format("<title>{0}</title>", _feedTitle));
streamToFill.WriteLine(String.Format("<description>{0}</description>", _feedDescription));
streamToFill.WriteLine(String.Format("<link>{0}</link>", _feedLink));
}
示例8: RenderCommand
public override void RenderCommand(Stream stream)
{
if (Blob != null)
{
stream.WriteString("M 644 ");
Blob.RenderMarkReference(stream);
stream.WriteString(string.Format(" \"{0}\"", Path));
stream.WriteLineFeed();
}
else
{
stream.WriteLine(string.Format("M 644 inline \"{0}\"", Path));
stream.RenderCommand(Data);
}
}
示例9: RenderCommand
public override void RenderCommand(Stream stream)
{
stream.WriteLine(string.Format("R {0} {1}", this.Source, this.Path));
}
示例10: WriteXmlFooter
protected override void WriteXmlFooter(Stream streamToFill)
{
streamToFill.WriteLine("</feed>");
}
示例11: WriteXmlHeader
protected virtual void WriteXmlHeader(Stream streamToFill)
{
streamToFill.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
streamToFill.WriteLine("<root>");
}
示例12: WriteXmlFooter
protected virtual void WriteXmlFooter(Stream streamToFill)
{
streamToFill.WriteLine("</root>");
}
示例13: RenderCommand
public override void RenderCommand(Stream stream)
{
foreach (var fc in FileCommands.OfType<FileModifyCommand>())
{
if (fc.Blob != null)
stream.RenderCommand(fc.Blob);
}
stream.WriteLine(string.Format("commit {0}", Reference));
base.RenderMarkCommand(stream);
if (Author != null)
stream.RenderCommand(Author);
stream.RenderCommand(Committer);
stream.RenderCommand(CommitInfo);
if (FromCommit != null)
{
stream.WriteString("from ");
FromCommit.RenderMarkReference(stream);
stream.WriteLineFeed();
}
foreach (var mc in MergeCommits)
{
stream.WriteString("merge ");
mc.RenderMarkReference(stream);
stream.WriteLineFeed();
}
foreach (var fc in FileCommands)
stream.RenderCommand(fc);
stream.WriteLineFeed();
}
示例14: WriteXmlFooter
protected override void WriteXmlFooter(Stream streamToFill)
{
streamToFill.WriteLine("</channel>");
streamToFill.WriteLine("</rss>");
}
示例15: RenderCommand
public override void RenderCommand(Stream stream)
{
stream.WriteLine(string.Format("D {0}", Path));
}