public VirtualBoxVirtualMachine(vboxService service, string machineRef, string vboxRef) { this.service = service; this.machineRef = machineRef; this.vboxRef = vboxRef; getState();// this forces an attempt to hit the server. if the machine doesnt exist, an exception will be thrown }
//service public VirtualBoxMachineUtility(String username, String password, String hostname) { //vboxPortTypeClient client; service = new vboxService(); service.Url = hostname; //service.IwebsessionManager vboxRef = service.IWebsessionManager_logon("", ""); Console.WriteLine("VirtualBox version: " + service.IVirtualBox_getAPIVersion(vboxRef)); }
public VBox(String url, int port, String login, string password) { var uri = new UriBuilder(url) { Port = port }; this.service = new vboxService(uri.ToString()); this.auth = this.service.IWebsessionManager_logon(login, password); }
internal Machine(VBox vbox, String auth) { this.service = vbox.service; this.auth = auth; }