Common CustomDataSourceCommon_CustomDataSource_VBNet\CustomDataSource_VBNet\TiledMapDataSource_VBNet\GISDataSource.vb
' Copyright 2007 ESRI
'
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
'
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
'
' See the use restrictions.
'
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Web.UI
Imports System.Collections
Imports ESRI.ArcGIS.ADF.Web.DataSources
Namespace TiledMapDataSource_VBNet
Public Class GISDataSource
Implements IGISDataSource
Public Sub New()
End Sub
Public Sub New(ByVal name_Renamed As String, ByVal dataSourceDefinition_Renamed As String)
Me.New(name_Renamed, String.Empty, dataSourceDefinition_Renamed)
End Sub
Public Sub New(ByVal name_Renamed As String, ByVal identity_Renamed As String, ByVal dataSourceDefinition_Renamed As String)
Me.name_Renamed = name_Renamed
Me.identity_Renamed = identity_Renamed
Me.dataSourceDefinition_Renamed = dataSourceDefinition_Renamed
End Sub
#Region "IGISDataSource implementation"
Private m_state As Hashtable
Private name_Renamed As String = String.Empty
Private dataSourceDefinition_Renamed As String = String.Empty
Private identity_Renamed As String = String.Empty
Private page_Renamed As Page = Nothing
Private resources_Renamed As GISResourceCollection = New GISResourceCollection()
''' <summary>
''' Name of the GIS Data Source
''' </summary>
Public Property Name() As String Implements IGISDataSource.Name
Get
Return name_Renamed
End Get
Set
name_Renamed = Value
End Set
End Property
''' <summary>
''' Definition of this data source
''' </summary>
Public Property DataSourceDefinition() As String Implements IGISDataSource.DataSourceDefinition
Get
Return dataSourceDefinition_Renamed
End Get
Set
If dataSourceDefinition_Renamed <> Value Then
dataSourceDefinition_Renamed = Value
End If
End Set
End Property
''' <summary>
''' Identity of user connecting to data source
''' </summary>
Public Property Identity() As String Implements IGISDataSource.Identity
Get
Return identity_Renamed
End Get
Set
identity_Renamed = Value
End Set
End Property
''' <summary>
''' The Page using this data source
''' </summary>
Public Property Page() As Page Implements IGISDataSource.Page
Get
Return page_Renamed
End Get
Set
page_Renamed = Value
End Set
End Property
''' <summary>
''' The collection of LodInfoNodes that this data source supports.
''' </summary>
Public Property Resources() As GISResourceCollection Implements IGISDataSource.Resources
Get
Return resources_Renamed
End Get
Set
resources_Renamed = Value
End Set
End Property
Private _initialized As Boolean = False
''' <summary>
''' Whether the data source has been initialized.
''' </summary>
Public ReadOnly Property Initialized() As Boolean Implements IGISDataSource.Initialized
Get
Return _initialized
End Get
End Property
''' <summary>
''' Loads state
''' </summary>
''' <param name="state">Hashtable to store state in</param>
Public Sub LoadState(ByVal state As Hashtable) Implements IGISDataSource.LoadState
m_state = state
End Sub
''' <summary>
''' Initializes the data source
''' </summary>
Public Sub Initialize() Implements IGISDataSource.Initialize
_initialized = True
End Sub
''' <summary>
''' Saves state
''' </summary>
''' <returns>Hashtable with state</param>
Public Function SaveState() As Hashtable Implements IGISDataSource.SaveState
Return m_state
End Function
''' <summary>
''' Disposes the data source
''' </summary>
Public Sub Dispose() Implements IGISDataSource.Dispose
_initialized = False
End Sub
Public ReadOnly Property State() As Hashtable Implements IGISDataSource.State
Get
Return m_state
End Get
End Property
''' <summary>
''' Gets the definitions of available LodInfoNodes
''' </summary>
Public Function GetAvailableResourceDefinitions(ByVal resourceType As System.Type) As String() Implements IGISDataSource.GetAvailableResourceDefinitions
Throw New Exception("The method or operation is not implemented.")
End Function
''' <summary>
''' Creates a resource with the passed in definition
''' </summary>
''' <param name="resourceDefinition">The definition of the resource to be created.</param>
''' <param name="name">The name of the resource to be created.</param>
''' <returns>A GIS Resource with the passed in definition.</returns>
Public Function CreateResource(ByVal resourceDefinition As String, ByVal name_Renamed As String) As IGISResource Implements IGISDataSource.CreateResource
Throw New Exception("The method or operation is not implemented.")
End Function
#End Region
End Class
End Namespace