/// <summary> /// Returns the EntitySet baseDir of the specified InterfaceType. /// </summary> /// <param baseDir="intf">the interface to resolve</param> /// <returns>the baseDir of the underlying entity set</returns> private string GetEntityName(InterfaceType intf) { if (intf == null) { throw new ArgumentNullException("intf"); } var rootType = intf.GetRootType(); return(rootType.Type.Name); }
public IEnumerable this[InterfaceType t] { get { // Interface types are structs and can't be null //if (t == null) { throw new ArgumentNullException("t"); } var rootT = t.GetRootType(); if (!_objects.ContainsKey(rootT)) { return(null); } Dictionary <TKey, IPersistenceObject> typeList = _objects[rootT]; return(typeList.Values); } }
public IPersistenceObject Lookup(InterfaceType t, TKey id) { // Interface types are structs and can't be null //if (t == null) { throw new ArgumentNullException("t"); } var rootT = t.GetRootType(); if (!_objects.ContainsKey(rootT)) { return(null); } IDictionary <TKey, IPersistenceObject> typeList = _objects[rootT]; if (!typeList.ContainsKey(id)) { return(null); } return(typeList[id]); }