-
-
Notifications
You must be signed in to change notification settings - Fork 41
Office.Cloud.Microsoft.Calendar
The Microsoft.Calendar
package integrates with the Office365 Calendar cloud service.
Credits: to Brokero that sponsor the initial implementation of this module.
This is a platform agnostic
module that authenticates against Azure using the Xpand.XAF.Modules.Microsoft package, for details head to it's wiki page.
The Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar
provides a configurable two way
synchronization between the IEvent
Domain Components and the Microsoft.Graph.Event
entity.
All CRUD
operations will execute the cloud api after a successful XAF transaction.
You can use the model to configure
:
- The subject
Views
, the target containerCalendar
and which Domain Component should be created when aNewCloudEvent
. - The CRUD
SynchronizationType
and theCallDirection
.
The package can operate without any configuration by executing a predefined map
between the IEvent
and OutlookEvent
objects on Update and on Insert for both incoming and outgoing calls.
To customize the predefined map you can use a query like the next one which suffix the OutlookEvent subject with the current date:
CalendarService.CustomizeSynchronization
.Do(e => {
var tuple = e.Instance;
if (tuple.mapAction != MapAction.Delete){
if (tuple.callDirection == CallDirection.In){
tuple.local.Subject = $"{tuple.cloud.Subject} - {DateTime.Now}";
}
else if (tuple.callDirection == CallDirection.Out){
tuple.cloud.Subject = $"{tuple.local.Subject} - {DateTime.Now}";
}
e.Handled = true;
}
})
.Subscribe();
Cloud to local synchronization: The package uses delta queries to track changes in Microsoft Graph data.
Possible future improvements:
Any other need you may have.
Let me know if you want me to implement them for you.
In the next screencast you can see all CRUD
operations on the Event BO and how they synchronize with the Office365
Calendar, for both platforms Win
, Web
and both directions Incoming
, Outgoing
. At the bottom the Reactive.Logger.Client.Win is reporting as the module is used.
-
First you need the nuget package so issue this command to the
VS Nuget package console
Install-Package Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar
.The above only references the dependencies and next steps are mandatory.
-
Ways to Register a Module or simply add the next call to your module constructor
RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.Office.Cloud.Microsoft.CalendarModule));
The module is not bound to DevExpress versioning, which means you can use the latest version with your old DevExpress projects Read more.
The module follows the Nuget Version Basics.
.NetFramework: net461
DevExpress.Persistent.Base | Any |
DevExpress.ExpressApp | Any |
DevExpress.ExpressApp.Xpo | Any |
Fasterflect.Xpand | 2.0.7 |
JetBrains.Annotations | 2020.1.0 |
Microsoft.Graph.Beta | 0.18.0-preview |
Microsoft.Graph.Core | 1.19.0 |
Microsoft.Identity.Client | 4.13.0 |
Newtonsoft.Json | 12.0.3 |
System.Reactive | 4.4.1 |
System.ValueTuple | 4.5.0 |
Xpand.Extensions | 2.202.57 |
Xpand.Extensions.Office.Cloud | 2.202.58 |
Xpand.Extensions.Reactive | 2.202.58 |
Xpand.Extensions.XAF | 2.202.58 |
Xpand.Extensions.XAF.Xpo | 2.202.54 |
Xpand.XAF.Modules.Office.Cloud.Microsoft | 2.202.59 |
Xpand.XAF.Modules.Reactive | 2.202.58 |
Xpand.VersionConverter | 2.202.10 |
To Step in the source code
you need to enable Source Server support
in your Visual Studio/Tools/Options/Debugging/Enable Source Server Support. See also How to boost your DevExpress Debugging Experience.
If the package is installed in a way that you do not have access to uninstall it, then you can unload
it with the next call at the constructor of your module.
Xpand.XAF.Modules.Reactive.ReactiveModuleBase.Unload(typeof(Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar.Office.Office.Cloud.Microsoft.CalendarModule))
The module is tested on Azure for each build with these tests. All Tests run as per our Compatibility Matrix