本文整理汇总了C#中IType.IsSubclassOf方法的典型用法代码示例。如果您正苦于以下问题:C# IType.IsSubclassOf方法的具体用法?C# IType.IsSubclassOf怎么用?C# IType.IsSubclassOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IType
的用法示例。
在下文中一共展示了IType.IsSubclassOf方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsAssignableFrom
public virtual bool IsAssignableFrom(IType other)
{
ExternalType external = other as ExternalType;
if (null == external)
{
if (EntityType.Null == other.EntityType)
{
return !IsValueType;
}
return other.IsSubclassOf(this);
}
if (other == _typeSystemServices.VoidType)
{
return false;
}
return _type.IsAssignableFrom(external._type);
}
示例2: KnowsQuackFu
public bool KnowsQuackFu(IType type)
{
return type.IsSubclassOf(IQuackFuType);
}
示例3: IsAttribute
public bool IsAttribute(IType type)
{
return type.IsSubclassOf(SystemAttribute);
}
示例4: IsMacro
public virtual bool IsMacro(IType type)
{
return type.IsSubclassOf(IAstMacroType) || type.IsSubclassOf(IAstGeneratorMacroType);
}
示例5: IsAstNode
public virtual bool IsAstNode(IType type)
{
return type == AstNodeType || type.IsSubclassOf(AstNodeType);
}
示例6: IsScriptType
public bool IsScriptType(IType type)
{
return type.IsSubclassOf(this._ScriptBaseType);
}
示例7: IsAssignableFrom
public virtual bool IsAssignableFrom(IType other)
{
if (other == null)
return false;
if (other == this || other.IsSubclassOf(this) || (other.IsNull() && !IsValueType))
return true;
return false;
}
示例8: IsAssignableFrom
public virtual bool IsAssignableFrom(IType other)
{
var external = other as ExternalType;
if (null == external)
{
if (EntityType.Null == other.EntityType)
{
return !IsValueType;
}
return other.IsSubclassOf(this);
}
if (other == _provider.Map(Types.Void))
{
return false;
}
return _type.IsAssignableFrom(external._type);
}
示例9: IsAssignableFrom
public virtual bool IsAssignableFrom(IType other)
{
if (other == null)
{
return false;
}
if (other == this || other.IsSubclassOf(this) || (other == Null.Default && !IsValueType))
{
return true;
}
return false;
}
示例10: IsAssignableFrom
public virtual bool IsAssignableFrom(IType other)
{
return this == other ||
(!this.IsValueType && Null.Default == other) ||
other.IsSubclassOf(this);
}