Пример #1
0
        public void Run(KScriptContainer container, string args, KScriptObject Pobj)
        {
            if (!Ignore && container.AllowExecution)
            {
                try
                {
                    try
                    {
                        if (GetValue().GetValidationType() != KScriptObject.ValidationTypes.BEFORE_PARSING)
                        {
                            GetValue().Validate();
                        }

                        if (GetValue().GetType().IsAssignableFrom(typeof(KScriptIDObject)))
                        {
                            KScriptIDObject val = (KScriptIDObject)GetValue();
                            Value = container.GetObjectStorageContainer().GetObjectFromUID <KScriptIDObject>(val.id);
                        }
                        else
                        {
                            GetValue().SetBaseScriptObject(Pobj);
                            GetValue().Run();
                        }
                    }
                    catch (KScriptExceptions.KScriptSkipScriptObject) { }
                }
                catch (System.Exception ex)
                {
                    container.HandleException(GetValue(), ex);
                }
            }
        }
Пример #2
0
        public override void Execute(KScriptObject obj, List <IKScriptDocumentNode> Nodes, KScriptContainer Container)
        {
            KScriptMethodWrapper objX = obj as KScriptMethodWrapper;

            Container.GetObjectStorageContainer().Add(Global.GlobalIdentifiers.CALLS, objX, objX.name, Nodes);
        }
        public override void Execute(KScriptObject obj, List <IKScriptDocumentNode> Nodes, KScriptContainer Container)
        {
            KScriptExceptionWrapper objX = obj as KScriptExceptionWrapper;

            Container.GetObjectStorageContainer().Add(Global.GlobalIdentifiers.EXCEPTIONS, objX, objX.type, Nodes);
        }