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


C# IType.MakeArrayType方法代码示例

本文整理汇总了C#中IType.MakeArrayType方法的典型用法代码示例。如果您正苦于以下问题:C# IType.MakeArrayType方法的具体用法?C# IType.MakeArrayType怎么用?C# IType.MakeArrayType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IType的用法示例。


在下文中一共展示了IType.MakeArrayType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TypeSystemServices

		public TypeSystemServices(CompilerContext context)
		{
			if (null == context) throw new ArgumentNullException("context");

			_context = context;
			_anonymousCallablesManager = new AnonymousCallablesManager(this);

			_findImplicitConversionOperator =
				new MemoizedFunction<IType, IType, IMethod>((fromType, toType) => FindConversionOperator("op_Implicit", fromType, toType));
			_findExplicitConversionOperator =
				new MemoizedFunction<IType, IType, IMethod>((fromType, toType) => FindConversionOperator("op_Explicit", fromType, toType));

			My<CurrentScope>.Instance.Changed += (sender, args) => ClearScopeDependentMemoizedFunctions();

			_canBeReachedByPromotion = new MemoizedFunction<IType, IType, bool>(CanBeReachedByPromotionImpl);

			DuckType = Map(typeof(Builtins.duck));
			IQuackFuType = Map(typeof(IQuackFu));
			VoidType = Map(Types.Void);
			ObjectType = Map(Types.Object);
			RegexType = Map(Types.Regex);
			ValueTypeType = Map(typeof(ValueType));
			EnumType = Map(typeof(Enum));
			ArrayType = Map(Types.Array);
			TypeType = Map(Types.Type);
			StringType = Map(Types.String);
			BoolType = Map(Types.Bool);
			SByteType = Map(Types.SByte);
			CharType = Map(Types.Char);
			ShortType = Map(Types.Short);
			IntType = Map(Types.Int);
			LongType = Map(Types.Long);
			ByteType = Map(Types.Byte);
			UShortType = Map(Types.UShort);
			UIntType = Map(Types.UInt);
			ULongType = Map(Types.ULong);
			SingleType = Map(Types.Single);
			DoubleType = Map(Types.Double);
			DecimalType = Map(Types.Decimal);
			TimeSpanType = Map(Types.TimeSpan);
			DateTimeType = Map(Types.DateTime);
			RuntimeServicesType = Map(Types.RuntimeServices);
			BuiltinsType = Map(Types.Builtins);
			ListType = Map(Types.List);
			HashType = Map(Types.Hash);
			ICallableType = Map(Types.ICallable);
			IEnumerableType = Map(Types.IEnumerable);
			IEnumeratorType = Map(typeof(IEnumerator));
			ICollectionType = Map(Types.ICollection);
			IDisposableType = Map(typeof(IDisposable));
			IntPtrType = Map(Types.IntPtr);
			UIntPtrType = Map(Types.UIntPtr);
			MulticastDelegateType = Map(Types.MulticastDelegate);
			DelegateType = Map(Types.Delegate);
			SystemAttribute = Map(typeof(Attribute));
			ConditionalAttribute = Map(typeof(ConditionalAttribute));
			IEnumerableGenericType = Map(Types.IEnumerableGeneric);
			IEnumeratorGenericType = Map(typeof(IEnumerator<>));
			ICollectionGenericType = Map(typeof(ICollection<>));
			IListGenericType = Map(typeof (IList<>));
			IListType = Map(typeof (IList));
			IAstMacroType = Map(typeof(IAstMacro));
			IAstGeneratorMacroType = Map(typeof(IAstGeneratorMacro));
			AstNodeType = Map(typeof(Node));

			ObjectArrayType = ObjectType.MakeArrayType(1);

			PreparePrimitives();
			PrepareBuiltinFunctions();
		}
开发者ID:HaKDMoDz,项目名称:GNet,代码行数:70,代码来源:TypeSystemServices.cs

示例2: EmitNewArray

 void EmitNewArray(IType type, Expression length)
 {
     Visit(length);
     EmitCastIfNeeded(TypeSystemServices.IntType, PopType());
     _il.Emit(OpCodes.Newarr, GetSystemType(type));
     PushType(type.MakeArrayType(1));
 }
开发者ID:Bombadil77,项目名称:boo,代码行数:7,代码来源:EmitAssembly.cs

示例3: EmitNewArray

		void EmitNewArray(IType type, Expression length)
		{
			LoadIntExpression(length);
			_il.Emit(OpCodes.Newarr, GetSystemType(type));
			PushType(type.MakeArrayType(1));
		}
开发者ID:hlizard,项目名称:boo,代码行数:6,代码来源:EmitAssembly.cs


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