public void RemoteGraph()
 {
     ArrayList list = new ArrayList();
     list.AddRange(new string[] {"First", "Second", "Third"});
     HqlResultGraph hrg = new HqlResultGraph(list, null);
     IList remote = hrg.RemoteGraph;
     Assert.AreEqual(list[0], ((RemoteObject) remote[0]).Value);
     Assert.AreEqual(list[1], ((RemoteObject) remote[1]).Value);
     Assert.AreEqual(list[2], ((RemoteObject) remote[2]).Value);
 }
 public HqlResultGraph RunHql(string hql, params TypedParameter[] parameters)
 {
     try
     {
         ISession session = factory.OpenSession();
         IQuery query = session.CreateQuery(hql);
         AddParameters(parameters, query);
         IList graph = query.List();
         CurrentHqlGraph = new HqlResultGraph(graph, session);
         return CurrentHqlGraph;
     }
     catch (Exception ex)
     {
         if (logger.IsErrorEnabled)
             logger.Error("Could not run query.", ex);
         if (ExceptionStackSerializable(ex))
             throw;
         else
             //Otherwise we lose all the exception info.
             throw new Exception(ex.ToString());
     }
 }