public ScreenResController(ILogger <ScreenResController> logger, IScreenResolutionService screenResolutionService)
 {
     // logger and screenResolutionService are injected by Dependcy-Injection
     // by "the runtime" (Program.cs and Startup.cs).
     this.logger = logger;
     this.screenResolutionService = screenResolutionService;
 }
 // Summary:
 //     Constructor.
 // Parameters:
 //   serviceProvider:
 //     An object that does all the work, , like communicating
 //     with the REST-API, setting the remote screen-resolution, and
 //     starting/stopping the local VNC-Server or FFmpeg.
 //     The serviceProvider is "injected" to the constructor.
 public MainWindowViewModel(ILogger <MainWindowViewModel> logger,
                            IScreenResolutionService screenResolutionService,
                            IStreamSourceService streamSourceService,
                            IRestApiClientService restApiClientService,
                            int preferredScreenWidth)
 {
     this.logger = logger;
     this.screenResolutionService = screenResolutionService;
     this.streamSourceService     = streamSourceService;
     this.restApiClientService    = restApiClientService;
     this.preferredScreenWidth    = preferredScreenWidth;
 }
 public ScreenResolutionsController(IScreenResolutionService context, IMapper mapper)
 {
     _screenResolutionService = context;
     _mapper = mapper;
 }
        public override void Initialize()
        {
            camera = (ICameraService)this.Game.Services.GetService(typeof(ICameraService));
            resolutionService = (IScreenResolutionService)this.Game.Services.GetService(typeof(IScreenResolutionService));

            base.Initialize();
        }
        /// <summary>
        /// Initializes the internal state of the camera
        /// </summary>
        public override void Initialize()
        {
            position = Vector2.Zero;
            viewMatrix = Matrix.Identity;

            inputManager = (IInputManagerService)this.Game.Services.GetService(typeof(IInputManagerService));
            resolutionService = (IScreenResolutionService)this.Game.Services.GetService(typeof(IScreenResolutionService));
            if(this.visibleArea == null)
                this.visibleArea = new RectangleF2();

            base.Initialize();
        }