hMailServer.Administrator.ucSSLCertificates.LoadList C# (CSharp) Method

LoadList() protected method

protected LoadList ( ) : void
return void
        protected override void LoadList()
        {
            listObjects.Items.Clear();

            hMailServer.Application app = APICreator.Application;
            hMailServer.Settings settings = app.Settings;
            hMailServer.SSLCertificates sslCertificates = settings.SSLCertificates;

            for (int i = 0; i < sslCertificates.Count; i++)
            {
                hMailServer.SSLCertificate sslCertificate = sslCertificates[i];
                ListViewItem item = listObjects.Items.Add(sslCertificate.Name);
                item.Tag = sslCertificate.ID;
                Marshal.ReleaseComObject(sslCertificate);
            }

            Marshal.ReleaseComObject(settings);
            Marshal.ReleaseComObject(sslCertificates);
        }