コード例 #1
0
        public CloudContentReaderWriter(Stream stream, CloudContentReaderWriterParameters parameters)
        {
            this.stream = stream;
            encoding = parameters != null ? ToTextEncoding(parameters.Encoding) : null;

            if (encoding == null)
                binaryReader = new BinaryReader(stream);
            else
                streamReader = new StreamReader(stream, encoding);
        }
コード例 #2
0
        public CloudContentReaderWriter(Action<Stream> continuation, CloudContentReaderWriterParameters parameters)
        {
            this.stream = new MemoryStream();
            encoding = parameters != null ? ToTextEncoding(parameters.Encoding) : null;

            if (encoding == null)
                binaryWriter = new BinaryWriter(stream, Encoding.Default, true);
            else
                streamWriter = new StreamWriter(stream, encoding, 1024, true);

            this.continuation = continuation;
        }