Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the BsonReader class.
 /// </summary>
 protected BsonReader(
     BsonReaderSettings settings
     )
 {
     this.settings = settings.Freeze();
     this.state    = BsonReaderState.Initial;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the BsonReader class.
 /// </summary>
 /// <param name="settings">The reader settings.</param>
 protected BsonReader(
     BsonReaderSettings settings
 )
 {
     this.settings = settings.FrozenCopy();
     this.state = BsonReaderState.Initial;
 }
Exemplo n.º 3
0
        /// <inheritdoc/>
        public void PushSettings(Action <BsonReaderSettings> configurator)
        {
            var newSettings = _settings.Clone();

            configurator(newSettings);
            newSettings.Freeze();
            _settingsStack.Push(_settings);
            _settings = newSettings;
        }
        // constructors
        /// <summary>
        /// Initializes a new instance of the BsonReader class.
        /// </summary>
        /// <param name="settings">The reader settings.</param>
        protected BsonReader(BsonReaderSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            _settings = settings.FrozenCopy();
            _state = BsonReaderState.Initial;
        }
Exemplo n.º 5
0
        // constructors
        /// <summary>
        /// Initializes a new instance of the BsonReader class.
        /// </summary>
        /// <param name="settings">The reader settings.</param>
        protected BsonReader(BsonReaderSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            _settings = settings.FrozenCopy();
            _state    = BsonReaderState.Initial;
        }
Exemplo n.º 6
0
 // constructors
 /// <summary>
 /// Initializes a new instance of the BsonReader class.
 /// </summary>
 /// <param name="settings">The reader settings.</param>
 protected BsonReader(BsonReaderSettings settings)
 {
     _settings = settings.FrozenCopy();
     _state    = BsonReaderState.Initial;
 }
Exemplo n.º 7
0
 /// <inheritdoc/>
 public void PopSettings()
 {
     _settings = _settingsStack.Pop();
 }