public bool ShouldAutoCastTo <TTo>(BasicTypeInfo <TTo> to) { foreach (var from in _possibleCastTargetTypes) { return(@from == to.TypeClass); } return(false); }
public bool Equals(BasicTypeInfo <T> other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(_serializer, other._serializer) && Equals(_comparator, other._comparator) && Equals(TypeClass, other.TypeClass) && _possibleCastTargetTypes.SequenceEqual(other._possibleCastTargetTypes)); }
public BasicArrayTypeInfo(Type arrayClass, BasicTypeInfo <TComponent> componentInfo) { TypeClass = Preconditions.CheckNotNull(arrayClass); ComponentInfo = Preconditions.CheckNotNull(componentInfo); }