21 lines
485 B
C#
21 lines
485 B
C#
|
namespace VideoInput
|
||
|
{
|
||
|
public interface IComponentFactory
|
||
|
{
|
||
|
IKinectSensor CreateKinectSensor();
|
||
|
IInfraredCamera CreateInfraredCamera();
|
||
|
}
|
||
|
|
||
|
public class ComponentFactory : IComponentFactory
|
||
|
{
|
||
|
public IKinectSensor CreateKinectSensor()
|
||
|
{
|
||
|
return new KinectSensor(CreateInfraredCamera());
|
||
|
}
|
||
|
|
||
|
public IInfraredCamera CreateInfraredCamera()
|
||
|
{
|
||
|
return new InfraredCamera();
|
||
|
}
|
||
|
}
|
||
|
}
|