示例#1
0
        /// <summary>
        ///     Gets the network element information for the specified feature.
        /// </summary>
        /// <param name="feature">The feature.</param>
        /// <param name="elementType">Type of the element.</param>
        /// <returns>
        ///     Returns the <see cref="int" /> representing the network information.
        /// </returns>
        protected int GetEID(IFeature feature, out esriElementType elementType)
        {
            elementType = esriElementType.esriETNone;

            INetworkFeature networkFeature = feature as INetworkFeature;

            if (networkFeature == null)
            {
                return(-1);
            }

            return(networkFeature.GetEID(out elementType));
        }
        /// <summary>
        ///     Returns the <see cref="IEIDInfo" /> for the specified network feature.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="elementType">Type of the element.</param>
        /// <returns>
        ///     Returns a <see cref="IEIDInfo" /> representing the network information.
        /// </returns>
        public static IEIDInfo GetEIDInfo(this INetworkFeature source, out esriElementType elementType)
        {
            int eid = source.GetEID(out elementType);

            return(source.GeometricNetwork.GetEIDInfo(eid, elementType));
        }