ArcFM Desktop Developer Guide
FeederWorkspace Property
Example 


Version: 10.2.1b and 10.2.1b SP1

Resource Center Home

Gets connection properties for the workspace containing the edited feature.
Syntax
public IConnectionProperties FeederWorkspace {get;}
'Declaration
 
Public ReadOnly Property FeederWorkspace As IConnectionProperties
 
'Usage
 
Dim instance As FeederChangedEvent
Dim value As IConnectionProperties
 
value = instance.FeederWorkspace

Property Value

The connection properties for the workspace containing the edited feature.
Example
The following example initializes a new feeder info provider using the provided feeder workspace property and writes feeder ID changes to the trace output stream.
public void HandleEvent(FeederChangedEvent e)
{
    // Writes a list of all edited features to the trace log.
    var feederInfoProvider = new FeederInfoProvider(e.FeederWorkspace);
    var featureClassContainer = (IFeatureClassContainer)(feederInfoProvider.WorkspaceInfo.Network).FeatureDataset;
            
    // Group diffs by object class ID
    foreach (var group in e.Diffs.GroupBy(diff => diff.Key.ObjectClassID))
    {
        // Get the feature class name.
        var featureClass  = featureClassContainer.Class[group.Key];
        Trace.WriteLine(string.Format("Feature Class: {0}", featureClass.AliasName);
            
        foreach (var diff in group)
        {
            // Get the feeder IDs and write results to the trace stream.
            string feederIdsBefore = string.Join(",", diff.InfoBefore.FeederIDs);
            string feederIdsAfter = string.Join(",", diff.InfoAfter.FeederIDs);
            
            Trace.WriteLine(string.Format("ObjectID={0} [FeederIDs Before: {1}, FeederIds After:{2}]", diff.Key,feederIdsBefore, feederIdsAfter));   
        }
    }
}
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

FeederChangedEvent Class
FeederChangedEvent Members

 

 


Send Comment