ReplaceAppointmentOperation ReplaceAppointmentOperation ReplaceAppointmentOperation ReplaceAppointmentOperation Class

Definition

Represents the operation object associated with replacing an appointment. Appointments provider apps use this info to perform the operation.

public : sealed class ReplaceAppointmentOperation : IReplaceAppointmentOperationpublic sealed class ReplaceAppointmentOperation : IReplaceAppointmentOperationPublic NotInheritable Class ReplaceAppointmentOperation Implements IReplaceAppointmentOperation// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

This class is used as the value of the ReplaceAppointmentOperation event data property from the AppointmentsProviderRemoveAppointmentActivatedEventArgs event data class. An appointments provider app typically goes through a series of casts and property checks starting from the IActivatedEventArgs event data of a general activation event handler. If the activation indicates that it's an AppointmentsProvider app activation kind with Remove as the verb, then it's appropriate to cast event data to AppointmentsProviderRemoveAppointmentActivatedEventArgs.

Providers call methods of ReplaceAppointmentOperation to indicate whether the operation was completed, was canceled, or when a provider error prevented the operation from being completed. Calling these methods influences the async results that the activating app gets back from one of its ShowReplaceAppointmentAsync calls. All of the reporting methods (ReportCompleted, ReportCanceled, ReportError ) dismiss the Replace Appointment UI.

Properties

AppointmentId AppointmentId AppointmentId AppointmentId

Gets the unique identifier of the appointment to replace.

public : PlatForm::String AppointmentId { get; }public string AppointmentId { get; }Public ReadOnly Property AppointmentId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The unique identifier of the appointment to replace.

Remarks

The identifier is typically a value that the appointments provider app previously returned through an AddAppointmentOperation.ReportCompleted call. If the identifier doesn't correspond to any known appointment, the appointment doesn't exist in the user’s calendar. Because the user's intent was to replace the original appointment, we recommend that the appointment provider app create a new appointment and add it to the calendar.

AppointmentInformation AppointmentInformation AppointmentInformation AppointmentInformation

Gets the Appointment info from the activation request.

public : Appointment AppointmentInformation { get; }public Appointment AppointmentInformation { get; }Public ReadOnly Property AppointmentInformation As Appointment// You can use this property in JavaScript.
Value
Appointment Appointment Appointment Appointment

An instance of the Appointment class that represents the specific info for the appointment to replace the current appointment.

InstanceStartDate InstanceStartDate InstanceStartDate InstanceStartDate

Gets the start date and time of the appointment instance to replace.

public : IReference<DateTime> InstanceStartDate { get; }public Nullable<DateTimeOffset> InstanceStartDate { get; }Public ReadOnly Property InstanceStartDate As Nullable<DateTimeOffset>// You can use this property in JavaScript.
Value
IReference<DateTime> Nullable<DateTimeOffset> Nullable<DateTimeOffset> Nullable<DateTimeOffset>

The start date and time of the appointment instance to replace.

SourcePackageFamilyName SourcePackageFamilyName SourcePackageFamilyName SourcePackageFamilyName

Gets the package family name of the app that is requesting the operation.

public : PlatForm::String SourcePackageFamilyName { get; }public string SourcePackageFamilyName { get; }Public ReadOnly Property SourcePackageFamilyName As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The package family name.

Methods

DismissUI() DismissUI() DismissUI() DismissUI()

Dismisses the UI for the operation that replaces an appointment.

public : void DismissUI()public void DismissUI()Public Function DismissUI() As void// You can use this method in JavaScript.

Remarks

A call to DismissUI is similar to when the user dismisses the appointment provider’s UI by tapping away from it. When the appointment provider’s UI is dismissed, the appointment provider app can continue to save the appointment in the background until the appointment provider app calls ReportCompleted or ReportError or up to 15 seconds elapses, which causes the appointments provider app to stop running.

ReportCanceled() ReportCanceled() ReportCanceled() ReportCanceled()

Informs the activating app that the operation was canceled by the user.

public : void ReportCanceled()public void ReportCanceled()Public Function ReportCanceled() As void// You can use this method in JavaScript.

ReportCompleted(String) ReportCompleted(String) ReportCompleted(String) ReportCompleted(String)

Informs the activating app that the operation was completed successfully.

public : void ReportCompleted(PlatForm::String itemId)public void ReportCompleted(String itemId)Public Function ReportCompleted(itemId As String) As void// You can use this method in JavaScript.
Parameters
itemId
PlatForm::String String String String

A unique appointment ID that the activating app can later use to remove this appointment if necessary or to replace it again.

ReportError(String) ReportError(String) ReportError(String) ReportError(String)

Informs the activating app that the operation couldn't be completed because of a provider error.

public : void ReportError(PlatForm::String value)public void ReportError(String value)Public Function ReportError(value As String) As void// You can use this method in JavaScript.
Parameters
value
PlatForm::String String String String

A string that contains info about the error.

Remarks

This method logs messages about event tracing for Windows (ETW) events. To view these messages, see: ```

Event Viewer\Applications and Services Logs\Microsoft\Windows\Apps\Microsoft-Windows-TWinUI\Operational ```