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


C# CompilerSettings.SetNewDynamicRuntimeEnable方法代碼示例

本文整理匯總了C#中Mono.CSharp.CompilerSettings.SetNewDynamicRuntimeEnable方法的典型用法代碼示例。如果您正苦於以下問題:C# CompilerSettings.SetNewDynamicRuntimeEnable方法的具體用法?C# CompilerSettings.SetNewDynamicRuntimeEnable怎麽用?C# CompilerSettings.SetNewDynamicRuntimeEnable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Mono.CSharp.CompilerSettings的用法示例。


在下文中一共展示了CompilerSettings.SetNewDynamicRuntimeEnable方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ParseOption


//.........這裏部分代碼省略.........
					Error_RequiresArgument (option);
					return ParseResult.Error;
				}

				switch (value.ToLowerInvariant ()) {
					case "none":
					settings.Inlining = InliningMode.None;
					break;
					case "explicit":
					settings.Inlining = InliningMode.Explicit;
					break;
					case "any":
					settings.Inlining = InliningMode.Any;
					break;
					default:
					report.Error (1672, "Invalid -inline option `{0}'. Valid options are `none', `explicit', `any'",
					              value);
					return ParseResult.Error;
				}

				return ParseResult.Success;
			
			case "/autoseal":
			case "/autoseal+":
				settings.AutoSeal = true;
				return ParseResult.Success;

			case "/autoseal-":
				settings.AutoSeal = false;
				return ParseResult.Success;

			case "/newdynamic":
			case "/newdynamic+":
				settings.SetNewDynamicRuntimeEnable(true);
				return ParseResult.Success;

			case "/newdynamic-":
				settings.SetNewDynamicRuntimeEnable(false);
				return ParseResult.Success;

			case "/autoseal_verbosity":
			case "/autoseal_verbosity+":
				settings.AutoSealVerbosity = true;
				return ParseResult.Success;
			
			case "/autoseal_verbosity-":
				settings.AutoSealVerbosity = false;
				return ParseResult.Success;
			
			case "/dynamic-":
				settings.AllowDynamic = false;
				return ParseResult.Success;

			case "/d":
			case "/define": {
					if (value.Length == 0) {
						Error_RequiresArgument (option);
						return ParseResult.Error;
					}

					foreach (string d in value.Split (argument_value_separator)) {
						string conditional = d.Trim ();
						string conditionalValue = "true"; // NOTE: This is only ever used by PlayScript!
						string[] conditionalArgs = conditional.Split (new char[] { '=' });
						if (conditionalArgs.Length == 2) {
							conditional = conditionalArgs [0].Trim ();
開發者ID:rlfqudxo,項目名稱:playscript-mono,代碼行數:67,代碼來源:settings.cs


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