DataSourceProvider DataSourceProvider DataSourceProvider DataSourceProvider Class

Definition

Common base class and contract for DataSourceProvider objects, which are factories that execute some queries to produce a single object or a list of objects that you can use as binding source objects.

public ref class DataSourceProvider abstract : System::ComponentModel::INotifyPropertyChanged, System::ComponentModel::ISupportInitialize
public abstract class DataSourceProvider : System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.ISupportInitialize
type DataSourceProvider = class
    interface INotifyPropertyChanged
    interface ISupportInitialize
Public MustInherit Class DataSourceProvider
Implements INotifyPropertyChanged, ISupportInitialize
Inheritance
DataSourceProviderDataSourceProviderDataSourceProviderDataSourceProvider
Derived
Implements

Remarks

DataSourceProvider is a convenience wrapper around an existing data model; it does not replace any data model. A data provider does not attempt to condense the complexity and versatility of a data model such as ADO into one single object with a few properties.

DataSourceProvider is an abstract class. Use one of the derived classes, which are XmlDataProvider and ObjectDataProvider. The DataSourceProvider is aware of the Windows Presentation Foundation (WPF) threading and dispatcher model. It assumes the thread at creation time to be the UI thread. Events will get marshaled from a worker thread to the UI thread of the application.

Constructors

DataSourceProvider() DataSourceProvider() DataSourceProvider() DataSourceProvider()

Initializes a new instance of the DataSourceProvider class. This is a protected constructor.

Properties

Data Data Data Data

Gets the underlying data object.

Dispatcher Dispatcher Dispatcher Dispatcher

Gets or sets the current Dispatcher object to the UI thread to use.

Error Error Error Error

Gets the error of the last query operation.

IsInitialLoadEnabled IsInitialLoadEnabled IsInitialLoadEnabled IsInitialLoadEnabled

Gets or sets a value that indicates whether to prevent or delay the automatic loading of data.

IsRefreshDeferred IsRefreshDeferred IsRefreshDeferred IsRefreshDeferred

Gets a value that indicates whether there is an outstanding DeferRefresh() in use.

Methods

BeginInit() BeginInit() BeginInit() BeginInit()

Indicates that initialization of this object is about to begin; no implicit Refresh() occurs until the matched EndInit() method is called.

BeginQuery() BeginQuery() BeginQuery() BeginQuery()

When overridden in a derived class, this base class calls this method when InitialLoad() or Refresh() has been called. The base class delays the call if refresh is deferred or initial load is disabled.

DeferRefresh() DeferRefresh() DeferRefresh() DeferRefresh()

Enters a defer cycle that you can use to change properties of the provider and delay automatic refresh.

EndInit() EndInit() EndInit() EndInit()

Indicates that the initialization of this object has completed; this causes a Refresh() if no other DeferRefresh() is outstanding.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitialLoad() InitialLoad() InitialLoad() InitialLoad()

Starts the initial query to the underlying data model. The result is returned on the Data property.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnPropertyChanged(PropertyChangedEventArgs) OnPropertyChanged(PropertyChangedEventArgs) OnPropertyChanged(PropertyChangedEventArgs) OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event with the provided arguments.

OnQueryFinished(Object) OnQueryFinished(Object) OnQueryFinished(Object) OnQueryFinished(Object)

Derived classes call this method to indicate that a query has finished.

OnQueryFinished(Object, Exception, DispatcherOperationCallback, Object) OnQueryFinished(Object, Exception, DispatcherOperationCallback, Object) OnQueryFinished(Object, Exception, DispatcherOperationCallback, Object) OnQueryFinished(Object, Exception, DispatcherOperationCallback, Object)

Derived classes call this method to indicate that a query has finished.

Refresh() Refresh() Refresh() Refresh()

Initiates a refresh operation to the underlying data model. The result is returned on the Data property.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Events

DataChanged DataChanged DataChanged DataChanged

Occurs when the Data property has a new value.

PropertyChanged PropertyChanged PropertyChanged PropertyChanged

Occurs when a property value changes.

Explicit Interface Implementations

INotifyPropertyChanged.PropertyChanged INotifyPropertyChanged.PropertyChanged INotifyPropertyChanged.PropertyChanged INotifyPropertyChanged.PropertyChanged
ISupportInitialize.BeginInit() ISupportInitialize.BeginInit() ISupportInitialize.BeginInit() ISupportInitialize.BeginInit()

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

ISupportInitialize.EndInit() ISupportInitialize.EndInit() ISupportInitialize.EndInit() ISupportInitialize.EndInit()

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

Applies to