AddAppointmentOperation
AddAppointmentOperation
AddAppointmentOperation
AddAppointmentOperation
Class
Definition
Represents the operation object associated with adding a new appointment. Appointments provider apps use this info to perform the operation.
public : sealed class AddAppointmentOperation : IAddAppointmentOperationpublic sealed class AddAppointmentOperation : IAddAppointmentOperationPublic NotInheritable Class AddAppointmentOperation Implements IAddAppointmentOperation// You can use this class in JavaScript.
- Attributes
| 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 AddAppointmentOperation event data property from the AppointmentsProviderAddAppointmentActivatedEventArgs 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 Add as the verb, then it's appropriate to cast event data to AppointmentsProviderAddAppointmentActivatedEventArgs.
Providers call methods of AddAppointmentOperation 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 its ShowAddAppointmentAsync call. All of the reporting methods (ReportCompleted, ReportCanceled, ReportError ) dismiss the Add Appointment UI.
Properties
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.
An instance of the Appointment class that represents the specific info for the appointment to add.
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 adds a new 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()
Call this method to inform 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)
Call this method to inform the activating app that the operation was completed successfully. Provide a unique appointment ID as the itemID parameter.
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.
- itemId
- PlatForm::String String String String
A unique appointment ID that the activating app can later use to remove this appointment if necessary.
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.
- 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 ```