Пример #1
0
        private void Initialize(StyleSheet styleSheet)
        {
            var    namespaceSeparatorIndex = Text.IndexOf('|');
            string @namespace = null;
            //string prefix = null;
            string alias   = "";
            string tagName = null;

            if (namespaceSeparatorIndex > -1)
            {
                alias   = Text.Substring(0, namespaceSeparatorIndex);
                tagName = Text.Substring(namespaceSeparatorIndex + 1);
                if (alias != "*")
                {
                    @namespace = styleSheet.GetNamespaceUri(alias, tagName);
                }
                else
                {
                }
            }
            else
            {
                tagName    = Text;
                @namespace = styleSheet.GetNamespaceUri("", tagName);
            }

            this.Alias           = alias;
            this.TagName         = tagName;
            this.NamespaceUri    = @namespace;
            this.initializedWith = styleSheet;
        }
Пример #2
0
        private void Initialize(StyleSheet styleSheet)
        {
            var    namespaceSeparatorIndex = Text.IndexOf('|');
            string @namespace = null;
            //string prefix = null;
            string alias   = "";
            string tagName = null;

            if (namespaceSeparatorIndex > -1)
            {
                alias   = Text.Substring(0, namespaceSeparatorIndex);
                tagName = Text.Substring(namespaceSeparatorIndex + 1);

                if (alias != "*")
                {
                    @namespace = styleSheet.GetNamespaceUri(alias, tagName);
                }
                else
                {
                }
            }
            else
            {
                tagName    = Text;
                @namespace = styleSheet.GetNamespaceUri("", tagName);
            }

            this.Alias             = alias;
            this.TagName           = tagName;
            this.NamespaceUri      = @namespace;
            this.initializedWith   = styleSheet;
            this.styleSheetVersion = styleSheet.Version;
            // Hack
            try
            {
                this.ElementTypeInfo = System.Type.GetType(TypeHelpers.ResolveFullTypeName(styleSheet.Namespaces, Text), false)?.GetTypeInfo();
            }
            catch { /* no valid type */ }
        }
Пример #3
0
        private void Initialize(StyleSheet styleSheet)
        {
            var    namespaceSeparatorIndex = Text.IndexOf('|');
            string alias      = "";
            string @namespace = null;

            if (namespaceSeparatorIndex > -1)
            {
                alias = Text.Substring(0, namespaceSeparatorIndex);
                if (alias != "*")
                {
                    @namespace = styleSheet.GetNamespaceUri(alias, "");
                }
            }
            else
            {
                @namespace = styleSheet.GetNamespaceUri("", "");
            }

            this.Alias           = alias;
            this.NamespaceUri    = @namespace;
            this.initializedWith = styleSheet;
        }