ESRI.ArcGIS.ADF.Web.DataSources
Initialize Method
See Also  Example
ESRI.ArcGIS.ADF.Web.DataSources Namespace > IGISResource Interface : Initialize Method




Initializes the resource. Deprecated. It is recommended that implementations initialize on demand, i.e., when properties or methods are used that require initialization. Clients of this interface using custom datasource implementations should continue to call this method unless they are sure that the custom datasource initializes on demand.

Syntax

Visual Basic (Declaration) 
<ObsoleteAttribute("It is recommended that implementations initialize on demand, i.e., when properties or methods are used that require initialization.  Clients of this interface using custom datasource implementations should continue to call this method unless they are sure that the custom datasource initializes on demand.")>
Sub Initialize() 
Visual Basic (Usage)Copy Code
Dim instance As IGISResource
 
instance.Initialize()
C# 
[ObsoleteAttribute("It is recommended that implementations initialize on demand, i.e., when properties or methods are used that require initialization.  Clients of this interface using custom datasource implementations should continue to call this method unless they are sure that the custom datasource initializes on demand.")]
void Initialize()

Example

The following code illustrates how a data source definition is used to read data used by the resource. The Initialize method may be called on every postback to the Page that contains the resource.
C#Copy Code
public void Initialize() 



    initialized = true;             

    string dataSourceConfig = DataSource.DataSourceDefinition; 

    ProcessData(dataSourceConfig); 



    

Remarks

At a minimum, the Initialized property should be set to true. Implementations of this method will often connect to a data source and read data when first initialized. A validate timeout may also be used when attempting to establish a connection.

See Also

© 2010 All Rights Reserved.