当前位置: 首页>>代码示例>>C#>>正文


C# TextWriter.WriteLine方法代码示例

本文整理汇总了C#中TextWriter.WriteLine方法的典型用法代码示例。如果您正苦于以下问题:C# TextWriter.WriteLine方法的具体用法?C# TextWriter.WriteLine怎么用?C# TextWriter.WriteLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextWriter的用法示例。


在下文中一共展示了TextWriter.WriteLine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Print

 public void Print(TextWriter tw, string indent = "")
 {
     tw.WriteLine(indent + this.Name + "\\" + "    " + this.GetSize() + " B");
     foreach (var file in this.Files)
         tw.WriteLine(indent + "    " + file.Name + "    " + file.Size + " B");
     foreach (var folder in this.Folders)
         folder.Print(tw, indent + "    ");
 }
开发者ID:staafl,项目名称:ta-hw-dsa,代码行数:8,代码来源:Folder.cs

示例2: Log

 public static void Log(string logMessage, TextWriter w)
 {
     w.Write("\r\nLog Entry : ");
     w.WriteLine("{0} {1}", DateTime.Now.ToLongTimeString(),
         DateTime.Now.ToLongDateString());
     w.WriteLine("  :");
     w.WriteLine("  :{0}", logMessage);
     w.WriteLine("-------------------------------");
 }
开发者ID:kjeans,项目名称:online-shop,代码行数:9,代码来源:paypal.aspx.cs

示例3: Render

 public void Render(ViewContext viewContext, TextWriter writer)
 {
     foreach (PartialView part in _parts)
     {
         viewContext.ViewData = part.Data;
         writer.WriteLine(string.Format("<div id=\"update-{0}\">", part.ForId));
         part.View.Render(viewContext, writer);
         writer.WriteLine(string.Format("</div>"));
     }
 }
开发者ID:rslijp,项目名称:sharptiles,代码行数:10,代码来源:MultiView.cs

示例4: LogCall

        private void LogCall(TextWriter logger, IDictionary<string, object> env)
        {
            var req = new Request(env);

            logger.WriteLine("{0} - Request: Environment#{1}", DateTime.Now, env.Count);

            logger.WriteLine("Environment: ");
            LogDictionary(logger, env);

            logger.WriteLine("Headers: ");
            LogHeaders(logger, req.Headers);
        }
开发者ID:owin,项目名称:museum-piece-gate,代码行数:12,代码来源:RequestLogger.cs

示例5: Write

 public static void Write(object element, int depth, TextWriter log)
 {
     ObjectDumper dumper = new ObjectDumper(depth);
     dumper.writer = log;
     dumper.WriteObject(null, element);
     log.WriteLine(new string('-', 20));
 }
开发者ID:diamondiamon,项目名称:WeikerenUtility,代码行数:7,代码来源:ObjectDumper.cs

