public static void RegisterDataSource(UIDataSource source, object view) { if (!RegisterDataSources.ContainsKey(view)) throw new ArgumentOutOfRangeException("view", "View is not registered."); var collection = RegisterDataSources[view]; if (collection.Contains(view)) throw new ArgumentException("The data source is already registered.", "source"); collection.Add(source); }
public static void RegisterDataSource(UIDataSource source, object view) { if (!RegisterDataSources.ContainsKey(view)) { throw new ArgumentOutOfRangeException("view", "View is not registered."); } var collection = RegisterDataSources[view]; if (collection.Contains(view)) { throw new ArgumentException("The data source is already registered.", "source"); } collection.Add(source); }