public override void Dispose() { ObjectContainer objContainer = (ObjectContainer)Kernel[typeof(ObjectContainer)]; objContainer.Close(); base.Dispose(); }
/// <summary> /// Closes the data store. /// </summary> public override void Close() { if (IsContainerInitialized) { ObjectContainer.Close(); ObjectContainer = null; } if (IsServerInitialized) { ObjectServer.Close(); ObjectServer = null; } }
public IList SendRequest(string request) { ArrayList objectSets = new ArrayList(); db = Db4o.OpenFile("sofia.yap"); try { xpn.LoadXML(request); ArrayList operations = xpn.GetAttributes("//Request", "operation"); ArrayList objects = xpn.GetAttributes("//Request", "object"); for (int i = 0; i < operations.Count; i++) { string ope = operations[i].ToString(); string obj = objects[i].ToString(); ObjectSet objectSet = ProcessRequest(ope, obj); if (objectSet != null) { objectSets.Add(objectSet); } } if (objectSets.Count > 0) { IList list = new ArrayList(); foreach (Dossier dossier in (ObjectSet)objectSets[0]) { list.Add(dossier); } return(list); } else { return(null); } } finally { db.Close(); } }
public IList SendRequest(string request) { ArrayList objectSets = new ArrayList(); db = Db4o.OpenFile("sofia.yap"); try { xpn.LoadXML(request); ArrayList operations = xpn.GetAttributes("//Request", "operation"); ArrayList objects = xpn.GetAttributes("//Request", "object"); for (int i = 0; i < operations.Count; i++) { string ope = operations[i].ToString(); string obj = objects[i].ToString(); ObjectSet objectSet = ProcessRequest(ope, obj); if (objectSet != null) objectSets.Add(objectSet); } if (objectSets.Count > 0) { IList list = new ArrayList(); foreach(Dossier dossier in (ObjectSet) objectSets[0]) { list.Add(dossier); } return list; } else return null; } finally { db.Close(); } }
public bool Close() { return(_Container.Close()); }