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


C# CSharp.Unsafe类代码示例

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


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

示例1: Visit

			public override object Visit(Unsafe unsafeStatement)
			{
				var result = new UnsafeStatement();
				result.AddChild(new CSharpTokenNode(Convert(unsafeStatement.loc), UnsafeStatement.UnsafeKeywordRole), UnsafeStatement.UnsafeKeywordRole);
				if (unsafeStatement.Block != null)
					result.AddChild((BlockStatement)unsafeStatement.Block.Accept(this), Roles.Body);
				return result;
			}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:8,代码来源:CSharpParser.cs

示例2: Visit

			public override object Visit (Unsafe unsafeStatement)
			{
				var result = new UnsafeStatement ();
				result.AddChild (new CSharpTokenNode (Convert (unsafeStatement.loc), "unsafe".Length), UnsafeStatement.Roles.Keyword);
				result.AddChild ((INode)unsafeStatement.Block.Accept (this), UnsafeStatement.Roles.Body);
				return result;
			}
开发者ID:pgoron,项目名称:monodevelop,代码行数:7,代码来源:CSharpParser.cs

示例3: yyparse


//.........这里部分代码省略.........
case 920:
  case_920();
  break;
case 921:
#line 6150 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 922:
  case_922();
  break;
case 923:
  case_923();
  break;
case 924:
#line 6191 "cs-parser.jay"
  {
		yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 925:
#line 6198 "cs-parser.jay"
  {
		yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 926:
  case_926();
  break;
case 927:
#line 6208 "cs-parser.jay"
  {
		yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 928:
  case_928();
  break;
case 929:
  case_929();
  break;
case 930:
  case_930();
  break;
case 931:
  case_931();
  break;
case 932:
  case_932();
  break;
case 933:
  case_933();
  break;
case 934:
  case_934();
  break;
case 935:
  case_935();
  break;
case 936:
  case_936();
  break;
case 937:
  case_937();
  break;
开发者ID:segaman,项目名称:NRefactory,代码行数:67,代码来源:cs-parser.cs

示例4: Visit

		public virtual object Visit (Unsafe unsafeStatement)
		{
			return null;
		}
开发者ID:KAW0,项目名称:Alter-Native,代码行数:4,代码来源:visit.cs

示例5: yyparse


//.........这里部分代码省略.........
		yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 837:
  case_837();
  break;
case 838:
#line 5338 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 839:
  case_839();
  break;
case 840:
#line 5356 "cs-parser.jay"
  {
		yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 841:
#line 5363 "cs-parser.jay"
  {
		yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 842:
  case_842();
  break;
case 843:
#line 5373 "cs-parser.jay"
  {
		yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 844:
  case_844();
  break;
case 845:
  case_845();
  break;
case 846:
  case_846();
  break;
case 847:
  case_847();
  break;
case 848:
  case_848();
  break;
case 849:
  case_849();
  break;
case 850:
  case_850();
  break;
case 851:
  case_851();
  break;
case 852:
#line 5455 "cs-parser.jay"
  {
		Report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration");
	  }
  break;
开发者ID:Ein,项目名称:monodevelop,代码行数:67,代码来源:cs-parser.cs

示例6: yyparse


//.........这里部分代码省略.........
  break;
case 811:
#line 5240 "cs-parser.jay"
  { yyVal = null; }
  break;
case 813:
#line 5246 "cs-parser.jay"
  {
		yyVal = new Tuple<FullNamedExpression, Tokenizer.LocatedToken> ((FullNamedExpression)yyVals[-2+yyTop], (Tokenizer.LocatedToken) yyVals[-1+yyTop]);
	  }
  break;
case 814:
#line 5250 "cs-parser.jay"
  {
		Report.Error (1015, GetLocation (yyVals[-1+yyTop]), "A type that derives from `System.Exception', `object', or `string' expected");
		yyVal = null;
	  }
  break;
case 815:
#line 5258 "cs-parser.jay"
  {
		yyVal = new Checked ((Block) yyVals[0+yyTop]);
	  }
  break;
case 816:
#line 5265 "cs-parser.jay"
  {
		yyVal = new Unchecked ((Block) yyVals[0+yyTop]);
	  }
  break;
case 817:
#line 5272 "cs-parser.jay"
  {
		RootContext.CheckUnsafeOption (GetLocation (yyVals[0+yyTop]), Report);
	  }
  break;
case 818:
#line 5274 "cs-parser.jay"
  {
		yyVal = new Unsafe ((Block) yyVals[0+yyTop]);
	  }
  break;
case 819:
#line 5283 "cs-parser.jay"
  {
		start_block (lexer.Location);
	  }
  break;
case 820:
#line 5287 "cs-parser.jay"
  {
		Expression type = (Expression) yyVals[-4+yyTop];
	  	var list = (List<KeyValuePair<Tokenizer.LocatedToken, Expression>>) yyVals[-3+yyTop];
		Fixed f = new Fixed (type,
			list.ConvertAll (i => {
				var v = new KeyValuePair<LocalInfo, Expression> (current_block.AddVariable (type, i.Key.Value, i.Key.Location), i.Value);
				if (v.Key != null) {
					v.Key.SetReadOnlyContext (LocalInfo.ReadOnlyContext.Fixed);
					v.Key.Pinned = true;
				}
				return v;
			}), (Statement) yyVals[0+yyTop], GetLocation (yyVals[-6+yyTop]));

		current_block.AddStatement (f);

		yyVal = end_block (lexer.Location);
开发者ID:speier,项目名称:shake,代码行数:67,代码来源:cs-parser.cs

示例7: yyparse


//.........这里部分代码省略.........
case 680:
#line 4753 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.VIRTUAL;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 681:
#line 4758 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.OVERRIDE;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 682:
#line 4763 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.EXTERN;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 683:
#line 4768 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.VOLATILE;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 684:
#line 4773 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.UNSAFE;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
		if (!settings.Unsafe)
			Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 685:
#line 4780 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.ASYNC;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 687:
#line 4789 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_container.AddBasesForPart (current_class, (List<FullNamedExpression>) yyVals[0+yyTop]);
	 }
  break;
case 689:
#line 4797 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 690:
#line 4801 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	 }
  break;
case 691:
#line 4809 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
开发者ID:runefs,项目名称:Marvin,代码行数:67,代码来源:cs-parser.cs


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