コード例 #1
0
        public LocalUserStore(string folderName, LocalSubscriber localSubscriber)
        {
            var appdataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "SnippetStudio");

            appdataDir = Path.Combine(appdataDir, folderName);
            Directory.CreateDirectory(appdataDir);

            _dataPath   = Path.Combine(appdataDir, "Users.json");
            _items      = GetItems();
            _subscriber = localSubscriber;
        }
コード例 #2
0
        public LocalSnippetStore(string folderName, LocalSubscriber localSubscriber)
        {
            if (Path.IsPathRooted(folderName))
            {
                _dataPath = folderName;
            }
            else
            {
                var appdataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "SnippetStudio");
                appdataDir = Path.Combine(appdataDir, folderName);
                Directory.CreateDirectory(appdataDir);

                _dataPath = appdataDir;
            }

            _items      = GetItems();
            _subscriber = localSubscriber;
        }