internal SharedAccessSignatureTokenProvider(string connectionString) { var builder = new NotificationHubConnectionStringBuilder(connectionString); this._keyName = builder.SharedAccessKeyName; this._encodedSharedAccessKey = Encoding.UTF8.GetBytes(builder.SharedAccessKey); this._tokenTimeToLive = DefaultTokenTimeout; }
public void ToStringShouldReturnAllProperties() { var b = new NotificationHubConnectionStringBuilder("Endpoint=sb://my-namespace.servicebus.windows.net/") { SharedAccessKeyName = "key-name", SharedAccessKey = "secret" }; Assert.Equal( "Endpoint=sb://my-namespace.servicebus.windows.net/;SharedAccessKeyName=key-name;SharedAccessKey=secret", b.ToString()); }