コード例 #1
0
 public IActionResult OnPostOSSCProfileCycle(ProfileName profile1, ProfileName profile2)
 {
     _ossc.LoadProfile(profile1);
     Thread.Sleep(TimeSpan.FromSeconds(3));
     _ossc.LoadProfile(profile2);
     return(RedirectToPage());
 }
コード例 #2
0
        private Task <MethodResponse> LoadProfile(MethodRequest methodRequest, object userContext)
        {
            bool success          = false;
            var  payloadDefintion = new
            {
                profileName = (ProfileName)(-1),
            };

            var payload = JsonConvert.DeserializeAnonymousType(methodRequest.DataAsJson, payloadDefintion);

            if (payload.profileName.Valid())
            {
                success = _device.LoadProfile(payload.profileName);
            }

            return(methodRequest.GetMethodResponse(success));
        }
コード例 #3
0
 public IActionResult OnPostLoadProfile(ProfileName profileName)
 {
     _device.LoadProfile(profileName);
     return(RedirectToPage());
 }
コード例 #4
0
ファイル: TestOSSC.cs プロジェクト: CharlieBeatnik/ControlAVP
 public void GivenDevice_WhenLoadProfile_ThenSuccessIsTrue()
 {
     Assert.IsTrue(_device.LoadProfile(ProfileName.Profile0));
 }