AppointmentCalendar.FindAppointmentsAsync メソッド

定義

オーバーロード

FindAppointmentsAsync(DateTime, TimeSpan)

指定した条件を満たす現在の AppointmentCalendar に属する予定の一覧を非同期的に取得します。

FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions)

指定した条件を満たす現在の AppointmentCalendar に属する予定の一覧を非同期的に取得します。

FindAppointmentsAsync(DateTime, TimeSpan)

指定した条件を満たす現在の AppointmentCalendar に属する予定の一覧を非同期的に取得します。

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)

指定した条件を満たす現在の AppointmentCalendar に属する予定の一覧を非同期的に取得します。

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 メンバーに値を追加します。

こちらもご覧ください

適用対象