/// <summary>
 /// Method determines is restricted or not located status.
 /// </summary>
 /// <param name="status">Status.</param>
 /// <returns>True if it is restricted or not located, otherwise - false.</returns>
 private static bool _IsRestrictedOrNotLocated(NAObjectStatus status)
 {
     return (status == NAObjectStatus.esriNAObjectStatusNotLocated ||
             status == NAObjectStatus.esriNAObjectStatusElementNotLocated ||
             status == NAObjectStatus.esriNAObjectStatusElementNotTraversable);
 }
        /// <summary>
        /// Method creates violation for restricted object according to its status.
        /// </summary>
        /// <param name="status">Object status.</param>
        /// <param name="assocObject">Associated object.</param>
        /// <returns>Violation.</returns>
        private static Violation _CreateRestrictedObjViolation(NAObjectStatus status,
                                                               DataObject assocObject)
        {
            var violation = new Violation();
            violation.AssociatedObject = assocObject;

            if (status == NAObjectStatus.esriNAObjectStatusNotLocated ||
                status == NAObjectStatus.esriNAObjectStatusElementNotLocated)
            {
                violation.ViolationType = ViolationType.TooFarFromRoad;
            }
            else if (status == NAObjectStatus.esriNAObjectStatusElementNotTraversable)
            {
                violation.ViolationType = ViolationType.RestrictedStreet;
            }
            else
                Debug.Assert(false);

            return violation;
        }