Пример #1
0
		public DefaultFunctionCall (XQueryStaticContext ctx, string name, int minArgs, int maxArgs, SequenceType type, ExprSequence args)
			: base (GetName (name), args)
		{
			this.type = type;
			this.minArgs = minArgs;
			this.maxArgs = maxArgs;
		}
Пример #2
0
		internal static SequenceType ComputeCommonBase (SequenceType t1, SequenceType t2)
		{
			// FIXME: implement
			// throw new NotImplementedException ();
			return SequenceType.AnyType;
		}
Пример #3
0
		internal static SequenceType Create (XmlSchemaType schemaType, Occurence occurence)
		{
			switch (schemaType.QualifiedName.Namespace) {
			case XmlSchema.Namespace:
			case InternalPool.XdtNamespace:
				break;
			default:
				return new SequenceType (schemaType, occurence);
			}

			Hashtable cacheForType = standardTypes [schemaType] as Hashtable;
			if (cacheForType == null) {
				cacheForType = new Hashtable ();
				standardTypes [schemaType] = cacheForType;
			} else {
				SequenceType type = cacheForType [occurence] as SequenceType;
				if (type != null)
					return type;
			}
			SequenceType t = new SequenceType (schemaType, occurence);
			cacheForType [occurence] = t;
			return t;
		}
Пример #4
0
		private ConvertingIterator (ConvertingIterator other)
			: base (other)
		{
			iter = other.iter.Clone ();
			type = other.type;
		}
Пример #5
0
		public ConvertingIterator (XPathSequence iter, SequenceType type)
			: base (iter.Context)
		{
			this.iter = iter;
			this.type = type;
		}
Пример #6
0
		public TreatExpr (ExprSingle expr, SequenceType type)
			: base (expr, type)
		{
		}
Пример #7
0
		public XQueryVariable (XmlQualifiedName name, SequenceType type, ExprSequence varBody)
		{
			this.name = name;
			this.type = type;
			this.varBody = varBody; // might be null (just declaration).
		}
Пример #8
0
		public XQueryFunctionArgument (XmlQualifiedName name, SequenceType type)
		{
			this.name = name;
			this.type = type;
		}
Пример #9
0
		// FIXME: use IXmlNamespaceResolver.LookupPrefix() in ctx
		public AtomicConstructorCall (XQueryStaticContext ctx, SequenceType type, XPathItemExpression [] args)
			: base (ctx, type.SchemaType.QualifiedName.Name, 1, 1, type, args)
		{
		}
Пример #10
0
		private XQueryCliFunction (XmlQualifiedName name, 
			XQueryFunctionArgument [] args,
			SequenceType returnType,
			Hashtable methods,
			int minArgs,
			int maxArgs)
			: base (name, args, returnType)
		{
			this.methods = methods;
			this.maxArgs = maxArgs;
			this.minArgs = minArgs;
		}
Пример #11
0
		protected TypeOperationExpr (ExprSingle expr, SequenceType type)
		{
			this.expr = expr;
			this.type = type;
		}
Пример #12
0
		public CaseClause (SequenceType type, ExprSingle expr, XmlQualifiedName varName)
		{
			this.type = type;
			this.expr = expr;
			this.varName = varName;
		}
Пример #13
0
		public QuantifiedExprBody (XmlQualifiedName varName,
			SequenceType type, ExprSingle expr)
		{
			this.varName = varName;
			this.type = type ;
			this.expr = expr;
		}
Пример #14
0
		public LetSingleBody (XmlQualifiedName varName, SequenceType type, ExprSingle expr)
			: base (varName, type, expr)
		{
		}
Пример #15
0
		public ForSingleBody (XmlQualifiedName varName, SequenceType type, XmlQualifiedName positionalVar, ExprSingle expr)
			: base (varName, type, expr)
		{
			this.positionalVar = positionalVar;
		}
Пример #16
0
		internal bool CanConvertTo (SequenceType other)
		{
			// FIXME: implement precisely
			return this == other;
			// throw new NotImplementedException ();
		}
Пример #17
0
		// Constructor

		internal XQueryFunction (XmlQualifiedName name, XQueryFunctionArgument [] args, SequenceType returnType)
		{
			this.name = name;
			this.args = args;
			this.returnType = returnType;
		}
Пример #18
0
		internal void CheckSchemaType (SequenceType type)
		{
			if (type == null)
				return;
			type.ItemType.CheckReference (this);
		}
Пример #19
0
		internal XQueryUserFunction (XmlQualifiedName name,
			XQueryFunctionArgument [] parameters,
			ExprSequence expr,
			SequenceType returnType)
			: base (name, parameters, returnType)
		{
			this.expr = expr;
		}
Пример #20
0
		internal void CheckType (ExprSingle expr, SequenceType type)
		{
			if (!expr.StaticType.CanConvertTo (type))
				throw new XmlQueryCompileException (String.Format ("Cannot convert type from {0} to {1}", expr.StaticType, type));
		}
Пример #21
0
		public FunctionDeclaration (XmlQualifiedName name,
			XQueryFunctionArgumentList parameters,
			SequenceType type,
			EnclosedExpr expr)
		{
			this.name = name;
			this.parameters = parameters;
			this.returnType = type;
			this.funcBody = expr;
		}
Пример #22
0
		public InstanceOfExpr (ExprSingle expr, SequenceType type)
			: base (expr, type)
		{
		}