当前位置: 首页>>代码示例>>C#>>正文


C# CodeDom.CodeGotoStatement类代码示例

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


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

示例1: Constructor1

		public void Constructor1 ()
		{
			string label1 = "mono1";

			CodeGotoStatement cgs = new CodeGotoStatement (label1);
			Assert.IsNotNull (cgs.Label, "#1");
			Assert.AreSame (label1, cgs.Label, "#2");

#if NET_2_0
			Assert.IsNotNull (cgs.StartDirectives, "#3");
			Assert.AreEqual (0, cgs.StartDirectives.Count, "#4");

			Assert.IsNotNull (cgs.EndDirectives, "#5");
			Assert.AreEqual (0, cgs.EndDirectives.Count, "#6");
#endif

			Assert.IsNotNull (cgs.UserData, "#7");
			Assert.AreEqual (typeof(ListDictionary), cgs.UserData.GetType (), "#8");
			Assert.AreEqual (0, cgs.UserData.Count, "#9");

			Assert.IsNull (cgs.LinePragma, "#10");

			string label2 = "mono2";
			cgs.Label = label2;
			Assert.AreSame (label2, cgs.Label, "#11");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:26,代码来源:CodeGotoStatementTest.cs

示例2: Constructor0

		public void Constructor0 ()
		{
			CodeGotoStatement cgs = new CodeGotoStatement ();
			Assert.IsNull (cgs.Label, "#1");

			Assert.IsNotNull (cgs.StartDirectives, "#2");
			Assert.AreEqual (0, cgs.StartDirectives.Count, "#3");

			Assert.IsNotNull (cgs.EndDirectives, "#4");
			Assert.AreEqual (0, cgs.EndDirectives.Count, "#5");

			Assert.IsNotNull (cgs.UserData, "#6");
			Assert.AreEqual (typeof(ListDictionary), cgs.UserData.GetType (), "#7");
			Assert.AreEqual (0, cgs.UserData.Count, "#8");

			Assert.IsNull (cgs.LinePragma, "#9");

			CodeLinePragma clp = new CodeLinePragma ("mono", 10);
			cgs.LinePragma = clp;
			Assert.IsNotNull (cgs.LinePragma, "#10");
			Assert.AreSame (clp, cgs.LinePragma, "#11");

			cgs.LinePragma = null;
			Assert.IsNull (cgs.LinePragma, "#12");

			string label = "mono";
			cgs.Label = label;
			Assert.AreSame (label, cgs.Label, "#13");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:29,代码来源:CodeGotoStatementTest.cs

示例3: TypescriptGotoStatement

 public TypescriptGotoStatement(
     IStatementFactory statementFactory,
     IExpressionFactory expressionFactory,
     CodeGotoStatement statement,
     CodeGeneratorOptions options)
 {
     _statementFactory = statementFactory;
     _expressionFactory = expressionFactory;
     _statement = statement;
     _options = options;
 }
开发者ID:s2quake,项目名称:TypescriptCodeDom,代码行数:11,代码来源:TypescriptGotoStatement.cs

示例4: EmitGotoStatement

        private void EmitGotoStatement(CodeGotoStatement Goto)
        {
            Depth++;
            Debug("Emitting goto: " + Goto.Label);

            LabelMetadata Meta = LookupLabel(Goto.Label);
            Generator.Emit(OpCodes.Br, Meta.Label);
            Meta.From = Goto;

            Depth--;
        }
开发者ID:Tyelpion,项目名称:IronAHK,代码行数:11,代码来源:EmitLabel.cs

示例5: Write

 private void Write(CodeGotoStatement e){
   TextWriter w = this.writer;
   w.Write("goto ");
   w.Write(e.Label);
   w.WriteLine(";");
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:6,代码来源:Compiler.cs

示例6: GenerateGotoStatement

		protected override void GenerateGotoStatement(CodeGotoStatement e)
		{
			Output.WriteLine("[CodeGotoStatement: {0}]", e.ToString());
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:4,代码来源:CodeDOMVerboseOutputGenerator.cs

示例7: GenerateGotoStatement

		protected override void GenerateGotoStatement (CodeGotoStatement statement)
		{
			TextWriter output = Output;

			output.Write ("goto ");
			output.Write (statement.Label);
			output.WriteLine ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:VBCodeGenerator.cs

示例8: Visit

			public void Visit (CodeGotoStatement o)
			{
				g.GenerateGotoStatement (o);
			}
开发者ID:carrie901,项目名称:mono,代码行数:4,代码来源:CodeGenerator.cs

示例9: Label_Null

		public void Label_Null ()
		{
			CodeGotoStatement cgs = new CodeGotoStatement ("mono");
			cgs.Label = null;
		}
开发者ID:Profit0004,项目名称:mono,代码行数:5,代码来源:CodeGotoStatementTest.cs

示例10: GenerateGotoStatement

 protected override void GenerateGotoStatement(CodeGotoStatement e) {
   throw new Exception(JScriptException.Localize("No goto statements", CultureInfo.CurrentUICulture));
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:3,代码来源:jscodegenerator.cs

示例11: Generate

 public void Generate(CodeGotoStatement statement)
 {
     throw new NotImplementedException();
 }
开发者ID:chunlea,项目名称:rubydotnetcompiler,代码行数:4,代码来源:RubyCodeGenerator.cs

示例12: Label_Empty

		public void Label_Empty () {
			CodeGotoStatement cgs = new CodeGotoStatement ("mono");
			cgs.Label = string.Empty;
#if ONLY_1_1
			Assert.IsNotNull (cgs.Label, "#1");
			Assert.AreEqual (string.Empty, cgs.Label, "#2");
#endif
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:CodeGotoStatementTest.cs

示例13: Label_Null

		public void Label_Null ()
		{
			CodeGotoStatement cgs = new CodeGotoStatement ("mono");
			cgs.Label = null;
#if ONLY_1_1
			Assert.IsNull (cgs.Label, "#1");
#endif
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:CodeGotoStatementTest.cs

示例14: Constructor1_EmptyLabel

		public void Constructor1_EmptyLabel () {
			CodeGotoStatement cgs = new CodeGotoStatement (string.Empty);
#if ONLY_1_1
			Assert.IsNotNull (cgs.Label, "#1");
			Assert.AreEqual (string.Empty, cgs.Label, "#2");
#endif
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:CodeGotoStatementTest.cs

示例15: Constructor1_NullLabel

		public void Constructor1_NullLabel ()
		{
			CodeGotoStatement cgs = new CodeGotoStatement ((string) null);
#if ONLY_1_1
			Assert.IsNull (cgs.Label, "#1");
#endif
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:CodeGotoStatementTest.cs


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