Esempio n. 1
0
        public override void Dispose()
        {
            ObjectContainer objContainer = (ObjectContainer)Kernel[typeof(ObjectContainer)];

            objContainer.Close();

            base.Dispose();
        }
Esempio n. 2
0
 /// <summary>
 /// Closes the data store.
 /// </summary>
 public override void Close()
 {
     if (IsContainerInitialized)
     {
         ObjectContainer.Close();
         ObjectContainer = null;
     }
     if (IsServerInitialized)
     {
         ObjectServer.Close();
         ObjectServer = null;
     }
 }
Esempio n. 3
0
        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();
            }
        }
Esempio n. 4
0
        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();
              	}
        }
Esempio n. 5
0
 public bool Close()
 {
     return(_Container.Close());
 }