/// <summary> /// Create a new InjectionMethod based on the specified MethodType /// </summary> /// <param name="type">Type of injection method to be created</param> /// <returns>A valid InjectionMethod instance if the 'type' parameter was valid, null otherwise</returns> public static InjectionMethod Create(InjectionMethodType type) { /** FACTORY CREATION **/ // So that I never have to expose individual classes to the library user. // the Create method will serve up the most appropriate InjectionMethod implementation, // and this makes it easier to hand out new versions of the library without worrying about // changing internal class names or adding new classes, etc. InjectionMethod method; switch (type) { case InjectionMethodType.ManualMap: method = new ManualMap(); break; case InjectionMethodType.Standard: method = new CRTInjection(); break; case InjectionMethodType.ThreadHijack: method = new ThreadHijack(); break; default: return(null); } if (method != null) { method.Type = type; } return(method); }
// Token: 0x06000109 RID: 265 RVA: 0x0000C9E8 File Offset: 0x0000ABE8 public static InjectionMethod Create(InjectionMethodType type) { InjectionMethod injectionMethod; switch (type) { case InjectionMethodType.Standard: injectionMethod = new CRTInjection(); break; case InjectionMethodType.ThreadHijack: injectionMethod = new ThreadHijack(); break; case InjectionMethodType.ManualMap: injectionMethod = new ManualMap(); break; default: return(null); } if (injectionMethod != null) { injectionMethod.Type = type; } return(injectionMethod); }
/// <summary> /// Create a new InjectionMethod based on the specified MethodType /// </summary> /// <param name="type">Type of injection method to be created</param> /// <returns>A valid InjectionMethod instance if the 'type' parameter was valid, null otherwise</returns> public static InjectionMethod Create(InjectionMethodType type) { /** FACTORY CREATION **/ // So that I never have to expose individual classes to the library user. // the Create method will serve up the most appropriate InjectionMethod implementation, // and this makes it easier to hand out new versions of the library without worrying about // changing internal class names or adding new classes, etc. InjectionMethod method; switch (type) { case InjectionMethodType.ManualMap: method = new ManualMap(); break; case InjectionMethodType.Standard: method = new CRTInjection(); break; case InjectionMethodType.ThreadHijack: method = new ThreadHijack(); break; default: return null; } if (method != null) method.Type = type; return method; }