Exemplo n.º 1
0
 public Eavesdropper(TextWriter channel, TextWriter sink)
     : base(CultureInfo.InvariantCulture)
 {
     Channel = channel.AssertNotNull();
     Sink = sink.AssertNotNull();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the CsvWriter class.
        /// </summary>
        /// <param name="textWriter">
        /// The target for the CSV data.
        /// </param>
        /// <param name="leaveOpen">
        /// If <see langword="true"/>, <paramref name="textWriter"/> will not be disposed when this <c>CsvWriter</c> is disposed.
        /// </param>
        public CsvWriter(TextWriter textWriter, bool leaveOpen)
        {
            textWriter.AssertNotNull("textWriter");

            this.textWriter = textWriter;
            this.leaveOpen = leaveOpen;
            this.valueBuilder = new StringBuilder(128);
            this.bufferBuilder = new StringBuilder(2048);
            this.valueSeparator = Constants.DefaultValueSeparator;
            this.valueDelimiter = Constants.DefaultValueDelimiter;
        }