コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }