public override bool Equals(object obj) { PropMap map = obj as PropMap; if (map != null) { return(this.SourceType.Equals(map.SourceType) && this.DestinationType.Equals(map.DestinationType) && this.ListControlAction.Equals(map.ListControlAction)); } return(false); }
private PropMap CreatePropMap(Type sourceType, Type destType, ListControlActionType actionType) { PropMap map = new PropMap(sourceType, destType, actionType); if (Maps.Any(m => m.Equals(map))) { throw new InvalidOperationException("Same map already added."); } Maps.Add(map); return(map); }
public IEnumerable <LambdaExpression> FindResolution(Type sourceType, Type destType, ListControlActionType actionType, string memberName) { PropMap map = Maps .Where(m => m.SourceType == sourceType && m.DestinationType == destType && (m.ListControlAction == actionType || m.ListControlAction == ListControlActionType.Common)) .OrderByDescending(m => m.ListControlAction) .FirstOrDefault(); if (map != null && map.Members.ContainsKey(memberName)) { return(map.Members[memberName]); } return(null); }
internal PropMapExpr(PropMap map) { _map = map; }