コード例 #1
0
        /// <inheritdoc/>
        public SmartContractValidationResult Validate(ModuleDefinition moduleDefinition)
        {
            ValidationPolicy policy = DeterminismPolicy.Default;
            var validator           = new ModulePolicyValidator(policy);
            IEnumerable <ValidationResult> validationResults = validator.Validate(moduleDefinition);

            return(new SmartContractValidationResult(validationResults));
        }
コード例 #2
0
        public SmartContractValidationResult Validate(ModuleDefinition moduleDefinition)
        {
            ValidationPolicy policy = ValidationPolicy.FromExisting(new[] { FormatPolicy.Default, DeterminismPolicy.Default });
            var validator           = new ModulePolicyValidator(policy);

            List <ValidationResult> results = validator.Validate(moduleDefinition).ToList();

            return(new SmartContractValidationResult(results));
        }
コード例 #3
0
        public SmartContractValidationResult Validate(ModuleDefinition moduleDefinition)
        {
            ValidationPolicy policy = FormatPolicy.Default;

            var validator = new ModulePolicyValidator(policy);

            List <ValidationResult> results = validator.Validate(moduleDefinition).ToList();

            return(new SmartContractValidationResult(results));
        }
コード例 #4
0
 public TypePolicyValidator(ValidationPolicy policy)
 {
     this.policy = policy;
 }
コード例 #5
0
 public ModulePolicyValidator(ValidationPolicy policy)
 {
     this.policy = policy;
     this.typePolicyValidator = new TypePolicyValidator(policy);
 }