Example #1
0
        public IdentityProvider(ServerConfiguration config)
        {
			_hashCache = new ConcurrentDictionary<string, SonosIdentifier>();
            _idGen = new ConvertPathsToSha1();

            _hashCache.TryAdd("root", new SonosIdentifier
            {
                Id = "root",
                Path = config.MusicShare
            });
        }
Example #2
0
        public IdentityProvider(ServerConfiguration config)
        {
            _hashCache = new ConcurrentDictionary <string, SonosIdentifier>();
            _idGen     = new ConvertPathsToSha1();

            _hashCache.TryAdd("root", new SonosIdentifier
            {
                Id   = "root",
                Path = config.MusicShare
            });
        }
Example #3
0
        public void SetUp()
        {
            _uncompressedId = "\\\\some\\smb\\path";
	        _compressedId = new ConvertPathsToSha1().IdentifierFor(_uncompressedId);

            var backing = new Dictionary<string, SonosIdentifier>
            {
                {_uncompressedId, new SonosIdentifier {Id = _compressedId, Path = "\\\\some\\smb\\path"}}
            };

	        _config = new ServerConfiguration {MusicShare = "\\\\a\\\\b"};
            _provider = new IdentityProvider(_config, backing);
        }