Exemplo n.º 1
0
        /// <summary>
        /// Deletes the specified player in the specified database.
        /// </summary>
        internal static async void Delete(int high, int low, DBMS database = Settings.Database)
        {
            switch (database)
            {
            case DBMS.Mongo:
            {
                await AvatarDb.Delete(high, low);

                break;
            }

            case DBMS.File:
            {
                new FileInfo($"{Directory.GetCurrentDirectory()}/Saves/Players/{high}-{low}.json").DeleteIfExists();
                break;
            }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deletes the specified player in the specified database.
        /// </summary>
        internal static async void Delete(LogicClientAvatar avatar, DBMS database = Settings.Database)
        {
            switch (database)
            {
            case DBMS.Mongo:
            {
                await AvatarDb.Delete(avatar.HighID, avatar.LowID);

                break;
            }

            case DBMS.File:
            {
                new FileInfo($"{Directory.GetCurrentDirectory()}/Saves/Players/{avatar}.json").DeleteIfExists();
                break;
            }
            }
        }