/// <summary> /// Gets the configuration for the specified types. Will return null if none is defined. /// </summary> internal static IMappingConfiguration GetConfiguration(Type sourceType, Type destinationType) { MapKey key = new MapKey(sourceType, destinationType); IMappingConfiguration configuration; configurationsDict.TryGetValue(key, out configuration); return(configuration); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (!(obj is MapKey)) { return(false); } MapKey compared = (MapKey)obj; return(sourceType.Equals(compared.sourceType) && targetType.Equals(compared.targetType)); }
/// <summary> /// Checks if a configuration has been defined. /// </summary> public static bool IsConfigurationDefined(Type sourceType, Type destinationType) { MapKey key = new MapKey(sourceType, destinationType); return(mapDictionary.ContainsKey(key)); }