internal SecureConversationServiceCredential(SecureConversationServiceCredential other)
 {
     this.securityStateEncoder = other.securityStateEncoder;
     this.securityContextClaimTypes = new Collection<Type>();
     for (int i = 0; i < other.securityContextClaimTypes.Count; i++)
     {
         this.securityContextClaimTypes.Add(other.securityContextClaimTypes[i]);
     }
     this.isReadOnly = other.isReadOnly;
 }
 internal SecureConversationServiceCredential(SecureConversationServiceCredential other)
 {
     this.securityStateEncoder      = other.securityStateEncoder;
     this.securityContextClaimTypes = new Collection <Type>();
     for (int i = 0; i < other.securityContextClaimTypes.Count; i++)
     {
         this.securityContextClaimTypes.Add(other.securityContextClaimTypes[i]);
     }
     this.isReadOnly = other.isReadOnly;
 }
 public ServiceCredentials()
 {
     this.userName = new UserNamePasswordServiceCredential();
     this.clientCertificate = new X509CertificateInitiatorServiceCredential();
     this.serviceCertificate = new X509CertificateRecipientServiceCredential();
     this.windows = new WindowsServiceCredential();
     this.issuedToken = new IssuedTokenServiceCredential();
     this.peer = new PeerCredential();
     this.secureConversation = new SecureConversationServiceCredential();
 }
 protected ServiceCredentials(ServiceCredentials other)
 {
     if (other == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("other");
     }
     this.userName = new UserNamePasswordServiceCredential(other.userName);
     this.clientCertificate = new X509CertificateInitiatorServiceCredential(other.clientCertificate);
     this.serviceCertificate = new X509CertificateRecipientServiceCredential(other.serviceCertificate);
     this.windows = new WindowsServiceCredential(other.windows);
     this.issuedToken = new IssuedTokenServiceCredential(other.issuedToken);
     this.peer = new PeerCredential(other.peer);
     this.secureConversation = new SecureConversationServiceCredential(other.secureConversation);
 }
 internal void ApplyConfiguration(SecureConversationServiceCredential secureConversation)
 {
     if (secureConversation == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("secureConversation");
     }
     if (!string.IsNullOrEmpty(this.SecurityStateEncoderType))
     {
         Type c = Type.GetType(this.SecurityStateEncoderType, true);
         if (!typeof(SecurityStateEncoder).IsAssignableFrom(c))
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigInvalidSecurityStateEncoderType", new object[] { this.SecurityStateEncoderType, typeof(SecurityStateEncoder).ToString() })));
         }
         secureConversation.SecurityStateEncoder = (SecurityStateEncoder) Activator.CreateInstance(c);
     }
 }