AjRools.Expert.Facts.IsAFact.IsSatisfiedByType C# (CSharp) Method

IsSatisfiedByType() private method

private IsSatisfiedByType ( Type type ) : bool
type System.Type
return bool
        private bool IsSatisfiedByType(Type type)
        {
            if (type.Name.Equals(this.type))
                return true;

            if (type.FullName.Equals(this.type))
                return true;

            if (type.BaseType != null)
                if (this.IsSatisfiedByType(type.BaseType))
                    return true;

            foreach (var @interface in type.GetInterfaces())
                if (this.IsSatisfiedByType(@interface))
                    return true;

            return false;
        }