public override bool Equals(object o) { ProjectingType other = o as ProjectingType; return(other != null && Projector == other.Projector && UnderlyingType.Equals(other.UnderlyingType)); }
// We could have used the default implementation of this on Type // if it handled special cases like generic type constraints // and interfaces->objec. public override bool IsSubclassOf(Type c) { ProjectingType otherType = c as ProjectingType; if (otherType == null || Projector != otherType.Projector) { return(false); } return(UnderlyingType.IsSubclassOf(otherType.UnderlyingType)); }
public override bool IsEquivalentTo(Type other) { ProjectingType otherType = other as ProjectingType; if (otherType == null || Projector != otherType.Projector) { return(false); } return(UnderlyingType.IsEquivalentTo(otherType.UnderlyingType)); }
public override bool IsAssignableFrom(Type c) { ProjectingType otherType = c as ProjectingType; if (otherType == null || Projector != otherType.Projector) { return(false); } return(UnderlyingType.IsAssignableFrom(otherType.UnderlyingType)); }
public Type Unproject(Type value) { ProjectingType projectingType = value as ProjectingType; if ((object)projectingType != null) { return(projectingType.UnderlyingType); } else { return(value); } }