Ejemplo n.º 1
0
        private void CollectionRegistry_OnItemAdded(string key, Collections.ICollection value)
        {
            if (key == GetComponent <PUN2EquipmentCollectionCreator>()?.CollectionName)
            {
                CollectionRegistry.byName.OnAddedItem       -= CollectionRegistry_OnItemAdded;
                ServerCollectionRegistry.byName.OnAddedItem -= CollectionRegistry_OnItemAdded;

                DoInit();
            }
        }
Ejemplo n.º 2
0
        // taken from bouncy castle SignedDataTest.cs
        private static bool VerifySignatures(CmsSignedData sp)
        {
            var signaturesValid = true;

            Org.BouncyCastle.X509.Store.IX509Store x509Certs = sp.GetCertificates("Collection");
            SignerInformationStore signers = sp.GetSignerInfos();

            foreach (SignerInformation signer in signers.GetSigners())
            {
                Collections.ICollection certCollection = x509Certs.GetMatches(signer.SignerID);

                Collections.IEnumerator certEnum = certCollection.GetEnumerator();
                certEnum.MoveNext();
                Org.BouncyCastle.X509.X509Certificate cert = (Org.BouncyCastle.X509.X509Certificate)certEnum.Current;

                signaturesValid &= signer.Verify(cert);
            }

            return(signaturesValid);
        }
Ejemplo n.º 3
0
 public Vendor(VendorConfig config, Collections.ICollection <IVendorProduct <T> > collection, ICurrencyCollection <ICurrency, double> currencies = null)
 {
     this.config      = config;
     vendorCollection = collection;
     vendorCurrencies = currencies ?? new InfiniteCurrencyCollection();
 }