Guide for developers working on or extending eSIM Manager.
git clone https://github.com/nexorasim/esim-manager.git
cd esim-manager
start esim-manager.sln
dotnet restore
dotnet build
dotnet run --project ESimManager/ESimManager.csproj
esim-manager/
├── ESimManager/ # Main WPF application
│ ├── Models/ # Data models
│ ├── ViewModels/ # MVVM view models
│ ├── Views/ # XAML views
│ ├── Services/ # Business logic services
│ └── Resources/ # Styles and resources
├── ESimManager.Tests/ # Unit tests
├── docs/ # Documentation
├── scripts/ # Build and automation scripts
└── esim-manager.sln # Solution file
The application follows the Model-View-ViewModel (MVVM) pattern:
Services are registered in App.xaml.cs:
services.AddSingleton<ILoggingService, LoggingService>();
services.AddSingleton<IDeviceConnectionService, DeviceConnectionService>();
services.AddSingleton<IESimService, ESimService>();
Handles application logging and event tracking.
Manages device discovery and connection for WLAN and Bluetooth.
Handles eSIM profile operations (provision, activate, deactivate, remove).
# Debug build
dotnet build
# Release build
dotnet build --configuration Release
# Clean build
dotnet clean
dotnet build
# Run all tests
dotnet test
# Run with coverage
dotnet test --collect:"XPlat Code Coverage"
# Run specific test
dotnet test --filter "FullyQualifiedName~TestName"
# Publish for Windows x64
dotnet publish ESimManager/ESimManager.csproj `
--configuration Release `
--runtime win-x64 `
--self-contained false `
--output ./publish
Services/:
public interface IMyService
{
Task<bool> DoSomethingAsync();
}
public class MyService : IMyService
{
public async Task<bool> DoSomethingAsync()
{
// Implementation
}
}
App.xaml.cs:
services.AddSingleton<IMyService, MyService>();
ViewModels/:
public partial class MyViewModel : ObservableObject
{
[ObservableProperty]
private string _myProperty;
[RelayCommand]
private void MyCommand()
{
// Command logic
}
}
Views/:
<UserControl x:Class="ESimManager.Views.MyView"
Background="{StaticResource PrimaryBackground}">
<TextBlock Text="{Binding MyProperty}"/>
</UserControl>
MainWindow.xaml.cspublic class MyServiceTests
{
[Fact]
public async Task DoSomething_ReturnsTrue()
{
// Arrange
var service = new MyService();
// Act
var result = await service.DoSomethingAsync();
// Assert
Assert.True(result);
}
}
var process = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "netsh",
Arguments = "wlan show networks mode=bssid",
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true
}
};
process.Start();
string output = await process.StandardOutput.ReadToEndAsync();
// Add reference to Windows.Devices.Bluetooth
using Windows.Devices.Bluetooth;
using Windows.Devices.Enumeration;
var devices = await DeviceInformation.FindAllAsync(
BluetoothDevice.GetDeviceSelector());
Defined in Resources/Styles.xaml:
<Style x:Key="MyButtonStyle" TargetType="Button"
BasedOn="{StaticResource ModernButton}">
<Setter Property="Background" Value="Red"/>
</Style>
Set breakpoints in Visual Studio and press F5 to debug.
Use ILoggingService for debugging:
_logger.Log(LogLevel.Debug, "Debug message", "Additional details");
Located in .github/workflows/build.yml:
git tag v1.0.0
git push origin v1.0.0
For development questions: