public void eachRelationship(forEachRelationship relationshipCallBack, forEachProperty propertyCallBack) { _eachRelationshipRecursive(this.ChildRelationships, relationshipCallBack, propertyCallBack); }
private void _eachRelationshipRecursive(IEnumerable <CswNbtViewRelationship> Relationships, forEachRelationship relationshipCallBack, forEachProperty propertyCallBack) { foreach (CswNbtViewRelationship Relationship in Relationships) { if (null != relationshipCallBack) { relationshipCallBack(Relationship); } foreach (CswNbtViewProperty ViewProp in Relationship.Properties) { if (null != propertyCallBack) { propertyCallBack(ViewProp); } } if (Relationship.ChildRelationships.Any()) { _eachRelationshipRecursive(Relationship.ChildRelationships, relationshipCallBack, propertyCallBack); } } }