public static IRC Create(RcTypes type, RcKey key) { switch (type) { case RcTypes.RC4: return(new RC4Function(key)); case RcTypes.RCX: return(new RCXFunction(key)); case RcTypes.RCY: return(new RCYFunction(key)); case RcTypes.ThreeRCX: return(new ThreeRCXFunction(key)); case RcTypes.ThreeRCY: return(new ThreeRCYFunction(key)); default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } }
public static IRC Create(RcTypes type, RcKey key) => Factory.Create(type, key);