private void CopyFrom(ODataMessageWriterSettings other)
        {
            ExceptionUtils.CheckArgumentNotNull(other, "other");

            this.acceptCharSets              = other.acceptCharSets;
            this.acceptMediaTypes            = other.acceptMediaTypes;
            this.BaseUri                     = other.BaseUri;
            this.EnableMessageStreamDisposal = other.EnableMessageStreamDisposal;
            this.EnableCharactersCheck       = other.EnableCharactersCheck;
            this.format                  = other.format;
            this.JsonPCallback           = other.JsonPCallback;
            this.messageQuotas           = new ODataMessageQuotas(other.MessageQuotas);
            this.ODataUri                = other.ODataUri.Clone();
            this.shouldIncludeAnnotation = other.shouldIncludeAnnotation;
            this.useFormat               = other.useFormat;
            this.Version                 = other.Version;
            this.LibraryCompatibility    = other.LibraryCompatibility;
            this.MetadataSelector        = other.MetadataSelector;

            this.validations = other.validations;
            this.ThrowIfTypeConflictsWithMetadata        = other.ThrowIfTypeConflictsWithMetadata;
            this.ThrowOnDuplicatePropertyNames           = other.ThrowOnDuplicatePropertyNames;
            this.ThrowOnUndeclaredPropertyForNonOpenType = other.ThrowOnUndeclaredPropertyForNonOpenType;
            this.ArrayPool = other.ArrayPool;
        }
Esempio n. 2
0
        private void CopyFrom(ODataMessageReaderSettings other)
        {
            ExceptionUtils.CheckArgumentNotNull(other, "other");

            this.BaseUri = other.BaseUri;
            this.ClientCustomTypeResolver      = other.ClientCustomTypeResolver;
            this.EnableMessageStreamDisposal   = other.EnableMessageStreamDisposal;
            this.EnablePrimitiveTypeConversion = other.EnablePrimitiveTypeConversion;
            this.EnableCharactersCheck         = other.EnableCharactersCheck;
            this.messageQuotas                           = new ODataMessageQuotas(other.MessageQuotas);
            this.MaxProtocolVersion                      = other.MaxProtocolVersion;
            this.ShouldIncludeAnnotation                 = other.ShouldIncludeAnnotation;
            this.validations                             = other.validations;
            this.ThrowOnDuplicatePropertyNames           = other.ThrowOnDuplicatePropertyNames;
            this.ThrowIfTypeConflictsWithMetadata        = other.ThrowIfTypeConflictsWithMetadata;
            this.ThrowOnUndeclaredPropertyForNonOpenType = other.ThrowOnUndeclaredPropertyForNonOpenType;
        }