Exemplo n.º 1
0
        public SimplerSaveSlot(
            SaveFolder saveFolder,
            [NotNull] string nickname,
            SaveManagerSettings?settings = default
            )
        {
            if (string.IsNullOrWhiteSpace(nickname))
            {
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(nickname));
            }

            SaveFolder = saveFolder;
            Nickname   = nickname;
            Settings   = settings ?? new SaveManagerSettings();
        }
Exemplo n.º 2
0
        public SimpleSaveSlot(
            SaveFolder saveFolder,
            [NotNull] string nickname,
            SaveManagerSettings?settings = default
            )
        {
            if (string.IsNullOrWhiteSpace(nickname))
            {
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(nickname));
            }

            settings ??= new SaveManagerSettings();
            SaveFolder   = saveFolder;
            Nickname     = nickname;
            Settings     = settings;
            RelativePath = new[] { nickname };

            SaveFileSearchPattern = new SaveFileName {
                Nickname      = nickname,
                FullExtension = settings.SaveFileExtension,
            }.GetFileSearchPattern();
        }
Exemplo n.º 3
0
 public SaveManager(SaveFolder saveFolder)
 {
     SaveFolder = saveFolder;
 }
Exemplo n.º 4
0
 public IEnumerable <ISaveFile <TData> > EnumerateSaveFiles()
 {
     return(SaveFolder.EnumerateSaveFiles <TData>(SaveFileSearchPattern));
 }