public override void SendValue(ValueMessage VM) { if (VM.Value == null) { Console.WriteLine("LOG: " + GetIndentString() + String.Format("{0} = NULL", VM.Message)); } else { Console.WriteLine("LOG: " + GetIndentString() + String.Format("{0} = '{1}'", VM.Message, VM.Value.ToString())); } }
public void SendValue(string Message, object Value) { ValueMessage VM = new ValueMessage(); VM.InitializeNewMessage(); VM.Message = Message; VM.Value = Value; foreach (Destination d in _Destins) { d.SendValue(VM); } }
public abstract void SendValue(ValueMessage VM);
public override void SendValue(ValueMessage VM) { if (VM.Value == null) { Output.WriteLine("{0}{1} {2} = **NULL**", VM.UTCTime.ToString("dd-MM-yyyy") + " " + VM.UTCTime.ToLongTimeString(), GetIndentString(), VM.Message); } else { ArrayList TempArray = new ArrayList(VM.Value.ToString().Split('\r', '\n')); string TempString = new String(' ', VM.UTCTime.ToString("dd-MM-yyyy").Length + 1 + VM.UTCTime.ToLongTimeString().Length); TempString += ""; TempString += GetIndentString(); TempString += " " + new String(' ', VM.Message.Length) + " "; Output.WriteLine("{0}{1} {2} = '{3}'", VM.UTCTime.ToString("dd-MM-yyyy") + " " + VM.UTCTime.ToLongTimeString(), GetIndentString(), VM.Message, TempArray[0].ToString()); TempArray.RemoveAt(0); foreach (String s in TempArray) { if (s.Trim('\r', '\n').Length != 0) { Output.WriteLine("{0} '{1}'", TempString, s); } } } }