Opc.Ua.DirectoryCertificateStore.Delete C# (CSharp) Method

Delete() public method

public Delete ( string thumbprint ) : Task
thumbprint string
return Task
        public Task<bool> Delete(string thumbprint)
        {
            lock (m_lock)
            {
                bool found = false;

                Entry entry = Find(thumbprint);

                if (entry != null)
                {
                    if (entry.PrivateKeyFile != null && entry.PrivateKeyFile.Exists)
                    {
                        entry.PrivateKeyFile.Delete();
                        found = true;
                    }

                    if (entry.CertificateFile != null && entry.CertificateFile.Exists)
                    {
                        entry.CertificateFile.Delete();
                        found = true;
                    }
                }

                if (found)
                {
                    m_lastDirectoryCheck = DateTime.MinValue;
                }

                return Task.FromResult(found);
            }
        }