public void Free() { Debug.WriteLine(m_DisplayName + ".Free()", "Entered:"); m_CalcToolProvider = null; m_moonConfiguredVector = null; m_sunConfiguredVector = null; Debug.WriteLine(m_DisplayName + ".Free()", "Exited:"); }
public void Free() { try { Debug.WriteLine("--> Entered", this.m_Name + ".Free()"); if (this.m_UPS != null) { if (this.m_MsgStatus) { this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Free():"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Free(): PreNextCntr( " + this.m_PreNextCntr + " )"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Free(): EvalCntr( " + this.m_EvalCntr + " )"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Free(): PostEvalCntr( " + this.m_PostEvalCntr + " )"); } Marshal.ReleaseComObject(this.m_UPS); } this.m_UPS = null; if (this.m_SPS != null) { Marshal.ReleaseComObject(this.m_SPS); } this.m_SPS = null; if (this.m_CPP != null) { Marshal.ReleaseComObject(this.m_CPP); } this.m_CPP = null; if (this.m_CCV != null) { Marshal.ReleaseComObject(this.m_CCV); } this.m_CCV = null; } catch (Exception ex) { if (this.m_UPS != null) { this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgAlarm, this.m_Name + ".Free(): Exception Message( " + ex.Message + " )"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgAlarm, this.m_Name + ".Free(): Exception StackTr( " + ex.StackTrace + " )"); } Debug.WriteLine("Exception Message( " + ex.Message + " )", this.m_Name + ".Free()"); Debug.WriteLine("Exception StackTr( " + ex.StackTrace + " )", this.m_Name + ".Free()"); } finally { Debug.WriteLine("<-- Exited", this.m_Name + ".Free()"); } }
public bool Reset(AgCrdnVectorPluginResultReset Result) { string objPath = "[" + Result.ObjectPath + "]"; Debug.WriteLine(m_DisplayName + ".Reset()", "Entered:"); m_CalcToolProvider = Result.CalcToolProvider; m_VectorToolProvider = Result.VectorToolProvider; m_moonConfiguredVector = m_VectorToolProvider.ConfigureVector("Moon", "<MyObject>", "ICRF", "<MyObject>"); m_sunConfiguredVector = m_VectorToolProvider.ConfigureVector("Sun", "<MyObject>", "ICRF", "<MyObject>"); Debug.WriteLine(m_DisplayName + ".Reset()", "Exited:"); return(true); }
public Example1() : base() { try { Debug.WriteLine("--> Entered", this.m_Name + ".Example1()"); this.SetAttributeConfigDefaults(); this.m_UPS = null; this.m_SPS = null; this.m_CPP = null; this.m_CCV = null; this.m_SRPArea = 0.0; this.m_PreNextCntr = 0; // CLR initializes to zero, but do it anyways. this.m_EvalCntr = 0; // CLR initializes to zero, but do it anyways. this.m_PostEvalCntr = 0; // CLR initializes to zero, but do it anyways. this.m_SrpIsOn = false; } finally { Debug.WriteLine("<-- Exited", this.m_Name + ".Example1()"); } }
public bool Init(IAgUtPluginSite Ups) { try { Debug.WriteLine("--> Entered", this.m_Name + ".Init()"); this.m_UPS = Ups; if (this.m_UPS != null) { if (this.m_Enabled) { m_SPS = this.m_UPS as IAgStkPluginSite; if (this.m_SPS != null) { this.m_CPP = this.m_SPS.VectorToolProvider; if (this.m_CPP != null) { this.m_CCV = this.m_CPP.ConfigureVector(this.m_VectorName, "", "J2000", "CentralBody/Earth"); } if (this.m_MsgStatus) { this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init():"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): AccelRefFrame( " + this.AccelRefFrame + " )"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): AccelX( " + this.m_AccelX + " )"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): AccelY( " + this.m_AccelY + " )"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): AccelZ( " + this.m_AccelZ + " )"); } if (this.m_CCV == null) { this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Could not obtain " + m_VectorName); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Turning off the computation of SRP Area"); } } else { this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Could not obtain IAgStkPluginSite from" + this.m_UPS.SiteName); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Turning off the computation of SRP Area"); } } else { if (this.m_MsgStatus) { this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Disabled"); } } } else { throw new Exception("UtPluginSite was null"); } } catch (Exception ex) { this.m_Enabled = false; if (this.m_UPS != null) { this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgAlarm, this.m_Name + ".Init(): Exception Message( " + ex.Message + " )"); this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgAlarm, this.m_Name + ".Init(): Exception StackTr( " + ex.StackTrace + " )"); } Debug.WriteLine("Exception Message( " + ex.Message + " )", this.m_Name + ".Init()"); Debug.WriteLine("Exception StackTr( " + ex.StackTrace + " )", this.m_Name + ".Init()"); } finally { Debug.WriteLine("<-- Exited", this.m_Name + ".Init()"); } return(this.m_Enabled); }