protected ExtendedProtectionPolicy(SerializationInfo info, StreamingContext context)
 {
     this.policyEnforcement  = (System.Security.Authentication.ExtendedProtection.PolicyEnforcement)info.GetInt32("policyEnforcement");
     this.protectionScenario = (System.Security.Authentication.ExtendedProtection.ProtectionScenario)info.GetInt32("protectionScenario");
     this.customServiceNames = (ServiceNameCollection)info.GetValue("customServiceNames", typeof(ServiceNameCollection));
     byte[] source = (byte[])info.GetValue("customChannelBinding", typeof(byte[]));
     if (source != null)
     {
         this.customChannelBinding = SafeLocalFreeChannelBinding.LocalAlloc(source.Length);
         Marshal.Copy(source, 0, this.customChannelBinding.DangerousGetHandle(), source.Length);
     }
 }
 public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, ServiceNameCollection customServiceNames)
 {
     if (policyEnforcement == System.Security.Authentication.ExtendedProtection.PolicyEnforcement.Never)
     {
         throw new ArgumentException(SR.GetString("security_ExtendedProtectionPolicy_UseDifferentConstructorForNever"), "policyEnforcement");
     }
     if ((customServiceNames != null) && (customServiceNames.Count == 0))
     {
         throw new ArgumentException(SR.GetString("security_ExtendedProtectionPolicy_NoEmptyServiceNameCollection"), "customServiceNames");
     }
     this.policyEnforcement  = policyEnforcement;
     this.protectionScenario = protectionScenario;
     this.customServiceNames = customServiceNames;
 }
 public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, ChannelBinding customChannelBinding)
 {
     if (policyEnforcement == System.Security.Authentication.ExtendedProtection.PolicyEnforcement.Never)
     {
         throw new ArgumentException(SR.GetString("security_ExtendedProtectionPolicy_UseDifferentConstructorForNever"), "policyEnforcement");
     }
     if (customChannelBinding == null)
     {
         throw new ArgumentNullException("customChannelBinding");
     }
     this.policyEnforcement    = policyEnforcement;
     this.protectionScenario   = System.Security.Authentication.ExtendedProtection.ProtectionScenario.TransportSelected;
     this.customChannelBinding = customChannelBinding;
 }
 public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, System.Security.Authentication.ExtendedProtection.ServiceNameCollection customServiceNames)
 {
 }
 public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, ICollection customServiceNames) : this(policyEnforcement, protectionScenario, (customServiceNames == null) ? null : new ServiceNameCollection(customServiceNames))
 {
 }
 public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement)
 {
     this.policyEnforcement  = policyEnforcement;
     this.protectionScenario = System.Security.Authentication.ExtendedProtection.ProtectionScenario.TransportSelected;
 }