Files
HawkeyeVision/framework/Inspectron.Camera/Emulation/EmulationCameraProvider.cs
2025-07-14 12:03:59 +02:00

34 lines
1.0 KiB
C#

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
namespace Inspectron.Camera.Emulation
{
public class EmulationCameraProvider:ICameraProvider
{
private EmulationCamera _emulationCamera;
public EmulationCameraProvider(params string[] emulationFolders)
{
List<ICamera> cameras = new List<ICamera>();
foreach (string s in emulationFolders)
{
_emulationCamera = new EmulationCamera(this);
_emulationCamera.Name = "Emulation "+Path.GetFileNameWithoutExtension(s);
_emulationCamera.SetFolder(s);
cameras.Add(_emulationCamera);
}
Cameras=new ReadOnlyCollection<ICamera>(cameras);
}
public string Name { get; } = "Emulation camera provider";
public ReadOnlyCollection<ICamera> Discover()
{
return Cameras;
}
public ReadOnlyCollection<ICamera> Cameras { get; }
}
}