本文整理汇总了C#中IReflectClass.GetDelegate方法的典型用法代码示例。如果您正苦于以下问题:C# IReflectClass.GetDelegate方法的具体用法?C# IReflectClass.GetDelegate怎么用?C# IReflectClass.GetDelegate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IReflectClass
的用法示例。
在下文中一共展示了IReflectClass.GetDelegate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsNDimensional
public virtual bool IsNDimensional(IReflectClass a_class)
{
if (a_class is GenericArrayClass)
{
return false;
}
return _delegate.IsNDimensional(a_class.GetDelegate());
}
示例2: NewInstance
public virtual object NewInstance(IReflectClass componentType, int length)
{
componentType = componentType.GetDelegate();
if (componentType is GenericClass)
{
return new GenericArray(((GenericClass)componentType).ArrayClass(), length);
}
return _delegate.NewInstance(componentType, length);
}
示例3: GetComponentType
public virtual IReflectClass GetComponentType(IReflectClass claxx)
{
claxx = claxx.GetDelegate();
if (claxx is GenericClass)
{
return claxx;
}
return _delegate.GetComponentType(claxx);
}
示例4: GetNetType
private static Type GetNetType(IReflectClass clazz)
{
if (null == clazz)
{
return null;
}
NetClass netClass = clazz as NetClass;
if (null != netClass)
{
return netClass.GetNetType();
}
IReflectClass claxx = clazz.GetDelegate();
if (claxx == clazz)
{
return null;
}
return GetNetType(claxx);
}
示例5: IsCollection
/// <summary>Determines if a candidate ReflectClass is a collection</summary>
/// <param name="candidate">candidate ReflectClass</param>
/// <returns>true if a candidate ReflectClass is a collection.</returns>
public virtual bool IsCollection(IReflectClass candidate)
{
//candidate = candidate.getDelegate();
var i = _collectionPredicates.GetEnumerator();
while (i.MoveNext())
{
if (((IReflectClassPredicate) i.Current).Match(candidate))
{
return true;
}
}
return _delegate.IsCollection(candidate.GetDelegate());
}
示例6: ToNative
public static Type ToNative(IReflectClass reflectClass)
{
NetClass netClass = reflectClass.GetDelegate() as NetClass;
if(netClass == null)
{
return null;
}
return netClass.GetNetType();
}