Determines whether a GIS resource supports a GIS functionality type.
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As IGISResource
Dim functionalityType As Type
Dim value As Boolean
value = instance.SupportsFunctionality(functionalityType) |
Parameters
- functionalityType
Return Value
Whether the functionality is supported
Example
At runtime, use SupportsFunctionality to determine if a GIS resource can create a GIS functionality. The example assumes a Map control named Map1 is available and contains at least one map resource.
C# | Copy Code |
---|
IGISFunctionality mf =
(IGISFunctionality)Map1.GetFunctionality(resource_index);
IGISResource gisresource = mf.Resource;
bool supported =
gisresource.SupportsFunctionality(typeof(IQueryFunctionality)); |
When implementing IGISResource, define an explicit list of functionality types supported.
C# | Copy Code |
---|
public bool SupportsFunctionality(System.Type functionalityType)
{
if (functionalityType ==
typeof(ESRI.ArcGIS.ADF.Web.DataSources.IMapFunctionality)) return true;
else if (functionalityType ==
typeof(ESRI.ArcGIS.ADF.Web.DataSources.IMapTocFunctionality)) return true;
else if (functionalityType ==
typeof(ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality)) return true;
else return false;
} |
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also