Ejemplo n.º 1
0
        public static bool Equal(RouteInfo a, RouteInfo b)
        {
            var result = true;

            try
            {
                if (a.Controller != b.Controller)
                {
                    return(false);
                }
                if (a.Parts.Count != b.Parts.Count)
                {
                    return(false);
                }
                for (var i = 0; i < a.Parts.Count; i++)
                {
                    if (!RoutePart.Equal(a.Parts[i], b.Parts[i]))
                    {
                        return(false);
                    }
                }
            }
            catch (Exception e)
            {
                throw new Exception($"RouteInfo Equal Error: {e.Message}");
            }

            return(result);
        }
Ejemplo n.º 2
0
        public static bool Equal(RoutePart a, RoutePart b)
        {
            var result = true;

            try
            {
                if (a.PartType != b.PartType)
                {
                    return(false);
                }
                if (a.Index != b.Index)
                {
                    return(false);
                }
                if (a.PartName != b.PartName)
                {
                    return(false);
                }
            }
            catch (Exception e)
            {
                throw new Exception($"RoutePart Equal Error: {e.Message}");
            }

            return(result);
        }