BTDB.ODBLayer.ObjectDB.TableInfoResolver.GetSingletonOid C# (CSharp) Method

GetSingletonOid() public method

public GetSingletonOid ( uint id ) : long
id uint
return long
            public long GetSingletonOid(uint id)
            {
                using (var tr = _keyValueDB.StartTransaction())
                {
                    tr.SetKeyPrefix(TableSingletonsPrefix);
                    var key = new byte[PackUnpack.LengthVUInt(id)];
                    var ofs = 0;
                    PackUnpack.PackVUInt(key, ref ofs, id);
                    if (tr.FindExactKey(key))
                    {
                        return (long) new KeyValueDBValueReader(tr).ReadVUInt64();
                    }
                    return 0;
                }
            }