public static object GetObject(this Phx.IProtoDataObjectDatabaseProvider provider , int objectKind, int id) { Contract.Requires(provider != null); Contract.Requires <ArgumentOutOfRangeException>(objectKind != PhxUtil.kObjectKindNone); var dbi = provider.GetNamesInterface(objectKind); return(dbi.GetObject(id)); }
public static int GetId(this Phx.IProtoDataObjectDatabaseProvider provider , int objectKind, string name) { Contract.Requires(provider != null); Contract.Requires <ArgumentOutOfRangeException>(objectKind != PhxUtil.kObjectKindNone); var dbi = provider.GetNamesInterface(objectKind); return(dbi.TryGetIdWithUndefined(name)); }