AppointmentStore.FindAppointmentsAsync メソッド

定義

オーバーロード

FindAppointmentsAsync(DateTime, TimeSpan)

指定した日付範囲内にある予定予定表内の予定の一覧を取得します。

FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions)

指定した日付範囲内にあり、指定された FindAppointmentsOptions オブジェクトで指定された条件を満たす予定予定表内の予定の一覧を取得します。

FindAppointmentsAsync(DateTime, TimeSpan)

指定した日付範囲内にある予定予定表内の予定の一覧を取得します。

public:
 virtual IAsyncOperation<IVectorView<Appointment ^> ^> ^ FindAppointmentsAsync(DateTime rangeStart, TimeSpan rangeLength) = FindAppointmentsAsync;
/// [Windows.Foundation.Metadata.Overload("FindAppointmentsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<Appointment>> FindAppointmentsAsync(DateTime const& rangeStart, TimeSpan const& rangeLength);
[Windows.Foundation.Metadata.Overload("FindAppointmentsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<Appointment>> FindAppointmentsAsync(System.DateTimeOffset rangeStart, System.TimeSpan rangeLength);
function findAppointmentsAsync(rangeStart, rangeLength)
Public Function FindAppointmentsAsync (rangeStart As DateTimeOffset, rangeLength As TimeSpan) As IAsyncOperation(Of IReadOnlyList(Of Appointment))

パラメーター

rangeStart
DateTime DateTimeOffset

予定が取得される日付範囲の開始。

rangeLength
TimeSpan TimeSpan

予定を取得する日付範囲の長さ。 rangeLength パラメーターが 0 に設定されている場合、予定は返されません。 RangeStart 値とまったく同じ StartTime を持つデバイスに予定が存在する場合でも、返されるリストは空になります。

戻り値

正常に完了したときに Appointment オブジェクトの IVectorView リストを返す非同期操作。

属性

Windows の要件

アプリの機能
appointmentsSystem

こちらもご覧ください

適用対象

FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions)

指定した日付範囲内にあり、指定された FindAppointmentsOptions オブジェクトで指定された条件を満たす予定予定表内の予定の一覧を取得します。

public:
 virtual IAsyncOperation<IVectorView<Appointment ^> ^> ^ FindAppointmentsAsync(DateTime rangeStart, TimeSpan rangeLength, FindAppointmentsOptions ^ options) = FindAppointmentsAsync;
/// [Windows.Foundation.Metadata.Overload("FindAppointmentsAsyncWithOptions")]
IAsyncOperation<IVectorView<Appointment>> FindAppointmentsAsync(DateTime const& rangeStart, TimeSpan const& rangeLength, FindAppointmentsOptions const& options);
[Windows.Foundation.Metadata.Overload("FindAppointmentsAsyncWithOptions")]
public IAsyncOperation<IReadOnlyList<Appointment>> FindAppointmentsAsync(System.DateTimeOffset rangeStart, System.TimeSpan rangeLength, FindAppointmentsOptions options);
function findAppointmentsAsync(rangeStart, rangeLength, options)
Public Function FindAppointmentsAsync (rangeStart As DateTimeOffset, rangeLength As TimeSpan, options As FindAppointmentsOptions) As IAsyncOperation(Of IReadOnlyList(Of Appointment))

パラメーター

rangeStart
DateTime DateTimeOffset

予定が取得される日付範囲の開始。

rangeLength
TimeSpan TimeSpan

予定を取得する日付範囲の長さ。 rangeLength パラメーターが 0 に設定されている場合、予定は返されません。 RangeStart 値とまったく同じ StartTime を持つデバイスに予定が存在する場合でも、返されるリストは空になります。

options
FindAppointmentsOptions

この操作のその他のオプションを指定するために使用される FindAppointmentsOptions オブジェクト。 取得する値を指定するには、 options パラメーターを設定する必要があります。

戻り値

正常に完了したときに Appointment オブジェクトの IVectorView リストを返す非同期操作。

属性

Windows の要件

アプリの機能
appointmentsSystem

FindAppointmentOptions.FetchProperties を設定して、取得する値を指定します。

AppointmentStore calendar = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly);

// Specify which values to retrieve
FindAppointmentsOptions options = new FindAppointmentsOptions(); 
options.FetchProperties.Add(AppointmentProperties.Subject); 
options.FetchProperties.Add(AppointmentProperties.Details); 
options.FetchProperties.Add(AppointmentProperties.DetailsKind);

var iteratingAppointments = await calendar.FindAppointmentsAsync(DateTimeOffset.Now, TimeSpan.FromDays(31), options);

foreach (var i in iteratingAppointments) 
{ 
  // do stuff with each appointment 
}

注釈

重要

パフォーマンス上の理由から、 FindAppointmentsAsync ではほとんどのプロパティが読み込まれません。 特定のプロパティを読み込むには、options パラメーターの FindAppointmentsOptions.FetchProperties メンバーに値を追加します。 詳細については、以下の例を参照してください。

こちらもご覧ください

適用対象