Ejemplo n.º 1
0
        public static JSBCollection FromCollection(IEnumerable collection)
        {
            JSBCollection col = new JSBCollection();

            foreach (object obj in collection)
            {
                col.Collection.Add(JSBObject.FromAnonymous(obj));
            }
            return(col);
        }
Ejemplo n.º 2
0
        public JSBAssignOperation(string name, object obj)
        {
            Type = JSBOperations.Asignment;

            VariableName = name;

            Type t = obj.GetType();

            if (!t.IsObject())
            {
                VariableValue = obj;
                IsValueType   = true;
            }
            else if (obj.GetType() != typeof(JSBObject))
            {
                VariableValue = JSBObject.FromAnonymous(obj);
            }
            else
            {
                VariableValue = (JSBObject)obj;
            }
        }