private Type FindType(string url) { url = ResolveUrl(url); if (!string.IsNullOrEmpty(url)) { Type result; MappingCollection mappings = this.Mappings; if (mappings.TryGetValue(url, out result)) { return(result); } } return(null); }
public virtual void Add(string url, Type type) { url = ResolveUrl(url); if (!string.IsNullOrEmpty(url) && type != null) { MappingCollection mappings = this.Mappings; if (mappings != null) { Type newType = null; mappings.TryGetValue(url, out newType); if (newType != type) { lock (mappings) { mappings[url] = type; } } } } }