using System; using System.Net; using SvdCli.DriverAdapt; using SvdCli.Storage; namespace SvdCli.App { internal class SvdService { private readonly IStorage _storage; private readonly EndPoint _serverEndPoint; private readonly VirtualDrive _virtualDrive; public SvdService(IStorage storage, EndPoint serverEndPoint) { _storage = storage ?? throw new ArgumentNullException(nameof(storage)); _serverEndPoint = serverEndPoint; _virtualDrive = new VirtualDrive(_storage); } public void Start() { if (null != _serverEndPoint) throw new NotImplementedException(); _virtualDrive.Attach(); } public void Stop() { if (null != _serverEndPoint) throw new NotImplementedException(); _virtualDrive.Detach(); } } }