當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。