public static T Create <T>(CrankyAddress myAddress) { if (typeof(T) == typeof(Spoketo)) { return((T)(IAddressPageScraper) new Spoketo(myAddress)); } else { throw new NotImplementedException(String.Format("Creation of {0} interface is not supported yet.", typeof(T))); } }
public Spoketo(CrankyAddress myAddress) { URL = "http://www.spokeo.com/" + myAddress.state + "/" + myAddress.city + "/" + myAddress.housenum + "-" + myAddress.road.Replace(" ", "-"); }