• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IO.TextWriter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



System.IO.TextWriter类属于命名空间,在下文中一共展示了System.IO.TextWriter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: TextWriterErrorListener

        public TextWriterErrorListener(TextWriter writer)
        {
            if (writer == null)
                throw new ArgumentNullException("writer");

            _writer = writer;
        }
开发者ID:mahanteshck,项目名称:antlrcs,代码行数:7,代码来源:TextWriterErrorListener.cs


示例2: BeginAssembly

    public override void BeginAssembly()
    {
      if (_consoleOnly)
      {
        base.BeginAssembly();
        Init = System.IO.TextWriter.Null; //This is a publi member that other classes may use!
        return;
      }

      OpenOutput(Filename + ".cpp");
      base.BeginAssembly();

      Init = new System.IO.StringWriter();

      var execDir = System.IO.Path.GetDirectoryName(System.IO.Path.GetFullPath(System.Reflection.Assembly.GetExecutingAssembly().Location));
      if (execDir.EndsWith("Debug"))
        execDir = execDir.Replace("Debug", "Release");

      WriteOutput(@"
#using <System.dll>
//#using <{0}/MCDynamicRuntime.dll>
//#using <{0}/mjr.exe>

using namespace System;
using namespace mjr;

namespace MDRSrcGen 
{{
	ref class Program 
	{{
", execDir.Replace('\\', '/'));
    }
开发者ID:reshadi2,项目名称:mcjs,代码行数:32,代码来源:CppAsmGenerator.cs


示例3: HtmlTextWriter

        public HtmlTextWriter(System.IO.TextWriter inner)
        {
            this._inner = inner;

            var nl = inner.NewLine;
            this.CoreNewLine = nl.ToCharArray();
            this._windowsNewLine = nl == "\r\n";
        }
开发者ID:boombuler,项目名称:CommonMark.NET,代码行数:8,代码来源:HtmlTextWriter.cs


示例4: Format

        /// <summary>
        /// Formats a complete HTML document describing the given 
        /// <see cref="Error"/> instance.
        /// </summary>

        public override void Format(TextWriter writer, Error error)
        {
            if (writer == null) throw new ArgumentNullException("writer");
            if (error == null) throw new ArgumentNullException("error");

            var page = new ErrorMailHtmlPage(error);
            writer.Write(page.TransformText());
        }
开发者ID:ramsenthil18,项目名称:elmah,代码行数:13,代码来源:ErrorMailHtmlFormatter.cs


示例5: Generate

 // This method is OPTIONAL, you may choose to implement Write and WriteLiteral without use of __razor_writer
 // and provide another means of invoking Execute.
 //
 /// <summary>Executes the template, writing to the provided text writer.</summary>
 /// <param name=""writer"">The TextWriter to which to write the template output.</param>
 public void Generate(System.IO.TextWriter writer)
 {
     Html = new HtmlHelper (writer);
     Url = new UrlHelper ();
     __razor_writer = writer;
     Execute ();
     __razor_writer = null;
 }
开发者ID:rrawla,项目名称:PortableRazor,代码行数:13,代码来源:ViewBase.cs


示例6: DumpChildren

 protected override void DumpChildren(TextWriter Out, uint Depth)
 {
     foreach (VEntry e in Fields.Values) {
     Indent(Out, Depth);
     Out.Write(e.Name);
     Out.WriteLine(" =");
     e.Value.Dump(Out, Depth+1);
     }
 }
开发者ID:cakoose,项目名称:cks,代码行数:9,代码来源:VRecord.cs


示例7: Game

 public Game(int players, System.IO.TextWriter log)
 {
     this.Log = log;
     this.Deck = new Deck();
     this.Players = Enumerable.Range(0, players).Select(i => new Player(this, i)).ToList();
     this.Fails = FAILS;
     this.Hints = HINTS;
     this.FinalTurns = players;
 }
开发者ID:martijneken,项目名称:hanabi,代码行数:9,代码来源:Program.cs


示例8: GetStringTemplateWriter

        public static ITemplateWriter GetStringTemplateWriter(this TemplateGroup group, TextWriter writer)
        {
            if (group == null)
                throw new ArgumentNullException("group");
            if (writer == null)
                throw new ArgumentNullException("writer");

            return new AutoIndentWriter(writer);
        }
开发者ID:mahanteshck,项目名称:antlrcs,代码行数:9,代码来源:TemplateExtensions.cs


示例9: WriteAfter

 /// <summary>
 /// Writes flow state that is true on exit from the basic block.
 /// </summary>
 /// <param name="arch"></param>
 /// <param name="writer"></param>
 public void WriteAfter(IProcessorArchitecture arch, TextWriter writer)
 {
     EmitRegisters(arch, "// DataOut:", DataOut, writer);
     writer.WriteLine();
     EmitFlagGroup(arch, "// DataOut (flags):", grfOut, writer);
     writer.WriteLine();
     EmitLocals("// LocalsOut:", writer);
     if (TerminatesProcess)
         writer.WriteLine("// Terminates process");
 }
开发者ID:relaxar,项目名称:reko,代码行数:15,代码来源:BlockFlow.cs


示例10: PrintStackTrace

 internal static void PrintStackTrace(this Exception e, TextWriter writer)
 {
     writer.WriteLine(e.ToString());
     string trace = e.StackTrace ?? string.Empty;
     foreach (string line in trace.Split('\n', '\r'))
     {
         if (!string.IsNullOrEmpty(line))
             writer.WriteLine("        " + line);
     }
 }
开发者ID:JSchofield,项目名称:antlrcs,代码行数:10,代码来源:ExceptionExtensions.cs


示例11: DumpChildren

 protected override void DumpChildren(TextWriter Out, uint Depth)
 {
     foreach (Element e in Elements) {
     e.First.Dump(Out, Depth);
     if (e.ArrowPos != null) {
         Indent(Out, Depth+1);
         Out.WriteLine("->");
         e.Second.Dump(Out, Depth+1);
     }
     }
 }
开发者ID:cakoose,项目名称:cks,代码行数:11,代码来源:VCollection.cs


示例12: Main

 public void Main(string[] args, 
     System.IO.TextReader In,
     System.IO.TextWriter Out,
     System.IO.TextWriter Error)
 {
     //this version of Main allows alternate streams
     this.In = In;
     this.Out = Out;
     this.Error = Error;
     this.Main(args);
 }
开发者ID:yuri-danilchenko,项目名称:vssbindingremover,代码行数:11,代码来源:ConsoleEngineBase.cs


示例13: Emit

 public override void Emit(IProcessorArchitecture arch, TextWriter writer)
 {
     EmitRegisters(arch, "// DataOut:", DataOut, writer);
     writer.WriteLine();
     EmitFlagGroup(arch, "// DataOut (flags):", grfOut, writer);
     writer.WriteLine();
     SymbolicIn.Emit(arch, "// SymbolicIn:", writer);
     writer.WriteLine();
     EmitLocals("// LocalsOut:", writer);
     if (TerminatesProcess)
         writer.WriteLine("// Terminates process");
 }
开发者ID:nemerle,项目名称:reko,代码行数:12,代码来源:BlockFlow.cs


示例14: ComponentSelectionForm

        public ComponentSelectionForm(IMgaModel component, IMgaModel alternativeContainer, System.IO.TextWriter errorWriter=null, System.IO.TextWriter infoWriter=null)
        {
            InitializeComponent();

            #region Initialize Class Variables
            this.component = component;
            this.alternativeContainer = alternativeContainer;
            this.dataSource = new List<ComponentListItem>();
            this.ErrorWriter = (errorWriter == null) ? Console.Error : errorWriter;
            this.InfoWriter = (infoWriter == null) ? Console.Out : infoWriter;
            this.clm = new ClmLib.Clm(this.component);
            #endregion

            this.filterParameters = this.clm.GenerateFilter(alternativeContainer, this.ErrorWriter, this.InfoWriter);

            RefreshLocalComponentList();
        }
开发者ID:neemask,项目名称:meta-core,代码行数:17,代码来源:ComponentSelectionForm.cs


示例15: Main

        public static void Main(string[] args)
        {
            nick = "SecureIRC";
            owner = "SecureIRC";
            server = "irc.entalyan.com";
            port = 6999;
            chan = "#SecureIRC";
            pass = ""; //Enter just the password

            //Connect to irc server and get input and output text streams from TcpClient.
            sock.Connect(server, port);
            if (!sock.Connected)
            {
                Console.WriteLine("Failed to connect!");
                return;
            }
            input = new System.IO.StreamReader(sock.GetStream());
            output = new System.IO.StreamWriter(sock.GetStream());

            //Starting USER and NICK login commands 
            output.Write(
                "PASS " + nick + ":" + pass + "\r\n" +
                "USER " + nick + " 0 * :" + owner + "\r\n" +
                "NICK " + nick + "\r\n" +
                "PRIVMSG #SecureIRC Successful login at: " + DateTime.Now.ToString() + "\r\n"
            );
            output.Flush();

            Listen();

            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();

        }
开发者ID:Entalyan,项目名称:Simple-IRC-Tests,代码行数:34,代码来源:Program.cs


示例16: zombolize

        public static void zombolize(string[] args)
        {
            if(args.Length!=6)
            {
                ConsoleLog.WriteLine("Usage: zombolize loginlist dictionary proxylist threadcount outfile");
                return;
            }
            m_NickNameList=new NerZul.Core.Utils.StringHolder(args[1]);
            m_Dictionary=System.IO.File.ReadAllLines(args[2]);
            m_ProxyList=new NerZul.Core.Utils.StringSelector(args[3]);
            int ThreadCount=int.Parse(args[4]);
            m_OutS=new System.IO.StreamWriter(args[5]);
            m_List=new System.Collections.Generic.List<Engine.Zomboloid.LoginPassword>();

            for(int i=0; i<ThreadCount;i++)
            {
                new System.Threading.Thread(zombolize_thread).Start();
            }
            while(true)
            {
                System.Threading.Thread.Sleep(500);
                lock(m_ThreadCountLock)
                {
                    if(m_ThreadCount<=0) return;
                }
            }
        }
开发者ID:sasha237,项目名称:NorthCitadel,代码行数:27,代码来源:Zomboloid.cs


示例17: JsonWriter

        public JsonWriter()
        {
            _instStringBuilder = new System.Text.StringBuilder();
            _writer = new System.IO.StringWriter(_instStringBuilder);

            Init();
        }
开发者ID:CraigTaylor,项目名称:App.Port,代码行数:7,代码来源:JsonWriter.cs


示例18: CommandBase

 public CommandBase()
 {
     //by default, read from/write to standard streams
     this.In = System.Console.In;
     this.Out = System.Console.Out;
     this.Error = System.Console.Error;
 }
开发者ID:varixto,项目名称:stellar,代码行数:7,代码来源:CommandBase.cs


示例19: Initializer

 protected void Initializer(string FeatureName)
 {
     this.In = System.Console.In;
     this.Out = System.Console.Out;
     this.Error = System.Console.Out;
     Name = FeatureName;
 }
开发者ID:Ngauet,项目名称:automatedframework,代码行数:7,代码来源:ConsoleBase.cs


示例20: IndentPrinter

 public IndentPrinter(TW Out, string IndentString, string PrefixString, bool FreshLine)
 {
     this.Out = Out;
     this.IndentString = IndentString;
     this.PrefixString = PrefixString;
     this.nl = FreshLine;
 }
开发者ID:cakoose,项目名称:cks,代码行数:7,代码来源:IndentPrinter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# System.Int32类代码示例发布时间:2022-05-24
下一篇:
C# IO.TextReader类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap