Exemplo n.º 1
0
 private void UseMethodValidators()
 {
     MethodValidators.AddRange(new IValidator <MethodDefinition>[]
     {
         new FloatOpsValidator(),
         new ArrayValidator(),
         new MultiDimArrayValidator(),
         new UncheckedMathValidator(),
     });
 }
Exemplo n.º 2
0
 private void UseMethodValidators()
 {
     MethodValidators.AddRange(new IValidator <MethodDefinition>[] {
         new FloatOpsValidator(),
         new ArrayValidator(),
         new MultiDimArrayValidator(),
         // TODO: Enable unchecked math validator once test cases are passing with overflow check
         // new UncheckedMathValidator(),
     });
 }
Exemplo n.º 3
0
        public ThirdPolicy()
        {
            Whitelist = new Whitelist();
            Whitelist.Namespace("System.Collections", Permission.Allowed);
            Whitelist.Namespace("System.OS", Permission.Denied);

            MethodValidators.AddRange(new IValidator <MethodDefinition>[]
            {
                new UncheckedMathValidator()
            });
        }
Exemplo n.º 4
0
        public SecondPolicy()
        {
            Whitelist = new Whitelist();
            Whitelist.Namespace("System.Linq", Permission.Allowed);
            Whitelist.Namespace("System.DateTime", Permission.Denied);

            MethodValidators.AddRange(new IValidator <MethodDefinition>[]
            {
                new MultiDimArrayValidator(),
            });
        }
Exemplo n.º 5
0
        public FirstPolicy()
        {
            Whitelist = new Whitelist();
            Whitelist.Namespace("System.Text", Permission.Allowed);
            Whitelist.Namespace("System.Random", Permission.Denied);

            MethodValidators.AddRange(new IValidator <MethodDefinition>[]
            {
                new ArrayValidator(),
                new FloatOpsValidator(),
            });
        }