Aspectacular.SqlCmdExecutionPlanAspect.Step_2_BeforeTryingMethodExec C# (CSharp) 메소드

Step_2_BeforeTryingMethodExec() 공개 메소드

public Step_2_BeforeTryingMethodExec ( ) : void
리턴 void
        public override void Step_2_BeforeTryingMethodExec()
        {
            if(this.Proxy.AugmentedClassInstance == null)
                return;

            this.command = this.cmdRetriever(this.Proxy.AugmentedClassInstance);
            if(this.command == null)
                return;

            if(this.command.Connection == null)
                throw new Exception("SQL command should have its Connection specified in order for Execution Plan aspect to work.");

            if(this.command.Connection.State == ConnectionState.Open)
                this.OnConnectionOpened();
            else
                this.command.Connection.StateChange += this.OnConnectionStateChange;
        }