ArcFM Desktop Developer Guide
Shutdown Method (FeederInfoProvider)
Example 


Version: 10.2.1b and 10.2.1b SP1

Resource Center Home

Releases resources so that stand-alone applications can shutdown cleanly. Calling this method releases resources and COM object references acquired by the workspace extension. This only applies to the workspace who's connection properties were passed in to this object's constructor. This should only be called when you are finished with that workspace. It's not necessary to call this method from an ArcGIS or ArcFM application extension, add-in, or custom tool.
Syntax
'Declaration
 
Public Sub Shutdown() 
'Usage
 
Dim instance As FeederInfoProvider
 
instance.Shutdown()
public void Shutdown()
Example
The following example illustrates the correct procedure creating and disposing of objects is a batch process which reports feeder information for all versioned workspaces in a database.
public void ReportFeederInfoForAllVersion(IWorkspace workspace)
{
    // Get a list of all versions.
    var versionedWorkspace = (IVersionedWorkspace)workspace;
    IEnumVersionInfo enumVersionInfo = versionedWorkspace.Versions;
    enumVersionInfo.Reset();
            
    // Iterate through each version and create a report.
    IVersionInfo versionInfo;
    while ((versionInfo = enumVersionInfo.Next()) != null)
    {
        FeederInfoProvider feederInfoProvider = null;
            
        try
        {
            // Create a feeder info provider for the current version, execute the report.
            var connectionProperties = new ConnectionProperties((IWorkspace)versionInfo);
            feederInfoProvider = new FeederInfoProvider(connectionProperties);
            
            ReportFeederInfoForVersion(versionInfo, feederInfoProvider);
        }
        finally
        {
            // Shutdown the feeder info provider for the current version and release the workspace.
            if (feederInfoProvider != null)
                feederInfoProvider.Shutdown();
            
            Marshal.FinalReleaseComObject(versionInfo);
        }
    }
}
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

FeederInfoProvider Class
FeederInfoProvider Members

 

 


Send Comment