public void Close() { lock (this.SyncRoot) { _so.Close(); _so = null; } }
public void Close() { lock (base.SyncRoot) { this._so.Close(); this._so = null; } }
/// <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; } }
/// <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; } }
public SharedObjectScope(IScope parent, string name, bool persistent, IPersistenceStore store) : base(parent, SharedObjectService.ScopeType, name, persistent) { this._serverListeners = new CopyOnWriteArray(); this._handlers = new Hashtable(); this._securityHandlers = new CopyOnWriteArray(); string contextPath = parent.ContextPath; if (!contextPath.StartsWith("/")) { contextPath = "/" + contextPath; } this._so = store.Load(name) as SharedObject; if (this._so == null) { this._so = new SharedObject(base._attributes, name, contextPath, persistent, store); store.Save(this._so); } else { this._so.Name = name; this._so.Path = parent.ContextPath; this._so.Store = store; } }