public virtual Item GenerateItem(Type type) { if (typeof(Item).IsAssignableFrom(type)) { return(Utility.CreateInstance <Item>(type)); } else { throw new Exception(String.Format("Type {0} is not assignable to type 'Server.Item'", type.FullName)); } }
public virtual Item GenerateItem(Type type) { if (typeof(Item).IsAssignableFrom(type)) { return(Utility.CreateInstance <Item>(type)); } else { throw new Exception(String.Format("Type {0} is not assignable to type 'Server.Item'", type.FullName)); } }