public void Copy(X509ScopedServiceCertificateElement from)
 {
     if (this.IsReadOnly())
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigReadOnly")));
     }
     if (from == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from");
     }
     this.TargetUri = from.TargetUri;
     this.FindValue = from.FindValue;
     this.StoreLocation = from.StoreLocation;
     this.StoreName = from.StoreName;
     this.X509FindType = from.X509FindType;
 }
 public void Copy(X509ScopedServiceCertificateElement from)
 {
     if (this.IsReadOnly())
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigReadOnly")));
     }
     if (from == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from");
     }
     this.TargetUri     = from.TargetUri;
     this.FindValue     = from.FindValue;
     this.StoreLocation = from.StoreLocation;
     this.StoreName     = from.StoreName;
     this.X509FindType  = from.X509FindType;
 }
 public static X509Certificate2 CreateInstance(this X509ScopedServiceCertificateElement el)
 {
     return(CreateCertificateFrom(el.StoreLocation, el.StoreName, el.X509FindType, el.FindValue));
 }