/// <summary> /// Gets embed result for a url, null if none /// </summary> /// <param name="url"></param> /// <param name="maxwidth"></param> /// <param name="maxheight"></param> /// <returns></returns> public OEmbedResult ParseURL(string url, int maxwidth, int maxheight) { foreach (Type t in Providers) { BaseProvider provider = ((BaseProvider)Activator.CreateInstance(t)); if (provider.Supported && provider.IsMatch(url)) { provider.MaxWidth = maxwidth; provider.MaxHeight = maxheight; return(provider.GetEmbedResult(url)); } } return(null); }