コード例 #1
0
        public void EngineExecuteCode(IZeusCodeSegment segment, IZeusContext context)
        {
            bool assemblyLoaded = false;

            try
            {
                this.Cleanup();
                this._codeSegment = segment;

                assemblyLoaded = this.LoadAssembly(context);
                if (assemblyLoaded && !HasErrors)
                {
                    this._currentObject = InstantiateClass(CurrentAssembly, typeof(_DotNetScriptTemplate), context);

                    if (this._currentObject is _DotNetScriptTemplate)
                    {
                        this._primaryObject = this._currentObject as _DotNetScriptTemplate;
                        this._primaryObject.Render();
                    }
                    this._assemblyStack.Pop();
                    assemblyLoaded = false;
                }
            }
            catch (Exception ex)
            {
                this.Cleanup(assemblyLoaded);
                log.Error(ex);
                throw ex;
            }
        }
コード例 #2
0
 override public void Cleanup()
 {
     this._currentAssembly = null;
     this._interfaceObject = null;
     this._primaryObject   = null;
     this._currentObject   = null;
 }
コード例 #3
0
        protected void Cleanup(bool newAssemblyCreated)
        {
            _primaryObject   = null;
            _interfaceObject = null;
            _currentObject   = null;

            if (newAssemblyCreated)
            {
                this._assemblyStack.Pop();
            }
        }
コード例 #4
0
        override protected void EngineExecuteCode(ZeusCodeSegment segment, ZeusTemplateContext context)
        {
            try
            {
                this.Cleanup();
                this._codeSegment = segment;

                this._currentObject = InstantiateClass(this.CurrentAssembly, typeof(_DotNetScriptTemplate), context);

                if (this._currentObject is _DotNetScriptTemplate)
                {
                    this._primaryObject = this._currentObject as _DotNetScriptTemplate;
                    this._primaryObject.Render();
                }
            }
            catch (ZeusCompilerException ex)
            {
                ex.IsTemplateScript = true;
                throw ex;
            }
        }
コード例 #5
0
		public void EngineExecuteCode(IZeusCodeSegment segment, IZeusContext context)
		{
			bool assemblyLoaded = false;
			try 
			{
				this.Cleanup();
				this._codeSegment = segment;
			
				assemblyLoaded = this.LoadAssembly(context);
				if (assemblyLoaded && !HasErrors) 
				{
					this._currentObject = InstantiateClass( CurrentAssembly, typeof(_DotNetScriptTemplate), context );

					if (this._currentObject is _DotNetScriptTemplate)
					{
						this._primaryObject = this._currentObject as _DotNetScriptTemplate;
						this._primaryObject.Render();
					}
					this._assemblyStack.Pop();
					assemblyLoaded = false;
				}
			}
			catch (Exception ex)
			{
				this.Cleanup( assemblyLoaded );
				throw ex;
			}
        }
コード例 #6
0
		protected void Cleanup(bool newAssemblyCreated) 
		{
			_primaryObject = null;
			_interfaceObject = null;
			_currentObject = null;
			
			if (newAssemblyCreated)
			{
				this._assemblyStack.Pop();
			}
		}
コード例 #7
0
		override public void Cleanup() 
		{
			this._currentAssembly = null;
			this._interfaceObject = null;
			this._primaryObject = null;
			this._currentObject = null;
		}
コード例 #8
0
		override protected void EngineExecuteCode(ZeusCodeSegment segment, ZeusTemplateContext context)
		{
			try 
			{
				this.Cleanup();
				this._codeSegment = segment;
			
				this._currentObject = InstantiateClass( this.CurrentAssembly, typeof(_DotNetScriptTemplate), context );

				if (this._currentObject is _DotNetScriptTemplate)
				{
					this._primaryObject = this._currentObject as _DotNetScriptTemplate;
					this._primaryObject.Render();
				}
			}
			catch (ZeusCompilerException ex)
			{
				ex.IsTemplateScript = true;
				throw ex;
			}
		}