public void Copy(IssuedTokenClientElement from)
 {
     if (this.IsReadOnly())
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigReadOnly")));
     }
     if (from == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from");
     }
     this.DefaultKeyEntropyMode = from.DefaultKeyEntropyMode;
     this.CacheIssuedTokens = from.CacheIssuedTokens;
     this.MaxIssuedTokenCachingTime = from.MaxIssuedTokenCachingTime;
     this.IssuedTokenRenewalThresholdPercentage = from.IssuedTokenRenewalThresholdPercentage;
     if (from.ElementInformation.Properties["localIssuer"].ValueOrigin != PropertyValueOrigin.Default)
     {
         this.LocalIssuer.Copy(from.LocalIssuer);
     }
     if (from.ElementInformation.Properties["localIssuerChannelBehaviors"].ValueOrigin != PropertyValueOrigin.Default)
     {
         this.LocalIssuerChannelBehaviors = from.LocalIssuerChannelBehaviors;
     }
     if (from.ElementInformation.Properties["issuerChannelBehaviors"].ValueOrigin != PropertyValueOrigin.Default)
     {
         foreach (IssuedTokenClientBehaviorsElement element in from.IssuerChannelBehaviors)
         {
             this.IssuerChannelBehaviors.Add(element);
         }
     }
 }
Ejemplo n.º 2
0
        public void Copy(IssuedTokenClientElement from)
        {
            if (this.IsReadOnly())
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly)));
            }
            if (null == from)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from");
            }

            this.DefaultKeyEntropyMode                 = from.DefaultKeyEntropyMode;
            this.CacheIssuedTokens                     = from.CacheIssuedTokens;
            this.MaxIssuedTokenCachingTime             = from.MaxIssuedTokenCachingTime;
            this.IssuedTokenRenewalThresholdPercentage = from.IssuedTokenRenewalThresholdPercentage;

#pragma warning suppress 56506 //Microsoft; from.ElementInformation.Properties[ConfigurationStrings.LocalIssuerIssuedTokenParameters] can never be null (underlying configuration system guarantees)
            if (PropertyValueOrigin.Default != from.ElementInformation.Properties[ConfigurationStrings.LocalIssuer].ValueOrigin)
            {
                this.LocalIssuer.Copy(from.LocalIssuer);
            }
#pragma warning suppress 56506 //Microsoft; from.ElementInformation.Properties[ConfigurationStrings.LocalIssuerChannelBehaviors] can never be null (underlying configuration system guarantees)
            if (PropertyValueOrigin.Default != from.ElementInformation.Properties[ConfigurationStrings.LocalIssuerChannelBehaviors].ValueOrigin)
            {
                this.LocalIssuerChannelBehaviors = from.LocalIssuerChannelBehaviors;
            }
#pragma warning suppress 56506 //Microsoft; from.ElementInformation.Properties[ConfigurationStrings.IssuerChannelBehaviors] can never be null (underlying configuration system guarantees)
            if (PropertyValueOrigin.Default != from.ElementInformation.Properties[ConfigurationStrings.IssuerChannelBehaviors].ValueOrigin)
            {
                foreach (IssuedTokenClientBehaviorsElement element in from.IssuerChannelBehaviors)
                {
                    this.IssuerChannelBehaviors.Add(element);
                }
            }
        }
        public void Copy(IssuedTokenClientElement from)
        {
            if (this.IsReadOnly())
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly)));
            }
            if (null == from)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from");
            }

            this.DefaultKeyEntropyMode = from.DefaultKeyEntropyMode;
            this.CacheIssuedTokens = from.CacheIssuedTokens;
            this.MaxIssuedTokenCachingTime = from.MaxIssuedTokenCachingTime;
            this.IssuedTokenRenewalThresholdPercentage = from.IssuedTokenRenewalThresholdPercentage;

#pragma warning suppress 56506 //[....]; from.ElementInformation.Properties[ConfigurationStrings.LocalIssuerIssuedTokenParameters] can never be null (underlying configuration system guarantees)
            if (PropertyValueOrigin.Default != from.ElementInformation.Properties[ConfigurationStrings.LocalIssuer].ValueOrigin)
            {
                this.LocalIssuer.Copy(from.LocalIssuer);
            }
#pragma warning suppress 56506 //[....]; from.ElementInformation.Properties[ConfigurationStrings.LocalIssuerChannelBehaviors] can never be null (underlying configuration system guarantees)
            if (PropertyValueOrigin.Default != from.ElementInformation.Properties[ConfigurationStrings.LocalIssuerChannelBehaviors].ValueOrigin)
            {
                this.LocalIssuerChannelBehaviors = from.LocalIssuerChannelBehaviors;
            }
#pragma warning suppress 56506 //[....]; from.ElementInformation.Properties[ConfigurationStrings.IssuerChannelBehaviors] can never be null (underlying configuration system guarantees)
            if (PropertyValueOrigin.Default != from.ElementInformation.Properties[ConfigurationStrings.IssuerChannelBehaviors].ValueOrigin)
            {
                foreach (IssuedTokenClientBehaviorsElement element in from.IssuerChannelBehaviors)
                {
                    this.IssuerChannelBehaviors.Add(element);
                }
            }
        }
 public void Copy(IssuedTokenClientElement from)
 {
     if (this.IsReadOnly())
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigReadOnly")));
     }
     if (from == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from");
     }
     this.DefaultKeyEntropyMode                 = from.DefaultKeyEntropyMode;
     this.CacheIssuedTokens                     = from.CacheIssuedTokens;
     this.MaxIssuedTokenCachingTime             = from.MaxIssuedTokenCachingTime;
     this.IssuedTokenRenewalThresholdPercentage = from.IssuedTokenRenewalThresholdPercentage;
     if (from.ElementInformation.Properties["localIssuer"].ValueOrigin != PropertyValueOrigin.Default)
     {
         this.LocalIssuer.Copy(from.LocalIssuer);
     }
     if (from.ElementInformation.Properties["localIssuerChannelBehaviors"].ValueOrigin != PropertyValueOrigin.Default)
     {
         this.LocalIssuerChannelBehaviors = from.LocalIssuerChannelBehaviors;
     }
     if (from.ElementInformation.Properties["issuerChannelBehaviors"].ValueOrigin != PropertyValueOrigin.Default)
     {
         foreach (IssuedTokenClientBehaviorsElement element in from.IssuerChannelBehaviors)
         {
             this.IssuerChannelBehaviors.Add(element);
         }
     }
 }