public void Copy(X509DefaultServiceCertificateElement from)
 {
     if (this.IsReadOnly())
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigReadOnly")));
     }
     if (from == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from");
     }
     this.FindValue     = from.FindValue;
     this.StoreLocation = from.StoreLocation;
     this.StoreName     = from.StoreName;
     this.X509FindType  = from.X509FindType;
 }
        public void Copy(X509DefaultServiceCertificateElement from)
        {
            if (this.IsReadOnly())
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly)));
            }
            if (null == from)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from");
            }

            this.FindValue = from.FindValue;
            this.StoreLocation = from.StoreLocation;
            this.StoreName = from.StoreName;
            this.X509FindType = from.X509FindType;
        }
 public static X509Certificate2 CreateInstance(this X509DefaultServiceCertificateElement el)
 {
     return(CreateCertificateFrom(el.StoreLocation, el.StoreName, el.X509FindType, el.FindValue));
 }