Exemplo n.º 1
0
        public void Write(Diagnosis diagnosis)
        {
            if (Severity.Error <= this.SeverityFilter)
            {
                lock (_syncState)
                {
                    string diagnosisErrorMsg = "";
                    diagnosisErrorMsg += "Application code: " + diagnosis.ApplicationCode;
                    diagnosisErrorMsg += Environment.NewLine;
                    diagnosisErrorMsg += "Message: " + diagnosis.Message;
                    diagnosisErrorMsg += Environment.NewLine;
                    diagnosisErrorMsg += "PayloadPath: " + diagnosis.PayloadPath;
                    diagnosisErrorMsg += Environment.NewLine;
                    diagnosisErrorMsg += "SdataCode: " + diagnosis.SdataCode.ToString();
                    diagnosisErrorMsg += Environment.NewLine;
                    diagnosisErrorMsg += "Severity: " + diagnosis.Severity.ToString();
                    diagnosisErrorMsg += Environment.NewLine;

                    if (this.SeverityFilter >= Severity.Trace)
                    {
                        diagnosisErrorMsg += "StackTrace: " + diagnosis.StackTrace;
                        diagnosisErrorMsg += Environment.NewLine;
                    }
                    _syncState.ErrorMsg = diagnosisErrorMsg;
                }
            }
        }
Exemplo n.º 2
0
 public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     this.Diagnosis = (Diagnosis)info.GetValue("diagnosis", typeof(Diagnosis));
     base.GetObjectData(info, context);
 }
Exemplo n.º 3
0
 public SdataException(Diagnosis diagnosis)
     : base(diagnosis.Message)
 {
     this.Diagnosis = diagnosis;
 }
 public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     this.Diagnosis = (Diagnosis)info.GetValue("diagnosis", typeof(Diagnosis));
     base.GetObjectData(info, context);
 }
 public SdataException(Diagnosis diagnosis)
     : base(diagnosis.Message)
 {
     this.Diagnosis = diagnosis;
 }
Exemplo n.º 6
0
 public void Write(Diagnosis diagnosis)
 {
 }