コード例 #1
0
 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);
 }
コード例 #2
0
        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);
        }