//We pass the variables as parameter to avoid global state. (This facilitates concurrent execution)
        public GenObj GetValue(object fieldName, Dictionary <string, object> variables)
        {
            if (fieldName != null && variables.ContainsKey(fieldName.ToString()))
            {
                return(GenObj.GetGenObj(variables[fieldName.ToString()].ToTrimmedUpperStr()));
            }

            return(GenObj.GetGenObj(null));
        }
Exemplo n.º 2
0
        public static GenObj GetGenObj(object val)
        {
            if (val is GenObj)
            {
                return((GenObj)val);
            }
            GenObj obj = new GenObj();

            obj.value = val;
            return(obj);
        }
Exemplo n.º 3
0
 public static GenObj GetGenObj(object val)
 {
     if (val is GenObj)
         return (GenObj)val;
     GenObj obj = new GenObj();
     obj.value = val;
     return obj;
 }
Exemplo n.º 4
0
 public static bool operator !=(double left, GenObj right)
 {
     return(!AreEquals(GenObj.GetGenObj(left).AsDouble(), GenObj.GetGenObj(right).AsDouble()));
 }
Exemplo n.º 5
0
 public static bool operator ==(GenObj left, double right)
 {
     return(AreEquals(GenObj.GetGenObj(left).AsDouble(), GenObj.GetGenObj(right).AsDouble()));
 }
Exemplo n.º 6
0
 public static bool operator !=(string obj1, GenObj obj2)
 {
     return(!AreEquals(GenObj.GetGenObj(obj1), obj2));
 }
Exemplo n.º 7
0
 public static bool operator !=(bool left, GenObj right)
 {
     return(!AreEquals(GenObj.GetGenObj(left), right));
 }
Exemplo n.º 8
0
 public static bool operator !=(GenObj left, bool right)
 {
     return(!AreEquals(left, GenObj.GetGenObj(right)));
 }