Esempio n. 1
0
        private SkillStorage(INativeRobotSkill skill)
        {
            Regex  invalidCharacters = new Regex(@"[\\/:*?""<>|]");
            string fileSafeSkillName = invalidCharacters.Replace(skill.Name.Replace(" ", "_"), "");

            _fileSafeDBName = $"{fileSafeSkillName}.txt";
        }
Esempio n. 2
0
 /// <summary>
 /// Method used to get a reference to the skill specific data store
 /// IMPORTANT! These are helper data storage classes and this version is readable and NOT encrypted
 /// If you need security, you can try the EncryptedStorage class or you may need to write your own.
 /// </summary>
 /// <param name="skill"></param>
 /// <returns></returns>
 public static ISkillStorage GetDatabase(INativeRobotSkill skill)
 {
     if (_skillDB == null)
     {
         _skillDB = new SkillStorage(skill);
     }
     return(_skillDB);
 }