public void Log(Agent pAgent) { //BEHAVIAC_ASSERT(this.m_changed); string valueStr = StringUtils.ToString(this.m_value); string typeName = ""; if (!Object.ReferenceEquals(this.m_value, null)) { typeName = Utils.GetNativeTypeName(this.m_value.GetType()); } else { typeName = "Agent"; } string full_name = this.m_name; if (!Object.ReferenceEquals(pAgent, null)) { CMemberBase pMember = pAgent.FindMember(this.m_name); if (pMember != null) { string classFullName = pMember.GetClassNameString().Replace(".", "::"); full_name = string.Format("{0}::{1}", classFullName, this.m_name); } } LogManager.Log(pAgent, typeName, full_name, valueStr); #if !BEHAVIAC_RELEASE this.m_changed = false; #endif }
public void LogVarValue(Agent pAgent, string name, object value) { #if !BEHAVIAC_RELEASE if (Config.IsLoggingOrSocketing) { string valueStr = StringUtils.ToString(value); string typeName = ""; if (!Object.ReferenceEquals(value, null)) { typeName = Utils.GetNativeTypeName(value.GetType()); } else { typeName = "Agent"; } string full_name = name; if (!Object.ReferenceEquals(pAgent, null)) { CMemberBase pMember = pAgent.FindMember(name); if (pMember != null) { string classFullName = pMember.GetClassNameString().Replace(".", "::"); full_name = string.Format("{0}::{1}", classFullName, name); } } LogManager.Instance.Log(pAgent, typeName, full_name, valueStr); } #endif }
public void Log(Agent pAgent) { string value = StringUtils.ToString(this.m_value); string typeName = string.Empty; if (!object.ReferenceEquals(this.m_value, null)) { typeName = Utils.GetNativeTypeName(this.m_value.GetType()); } else { typeName = "Agent"; } string varName = this.m_name; if (!object.ReferenceEquals(pAgent, null)) { CMemberBase cMemberBase = pAgent.FindMember(this.m_name); if (cMemberBase != null) { string text = cMemberBase.GetClassNameString().Replace(".", "::"); varName = string.Format("{0}::{1}", text, this.m_name); } } LogManager.Log(pAgent, typeName, varName, value); }