/// <summary> /// Gets the request builder for CallChangeScreenSharingRole. /// </summary> /// <returns>The <see cref="ICallChangeScreenSharingRoleRequestBuilder"/>.</returns> public ICallChangeScreenSharingRoleRequestBuilder ChangeScreenSharingRole( ScreenSharingRole role) { return(new CallChangeScreenSharingRoleRequestBuilder( this.AppendSegmentToRequestUrl("microsoft.graph.changeScreenSharingRole"), this.Client, role)); }
/// <summary> /// Constructs a new <see cref="CallChangeScreenSharingRoleRequestBuilder"/>. /// </summary> /// <param name="requestUrl">The URL for the request.</param> /// <param name="client">The <see cref="IBaseClient"/> for handling requests.</param> /// <param name="role">A role parameter for the OData method call.</param> public CallChangeScreenSharingRoleRequestBuilder( string requestUrl, IBaseClient client, ScreenSharingRole role) : base(requestUrl, client) { this.SetParameter("role", role, false); }
/// <summary> /// Changes bot's screen sharing role async. /// </summary> /// <param name="callLegId">which call to change role on.</param> /// <param name="role">The role to change to.</param> /// <returns>The <see cref="Task"/>.</returns> public async Task ChangeSharingRoleAsync(string callLegId, ScreenSharingRole role) { if (string.IsNullOrEmpty(callLegId)) { throw new ArgumentNullException(nameof(callLegId)); } await this.Client.Calls()[callLegId] .ChangeScreenSharingRoleAsync(role) .ConfigureAwait(false); }
/// <summary> /// Changes bot's screen sharing role async. /// </summary> /// <param name="callLegId">which call to change role on.</param> /// <param name="role">The role to change to.</param> /// <returns>The <see cref="Task"/>.</returns> public async Task ChangeSharingRoleAsync(string callLegId, ScreenSharingRole role) { if (string.IsNullOrEmpty(callLegId)) { throw new ArgumentNullException(nameof(callLegId)); } var call = this.Client.Calls()[callLegId]; if (call == null) { throw new ArgumentNullException($"No calls found for {callLegId}"); } await call.ChangeScreenSharingRoleAsync(role) .ConfigureAwait(false); }