示例#1
0
        public HgStore(HgEncoder hgEncoder, string storeBasePath, HgFileSystem fileSystem)
        {
            Encoder = hgEncoder;
            
            this.storeBasePath = storeBasePath;
            this.fileSystem = fileSystem;

            hgPathEncoder = new HgPathEncoder(HgPathEncodings.None, hgEncoder);
        }
        public HgFnCacheStore(HgPathEncodings encodings, HgEncoder hgEncoder, string storeBasePath, HgFileSystem fileSystem) :
            base(hgEncoder, storeBasePath, fileSystem)
        {
            fnCacheFilePath = Path.Combine(StoreBasePath, "fncache");
            hgPathEncoder = new HgPathEncoder(encodings, hgEncoder);

            if(File.Exists(fnCacheFilePath))
            {
                var fnCacheEntries =
                    File.ReadAllText(fnCacheFilePath, hgEncoder.Local).
                        Split('\n').
                        Select(n => HgPathEncoder.DecodeDirectory(n.Trim()));

                fnCache = new List<string>(fnCacheEntries);
            } // if
            else
                fnCache = new List<string>();
        }