本文整理汇总了C#中IGenericBinder类的典型用法代码示例。如果您正苦于以下问题:C# IGenericBinder类的具体用法?C# IGenericBinder怎么用?C# IGenericBinder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IGenericBinder类属于命名空间,在下文中一共展示了IGenericBinder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetParameterType
internal Type GetParameterType(IGenericBinder binder, int index)
{
return parameterTypes[index].BindTypeParameters(binder);
}
示例2: GetReturnTypeOptionalCustomModifiers
internal Type[] GetReturnTypeOptionalCustomModifiers(IGenericBinder binder)
{
return BindTypeParameters(binder, modifiers, 0, 0);
}
示例3: GetReturnTypeRequiredCustomModifiers
internal Type[] GetReturnTypeRequiredCustomModifiers(IGenericBinder binder)
{
return BindTypeParameters(binder, modifiers, 0, 1);
}
示例4: BindArray
private static Type[] BindArray(Type[] array, IGenericBinder binder)
{
if (array ==null || array.Length == 0)
{
return array;
}
Type[] result = array;
for (int i = 0; i < array.Length; i++)
{
Type type = array[i].BindTypeParameters(binder);
if (!ReferenceEquals(type, array[i]))
{
if (result == array)
{
result = (Type[])array.Clone();
}
result[i] = type;
}
}
return result;
}
示例5: BindTypeParameters
internal sealed override Type BindTypeParameters(IGenericBinder binder)
{
Type type = elementType.BindTypeParameters(binder);
CustomModifiers mods = this.mods.Bind(binder);
if (ReferenceEquals(type, elementType)
&& mods.Equals(this.mods))
{
return this;
}
return Wrap(type, mods);
}
示例6: InplaceBindTypeParameters
internal static void InplaceBindTypeParameters(IGenericBinder binder, Type[] types)
{
for (int i = 0; i < types.Length; i++)
{
types[i] = types[i].BindTypeParameters(binder);
}
}
示例7: GetParameterCustomModifiers
internal CustomModifiers GetParameterCustomModifiers(IGenericBinder binder, int index)
{
return modifiers.GetParameterCustomModifiers(index).Bind(binder);
}
示例8: Bind
internal PackedCustomModifiers Bind(IGenericBinder binder)
{
if (customModifiers == null)
{
return new PackedCustomModifiers();
}
CustomModifiers[] expanded = new CustomModifiers[customModifiers.Length];
for (int i = 0; i < customModifiers.Length; i++)
{
expanded[i] = customModifiers[i].Bind(binder);
}
return new PackedCustomModifiers(expanded);
}
示例9: BindTypeParameters
protected static Type[] BindTypeParameters(IGenericBinder binder, Type[][][] types, int index, int optOrReq)
{
if (types == null || types[index] == null)
{
return null;
}
return BindTypeParameters(binder, types[index][optOrReq]);
}
示例10: GetReturnTypeCustomModifiers
internal CustomModifiers GetReturnTypeCustomModifiers(IGenericBinder binder)
{
return modifiers.GetReturnTypeCustomModifiers().Bind(binder);
}
示例11: BindTypeParameters
internal override Type BindTypeParameters(IGenericBinder binder)
{
int owner = module.GenericParam.records[index].Owner;
if ((owner >> 24) == MethodDefTable.Index)
{
return binder.BindMethodParameter(this);
}
else
{
return binder.BindTypeParameter(this);
}
}
示例12: GetParameterOptionalCustomModifiers
internal Type[] GetParameterOptionalCustomModifiers(IGenericBinder binder, int index)
{
return BindTypeParameters(binder, modifiers, index + 1, 0);
}
示例13: BindTypeParameters
protected static Type[] BindTypeParameters(IGenericBinder binder, Type[] types)
{
if (types == null || types.Length == 0)
{
return Type.EmptyTypes;
}
Type[] expanded = new Type[types.Length];
for (int i = 0; i < types.Length; i++)
{
expanded[i] = types[i].BindTypeParameters(binder);
}
return expanded;
}
示例14: GetParameterRequiredCustomModifiers
internal Type[] GetParameterRequiredCustomModifiers(IGenericBinder binder, int index)
{
return BindTypeParameters(binder, modifiers, index + 1, 1);
}
示例15: BindTypeParameters
internal override Type BindTypeParameters(IGenericBinder binder)
{
return this;
}