/// <summary> /// Returns the IP Address of the current cassini server /// </summary> /// <param name="apiCassini"></param> /// <returns></returns> public static string ipAddress(this API_Cassini apiCassini) { if (apiCassini.server().notNull()) { return(apiCassini.server().IPAddress.str()); } return(null); }
/// <summary> /// Returns the root URL of the current server /// </summary> /// <param name="apiCassini"></param> /// <returns></returns> public static string url(this API_Cassini apiCassini) { if (apiCassini.notNull()) { var server = apiCassini.server(); return("http://{0}:{1}/".format(server.IPAddress.str(), server.Port)); } return(null); }
/// <summary> /// Returns the CassiniServer Host object (by calling <code>CassiniServer.GetHost()</code> ) /// </summary> /// <param name="apiCassini"></param> /// <returns></returns> public static Host host(this API_Cassini apiCassini) { return(apiCassini.server().notNull() ? apiCassini.server().GetHost() : null); }