當前位置: 首頁>>代碼示例>>C#>>正文


C# JavaScript.JsEmitContext類代碼示例

本文整理匯總了C#中Mono.CSharp.JavaScript.JsEmitContext的典型用法代碼示例。如果您正苦於以下問題:C# JsEmitContext類的具體用法?C# JsEmitContext怎麽用?C# JsEmitContext使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


JsEmitContext類屬於Mono.CSharp.JavaScript命名空間,在下文中一共展示了JsEmitContext類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			CheckExternImpl ();
			
			base.EmitJs (jec);
		}
開發者ID:bbqchickenrobot,項目名稱:playscript-mono,代碼行數:6,代碼來源:class.cs

示例2: EmitStatementJs

		public override void EmitStatementJs (JsEmitContext jec)
		{
			// It can be null for static initializers
			if (base_ctor == null || base_ctor.DeclaringType == jec.Compiler.BuiltinTypes.Object)
				return;

			jec.Buf.Write ("\t", Location);

			EmitJs (jec);

			jec.Buf.Write (";\n");
		}
開發者ID:OpenFlex,項目名稱:playscript-mono,代碼行數:12,代碼來源:method.cs

示例3: EmitJs

		public void EmitJs (TypeDefinition parent, JsEmitContext jec)
		{
			var mc = (IMemberContext) method;

			method.ParameterInfo.ApplyAttributes (mc, MethodBuilder);
			
			ToplevelBlock block = method.Block;
			if (block != null) {
				BlockContext bc = new BlockContext (mc, block, method.ReturnType);
				if (block.Resolve (null, bc, method)) {
					block.EmitBlockJs (jec, false, false);
				}
			}
		}
開發者ID:OpenFlex,項目名稱:playscript-mono,代碼行數:14,代碼來源:method.cs

示例4: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			var typeName = jec.MakeJsTypeName(this.Parent.MemberName.Name);

			var proto = "";
			if ((ModFlags & Modifiers.STATIC) == 0) {
				proto = ".prototype";
			}

			jec.Buf.Write ("\tObject.defineProperty(", typeName, proto, ", \"", MemberName.Name, "\", {\n", Location);
			jec.Buf.Indent ();

			if (this.Get != null) {
				this.Get.EmitJs (jec);
			}

			if (this.Set != null) {
				this.Set.EmitJs (jec);
			}

			jec.Buf.Write ("\tenumerable: true,\n\tconfigurable: true\n");
			jec.Buf.Unindent ();
			jec.Buf.Write ("\t});\n");
		}
開發者ID:bbqchickenrobot,項目名稱:playscript-mono,代碼行數:24,代碼來源:property.cs

示例5: EmitJs

			public override void EmitJs (JsEmitContext jec)
			{
				child.EmitJs (jec);
			}
開發者ID:rlfqudxo,項目名稱:playscript-mono,代碼行數:4,代碼來源:assign.cs

示例6: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			jec.Buf.Write ("undefined", Location);
		}
開發者ID:johnv315,項目名稱:playscript-mono,代碼行數:4,代碼來源:ps-lang.cs

示例7: DoEmitJs

		protected override void DoEmitJs (JsEmitContext jec) 
		{
			expr.EmitJs (jec);
		}
開發者ID:johnv315,項目名稱:playscript-mono,代碼行數:4,代碼來源:ps-lang.cs

示例8: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			Arguments[0].Expr.EmitJs (jec);
			jec.Buf.Write (".", name, Location);
		}
開發者ID:bbqchickenrobot,項目名稱:playscript-mono,代碼行數:5,代碼來源:dynamic.cs

示例9: EmitJs

		/// <summary>
		/// Base JS emit method.  This is also entry point for CLS-Compliant verification.
		/// </summary>
		public virtual void EmitJs (JsEmitContext jec)
		{
			if (!Compiler.Settings.VerifyClsCompliance)
				return;
			
			VerifyClsCompliance ();
		}
開發者ID:bbqchickenrobot,項目名稱:playscript-mono,代碼行數:10,代碼來源:decl.cs

示例10: EmitContainerJs

		public override void EmitContainerJs (JsEmitContext jec)
		{
			jec.Buf.Write ("// File: ", this.FileName, "\n");

			base.EmitContainerJs (jec);
		}
開發者ID:johnv315,項目名稱:playscript-mono,代碼行數:6,代碼來源:namespace.cs

示例11: EmitStatementJs

		public override void EmitStatementJs (JsEmitContext jec)
		{
			jec.Buf.Write ("\t", Location);
			Target.EmitJs (jec);
			jec.Buf.Write (" = ");
			Source.EmitJs (jec);
			jec.Buf.Write (";\n");
		}
開發者ID:rlfqudxo,項目名稱:playscript-mono,代碼行數:8,代碼來源:assign.cs

示例12: EmitJs

		public virtual void EmitJs (JsEmitContext jec)
		{
			bool first = true;
			foreach (Argument a in args) {
				if (!first)
					jec.Buf.Write(", ");
				a.Expr.EmitJs (jec);
				first = false;
			}
		}
開發者ID:johnv315,項目名稱:playscript-mono,代碼行數:10,代碼來源:argument.cs

示例13: EmitContainerJs

		public override void EmitContainerJs (JsEmitContext jec)
		{
			if (OptAttributes != null)
				OptAttributes.EmitJs (jec);

			foreach (var tc in containers) {
				tc.PrepareEmit ();
			}
			
			base.EmitContainerJs (jec);

			if (Compiler.Report.Errors == 0 && !Compiler.Settings.WriteMetadataOnly)
				VerifyMembers ();
			
			if (anonymous_types != null) {
				foreach (var atypes in anonymous_types)
					foreach (var at in atypes.Value)
						at.EmitContainerJs (jec);
			}
		}
開發者ID:johnv315,項目名稱:playscript-mono,代碼行數:20,代碼來源:module.cs

示例14: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			jec.Buf.Write ("\"", jec.Buf.EscapeString(Value), "\"", loc);
		}
開發者ID:bbqchickenrobot,項目名稱:playscript-mono,代碼行數:4,代碼來源:literal.cs

示例15: EmitContainerJs

		public virtual void EmitContainerJs (JsEmitContext jec)
		{
			if (containers != null) {
				for (int i = 0; i < containers.Count; ++i)
					containers[i].EmitContainerJs (jec);
			}
		}
開發者ID:bbqchickenrobot,項目名稱:playscript-mono,代碼行數:7,代碼來源:class.cs


注:本文中的Mono.CSharp.JavaScript.JsEmitContext類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。