本文整理汇总了C#中ISet.AddAll方法的典型用法代码示例。如果您正苦于以下问题:C# ISet.AddAll方法的具体用法?C# ISet.AddAll怎么用?C# ISet.AddAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISet
的用法示例。
在下文中一共展示了ISet.AddAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessCertD
internal static PkixPolicyNode ProcessCertD(
PkixCertPath certPath,
int index,
ISet acceptablePolicies,
PkixPolicyNode validPolicyTree,
IList[] policyNodes,
int inhibitAnyPolicy)
//throws CertPathValidatorException
{
IList certs = certPath.Certificates;
X509Certificate cert = (X509Certificate)certs[index];
int n = certs.Count;
// i as defined in the algorithm description
int i = n - index;
//
// (d) policy Information checking against initial policy and
// policy mapping
//
Asn1Sequence certPolicies = null;
try
{
certPolicies = DerSequence.GetInstance(
PkixCertPathValidatorUtilities.GetExtensionValue(cert, X509Extensions.CertificatePolicies));
}
catch (Exception e)
{
throw new PkixCertPathValidatorException(
"Could not read certificate policies extension from certificate.", e, certPath, index);
}
if (certPolicies != null && validPolicyTree != null)
{
//
// (d) (1)
//
ISet pols = new HashSet();
foreach (Asn1Encodable ae in certPolicies)
{
PolicyInformation pInfo = PolicyInformation.GetInstance(ae.ToAsn1Object());
DerObjectIdentifier pOid = pInfo.PolicyIdentifier;
pols.Add(pOid.Id);
if (!Rfc3280CertPathUtilities.ANY_POLICY.Equals(pOid.Id))
{
ISet pq = null;
try
{
pq = PkixCertPathValidatorUtilities.GetQualifierSet(pInfo.PolicyQualifiers);
}
catch (PkixCertPathValidatorException ex)
{
throw new PkixCertPathValidatorException(
"Policy qualifier info set could not be build.", ex, certPath, index);
}
bool match = PkixCertPathValidatorUtilities.ProcessCertD1i(i, policyNodes, pOid, pq);
if (!match)
{
PkixCertPathValidatorUtilities.ProcessCertD1ii(i, policyNodes, pOid, pq);
}
}
}
if (acceptablePolicies.IsEmpty || acceptablePolicies.Contains(Rfc3280CertPathUtilities.ANY_POLICY))
{
acceptablePolicies.Clear();
acceptablePolicies.AddAll(pols);
}
else
{
ISet t1 = new HashSet();
foreach (object o in acceptablePolicies)
{
if (pols.Contains(o))
{
t1.Add(o);
}
}
acceptablePolicies.Clear();
acceptablePolicies.AddAll(t1);
}
//
// (d) (2)
//
if ((inhibitAnyPolicy > 0) || ((i < n) && PkixCertPathValidatorUtilities.IsSelfIssued(cert)))
{
foreach (Asn1Encodable ae in certPolicies)
{
PolicyInformation pInfo = PolicyInformation.GetInstance(ae.ToAsn1Object());
if (Rfc3280CertPathUtilities.ANY_POLICY.Equals(pInfo.PolicyIdentifier.Id))
{
ISet _apq = PkixCertPathValidatorUtilities.GetQualifierSet(pInfo.PolicyQualifiers);
IList _nodes = policyNodes[i - 1];
for (int k = 0; k < _nodes.Count; k++)
{
//.........这里部分代码省略.........
示例2: ExtractTerms
public override void ExtractTerms(ISet<Term> terms)
{
terms.AddAll(this.terms);
}
示例3: RecurseUpTree
/// <summary>
/// Recurse all the way up the tree until all referenced structures are found - in the order in which they are found
/// </summary>
/// <param name="getParentsFor">
/// The list of structures to get the parents for.
/// </param>
/// <param name="ignoreParents">
/// The list of structures to ignore the parents.
/// </param>
/// <param name="filterSet">
/// The filter set.
/// </param>
/// /// <returns>
/// The referenced structures.
/// </returns>
private IEnumerable<IMaintainableObject> RecurseUpTree(
IEnumerable<IMaintainableObject> getParentsFor,
ISet<IMaintainableObject> ignoreParents,
ISet<IMaintainableObject> filterSet)
{
var crossReferencingStructures = new List<IMaintainableObject>();
foreach (IMaintainableObject oldBean in getParentsFor)
{
crossReferencingStructures.AddAll(this._crossReferencingRetrievalManager.GetCrossReferencingStructures(oldBean.AsReference, false));
}
//Filter out the parents we do not want to reversion
crossReferencingStructures.RemoveItemList(ignoreParents);
this.FilterReferencingStructures(crossReferencingStructures, filterSet);
ignoreParents.AddAll(crossReferencingStructures);
if (crossReferencingStructures.Count > 0)
{
IEnumerable<IMaintainableObject> ancestors = this.RecurseUpTree(
crossReferencingStructures, ignoreParents, filterSet);
foreach (IMaintainableObject currentAncestor in ancestors)
{
if (!crossReferencingStructures.Contains(currentAncestor))
{
crossReferencingStructures.AddAll(ancestors);
}
}
}
return crossReferencingStructures;
}
示例4: AddRegistrations
public void AddRegistrations(ISet<IRegistrationObject> registrations0) {
if (registrations0 != null) {
registrations0.AddAll(this.registrations);
}
}