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; }
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 */ } }
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; }