corelibraries-devexpress-dot-xtrascheduler-dot-exchange-dot-appointmentimporter-dot-import-x28-system-dot-io-dot-stream-x29.md
Imports appointments from the specified stream.
Namespace : DevExpress.XtraScheduler.Exchange
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
public virtual void Import(
Stream stream
)
Public Overridable Sub Import(
stream As Stream
)
| Name | Type | Description |
|---|---|---|
| stream | Stream |
A Stream object which represents the stream the appointments will be imported from.
|
This method should be overridden in descendants of the AppointmentImporter class.
If appointments are imported from an MS Outlook calendar, then the Import parameter should be set to Null, as illustrated in the following code snippet:
using DevExpress.XtraScheduler.Exchange;
using DevExpress.XtraScheduler.Outlook;
//...
// Create an importer class instance.
AppointmentImporter importer = schedulerStorage.CreateOutlookImporter();
// Specify a path to the calendar folder.
((ISupportCalendarFolders)importer).CalendarFolderName = "\\\\Personal Folders\\MyCalendar";
// Prepare a progress bar or perform other actions prior to import.
BeforeImport(importer.SourceObjectCount);
// Perform the import.
// Notice the null stream as a parameter to Import method.
try
{
importer.Import(System.IO.Stream.Null);
}
finally
{
AfterImport();
}
Imports DevExpress.XtraScheduler.Exchange
Imports DevExpress.XtraScheduler.Outlook
'...
' Create an importer class instance.
Dim importer As AppointmentImporter = schedulerStorage.CreateOutlookImporter()
' Specify a path to the calendar folder.
CType(importer, ISupportCalendarFolders).CalendarFolderName = "\\Personal Folders\MyCalendar"
' Prepare a progress bar or perform other actions prior to import.
BeforeImport(importer.SourceObjectCount)
' Perform the import.
' Notice the null stream as a parameter to Import method.
Try
importer.Import(System.IO.Stream.Null)
Finally
AfterImport()
End Try
See Also