예제 #1
0
        Task <int> OnExecuteAsync()
        {
            var test = new Test();

            return(test.RunAsync(
                       new Test.Args
            {
                DeviceId = this.DeviceId,
                ConnectionString = EnvironmentVariable.Expect("E2E_IOT_HUB_CONNECTION_STRING"),
                Endpoint = EnvironmentVariable.Expect("E2E_EVENT_HUB_ENDPOINT"),
                InstallerPath = this.InstallerPath,
                PackagesPath = Option.Maybe(this.PackagesPath),
                Proxy = Option.Maybe(this.Proxy),
                AgentImage = this.AgentImage,
                HubImage = this.HubImage,
                SensorImage = this.SensorImage,
                Registry = this.RegistryAddress != null
                        ? Option.Some(
                    (
                        this.RegistryAddress,
                        this.RegistryUser,
                        EnvironmentVariable.Expect("E2E_CONTAINER_REGISTRY_PASSWORD")))
                        : Option.None <(string, string, string)>(),
                Timeout = TimeSpan.FromMinutes(this.Timeout),
                Verbose = this.Verbose,
                LogFile = Option.Maybe(this.LogFile)
            }));