GetEventsType クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
クラスは GetEventsType 、プル通知サブスクリプションのイベントを取得する要求を表します。
public ref class GetEventsType : ExchangeWebServices::BaseRequestType
public class GetEventsType : ExchangeWebServices.BaseRequestType
Public Class GetEventsType
Inherits BaseRequestType
- 継承
例
次の例では、プル通知サブスクリプションのイベントを取得する要求を作成する方法を示します。 要求のビルドに使用される透かしは、最後の GetEvents 呼び出しで返される最後の透かしであるか、最初の GetEvents 呼び出しの場合は Subscribe 応答からの透かしである必要があります。 GetEvents の次の呼び出しに使用するために、最後のイベントの透かしを保存する必要があります。
static void GetEvents(ExchangeServiceBinding esb)
{
// Create the GetEvents request.
GetEventsType <span class="label">request</span> = new GetEventsType();
// Identify the subscription identifier and watermark for the subscription
// that will be polled for changes in the Exchange store.
<span class="label">request</span>.SubscriptionId = "2448550a-4685-412c-bc40-62f0999a8bdb";
<span class="label">request</span>.Watermark = "AQAAAM/SnQORsD1IqTUHelGT0oxxHQAAAAAAAAE=";
// Send the request and get the response.
GetEventsResponseType response = esb.GetEvents(<span class="label">request</span>);
ArrayOfResponseMessagesType aormt = response.ResponseMessages;
ResponseMessageType[] rmta = aormt.Items;
foreach (ResponseMessageType rmt in rmta)
{
// Determine whether the request was a success.
if (rmt.ResponseClass == ResponseClassType.Success)
{
// Cast to appropriate response message type.
GetEventsResponseMessageType responseMessage = (rmt as GetEventsResponseMessageType);
// Get the notifications.
NotificationType notification = responseMessage.Notification;
BaseNotificationEventType[] bneta = notification.Items;
foreach (BaseNotificationEventType bnet in bneta)
{
// TODO: Handle each notification. Refer to the Push Notification
// sample for an example of how to do this.
}
if (notification.MoreEvents)
{
// TODO: Call GetEvents again with the watermark to get the
// remaining events.
}
}
}
}
プル通知の詳細については、「プッシュ通知サンプル アプリケーション」を参照してください。
注釈
予定表アイテムを変更すると、複数のイベントが生成される可能性があります。 他の項目に対する操作では、複数の低レベルイベントを生成することもできます。 これらのイベントは、メールボックス内に一時的なアイテムを作成した結果であり、通常の予定表操作の一部として空き時間情報データ ストレージアイテムに対する変更、またはその両方です。 項目クラス IPM のイベント。SchedulePlus.FreeBusy.BinaryData は、Web サービス クライアントでは無視する必要があります。 これらの一時アイテムは、作成後に削除されます。 これらの項目を取得しようとすると、その項目が見つからなかったことを示すエラーが返されます。
コンストラクター
GetEventsType() |
コンストラクターは GetEventsType 、 クラスの新しいインスタンスを GetEventsType 初期化します。 |
プロパティ
SubscriptionId |
プロパティは SubscriptionId 、サブスクリプションの識別子を取得または設定します。 このプロパティは必須です。 これは、読み取り/書き込みプロパティです。 |
Watermark |
プロパティは Watermark 、メールボックス イベント キュー内のイベント ブックマークを表す文字列を取得または設定します。 このプロパティは必須です。 これは、読み取り/書き込みプロパティです。 |