public void Add(XQueryVariable decl) { Dictionary.Add(decl.Name, decl); }
public void Add (XQueryVariable decl) { Dictionary.Add (decl.Name, decl); }
public void Add(object item) { if (item is bool) { DefaultOrdered = (bool)item; } else if (item is XmlQualifiedName) { XmlQualifiedName q = (XmlQualifiedName)item; NamespaceDecls.Add(q.Name, q.Namespace); } else if (item is XmlSpaceDecl) { XmlSpace = ((XmlSpaceDecl)item).Value; } else if (item is ConstructionDecl) { Constructor = ((ConstructionDecl)item).Value; } else if (item is SimplePrologContent) { SimplePrologContent c = (SimplePrologContent)item; string s = c.LiteralValue; switch (c.Type) { case PrologContentType.DefaultElementNamespace: DefaultElementNamespace = s; break; case PrologContentType.DefaultFunctionNamespace: DefaultFunctionNamespace = s; break; case PrologContentType.DefaultCollation: DefaultCollation = s; break; case PrologContentType.BaseUri: BaseUri = s; break; default: throw new XmlQueryCompileException("Invalid XQuery prolog content was found."); } } else if (item is SchemaImport) { SchemaImports.Add(item as SchemaImport); } else if (item is ModuleImport) { ModuleImports.Add(item as ModuleImport); } else if (item is XQueryVariable) { XQueryVariable var = item as XQueryVariable; Variables.Add(var); } else if (item is XmlSchemaContentProcessing) { ValidationType = (XmlSchemaContentProcessing)item; } else if (item is FunctionDeclaration) { Functions.Add(item as FunctionDeclaration); } else { throw new XmlQueryCompileException("Invalid XQuery prolog content item was found."); } }