Пример #1
0
 protected internal void Copy(EndpointAddressElementBase source)
 {
     if (this.IsReadOnly())
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigReadOnly")));
     }
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     this.Address         = source.Address;
     this.Headers.Headers = source.Headers.Headers;
     if (source.ElementInformation.Properties["identity"].ValueOrigin != PropertyValueOrigin.Default)
     {
         this.Identity.Copy(source.Identity);
     }
 }
 protected internal void Copy(EndpointAddressElementBase source)
 {
     if (this.IsReadOnly())
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigReadOnly")));
     }
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     this.Address = source.Address;
     this.Headers.Headers = source.Headers.Headers;
     if (source.ElementInformation.Properties["identity"].ValueOrigin != PropertyValueOrigin.Default)
     {
         this.Identity.Copy(source.Identity);
     }
 }
        internal protected void Copy(EndpointAddressElementBase source)
        {
            if (this.IsReadOnly())
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly)));
            }
            if (null == source)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
            }

            this.Address = source.Address;
            this.Headers.Headers = source.Headers.Headers;
            PropertyInformationCollection properties = source.ElementInformation.Properties;
            if (properties[ConfigurationStrings.Identity].ValueOrigin != PropertyValueOrigin.Default)
            {
                this.Identity.Copy(source.Identity);
            }
        }
        internal protected void Copy(EndpointAddressElementBase source)
        {
            if (this.IsReadOnly())
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly)));
            }
            if (null == source)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
            }

            this.Address         = source.Address;
            this.Headers.Headers = source.Headers.Headers;
            PropertyInformationCollection properties = source.ElementInformation.Properties;

            if (properties[ConfigurationStrings.Identity].ValueOrigin != PropertyValueOrigin.Default)
            {
                this.Identity.Copy(source.Identity);
            }
        }
 public static EndpointAddress CreateInstance(this EndpointAddressElementBase el)
 {
     return(new EndpointAddress(el.Address, el.Identity.CreateInstance(), el.Headers.Headers));
 }