/// <summary> /// Builds the <see cref="IEnumNetEID" /> from the specified list of elements. /// </summary> /// <param name="source">The source.</param> /// <param name="elementType">Type of the element.</param> /// <param name="eids">The eids.</param> /// <returns> /// A <see cref="IEnumNetEID" /> from the list of elements. /// </returns> /// <exception cref="System.ArgumentNullException">eids</exception> public static IEnumNetEID CreateEnumNetEID(this IGeometricNetwork source, esriElementType elementType, List <int> eids) { if (source == null) { return(null); } if (eids == null) { throw new ArgumentNullException("eids"); } return(source.CreateEnumNetEID(elementType, eids.ToArray())); }
/// <summary> /// Returns the <see cref="IEIDInfo" /> for the specified network element. /// </summary> /// <param name="source">The source.</param> /// <param name="eid">The element ID.</param> /// <param name="elementType">Type of the element.</param> /// <param name="returnFeatures">if set to <c>true</c> if the created IEIDInfo should contain features.</param> /// <param name="returnGeometries">if set to <c>true</c> if the created EIDInfo should contain geometries.</param> /// <returns> /// Returns the <see cref="IEIDInfo" /> interface for the network element. /// </returns> public static IEIDInfo GetEIDInfo(this IGeometricNetwork source, int eid, esriElementType elementType, bool returnFeatures, bool returnGeometries) { if (source == null) { return(null); } IEnumNetEID enumNetEID = source.CreateEnumNetEID(elementType, eid); IEIDHelper eidHelper = new EIDHelperClass(); eidHelper.GeometricNetwork = source; eidHelper.ReturnFeatures = returnFeatures; eidHelper.ReturnGeometries = returnGeometries; IEnumEIDInfo enumEIDInfo = eidHelper.CreateEnumEIDInfo(enumNetEID); IEIDInfo eidInfo = enumEIDInfo.Next(); return(eidInfo); }