public void ServerRoot_CalculatedBaseOnServerIpAndPort() { var sc = new ServerConfiguration { ServerIp = IPAddress.Parse("127.0.0.1"), BasePort = "80" }; Assert.That(sc.ServerRoot, Is.EqualTo("http://127.0.0.1:80")); }
public IdentityProvider(ServerConfiguration config) { _hashCache = new ConcurrentDictionary<string, SonosIdentifier>(); _idGen = new ConvertPathsToSha1(); _hashCache.TryAdd("root", new SonosIdentifier { Id = "root", Path = config.MusicShare }); }
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); }
public IdentityProvider(ServerConfiguration config, IEnumerable<KeyValuePair<string, SonosIdentifier>> backingStore) : this(config) { if (backingStore == null) { return; } foreach (var item in backingStore) { _hashCache.TryAdd(item.Key, item.Value); } }
public PlayerWebInterface(ServerConfiguration config) { _config = config; }
public SmapiService(LocalMusicServerFactory localMusicServerFactory, ServerConfiguration config) { _server = localMusicServerFactory.HostedAt(new Uri(config.BaseUrl + ":" + config.BasePort)); }
public TopLevelDirectorySearchProvider(ServerConfiguration config, IFileSystem fs) { _config = config; _fs = fs; }
public ServerRegistrationService(PlayerWebInterface webInterface, ServerConfiguration config) { _webInterface = webInterface; _config = config; }