public ILoginMethod CreateInstance(string name) { if (LoginMethods.ContainsKey (name)) { return (ILoginMethod)LoginMethods [name].GetConstructor (new Type[]{ }).Invoke (new object[]{ }); } return null; }