コード例 #1
0
 public void Close()
 {
     lock (this.SyncRoot) {
         _so.Close();
         _so = null;
     }
 }
コード例 #2
0
ファイル: SharedObjectScope.cs プロジェクト: GodLesZ/svn-dump
		/// <summary>
		/// Creates shared object with given parent scope, name, persistence flag state and store object.
		/// </summary>
		/// <param name="parent"></param>
		/// <param name="name"></param>
		/// <param name="persistent"></param>
		/// <param name="store"></param>
		public SharedObjectScope(IScope parent, string name, bool persistent, IPersistenceStore store)
			: base(parent, SharedObjectService.ScopeType, name, persistent) {
			string path = parent.ContextPath;
			if (!path.StartsWith("/"))
				path = "/" + path;
			// Create shared object wrapper around the attributes
			_so = store.Load(name) as SharedObject;
			if (_so == null) {
				_so = new SharedObject(_attributes, name, path, persistent, store);
				store.Save(_so);
			} else {
				_so.Name = name;
				_so.Path = parent.ContextPath;
				_so.Store = store;
			}
		}
コード例 #3
0
        /// <summary>
        /// Creates shared object with given parent scope, name, persistence flag state and store object.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="name"></param>
        /// <param name="persistent"></param>
        /// <param name="store"></param>
        public SharedObjectScope(IScope parent, string name, bool persistent, IPersistenceStore store)
            : base(parent, SharedObjectService.ScopeType, name, persistent)
        {
            string path = parent.ContextPath;

            if (!path.StartsWith("/"))
            {
                path = "/" + path;
            }
            // Create shared object wrapper around the attributes
            _so = store.Load(name) as SharedObject;
            if (_so == null)
            {
                _so = new SharedObject(_attributes, name, path, persistent, store);
                store.Save(_so);
            }
            else
            {
                _so.Name  = name;
                _so.Path  = parent.ContextPath;
                _so.Store = store;
            }
        }
コード例 #4
0
ファイル: SharedObjectScope.cs プロジェクト: GodLesZ/svn-dump
		public void Close() {
			lock (this.SyncRoot) {
				_so.Close();
				_so = null;
			}
		}