Exemple #1
0
 internal SetScriptBase(SetScriptConstructor constructor, IFunction<Element> appliesTo, string property)
 {
     m_constructor = constructor;
     m_worldModel = constructor.WorldModel;
     AppliesTo = appliesTo;
     Property = property;
 }
Exemple #2
0
        public ScriptFactory(WorldModel worldModel)
        {
            m_worldModel = worldModel;

            // Use Reflection to create instances of all IScriptConstructors
            foreach (Type t in AxeSoftware.Utility.Classes.GetImplementations(System.Reflection.Assembly.GetExecutingAssembly(),
                typeof(IScriptConstructor)))
            {
                AddConstructor((IScriptConstructor)Activator.CreateInstance(t));
            }

            m_setConstructor = (SetScriptConstructor)InitScriptConstructor(new SetScriptConstructor());
            m_procConstructor = (FunctionCallScriptConstructor)InitScriptConstructor(new FunctionCallScriptConstructor());
        }
Exemple #3
0
 public SetScriptScript(SetScriptConstructor constructor, IFunction<Element> appliesTo, string property, IScript script)
     : base(constructor, appliesTo, property)
 {
     m_script = script;
     m_scriptFactory = constructor.ScriptFactory;
 }
Exemple #4
0
 public SetExpressionScript(SetScriptConstructor constructor, IFunction<Element> appliesTo, string property, Expression<object> expr)
     : base(constructor, appliesTo, property)
 {
     m_expr = expr;
 }