public static Effect Resolve(string name) { Type effectType; Effect result = null; if (Registrar.Effects.TryGetValue(name, out effectType)) { result = (Effect)Activator.CreateInstance(effectType); } if (result == null) result = new NullEffect(); result.ResolveId = name; return result; }
public static Effect Resolve(string name) { Effect result = null; if (Internals.Registrar.Effects.TryGetValue(name, out Type effectType)) { result = (Effect)DependencyResolver.ResolveOrCreate(effectType); } if (result == null) { result = new NullEffect(); } result.ResolveId = name; return(result); }
public static Effect Resolve(string name) { Type effectType; Effect result = null; if (Registrar.Effects.TryGetValue(name, out effectType)) { result = (Effect)Activator.CreateInstance(effectType); } if (result == null) { result = new NullEffect(); } result.ResolveId = name; return(result); }