예제 #1
0
 // Token: 0x0600029D RID: 669 RVA: 0x0000C067 File Offset: 0x0000A267
 public void Merge(FaultDefinition source)
 {
     if (source != null)
     {
         this.MergeFaults(source);
         if (!this.IsFatalFailure)
         {
             this.IsFatalFailure = source.IsFatalFailure;
         }
     }
 }
예제 #2
0
        // Token: 0x0600029B RID: 667 RVA: 0x0000BEA4 File Offset: 0x0000A0A4
        public static FaultDefinition FromErrorString(string error, [CallerMemberName] string callerMember = null, [CallerFilePath] string callerFilePath = null, [CallerLineNumber] int callerLineNumber = 0)
        {
            FaultDefinition faultDefinition = new FaultDefinition();
            FaultRecord     faultRecord     = new FaultRecord();

            faultDefinition.Faults.TryAdd(faultRecord);
            faultRecord.Data["RC"]    = "0";
            faultRecord.Data["EFILE"] = callerFilePath;
            faultRecord.Data["EFUNC"] = callerMember;
            faultRecord.Data["ELINE"] = callerLineNumber.ToString();
            faultRecord.Data["TEX"]   = "false";
            faultRecord.Data["HEX"]   = "true";
            faultRecord.Data["EX"]    = error;
            faultRecord.Data["EXC"]   = string.Format("{0}:{1}:{2}", callerMember, callerLineNumber, error.GetHashCode());
            return(faultDefinition);
        }
예제 #3
0
        // Token: 0x0600029C RID: 668 RVA: 0x0000BF80 File Offset: 0x0000A180
        public static FaultDefinition FromException(Exception error, bool handled = true, bool transient = false, [CallerMemberName] string callerMember = null, [CallerFilePath] string callerFilePath = null, [CallerLineNumber] int callerLineNumber = 0)
        {
            FaultDefinition faultDefinition = new FaultDefinition();
            FaultRecord     faultRecord     = new FaultRecord();

            faultDefinition.Faults.TryAdd(faultRecord);
            faultRecord.Data["RC"]    = "0";
            faultRecord.Data["EFILE"] = callerFilePath;
            faultRecord.Data["EFUNC"] = callerMember;
            faultRecord.Data["ELINE"] = callerLineNumber.ToString();
            faultRecord.Data["TEX"]   = transient.ToString();
            faultRecord.Data["HEX"]   = handled.ToString();
            faultRecord.Data["EX"]    = string.Format("{0}", error);
            if (error != null)
            {
                faultRecord.Data["EXC"] = string.Format("{0}", error.GetType().Name);
            }
            return(faultDefinition);
        }