void FillNodes(CertificateState filter) { MMCActionHelper.CheckedExec(delegate() { this.ResultNodes.Clear(); var serverDTO = (ScopeNode.Parent as ChildScopeNode).ServerDTO; if ((int)filter == -1) { if (serverDTO.PrivateCertificates != null) { foreach (var dto in serverDTO.PrivateCertificates) { AddCert(dto.Certificate.GetX509Certificate2FromString()); } } } else { using (var context = new VMCAEnumContext(serverDTO.VMCAClient, filter)) { foreach (var cert in context.GetCertificates()) { AddCert(cert); } } } }); }
void FillCache(int itemIndex) { if (_viewCache.ContainsKey(itemIndex)) { return; } MMCActionHelper.CheckedExec(delegate { var list = _context.GetCertificates(); if (list != null) { int i = 0; foreach (var dto in list) { _viewCache[itemIndex + i] = dto; i++; if (i == 40) { break; } } lstCertDetails.VirtualListSize = _viewCache.Count; } }); }
public void FillExpiredCertsList() { UIErrorHelper.CatchAndThrow(delegate() { using (var context = new VMCAEnumContext(this.ServerDTO.VMCAClient, VMCA.CertificateState.Expired)) { foreach (var cert in context.GetCertificates()) { ExpiredCertsList.Add(cert); } } }); }