protected ODataMessageReaderSettingsBase(ODataMessageReaderSettingsBase other)
        {
            ExceptionUtils.CheckArgumentNotNull(other, "other");

            this.checkCharacters           = other.checkCharacters;
            this.enableAtomMetadataReading = other.enableAtomMetadataReading;
            this.messageQuotas             = new ODataMessageQuotas(other.MessageQuotas);
            this.shouldIncludeAnnotation   = other.shouldIncludeAnnotation;
        }
        protected ODataMessageReaderSettingsBase(ODataMessageReaderSettingsBase other)
        {
            ExceptionUtils.CheckArgumentNotNull(other, "other");

            this.checkCharacters = other.checkCharacters;
            this.enableAtomMetadataReading = other.enableAtomMetadataReading;
            this.messageQuotas = new ODataMessageQuotas(other.MessageQuotas);
            this.shouldIncludeAnnotation = other.shouldIncludeAnnotation;
        }
        private void CompareMessageReaderSettings(ODataMessageReaderSettingsBase expected, ODataMessageReaderSettingsBase actual)
        {
            if (expected == null && actual == null)
            {
                return;
            }

            Assert.IsNotNull(expected, "expected settings cannot be null");
            Assert.IsNotNull(actual, "actual settings cannot be null");
            Assert.AreEqual(expected.CheckCharacters, actual.CheckCharacters, "CheckCharacters does not match");
            Assert.AreEqual(expected.EnableAtomMetadataReading, actual.EnableAtomMetadataReading, "EnableAtomMetadataReading does not match");
            Assert.AreEqual(expected.MessageQuotas.MaxPartsPerBatch, actual.MessageQuotas.MaxPartsPerBatch, "MaxPartsPerBatch does not match");
            Assert.AreEqual(expected.MessageQuotas.MaxOperationsPerChangeset, actual.MessageQuotas.MaxOperationsPerChangeset, "MaxOperationsPerChangeset does not match");
            Assert.AreEqual(expected.MessageQuotas.MaxNestingDepth, actual.MessageQuotas.MaxNestingDepth, "MaxNestingDepth does not match");
            Assert.AreEqual(expected.MessageQuotas.MaxReceivedMessageSize, actual.MessageQuotas.MaxReceivedMessageSize, "MaxMessageSize does not match");
            Assert.AreEqual(expected.MessageQuotas.MaxEntityPropertyMappingsPerType, actual.MessageQuotas.MaxEntityPropertyMappingsPerType, "MaxEntityPropertyMappingsPerType does not match");
            Assert.AreEqual(expected.InstanceAnnotationFilter, actual.InstanceAnnotationFilter, "InstanceAnnotationFilter does not match");
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DataServiceClientMessageReaderSettingsShim"/> class.
 /// </summary>
 /// <param name="settings">The settings.</param>
 internal DataServiceClientMessageReaderSettingsShim(ODataMessageReaderSettingsBase settings)
 {
     Debug.Assert(settings != null, "settings != null");
     this.settings = settings;
 }
        /// <summary>
        /// Executes actions that configure reader settings.
        /// </summary>
        /// <param name="readerSettings">The reader settings.</param>
        internal void ExecuteReaderSettingsConfiguration(ODataMessageReaderSettingsBase readerSettings)
        {
            Debug.Assert(readerSettings != null, "readerSettings != null");

            if (this.messageReaderSettingsConfigurationActions.Count > 0)
            {
                MessageReaderSettingsArgs args = new MessageReaderSettingsArgs(new DataServiceClientMessageReaderSettingsShim(readerSettings));
                foreach (Action<MessageReaderSettingsArgs> readerSettingsConfigurationAction in this.messageReaderSettingsConfigurationActions)
                {
                    readerSettingsConfigurationAction(args);
                }
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MessageReaderSettingsArgs"/> class.
        /// </summary>
        /// <param name="settings">The settings.</param>
        public MessageReaderSettingsArgs(ODataMessageReaderSettingsBase settings)
        {
            WebUtil.CheckArgumentNull(settings, "settings");

            this.Settings = settings;
        }