Ejemplo n.º 1
0
        public static T?GetUriElementReference <T>(this SvgElement svgOwnerElement, string name, HashSet <Uri> uris) where T : SvgElement
        {
            var uri = svgOwnerElement.GetUri(name);

            if (uri != null)
            {
                if (HasRecursiveReference(svgOwnerElement, (e) => e.GetUri(name), uris))
                {
                    return(null);
                }

                var svgElement = GetReference <T>(svgOwnerElement, uri);
                if (svgElement == null)
                {
                    return(null);
                }
                return(svgElement);
            }
            return(null);
        }