Exemplo n.º 1
0
        public static RuleElement Random()
        {
            var i = Aids.GetRandom.Int32() % 8;

            switch (i)
            {
            case 1:
                return(Operator.Random());

            case 2:
                return(BooleanVariable.Random());

            case 3:
                return(IntegerVariable.Random());

            case 4:
                return(DoubleVariable.Random());

            case 5:
                return(DecimalVariable.Random());

            case 6:
                return(DateTimeVariable.Random());

            case 7:
                return(StringVariable.Random());

            default:
                return(Operand.Random());
            }
        }
Exemplo n.º 2
0
        public static Operand GetRandomInherited()
        {
            var i = Aids.GetRandom.Int32() % 6;

            switch (i)
            {
            case 1:
                return(BooleanVariable.Random());

            case 2:
                return(IntegerVariable.Random());

            case 3:
                return(DoubleVariable.Random());

            case 4:
                return(DateTimeVariable.Random());

            case 5:
                return(DecimalVariable.Random());

            default:
                return(StringVariable.Random());
            }
        }
Exemplo n.º 3
0
        public new static DoubleVariable Random()
        {
            var x = new DoubleVariable();

            x.SetRandomValues();
            return(x);
        }