private static bool IsBaseType(IType type, IType baseType) { if (type is ITypeReference typeReference && baseType is ITypeReference typeReference2) { ITypeDeclaration typeDeclaration = typeReference.Resolve(); if (typeDeclaration != null) { if (typeDeclaration.BaseType != null && typeDeclaration.BaseType.Equals(baseType)) { return(true); } foreach (object obj in typeDeclaration.Interfaces) { ITypeReference typeReference3 = (ITypeReference)obj; if (typeReference3.Equals(baseType)) { return(true); } } if (typeDeclaration.BaseType != null && IsBaseType(typeDeclaration.BaseType, baseType)) { return(true); } foreach (object obj2 in typeDeclaration.Interfaces) { ITypeReference typeReference3 = (ITypeReference)obj2; if (IsBaseType(typeReference3, baseType)) { return(true); } } } } return(false); }
public override bool TryGetDataForTypeReference <T>(ITypeReference typeReference, out T data) { if (!typeReference.Equals(ExecutionPaths.Single().Output)) { return(base.TryGetDataForTypeReference <T>(typeReference, out data)); } if (typeof(T) != typeof(ITransactionDesignerData)) { throw new ArgumentException(string.Format("Invalid data type: {0}.", typeof(T))); } data = (T)(object)new TransactionDesignerData(this); return(true); }
private bool Equals(AttributeInfo other) { return(_type.Equals(other._type) && _arguments.SequenceEqual(other._arguments)); }