Пример #1
0
        public void ExtractScriptOperands()
        {
            if (scriptOperands.Count == 0)
            {
                object lockItUp = new object();
                foreach (var item in AssemblyManager.Instance.GetLoadedAssemblies())
                {
                    foreach (Type objType in item.ExportedTypes)
                    {
                        if (((objType.Attributes & TypeAttributes.Abstract) != TypeAttributes.Abstract))
                        {
                            //See if this type implements our interface
                            Type objInterface = objType.GetInterface("IXapEvaluationEngineOperand", true);

                            if ((objInterface != null))
                            {
                                IXapEvaluationEngineOperand _obj = AssemblyManager.Instance.CreateInstance <IXapEvaluationEngineOperand>("Xap.Evaluation.Engine.Rules.XapOperands");
                                lock (lockItUp) {
                                    scriptOperands.AddOperand(_obj.ToString(), new ScriptOperand(_obj.ToString(), _obj));
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #2
0
 public ScriptOperand(string operandName, IXapEvaluationEngineOperand engineOperand)
 {
     _operandName   = operandName;
     _engineOperand = engineOperand;
     ExtractOperandMethods();
 }