Ejemplo n.º 1
0
        public static T Create <T>(Bacpac bacpac) where T : Camera, ICamera
        {
            var task = CreateAsync <T>(bacpac);

            task.Wait();

            return(task.Result);
        }
Ejemplo n.º 2
0
        public Camera(Bacpac bacpac)
        {
            SetFilter(new NoFilter <ICamera>());

            _information      = new CameraInformation();
            _extendedSettings = new CameraExtendedSettings();
            _settings         = new CameraSettings();

            this.Bacpac = bacpac;
        }
Ejemplo n.º 3
0
        public static async Task <Bacpac> CreateAsync(string address)
        {
            var bacpac = new Bacpac(address);

            await bacpac.UpdatePasswordAsync();

            await bacpac.UpdateInformationAsync();

            await bacpac.UpdateStatusAsync();

            return(bacpac);
        }
Ejemplo n.º 4
0
        public static async Task <T> CreateAsync <T>(Bacpac bacpac) where T : Camera, ICamera
        {
            var camera = Activator.CreateInstance(typeof(T), bacpac) as T;

            var power = (await camera.BacpacStatusAsync()).CameraPower;

            if (!power)
            {
                return(camera);
            }

            await camera.InformationAsync();

            await camera.SettingsAsync();

            await camera.ExtendedSettingsAsync();

            await camera.CapabilitiesAsync();

            return(camera);
        }