public static Tuple <HWModuleCommutationType, BVTTestType, bool> MapCommutationType( ModuleCommutationType CommType, int Position) { var ct = (HWModuleCommutationType)CommType; switch (ct) { case HWModuleCommutationType.Reverse: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.Reverse, BVTTestType.Both, false)); case HWModuleCommutationType.Direct: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.Direct, BVTTestType.Both, true)); case HWModuleCommutationType.MT1: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MT1, BVTTestType.Both, true)); case HWModuleCommutationType.MD1: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MD1, BVTTestType.Reverse, false)); case HWModuleCommutationType.MT3: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MT3, BVTTestType.Both, true)); case HWModuleCommutationType.MD3: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MD3, BVTTestType.Reverse, false)); case HWModuleCommutationType.MTD3: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MTD3, (Position == 1) ? BVTTestType.Both : BVTTestType.Reverse, Position == 1)); case HWModuleCommutationType.MDT3: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MDT3, (Position == 1) ? BVTTestType.Reverse : BVTTestType.Both, Position != 1)); case HWModuleCommutationType.MT4: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MT4, BVTTestType.Both, true)); case HWModuleCommutationType.MD4: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MD4, BVTTestType.Reverse, false)); case HWModuleCommutationType.MTD4: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MTD4, (Position == 1) ? BVTTestType.Both : BVTTestType.Reverse, Position == 1)); case HWModuleCommutationType.MDT4: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MDT4, (Position == 1) ? BVTTestType.Reverse : BVTTestType.Both, Position != 1)); case HWModuleCommutationType.MT5: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MT5, BVTTestType.Both, true)); case HWModuleCommutationType.MD5: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MD5, BVTTestType.Reverse, false)); case HWModuleCommutationType.MTD5: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MTD5, (Position == 1) ? BVTTestType.Both : BVTTestType.Reverse, Position == 1)); case HWModuleCommutationType.MDT5: return (new Tuple <HWModuleCommutationType, BVTTestType, bool>( HWModuleCommutationType.MDT5, (Position == 1) ? BVTTestType.Reverse : BVTTestType.Both, Position != 1)); default: throw new ArgumentOutOfRangeException(nameof(CommType)); } }
public static HWModuleCommutationType MapCommutationType(ModuleCommutationType Arg) { return((HWModuleCommutationType)Arg); }