/// <summary> /// Creates a bug trace step. /// </summary> /// <param name="index">Index</param> /// <param name="type">BugTraceStepType</param> /// <param name="machine">Machine</param> /// <param name="machineState">MachineState</param> /// <param name="eventInfo">EventInfo</param> /// <param name="action">MethodInfo</param> /// <param name="targetMachine">Target machine</param> /// <param name="boolChoice">Boolean choice</param> /// <param name="intChoice">Integer choice</param> /// <param name="extraInfo">Extra info</param> /// <returns>BugTraceStep</returns> internal static BugTraceStep Create(int index, BugTraceStepType type, MachineId machine, string machineState, EventInfo eventInfo, MethodInfo action, MachineId targetMachine, bool?boolChoice, int?intChoice, string extraInfo) { var traceStep = new BugTraceStep(); traceStep.Index = index; traceStep.Type = type; traceStep.Machine = machine; traceStep.MachineState = machineState; traceStep.EventInfo = eventInfo; if (action != null) { traceStep.InvokedAction = action.Name; } traceStep.TargetMachine = targetMachine; traceStep.RandomBooleanChoice = boolChoice; traceStep.RandomIntegerChoice = intChoice; traceStep.ExtraInfo = extraInfo; traceStep.Previous = null; traceStep.Next = null; return(traceStep); }
/// <summary> /// Creates a bug trace step. /// </summary> /// <param name="index">Index</param> /// <param name="type">BugTraceStepType</param> /// <param name="machine">Machine</param> /// <param name="machineState">MachineState</param> /// <param name="eventInfo">EventInfo</param> /// <param name="action">MethodInfo</param> /// <param name="targetMachine">Target machine</param> /// <param name="boolChoice">Boolean choice</param> /// <param name="intChoice">Integer choice</param> /// <param name="extraInfo">Extra info</param> /// <returns>BugTraceStep</returns> internal static BugTraceStep Create(int index, BugTraceStepType type, MachineId machine, string machineState, EventInfo eventInfo, MethodInfo action, MachineId targetMachine, bool? boolChoice, int? intChoice, string extraInfo) { var traceStep = new BugTraceStep(); traceStep.Index = index; traceStep.Type = type; traceStep.Machine = machine; traceStep.MachineState = machineState; traceStep.EventInfo = eventInfo; if (action != null) { traceStep.InvokedAction = action.Name; } traceStep.TargetMachine = targetMachine; traceStep.RandomBooleanChoice = boolChoice; traceStep.RandomIntegerChoice = intChoice; traceStep.ExtraInfo = extraInfo; traceStep.Previous = null; traceStep.Next = null; return traceStep; }