• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# XPath2.XQueryASTCompiler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Mono.Xml.XPath2.XQueryASTCompiler的典型用法代码示例。如果您正苦于以下问题:C# XQueryASTCompiler类的具体用法?C# XQueryASTCompiler怎么用?C# XQueryASTCompiler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XQueryASTCompiler类属于Mono.Xml.XPath2命名空间,在下文中一共展示了XQueryASTCompiler类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CompileCore

		internal override ExprSingle CompileCore (XQueryASTCompiler compiler)
		{
			if (Content != null)
				for (int i = 0; i < Content.Count; i++)
					Content [i] = Content [i].Compile (compiler);
			return this;
		}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:XQueryExpression.cs


示例2: Create

		/*
		internal static DefaultFunctionCall Create (
			XmlQualifiedName name,
			ExprSingle [] args,
			XQueryStaticContext ctx)
		{
			switch (name.Namespace) {
			case XQueryFunction.Namespace:
				switch (name.Name) {
				case "node-name":
					return new FnNodeNameCall (ctx, args);
				case "nilled":
					return new FnNilledCall (ctx, args);
				case "string":
					return new FnStringCall (ctx, args);
				case "data":
					return new FnDataCall (ctx, args);
				case "base-uri":
					return new FnBaseUriCall (ctx, args);
				case "document-uri":
					return new FnDocumentUriCall (ctx, args);
				case "error":
					return new FnErrorCall (ctx, args);
				case "trace":
					return new FnTraceCall (ctx, args);
				case "abs":
					return new FnAbsCall (ctx, args);
				case "ceiling":
					return new FnCeilingCall (ctx, args);
				case "floor":
					return new FnFloorCall (ctx, args);
				case "round":
					return new FnRoundCall (ctx, args);
				case "round-half-to-even":
					return new FnRoundHalfToEvenCall (ctx, args);
				case "codepoints-to-string":
					return new FnCodepointsToStringCall (ctx, args);
				case "string-to-codepoints":
					return new FnStringCallToCodepointsCall (ctx, args);
				}
				goto default;
			case InternalPool.XdtNamespace:
			case XmlSchema.Namespace:
				XmlSchemaType type = XmlSchemaType.GetBuiltInSimpleType (name);
				if (type != null)
					return new AtomicConstructorCall (ctx, SequenceType.Create (type, Occurence.One), args);
				type = XmlSchemaType.GetBuiltInComplexType (name);
				if (type == null)
					goto default;
				return null;
			default:
				XQueryFunction func = ctx.CompileContext.InEffectFunctions [name];
				if (func != null)
					return new CustomFunctionCallExpression (ctx, args, func);
				return null;
			}
		}
		*/

		internal void CheckArguments (XQueryASTCompiler compiler)
		{
			if (args.Count < MinArgs || args.Count > MaxArgs)
				// FIXME: add more info
				throw new XmlQueryCompileException (String.Format ("{0} is invalid for the number of {1} function argument. MinArgs = {2}, MaxArgs = {3}.", args.Count, name, MinArgs, MaxArgs));
		}
开发者ID:nlhepler,项目名称:mono,代码行数:65,代码来源:XPath2Expression.cs


示例3: CheckReference

		internal override void CheckReference (XQueryASTCompiler compiler)
		{
			if (nameExpr != null)
				nameExpr.CheckReference (compiler);
			if (Content != null)
				Content.CheckReference (compiler);
		}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:XQueryExpression.cs


示例4: Compile

		internal override void Compile (XQueryASTCompiler compiler)
		{
		}
开发者ID:nlhepler,项目名称:mono,代码行数:3,代码来源:SequenceType.cs


示例5: CompileProlog

		private void CompileProlog ()
		{
			Prolog p = module.Prolog;

			// resolve external modules
			// FIXME: check if external queries are allowed by default.
			// FIXME: check recursion
			XmlUrlResolver res = new XmlUrlResolver ();
			foreach (ModuleImport modimp in p.ModuleImports) {
				foreach (string uri in modimp.Locations) {
					Stream s = res.GetEntity (res.ResolveUri (null, uri), null, typeof (Stream)) as Stream;
					XQueryLibraryModule ext = Mono.Xml.XQuery.Parser.Parser.Parse (new StreamReader (s)) as XQueryLibraryModule;
					if (ext == null)
						throw new XmlQueryCompileException (String.Format ("External module {0} is resolved as a main module, while it should be a library module."));
					XQueryStaticContext sctx = new XQueryASTCompiler (ext, options, compileContext, evidence, commandImpl).Compile ();
					libModuleContexts.Add (sctx);
				}
			}

			// resolve and compile in-scope schemas
			foreach (SchemaImport xsimp in p.SchemaImports) {
				foreach (string uri in xsimp.Locations) {
					XmlSchema schema = inScopeSchemas.Add (xsimp.Namespace, uri);
					compileContext.InEffectSchemas.Add (schema);
				}
			}
			inScopeSchemas.Compile ();

			CheckReferences ();

			ResolveVariableReferences ();

			// compile FunctionDeclaration into XQueryFunction
			foreach (FunctionDeclaration func in p.Functions.Values) {
				XQueryFunction cfunc = CompileFunction (func);
				localFunctions.Add (cfunc);
			}
		}
开发者ID:nlhepler,项目名称:mono,代码行数:38,代码来源:XQueryASTCompiler.cs


示例6: CompileCore

		// If internal&&protected is available in C#, it is the best signature.
		internal abstract ExprSingle CompileCore (XQueryASTCompiler compiler);
开发者ID:nlhepler,项目名称:mono,代码行数:2,代码来源:XPath2Expression.cs


示例7: CheckReference

		internal override void CheckReference (XQueryASTCompiler compiler)
		{
			foreach (QuantifiedExprBody one in body) {
				if (one.Type != null)
					compiler.CheckSchemaType (one.Type);
				one.Expression.CheckReference (compiler);
			}
			Satisfies.CheckReference (compiler);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:9,代码来源:XPath2Expression.cs


示例8: CheckReference

		internal virtual void CheckReference (XQueryASTCompiler compiler)
		{
		}
开发者ID:nlhepler,项目名称:mono,代码行数:3,代码来源:SequenceType.cs


示例9: Compile

		internal ExprSingle Compile (XQueryASTCompiler compiler)
		{
			this.ctx = ctx;
			return CompileCore (compiler);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:5,代码来源:XPath2Expression.cs



注:本文中的Mono.Xml.XPath2.XQueryASTCompiler类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Parser.CSharpParser类代码示例发布时间:2022-05-26
下一篇:
C# XPath2.XPathSequence类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap