Exemplo n.º 1
0
 internal ObjectWriter(
     Stream stream,
     ObjectWriterData defaultData = null,
     RecordingObjectBinder binder = null,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     this.writer = new BinaryWriter(stream, MultiByteEncoding.Instance);
     this.dataMap = new ObjectWriterData(defaultData);
     this.binder = binder ?? new RecordingObjectBinder();
     this.cancellationToken = cancellationToken;
 }
Exemplo n.º 2
0
 internal ObjectWriter(
     Stream stream,
     ObjectWriterData defaultData        = null,
     RecordingObjectBinder binder        = null,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     this.writer            = new BinaryWriter(stream, MultiByteEncoding.Instance);
     this.dataMap           = new ObjectWriterData(defaultData);
     this.binder            = binder ?? new RecordingObjectBinder();
     this.cancellationToken = cancellationToken;
 }
        internal ObjectWriter(
            Stream stream,
            ObjectWriterData defaultData = null,
            RecordingObjectBinder binder = null,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            // String serialization assumes both reader and writer to be of the same endianness.
            // It can be adjusted for BigEndian if needed.
            Debug.Assert(BitConverter.IsLittleEndian);

            this.writer = new BinaryWriter(stream, Encoding.UTF8);
            this.dataMap = new ObjectWriterData(defaultData);
            this.binder = binder ?? new SimpleRecordingObjectBinder();
            this.cancellationToken = cancellationToken;
        }
Exemplo n.º 4
0
        internal ObjectWriter(
            Stream stream,
            ObjectWriterData defaultData        = null,
            RecordingObjectBinder binder        = null,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            // String serialization assumes both reader and writer to be of the same endianness.
            // It can be adjusted for BigEndian if needed.
            Debug.Assert(BitConverter.IsLittleEndian);

            this.writer            = new BinaryWriter(stream, Encoding.UTF8);
            this.dataMap           = new ObjectWriterData(defaultData);
            this.binder            = binder ?? new SimpleRecordingObjectBinder();
            this.cancellationToken = cancellationToken;
        }