public static VDataBase Open(ushort auth_code, string db_name) { if (VS.SystemExists(out string d_path)) { var source = VS.GetLayout(auth_code, db_name, Path.Combine(d_path, "data")); return(new VDataBase(source)); } else { throw new VDataBaseException("DBVN не установлен на данной системе.", "vndbw.vdatabase", 0xff1); } }
public static bool DataBaseExists(ushort auth_code, string db_name) { if (VS.SystemExists(out string d_path)) { try { VS.GetLayout(auth_code, db_name, Path.Combine(d_path, "data")); return(true); } catch (InvalidOperationException) { return(false); } } else { throw new VDataBaseException("DBVN не установлен на данной системе.", "vndbw.vdatabase", 0xff1); } }