示例#1
0
 public static Session DuplicateSession(Session session, IXenConnection connection, int timeout)
 {
     if (Helpers.DbProxyIsSimulatorUrl(session.Url))
     {
         return(new Session(session, DbProxy.GetProxy(connection, session.Url), connection));
     }
     else
     {
         return(new Session(session, connection, timeout));
     }
 }
示例#2
0
 public static Session CreateSession(IXenConnection connection, string hostname, int port)
 {
     if (Helpers.DbProxyIsSimulatorUrl(hostname))
     {
         return(new Session(DbProxy.GetProxy(connection, hostname), connection));
     }
     else
     {
         return(new Session(Session.STANDARD_TIMEOUT, connection, hostname, port));
     }
 }
示例#3
0
 public static Session CreateSession(IXenConnection connection, string hostname, int port)
 {
     if (DbProxy.IsSimulatorUrl(hostname))
     {
         return new Session(DbProxy.GetProxy(connection, hostname), connection)
                {
                    //do nothing; we don't want to swap backends for simulator Urls
                    XmlRpcToJsonRpcInvoker = null
                }
     }
     ;
     return(new Session(Session.STANDARD_TIMEOUT, connection, hostname, port));
 }
示例#4
0
     public static Session DuplicateSession(Session session, IXenConnection connection, int timeout)
     {
         if (DbProxy.IsSimulatorUrl(session.Url))
         {
             return new Session(session, DbProxy.GetProxy(connection, session.Url), connection)
                    {
                        //do nothing; we don't want to swap backends for simulator Urls
                        XmlRpcToJsonRpcInvoker = null
                    }
         }
         ;
         return(new Session(session, connection, timeout));
     }
 }