public void LoadAll()
            {
                if (AllObjectsLoading != null)
                {
                    AllObjectsLoadingEventArgs <string, DatasetBase> e = new AllObjectsLoadingEventArgs <string, DatasetBase>();

                    AllObjectsLoading(this, e);

                    if (!e.Cancel)
                    {
                        foreach (var ds in e.Collection)
                        {
                            this[ds.Key] = ds.Value;
                        }
                    }
                }
            }
            public void LoadAll()
            {
                if (!isAllLoaded && AllObjectsLoading != null)
                {
                    AllObjectsLoadingEventArgs <string, T> e = new AllObjectsLoadingEventArgs <string, T>();

                    AllObjectsLoading(this, e);

                    if (!e.Cancel)
                    {
                        foreach (var ds in e.Collection)
                        {
                            this[ds.Key] = ds.Value;
                        }
                    }

                    this.isAllLoaded = true;
                }
            }
示例#3
0
 private void OnAllDatasetsLoading(object sender, AllObjectsLoadingEventArgs <string, DatasetBase> e)
 {
     e.Collection = LoadAllDatasets();
     e.Cancel     = false;
 }
示例#4
0
 private void OnAllObjectLoading <T>(object sender, AllObjectsLoadingEventArgs <string, T> e)
     where T : DatabaseObject, new()
 {
     e.Collection = LoadAllObjects <T>(e.DatabaseName);
 }