/// <inheritdoc/>
        public bool Equals(IApplicationResourceIdentifier other)
        {
            if (LocationSegments.Count() != other.LocationSegments.Count())
            {
                return(false);
            }

            if (((string)Application.Name) != ((string)other.Application.Name))
            {
                return(false);
            }
            if (((string)Resource.Name) != ((string)other.Resource.Name))
            {
                return(false);
            }

            var locationSegmentsA = LocationSegments.ToArray();
            var locationSegmentsB = other.LocationSegments.ToArray();

            for (var i = 0; i < locationSegmentsA.Length; i++)
            {
                if (locationSegmentsA[i].Name.AsString() != locationSegmentsB[i].Name.AsString())
                {
                    return(false);
                }
            }

            return(true);
        }
        /// <inheritdoc/>
        public override string ToString()
        {
            var stringBuilder = new StringBuilder();

            stringBuilder.Append(Application?.Name?.ToString() ?? "<unknown application>");
            stringBuilder.Append($" - {Resource?.Name?.ToString() ?? "<unknown resource>"}");

            LocationSegments.ForEach(segment => stringBuilder.Append($"- {segment?.Name?.ToString() ?? "<unknown segment>"}"));

            return(stringBuilder.ToString());
        }