本文整理汇总了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();
}
示例2: EmitNewArray
void EmitNewArray(IType type, Expression length)
{
Visit(length);
EmitCastIfNeeded(TypeSystemServices.IntType, PopType());
_il.Emit(OpCodes.Newarr, GetSystemType(type));
PushType(type.MakeArrayType(1));
}
示例3: EmitNewArray
void EmitNewArray(IType type, Expression length)
{
LoadIntExpression(length);
_il.Emit(OpCodes.Newarr, GetSystemType(type));
PushType(type.MakeArrayType(1));
}