Exemplo n.º 1
0
 public static void HashMembershipConditionCallMethods()
 {
     Policy.HashMembershipCondition hmc = new Policy.HashMembershipCondition(Cryptography.SHA1.Create(), new byte[1]);
     bool check = hmc.Check(new Policy.Evidence());
     Policy.IMembershipCondition obj = hmc.Copy();
     check = hmc.Equals(new object());
     int hash = hmc.GetHashCode();
     string str = hmc.ToString();
     SecurityElement se = new SecurityElement("");
     Policy.PolicyLevel pl = (Policy.PolicyLevel)Activator.CreateInstance(typeof(Policy.PolicyLevel), true);
     hmc.FromXml(se);
     hmc.FromXml(se, pl);
     se = hmc.ToXml();
     se = hmc.ToXml(pl);
 }
Exemplo n.º 2
0
        public static void HashMembershipConditionCallMethods()
        {
            Policy.HashMembershipCondition hmc = new Policy.HashMembershipCondition(Cryptography.SHA1.Create(), new byte[1]);
            bool check = hmc.Check(new Policy.Evidence());

            Policy.IMembershipCondition obj = hmc.Copy();
            check = hmc.Equals(new object());
            int             hash = hmc.GetHashCode();
            string          str  = hmc.ToString();
            SecurityElement se   = new SecurityElement("");

            Policy.PolicyLevel pl = (Policy.PolicyLevel)Activator.CreateInstance(typeof(Policy.PolicyLevel), true);
            hmc.FromXml(se);
            hmc.FromXml(se, pl);
            se = hmc.ToXml();
            se = hmc.ToXml(pl);
        }