Save() protected method

通知数据服务保存数据对象
protected Save ( ) : void
return void
Example #1
0
        /// <summary>
        /// 通知数据服务保存数据对象
        /// </summary>
        protected virtual void Save()
        {
            if (Host != null)
            {
                Host.Save();
            }

            lock ( _saveSync )
            {
                if (_saveTransaction != null)
                {
                    return;
                }


                EnsureInitialized();
                DataService.Save(this);
            }
        }
Example #2
0
 void IDisposable.Dispose()
 {
     _dataItem._saveTransaction = null;
     _dataItem.Save();
     Monitor.Exit(_dataItem._saveSync);
 }