示例6: Footer

	static void Footer (TextWriter tw)
	{
		tw.WriteLine (@"## Feedback

Please report any documentation errors, typos or suggestions to the 
[[Gendarme Google Group|http://groups.google.com/group/gendarme]]. Thanks!");
	}
开发者ID:boothead,项目名称:mono-tools,代码行数:7,代码来源:xmldoc2wiki.cs

示例7: Footer

	static void Footer (TextWriter tw)
	{
		tw.WriteLine (@"= Feedback =

Please report any documentation errors, typos or suggestions to the 
[http://groups.google.com/group/gendarme Gendarme Google Group]. Thanks!
[[Category:Gendarme]]");
	}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:8,代码来源:xmldoc2wiki.cs

示例8: LogDictionary

 private void LogDictionary(TextWriter logger, IDictionary<string, object> dictionary)
 {
     foreach (KeyValuePair<string, object> pair in dictionary)
     {
         logger.WriteLine("{0} - T:{1}, V:{2}", pair.Key,
             (pair.Value == null ? "(null)" : pair.Value.GetType().FullName),
             (pair.Value == null ? "(null)" : pair.Value.ToString()));
     }
 }
开发者ID:owin,项目名称:museum-piece-gate,代码行数:9,代码来源:RequestLogger.cs

示例9: Usage

	public static void Usage(TextWriter w)
	{
		w.WriteLine("Usage: WiFile.exe package.msi /l [filename,filename2,...]");
		w.WriteLine("Usage: WiFile.exe package.msi /x [filename,filename2,...]");
		w.WriteLine("Usage: WiFile.exe package.msi /u [filename,filename2,...]");
		w.WriteLine();
		w.WriteLine("Lists (/l), extracts (/x) or updates (/u) files in an MSI or MSM.");
		w.WriteLine("Files are extracted using their source path relative to the package.");
		w.WriteLine("Specified filenames do not include paths.");
		w.WriteLine("Filenames may be a pattern such as *.exe or file?.dll");
	}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:11,代码来源:WiFile.cs

示例10: WriteInfo

 public void WriteInfo(TextWriter tw)
 {
     tw.WriteLine("data size = 0x{0:X}", dataSize);
     tw.WriteLine("#nodes = 0x{0:X}", nodeNum);
     tw.WriteLine("nodes @ 0x{0:X}", nodeOffs);
     tw.WriteLine("#poses = 0x{0:X}", poseNum);
     tw.WriteLine("pose size list @ 0x{0:X}", sizeOffs);
     tw.WriteLine("#vecs = 0x{0:X}", vecNum);
     tw.WriteLine("vecs @ 0x{0:X}", vecOffs);
     tw.WriteLine("#pose bits = 0x{0:X}", nbits);
 }
开发者ID:schaban,项目名称:AnimTools,代码行数:11,代码来源:psqinfo.cs

示例11: LogHeaders

 private void LogHeaders(TextWriter logger, IDictionary<string, string[]> headers)
 {
     foreach (KeyValuePair<string, string[]> header in headers)
     {
         foreach (string value in header.Value)
         {
             logger.WriteLine("{0}: {1}", header.Key, value ?? "(null)");
         }
     }
 }
开发者ID:owin,项目名称:museum-piece-gate,代码行数:10,代码来源:RequestLogger.cs

示例12: WriteLine

 private void WriteLine(TextWriter stream, String message, Object[] args, Boolean error = false)
 {
     if (String.IsNullOrEmpty(message)) {
         stream.WriteLine();
         return;
     }
     if (error) Console.ForegroundColor = ConsoleColor.Red;
     if (!String.IsNullOrEmpty(this.Prefix)) {
         if (!error) Console.ForegroundColor = ConsoleColor.Cyan;
         stream.Write(this.Prefix);
         stream.Write(' ');
         if (!error) Console.ResetColor();
     }
     if (this.PrintTimestamp) {
         stream.Write(DateTime.Now.ToString("HH:mm:ss.fff"));
         stream.Write(' ');
     }
     if ((null != args) && (0 < args.Length))
         message = String.Format(message, args);
     stream.WriteLine(message);
     if (error) Console.ResetColor();
 }
开发者ID:FirstWaveSoftware,项目名称:TsRecompiler,代码行数:22,代码来源:Logging.cs

示例13: Run

    public void Run(string [] args)
    {
        fs1 = File.CreateText ("type-hierarchy.xml");
        fs1.WriteLine ("<android-hierarchy xmlns:android='" + android_ns + "'>");

        foreach (var arg in new string [] {"http://developer.android.com/reference/android/view/View.html"}) {
            var baseUrl = resolver.ResolveUri (null, arg);
            var doc = FetchXmlDocument (baseUrl);

            ProcessDocument (baseUrl);

            foreach (XmlElement node in doc.SelectNodes ("//div[@id='subclasses-direct' or @id='subclasses-indirect']")) {
                foreach (XmlElement link in node.SelectNodes ("div/table[@class='jd-sumtable-expando']/tr/td[@class='jd-linkcol']/a[@href]")) {
                    if (link.PreviousSibling != null && link.PreviousSibling.Value.Contains ("extends"))
                        continue; // it is a link to generic type argument.
                    var durl = resolver.ResolveUri (baseUrl, link.GetAttribute ("href"));
                    ProcessDocument (durl);
                }
            }
        }
        fs1.WriteLine ("</android-hierarchy>");
        fs1.Close ();
    }
开发者ID:atsushieno,项目名称:monodroid-schema-gen,代码行数:23,代码来源:type-hierarchy-importer.cs

示例14: CsWriter

    public CsWriter(string filename)
    {
        _writer = new StreamWriter(filename);

        _writer.WriteLine("// Licensed to the .NET Foundation under one or more agreements.");
        _writer.WriteLine("// The .NET Foundation licenses this file to you under the MIT license.");
        _writer.WriteLine("// See the LICENSE file in the project root for more information.");
        _writer.WriteLine();
        _writer.WriteLine("// NOTE: This is a generated file - do not manually edit!");
        _writer.WriteLine();
    }
开发者ID:tijoytom,项目名称:corert,代码行数:11,代码来源:CsWriter.cs

示例15: Logger

    public Logger(TextWriter writer)
    {
        _lwriter = writer;
        _loggerTask = Task.Factory.StartNew(() =>
                {
                    var cToken = _cts.Token;
                    for (; ; )
                    {
                        _lwriter.WriteLine(_buf.Receive());
                        if (cToken.IsCancellationRequested && _buf.Count == 0)
                            return;
                
                    }
                
                });

    }
开发者ID:DVDPT,项目名称:Programmatically-Speaking-Repository,代码行数:17,代码来源:logger.cs


注:本文中的TextWriter.WriteLine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。