'Declaration Public Overridable Sub Fetch( _ ByVal context As DataContext _ )
public virtual void Fetch( DataContext context )
Exception | Description |
---|---|
System.ArgumentException | Thrown when context does not specify a supported operation. A valid Operation must be one of "FetchResource", "FetchResources", "FetchActivities" or "FetchReminders". |
System.ArgumentNullException | Thrown when the supplied context is null (Nothing in Visual Basic .NET). |
This method implements the Fetch method of the IDataFetch interface. The WebScheduleInfo consumes this interface in order to populate it's collections with Activities and Resources from the WebSchedule data model at data-bind time. Web application developers should not call this method directly from their scheduling applications.
The base class implementation of Fetch handles the following operations:
Inheritors developing their own custom data provider should override Fetch to support additional operations, current operations on different relational database management systems, and data bindings (e.g., to increase the number of types the WebSchedule data model can persist from a scheduling application). Please see the help documentation for further information on extending WebScheduleDbProvider to create a custom data provider.
When extending the WebScheduleDbProvider (additional operations or data bindings), inheritors should first check context to see if it matches one of their extended DataContexts. When it does, the subclass is responsible for dispatching it to a method it implements for handling that operation and/or ScheduleDataBinding subclass. If the context does not match a recognized operation, then call the base implementation of Fetch to ensure proper dispatch and/or error handling.
When implementing support for a new relational database management system (or other underlying data store), the implementation of methods for standard operations (i.e., "FetchActivities", "AddActivity", etc.) MAY not be compatible with that data technology. When this is the case, the overridden implementation of Fetch in the subclass should handle the standard operation and dispatch it to it's own method supporting the new data platform.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2