Skip to main content

AppointmentImporter.Import(Stream) Method

Imports appointments from the specified stream.

Namespace: DevExpress.XtraScheduler.Exchange

Assembly: DevExpress.XtraScheduler.v24.1.Core.dll

NuGet Package: DevExpress.Scheduler.Core

Declaration

public virtual void Import(
    Stream stream
)

Parameters

Name Type Description
stream Stream

A Stream object which represents the stream the appointments will be imported from.

Remarks

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();
    }
See Also