ScheduleCreate Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Creates the specified Schedule from an Xml source.

Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)

public static Schedule Create(
	XmlReader reader


Type: System.XmlXmlReader
The XmlReader that reads from the Xml source.

Return Value

Type: Schedule
A Schedule object that contains schedule information from the data source, if found; null (Nothing in Visual Basic) otherwise.

ArgumentNullExceptionThe reader must not be null.
XmlExceptionThe data read by the XmlReader is not valid according to the schema

This method accepts an XmlReader that reads the Xml base serialized schedule data from a repository. The method advances the reader to the next schedule element, ensures that the data conforms with the schema (see the GetValidationSchema(ValidationEventHandler) method), and advances the reader to the end of the schedule element. This makes it possible to create one Schedule object for each occurrence in the xml source as th sample code shows.

List<Schedule> GetSchedules(XmlReader reader)
  List<Schedule> list = new List<Schedule>();
  //as long as the reader is valid
    //create a new schedule from the xml data,
    Schedule schedule = Schedule.Create(reader);
    //when the end of the data has been reached, schedule will be null
    if (schedule != null)
  return list;
See Also