public IActionResult OnPostOSSCProfileCycle(ProfileName profile1, ProfileName profile2) { _ossc.LoadProfile(profile1); Thread.Sleep(TimeSpan.FromSeconds(3)); _ossc.LoadProfile(profile2); return(RedirectToPage()); }
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)); }
public IActionResult OnPostLoadProfile(ProfileName profileName) { _device.LoadProfile(profileName); return(RedirectToPage()); }
public void GivenDevice_WhenLoadProfile_ThenSuccessIsTrue() { Assert.IsTrue(_device.LoadProfile(ProfileName.Profile0)); }