# fabiojdomingues/vbox.net architecture

> Architecture diagram of the GitHub repository fabiojdomingues/vbox.net, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fabiojdomingues/vbox.net
- Repository: https://github.com/fabiojdomingues/vbox.net

## Overview

VBOX.NET is a small C# client for the VirtualBox web service. A caller creates a VBox client, which logs on and retrieves machine handles; those handles expose machine identity and state, and operations to start, stop, or restore snapshots. The Machine implementation also manages sessions, locks, and progress waits while invoking the service proxy. The generated proxy implementation is listed in the tree but was not excerpted, so its internal behavior is not mapped; the documented remote-service link is shown at a high level.

Main entry points: [`Service/vboxService.cs`](https://github.com/fabiojdomingues/vbox.net/blob/master/Service/vboxService.cs) (Service Proxy), [`VBox.cs`](https://github.com/fabiojdomingues/vbox.net/blob/master/VBox.cs) (VBox Client), [`Machine.cs`](https://github.com/fabiojdomingues/vbox.net/blob/master/Machine.cs) (Machine Handle), [`Service/vboxServiceExt.cs`](https://github.com/fabiojdomingues/vbox.net/blob/master/Service/vboxServiceExt.cs) (Proxy Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client API"]
  node_vbox["VBox Client<br/>[VBox.cs]"]
  node_inventory["Machine Inventory<br/>[VBox.cs]"]
end

subgraph group_machines["Machine Operations"]
  node_machine["Machine Handle<br/>[Machine.cs]"]
  node_lifecycle["VM Lifecycle<br/>[Machine.cs]"]
  node_snapshots["Snapshot Restore<br/>[Machine.cs]"]
end

subgraph group_remote["Remote Service"]
  node_proxy["Service Proxy<br/>[vboxService.cs]"]
  node_proxyinit["Proxy Setup<br/>[vboxServiceExt.cs]"]
  node_virtualbox["VirtualBox Service"]
end

node_caller(("Application"))

node_caller -->|"creates"| node_vbox
node_vbox -->|"creates and logs on"| node_proxy
node_vbox -->|"requests machines"| node_inventory
node_inventory -->|"yields handles"| node_machine
node_machine -->|"reads identity and state"| node_proxy
node_lifecycle -->|"starts and stops"| node_proxy
node_snapshots -->|"finds and restores"| node_proxy
node_proxyinit -->|"sets service URL"| node_proxy
node_proxy -.->|"calls remotely"| node_virtualbox

click node_vbox "https://github.com/fabiojdomingues/vbox.net/blob/master/VBox.cs"
click node_inventory "https://github.com/fabiojdomingues/vbox.net/blob/master/VBox.cs"
click node_machine "https://github.com/fabiojdomingues/vbox.net/blob/master/Machine.cs"
click node_lifecycle "https://github.com/fabiojdomingues/vbox.net/blob/master/Machine.cs"
click node_snapshots "https://github.com/fabiojdomingues/vbox.net/blob/master/Machine.cs"
click node_proxy "https://github.com/fabiojdomingues/vbox.net/blob/master/Service/vboxService.cs"
click node_proxyinit "https://github.com/fabiojdomingues/vbox.net/blob/master/Service/vboxServiceExt.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_vbox,node_inventory toneBlue
class node_machine,node_lifecycle,node_snapshots toneAmber
class node_proxy,node_proxyinit,node_virtualbox toneMint
class node_caller toneIndigo
```

## Components

### Client API

- [VBox Client](https://github.com/fabiojdomingues/vbox.net/blob/master/VBox.cs): `VBox.cs`
- [Machine Inventory](https://github.com/fabiojdomingues/vbox.net/blob/master/VBox.cs): `VBox.cs`

### Machine Operations

- [Machine Handle](https://github.com/fabiojdomingues/vbox.net/blob/master/Machine.cs): `Machine.cs`
- [VM Lifecycle](https://github.com/fabiojdomingues/vbox.net/blob/master/Machine.cs): `Machine.cs`
- [Snapshot Restore](https://github.com/fabiojdomingues/vbox.net/blob/master/Machine.cs): `Machine.cs`

### Remote Service

- [Service Proxy](https://github.com/fabiojdomingues/vbox.net/blob/master/Service/vboxService.cs): `Service/vboxService.cs`
- [Proxy Setup](https://github.com/fabiojdomingues/vbox.net/blob/master/Service/vboxServiceExt.cs): `Service/vboxServiceExt.cs`
- **VirtualBox Service**

### Other components

- **Application**

## Connections

- Application → VBox Client: creates (evidence: `README.md`)
- VBox Client → Service Proxy: creates and logs on (evidence: `VBox.cs`)
- VBox Client → Machine Inventory: requests machines (evidence: `VBox.cs`)
- Machine Inventory → Machine Handle: yields handles (evidence: `VBox.cs`)
- Machine Handle → Service Proxy: reads identity and state (evidence: `Machine.cs`)
- VM Lifecycle → Service Proxy: starts and stops (evidence: `Machine.cs`)
- Snapshot Restore → Service Proxy: finds and restores (evidence: `Machine.cs`)
- Proxy Setup → Service Proxy: sets service URL (evidence: `Service/vboxServiceExt.cs`)
- Service Proxy → VirtualBox Service: calls remotely (evidence: `README.md`)
