getStream() public static method

public static getStream ( string filename ) : Stream
filename string
return Stream
コード例 #1
0
ファイル: ManagedNodeWriter.cs プロジェクト: z77ma/runtime
        // Entry point.
        public static void Main(string[] args)
        {
            string            filename = "temp.xml";
            ManagedNodeWriter mw       = new ManagedNodeWriter(filename);
            ManagedNodeWriter mnw      = new ManagedNodeWriter();

            mnw.PutPattern("X");

            int count = 0;

            do
            {
                mnw.PutPattern("E/");
                count++;
            } while (count < 65536);
            mnw.PutText("<a/>");
            mnw.Finish();
            StreamWriter sw = new StreamWriter(FilePathUtil.getStream("deep.xml"));

            sw.Write(mnw.GetNodes());
            sw.Dispose();
        }
コード例 #2
0
 public CustomWriter(string filename, XmlWriterSettings xws)
 {
     _writer = XmlWriter.Create(FilePathUtil.getStream(filename), xws);
 }
コード例 #3
0
ファイル: ManagedNodeWriter.cs プロジェクト: zwy2014/corefx
 ///
 /// Overloaded Constructor with FileName to Write
 ///
 public ManagedNodeWriter(string filename)
 {
     Init();
     _textWriter = new StreamWriter(FilePathUtil.getStream(filename));
 }