/// <summary>
 /// Raises the AfterBindingDataLoad event.
 /// </summary>
 /// <param name="e">Data that contains the binder's loading event information.</param>
 protected virtual void OnAfterBindingDataLoad(DataBinderLoadingEventArgs e)
 {
     if (AfterBindingDataLoad != null) AfterBindingDataLoad(this, e);
 }
        /// <summary>
        ///  Asynchronously loads the data binding information and returns an argument relative to its data loading execution. Call the EndLoad(IAsyncResult) to get synchronization result argument after synchronization is complete.
        /// </summary>
        /// <returns>System.IAsyncResult generated from the DataBinding loading asynchornization.</returns>
        public IAsyncResult BeginLoad()
        {
            if (_binder == null) return null;

            DataBinderLoadingEventArgs _args = new DataBinderLoadingEventArgs(this);
            Materia.RaiseEvent(_binder, "BeforeBindingDataLoad", _args);
         
            if (!_args.Cancel)
            {
                Func<DataBinderLoadingEventArgs> _delegate = new Func<DataBinderLoadingEventArgs>(LoadBinding);
                IAsyncResult _result = _delegate.BeginInvoke(null, _delegate);
                if (!_delegatetable.ContainsKey(_result)) _delegatetable.Add(_result, _delegate);
                return _result;
            }
            else return null;
        }
        /// <summary>
        /// Loads the data binding information and returns an argument relative to its data loading execution.
        /// </summary>
        /// <returns>Development.Materia.Database.DataBinderLoadingEventArgs generated from the data binding's loading routines.</returns>
        public DataBinderLoadingEventArgs Load()
        {
            if (_binder == null) return null;
            else
            {
                DataBinderLoadingEventArgs _args = new DataBinderLoadingEventArgs(this);
                Materia.RaiseEvent(_binder, "BeforeBindingDataLoad", _args);

                if (!_args.Cancel)
                {
                    DataBinderLoadingEventArgs _newargs = LoadBinding();
                    if (!_args.Cancel)
                    {
                        Bind();  Materia.RaiseEvent(_binder, "AfterBindingDataLoad", _args);
                    }

                    return _newargs;
                }
                else return _args;
            }
        }
 /// <summary>
 /// Raises the BeforeBindingDataLoad event.
 /// </summary>
 /// <param name="e">Data that contains the binder's loading event information.</param>
 protected virtual void OnBeforeBindingDataLoad(DataBinderLoadingEventArgs e)
 {
     if (BeforeBindingDataLoad != null) BeforeBindingDataLoad(this, e);
 }