Opc.Ua.CertificateStoreIdentifier.CreateStore C# (CSharp) Method

CreateStore() public static method

Returns an object that can be used to access the store.
public static CreateStore ( string storeType ) : ICertificateStore
storeType string
return ICertificateStore
        public static ICertificateStore CreateStore(string storeType)
        {
            ICertificateStore store = null;

            if (String.IsNullOrEmpty(storeType))
            {
                return (ICertificateStore) new CertificateIdentifierCollection();
            }

            switch (storeType)
            {
                case CertificateStoreType.Directory:
                {
                    store = new DirectoryCertificateStore();
                    break;
                }
            }
            return store;
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Returns an object that can be used to access the store containing the certificate.
        /// </summary>
        /// <returns>An instance of the <see cref="ICertificateStore"/> poined out by the current value of </returns>
        public ICertificateStore OpenStore()
        {
            ICertificateStore store = CertificateStoreIdentifier.CreateStore(this.StoreType);

            store.Open(this.StorePath);
            return(store);
        }
All Usage Examples Of Opc.Ua.CertificateStoreIdentifier::CreateStore