コード例 #1
0
        private void CopyFrom(ODataMessageReaderSettings other)
        {
            ExceptionUtils.CheckArgumentNotNull(other, "other");

            this.BaseUri = other.BaseUri;
            this.ClientCustomTypeResolver      = other.ClientCustomTypeResolver;
            this.PrimitiveTypeResolver         = other.PrimitiveTypeResolver;
            this.EnableMessageStreamDisposal   = other.EnableMessageStreamDisposal;
            this.EnablePrimitiveTypeConversion = other.EnablePrimitiveTypeConversion;
            this.EnableCharactersCheck         = other.EnableCharactersCheck;
            this.messageQuotas                           = new ODataMessageQuotas(other.MessageQuotas);
            this.MaxProtocolVersion                      = other.MaxProtocolVersion;
            this.ReadUntypedAsString                     = other.ReadUntypedAsString;
            this.ShouldIncludeAnnotation                 = other.ShouldIncludeAnnotation;
            this.validations                             = other.validations;
            this.ThrowOnDuplicatePropertyNames           = other.ThrowOnDuplicatePropertyNames;
            this.ThrowIfTypeConflictsWithMetadata        = other.ThrowIfTypeConflictsWithMetadata;
            this.ThrowOnUndeclaredPropertyForNonOpenType = other.ThrowOnUndeclaredPropertyForNonOpenType;
            this.LibraryCompatibility                    = other.LibraryCompatibility;
            this.Version          = other.Version;
            this.ReadAsStreamFunc = other.ReadAsStreamFunc;
            this.ArrayPool        = other.ArrayPool;
        }
コード例 #2
0
        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.validations = other.validations;
            this.ThrowIfTypeConflictsWithMetadata        = other.ThrowIfTypeConflictsWithMetadata;
            this.ThrowOnDuplicatePropertyNames           = other.ThrowOnDuplicatePropertyNames;
            this.ThrowOnUndeclaredPropertyForNonOpenType = other.ThrowOnUndeclaredPropertyForNonOpenType;
        }