public new bool Equals(object x, object y) { if (x.GetType().Equals(y.GetType())) { if (TypeRegistry.ScalarTypes.Contains(x.GetType())) { return(TypeRegistry.ScalarTypes[x.GetType()].SimplEquals(x, y)); } else if (CollectionType.CanBeCreatedFrom(x.GetType())) { var collectionType = TypeRegistry.CollectionTypes.GetOrAdd(x.GetType()); return(collectionType.SimplEquals(x, y)); } else { var compositeType = TypeRegistry.CompositeTypes.GetOrAdd(x.GetType()); return(compositeType.SimplEquals(x, y)); } } else { return(false); } }
/// <summary> /// Determines if a simpl Collection Type can be created for the given C# TYpe /// </summary> /// <param name="aType">The type to consider</param> /// <returns>True if a collection type can be made</returns> public static bool CanBeCreatedFrom(Type aType) { return(!CollectionType.CanBeCreatedFrom(aType)); }
public static void SetDefaultMapType(CollectionType ct) { DefaultMapType = ct; }