ArcFM Responder Mobile Developer Guide
Diffs Property
Example 






Gets differences between the network state before and after an edit.
Syntax
'Declaration
 
Public ReadOnly Property Diffs As System.Collections.Generic.IEnumerable(Of FeederInfoDiff)
'Usage
 
Dim instance As FeederChangedEvent
Dim value As System.Collections.Generic.IEnumerable(Of FeederInfoDiff)
 
value = instance.Diffs
public System.Collections.Generic.IEnumerable<FeederInfoDiff> Diffs {get;}
public read-only property Diffs: System.Collections.Generic.IEnumerable; 
public function get Diffs : System.Collections.Generic.IEnumerable
public: __property System.Collections.Generic.IEnumerable<FeederInfoDiff*>* get_Diffs();
public:
property System.Collections.Generic.IEnumerable<FeederInfoDiff^>^ Diffs {
   System.Collections.Generic.IEnumerable<FeederInfoDiff^>^ get();
}

Property Value

Differences in between the network state before and after an edit.
Remarks
Changes to the networks state for a feature are only reported if the feeder information for a feature has chaged.
Example
Finding loops created by the edit which triggered a feeder changed event.
public void HandleEvent(FeederChangedEvent e)
{
    IEnumerable<string> editingFeedback = GetEditingFeedback(e.Diffs);
            
    if (editingFeedback.Any())
    {
        string warnings = string.Join("\r\n", editingFeedback.ToArray());
        MessageBox.Show(warnings);
    }
}
            
private IEnumerable<string> GetEditingFeedback(IEnumerable<FeederInfoDiff> diffs)
{
    var warnings = new List<string>();
            
    int diffCount = diffs.Count();
            
    if (diffCount > 100)
    {
        warnings.Add(string.Format("Warning {0} features were modified exceeding the maximum number of modified features per edit policy.", diffCount));
    }
            
    if (diffs.Any(diff => diff.InfoBefore.IsLooped == false & diff.InfoAfter.IsLooped))
    {
        warnings.Add(string.Format("Warning a loop was created by the last edit."));
    }
            
    int deenergizedFeatureCount = diffs.Count(diff => diff.InfoAfter.EnergizedPhases == Phases.None);
            
        if (deenergizedFeatureCount > 0)
    {
        warnings.Add(string.Format("Warning {0} features were de-energized as a result of the previous edit.", deenergizedFeatureCount));
    }
            
    if (diffs.Any(diff => diff.InfoAfter.FeederIDs.Count() > 1))
    {
        warnings.Add(string.Format("Warning a multifeed was created by the previous edit."));
    }
            
    return warnings;
            
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FeederChangedEvent Class
FeederChangedEvent Members

Send Feedback