/// <summary>
    /// Executes this request.
    /// </summary>
    /// <returns>Service response.</returns>
    PlayOnPhoneResponse Execute()
    {
        PlayOnPhoneResponse serviceResponse = (PlayOnPhoneResponse)this.InternalExecute();

        serviceResponse.ThrowIfNecessary();
        return(serviceResponse);
    }
    object ParseResponse(EwsServiceXmlReader reader)
    {
        PlayOnPhoneResponse serviceResponse = new PlayOnPhoneResponse(this.Service);

        serviceResponse.LoadFromXml(reader, XmlElementNames.PlayOnPhoneResponse);
        return(serviceResponse);
    }
Beispiel #3
0
    /// <summary>
    /// Calls a phone and reads a message to the person who picks up.
    /// </summary>
    /// <param name="itemId">The Id of the message to read.</param>
    /// <param name="dialString">The full dial String used to call the phone.</param>
    /// <returns>An object providing status for the phone call.</returns>
    PhoneCall PlayOnPhone(ItemId itemId, String dialString)
    {
        EwsUtilities.ValidateParam(itemId, "itemId");
        EwsUtilities.ValidateParam(dialString, "dialString");

        PlayOnPhoneRequest request = new PlayOnPhoneRequest(service);

        request.DialString = dialString;
        request.ItemId     = itemId;
        PlayOnPhoneResponse serviceResponse = request.Execute();

        PhoneCall callInformation = new PhoneCall(service, serviceResponse.PhoneCallId);

        return(callInformation);
    }