예제 #1
0
 /// <summary>
 /// Raises the DeepLoaded event.
 /// </summary>
 /// <param name="e">An instance of ProviderDataSourceDeepLoadEventArgs containing the event data.</param>
 internal virtual void OnDeepLoaded(ProviderDataSourceDeepLoadEventArgs e)
 {
     if (DeepLoaded != null)
     {
         DeepLoaded(Owner, e);
     }
 }
예제 #2
0
        /// <summary>
        /// Performs a DeepLoad operation on the specified entity collection.
        /// </summary>
        /// <param name="entityList"></param>
        internal virtual void ExecuteDeepLoad(TList <Entity> entityList)
        {
            ProviderDataSourceDeepLoadEventArgs args1 = new ProviderDataSourceDeepLoadEventArgs(entityList, DeepLoadProperties);

            OnDeepLoading(args1);

            if (args1.Cancel)
            {
                return;
            }

            try
            {
                DeepLoad(entityList, args1.DeepLoadProperties);

                ProviderDataSourceDeepLoadEventArgs args2 = new ProviderDataSourceDeepLoadEventArgs(entityList, args1.DeepLoadProperties);
                OnDeepLoaded(args2);
            }
            catch (Exception)
            {
                throw;
            }
        }