public static SetPresetResponse Unmarshall(UnmarshallerContext context) { SetPresetResponse setPresetResponse = new SetPresetResponse(); setPresetResponse.HttpResponse = context.HttpResponse; setPresetResponse.RequestId = context.StringValue("SetPreset.RequestId"); setPresetResponse.Id = context.StringValue("SetPreset.Id"); return(setPresetResponse); }
public async Task <Boolean> setPTZPresetAsync(string preseToken) { try { if (m_Presets == null) { m_Presets = await readPTZPresetsAsync(); if (m_Presets == null) { return(false); } } PTZPreset preset = getPTZByToken(preseToken); OnVifServices.OnvifPTZService.SetPresetRequest request = null; if (preset != null) { request = new SetPresetRequest(m_ProfileRefToken, preset.Name, preset.token); } else { string presettoken = getfreePresetToken(); string presetname = getfreePresetName(); request = new SetPresetRequest(m_ProfileRefToken, presetname, presettoken); } if (request != null) { SetPresetResponse presetResponse = await m_ptzClient.SetPresetAsync(request); return(true); } return(false); } catch (Exception ex) { m_ErrorMessage = ex.Message; throw new OnVifException("OnVifPTZController.setPTZPresetAsync", ex); // return false; } }