public DeleteServiceTests() { _indexDataStore = Substitute.For <IIndexDataStore>(); _metadataStore = Substitute.For <IMetadataStore>(); _fileDataStore = Substitute.For <IFileStore>(); _deleteConfiguration = new DeletedInstanceCleanupConfiguration { DeleteDelay = TimeSpan.FromDays(1), BatchSize = 10, MaxRetries = 5, PollingInterval = TimeSpan.FromSeconds(1), RetryBackOff = TimeSpan.FromDays(4), }; IOptions <DeletedInstanceCleanupConfiguration> deletedInstanceCleanupConfigurationOptions = Substitute.For <IOptions <DeletedInstanceCleanupConfiguration> >(); deletedInstanceCleanupConfigurationOptions.Value.Returns(_deleteConfiguration); ITransactionHandler transactionHandler = Substitute.For <ITransactionHandler>(); _transactionScope = Substitute.For <ITransactionScope>(); transactionHandler.BeginTransaction().Returns(_transactionScope); _dicomRequestContextAccessor = Substitute.For <IDicomRequestContextAccessor>(); _dicomRequestContextAccessor.RequestContext.DataPartitionEntry = new PartitionEntry(DefaultPartition.Key, DefaultPartition.Name); _deleteService = new DeleteService(_indexDataStore, _metadataStore, _fileDataStore, deletedInstanceCleanupConfigurationOptions, transactionHandler, NullLogger <DeleteService> .Instance, _dicomRequestContextAccessor); }
public MqttWebSocketListener( Settings settings, MessagingBridgeFactoryFunc messagingBridgeFactoryFunc, IAuthenticator authenticator, IUsernameParser usernameParser, IClientCredentialsFactory clientCredentialsFactory, Func <ISessionStatePersistenceProvider> sessionProviderFactory, IEventLoopGroup workerGroup, IByteBufferAllocator byteBufferAllocator, bool autoRead, int mqttDecoderMaxMessageSize, bool clientCertAuthAllowed, IMetadataStore metadataStore) { this.settings = Preconditions.CheckNotNull(settings, nameof(settings)); this.messagingBridgeFactoryFunc = Preconditions.CheckNotNull(messagingBridgeFactoryFunc, nameof(messagingBridgeFactoryFunc)); this.authenticator = Preconditions.CheckNotNull(authenticator, nameof(authenticator)); this.usernameParser = Preconditions.CheckNotNull(usernameParser, nameof(usernameParser)); this.clientCredentialsFactory = Preconditions.CheckNotNull(clientCredentialsFactory, nameof(clientCredentialsFactory)); this.sessionProviderFactory = Preconditions.CheckNotNull(sessionProviderFactory, nameof(sessionProviderFactory)); this.workerGroup = Preconditions.CheckNotNull(workerGroup, nameof(workerGroup)); this.byteBufferAllocator = Preconditions.CheckNotNull(byteBufferAllocator, nameof(byteBufferAllocator)); this.autoRead = autoRead; this.mqttDecoderMaxMessageSize = mqttDecoderMaxMessageSize; this.clientCertAuthAllowed = clientCertAuthAllowed; this.metadataStore = Preconditions.CheckNotNull(metadataStore, nameof(metadataStore)); }
public DeleteService( IIndexDataStore indexDataStore, IMetadataStore metadataStore, IFileStore fileStore, IOptions <DeletedInstanceCleanupConfiguration> deletedInstanceCleanupConfiguration, ITransactionHandler transactionHandler, ILogger <DeleteService> logger, IDicomRequestContextAccessor contextAccessor) { EnsureArg.IsNotNull(indexDataStore, nameof(indexDataStore)); EnsureArg.IsNotNull(metadataStore, nameof(metadataStore)); EnsureArg.IsNotNull(fileStore, nameof(fileStore)); EnsureArg.IsNotNull(deletedInstanceCleanupConfiguration?.Value, nameof(deletedInstanceCleanupConfiguration)); EnsureArg.IsNotNull(transactionHandler, nameof(transactionHandler)); EnsureArg.IsNotNull(logger, nameof(logger)); EnsureArg.IsNotNull(contextAccessor, nameof(contextAccessor)); _indexDataStore = indexDataStore; _metadataStore = metadataStore; _fileStore = fileStore; _deletedInstanceCleanupConfiguration = deletedInstanceCleanupConfiguration.Value; _transactionHandler = transactionHandler; _logger = logger; _contextAccessor = contextAccessor; }
public void Setup_Mocks() { logger = Mock.Of <ILogger <DefaultEventProcessingService> >(); metadataStore = Mock.Of <IMetadataStore>(); subscriberQueueStore = Mock.Of <ISubscriberQueueStore>(); subscriberStore = Mock.Of <ISubscriberStore>(); }
public StoredProcedureToListAction(IMetadataStore metadataStore, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) : base(metadataStore, default(TEntity), connection, dialect, environment) { this._hydrator = hydrator; }
public CloudConnectionProvider( IMessageConverterProvider messageConverterProvider, int connectionPoolSize, IClientProvider clientProvider, Option <UpstreamProtocol> upstreamProtocol, ITokenProvider edgeHubTokenProvider, IDeviceScopeIdentitiesCache deviceScopeIdentitiesCache, ICredentialsCache credentialsCache, IIdentity edgeHubIdentity, TimeSpan idleTimeout, bool closeOnIdleTimeout, TimeSpan operationTimeout, bool useServerHeartbeat, Option <IWebProxy> proxy, IMetadataStore metadataStore, bool nestedEdgeEnabled = false) { this.messageConverterProvider = Preconditions.CheckNotNull(messageConverterProvider, nameof(messageConverterProvider)); this.clientProvider = Preconditions.CheckNotNull(clientProvider, nameof(clientProvider)); this.upstreamProtocol = upstreamProtocol; this.connectionPoolSize = Preconditions.CheckRange(connectionPoolSize, 1, nameof(connectionPoolSize)); this.proxy = proxy; this.edgeHub = Option.None <IEdgeHub>(); this.idleTimeout = idleTimeout; this.closeOnIdleTimeout = closeOnIdleTimeout; this.useServerHeartbeat = useServerHeartbeat; this.edgeHubTokenProvider = Preconditions.CheckNotNull(edgeHubTokenProvider, nameof(edgeHubTokenProvider)); this.deviceScopeIdentitiesCache = Preconditions.CheckNotNull(deviceScopeIdentitiesCache, nameof(deviceScopeIdentitiesCache)); this.credentialsCache = Preconditions.CheckNotNull(credentialsCache, nameof(credentialsCache)); this.edgeHubIdentity = Preconditions.CheckNotNull(edgeHubIdentity, nameof(edgeHubIdentity)); this.operationTimeout = operationTimeout; this.metadataStore = Preconditions.CheckNotNull(metadataStore, nameof(metadataStore)); this.nestedEdgeEnabled = nestedEdgeEnabled; }
public InsertAction(IMetadataStore metadataStore, TEntity entity, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) : base(metadataStore, entity, connection, dialect, environment) { this._hydrator = hydrator; }
public MqttProtocolHead( ISettingsProvider settingsProvider, X509Certificate tlsCertificate, IMqttConnectionProvider mqttConnectionProvider, IAuthenticator authenticator, IUsernameParser usernameParser, IClientCredentialsFactory clientCredentialsFactory, ISessionStatePersistenceProvider sessionProvider, IWebSocketListenerRegistry webSocketListenerRegistry, IByteBufferAllocator byteBufferAllocator, IMetadataStore metadataStore, bool clientCertAuthAllowed, SslProtocols sslProtocols) { this.settingsProvider = Preconditions.CheckNotNull(settingsProvider, nameof(settingsProvider)); this.tlsCertificate = Preconditions.CheckNotNull(tlsCertificate, nameof(tlsCertificate)); this.mqttConnectionProvider = Preconditions.CheckNotNull(mqttConnectionProvider, nameof(mqttConnectionProvider)); this.authenticator = Preconditions.CheckNotNull(authenticator, nameof(authenticator)); this.usernameParser = Preconditions.CheckNotNull(usernameParser, nameof(usernameParser)); this.clientCredentialsFactory = Preconditions.CheckNotNull(clientCredentialsFactory, nameof(clientCredentialsFactory)); this.sessionProvider = Preconditions.CheckNotNull(sessionProvider, nameof(sessionProvider)); this.webSocketListenerRegistry = Preconditions.CheckNotNull(webSocketListenerRegistry, nameof(webSocketListenerRegistry)); this.byteBufferAllocator = Preconditions.CheckNotNull(byteBufferAllocator); this.clientCertAuthAllowed = clientCertAuthAllowed; this.metadataStore = Preconditions.CheckNotNull(metadataStore, nameof(metadataStore)); this.sslProtocols = sslProtocols; }
public FlickrSource(IMetadataStore store, IPlacelessconfig configuration, IUserInteraction userInteraction) { _metadataStore = store; _configuration = configuration; _userInteraction = userInteraction; _flickr = new FlickrNet.Flickr(API_KEY, API_SECRET); _flickr.InstanceCacheDisabled = true; var token = _configuration.GetValue(TOKEN_PATH); var secret = _configuration.GetValue(SECRET_PATH); token = ""; secret = ""; if (string.IsNullOrWhiteSpace(token) || string.IsNullOrWhiteSpace(secret)) { var requestToken = _flickr.OAuthGetRequestToken("oob"); string url = _flickr.OAuthCalculateAuthorizationUrl(requestToken.Token, AuthLevel.Write); _userInteraction.OpenWebPage(url); string approvalCode = _userInteraction.InputPrompt("Please approve access to your Flickr account and enter the key here:"); var accessToken = _flickr.OAuthGetAccessToken(requestToken, approvalCode); token = accessToken.Token; secret = accessToken.TokenSecret; _configuration.SetValue(TOKEN_PATH, token); _configuration.SetValue(SECRET_PATH, secret); } _flickr.OAuthAccessToken = token; _flickr.OAuthAccessTokenSecret = secret; }
public DefaultMetadataService( ILogger <DefaultMetadataService> logger, IMetadataStore metadataStore) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.metadataStore = metadataStore ?? throw new ArgumentNullException(nameof(metadataStore)); }
public RetrieveMetadataServiceTests(DataStoreTestsFixture storagefixture) { _instanceStore = Substitute.For <IInstanceStore>(); _metadataStore = storagefixture.MetadataStore; _eTagGenerator = Substitute.For <IETagGenerator>(); _retrieveMetadataService = new RetrieveMetadataService(_instanceStore, _metadataStore, _eTagGenerator); }
public ColumnInfo(IMetadataStore metadataStore, Type entity, PropertyInfo column) { MetadataStore = metadataStore; Entity = entity; Column = column; LoadColumn(); }
public DeleteServiceTests() { _indexDataStore = Substitute.For <IIndexDataStore>(); _metadataStore = Substitute.For <IMetadataStore>(); _fileDataStore = Substitute.For <IFileStore>(); _indexDataStoreFactory = Substitute.For <IIndexDataStoreFactory>(); _deleteConfiguration = new DeletedInstanceCleanupConfiguration { DeleteDelay = TimeSpan.FromDays(1), BatchSize = 10, MaxRetries = 5, PollingInterval = TimeSpan.FromSeconds(1), RetryBackOff = TimeSpan.FromDays(4), }; IOptions <DeletedInstanceCleanupConfiguration> deletedInstanceCleanupConfigurationOptions = Substitute.For <IOptions <DeletedInstanceCleanupConfiguration> >(); deletedInstanceCleanupConfigurationOptions.Value.Returns(_deleteConfiguration); ITransactionHandler transactionHandler = Substitute.For <ITransactionHandler>(); _transactionScope = Substitute.For <ITransactionScope>(); transactionHandler.BeginTransaction().Returns(_transactionScope); _indexDataStoreFactory.GetInstance().Returns(_indexDataStore); _deleteService = new DeleteService(_indexDataStoreFactory, _metadataStore, _fileDataStore, deletedInstanceCleanupConfigurationOptions, transactionHandler, NullLogger <DeleteService> .Instance); }
protected LinkHandler( IIdentity identity, IAmqpLink link, Uri requestUri, IDictionary <string, string> boundVariables, IConnectionHandler connectionHandler, IMessageConverter <AmqpMessage> messageConverter, IMetadataStore metadataStore) { this.Identity = Preconditions.CheckNotNull(identity, nameof(identity)); this.MessageConverter = Preconditions.CheckNotNull(messageConverter, nameof(messageConverter)); this.BoundVariables = Preconditions.CheckNotNull(boundVariables, nameof(boundVariables)); this.Link = Preconditions.CheckNotNull(link, nameof(link)); this.LinkUri = Preconditions.CheckNotNull(requestUri, nameof(requestUri)); this.Link.SafeAddClosed(this.OnLinkClosed); this.connectionHandler = Preconditions.CheckNotNull(connectionHandler, nameof(connectionHandler)); this.metadataStore = Preconditions.CheckNotNull(metadataStore, nameof(metadataStore)); string clientVersion = null; if (this.Link.Settings?.Properties?.TryGetValue(IotHubAmqpProperty.ClientVersion, out clientVersion) ?? false) { this.ClientVersion = Option.Maybe(clientVersion); } string modelId = null; this.Link.Settings?.Properties?.TryGetValue(IotHubAmqpProperty.ModelId, out modelId); this.ModelId = Option.Maybe(modelId); string authChain = null; this.Link.Settings?.Properties?.TryGetValue <string>(IotHubAmqpProperty.AuthChain, out authChain); this.AuthChain = Option.Maybe(authChain); }
public AuthAgentController(IAuthenticator authenticator, IMetadataStore metadataStore, IUsernameParser usernameParser, IClientCredentialsFactory clientCredentialsFactory, ISystemComponentIdProvider systemComponentIdProvider) { this.authenticator = Preconditions.CheckNotNull(authenticator, nameof(authenticator)); this.metadataStore = Preconditions.CheckNotNull(metadataStore, nameof(metadataStore)); this.usernameParser = Preconditions.CheckNotNull(usernameParser, nameof(usernameParser)); this.clientCredentialsFactory = Preconditions.CheckNotNull(clientCredentialsFactory, nameof(clientCredentialsFactory)); this.systemComponentIdProvider = Preconditions.CheckNotNull(systemComponentIdProvider, nameof(systemComponentIdProvider)); }
public AlbumItemFactory( IEnumerable<IImageFormat> imageFormats, IMetadataStore<AlbumItem>[] metadataStores ) { this.imageExtensions = imageFormats.SelectMany(f => f.FileExtensions).ToSet(StringComparer.InvariantCultureIgnoreCase); this.metadataStores = metadataStores; }
public ChangeFeedService(IChangeFeedStore changeFeedStore, IMetadataStore metadataStore) { EnsureArg.IsNotNull(changeFeedStore, nameof(changeFeedStore)); EnsureArg.IsNotNull(metadataStore, nameof(metadataStore)); _changeFeedStore = changeFeedStore; _metadataStore = metadataStore; }
public LoggingMetadataStore(IMetadataStore metadataStore, ILogger <LoggingMetadataStore> logger) { EnsureArg.IsNotNull(metadataStore, nameof(metadataStore)); EnsureArg.IsNotNull(logger, nameof(logger)); _metadataStore = metadataStore; _logger = logger; }
public RetrieveMetadataServiceTests() { _instanceStore = Substitute.For <IInstanceStore>(); _metadataStore = Substitute.For <IMetadataStore>(); _eTagGenerator = Substitute.For <IETagGenerator>(); _retrieveMetadataService = new RetrieveMetadataService(_instanceStore, _metadataStore, _eTagGenerator); }
public Collector(IMetadataStore metadataStore, T source, IUserInteraction userInteraction) { _metadataStore = metadataStore; _source = source; _sourceName = source.GetName(); _roots = new ConcurrentQueue <string>(); _files = new ConcurrentQueue <DiscoveredFile>(); _userInteraction = userInteraction; }
public Session(IDbConnection connection, IMetadataStore metadataStore, IDialect dialect, IEnvironmentSettings environment) : this() { this._connection = connection; this._metadataStore = metadataStore; _dialect = dialect; _environment = environment; this.InitializeSession(this._metadataStore, this._connection); }
public QueryByStoredProcedure(IMetadataStore metadatastore, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) { this._metadatastore = metadatastore; this.hydrator = hydrator; this.connection = connection; _dialect = dialect; _environment = environment; }
public DataInvocation(ISession session, IMetadataStore metadataStore, object entity, Action proceedAction) { this.proceedAction = proceedAction; Session = session; MetadataStore = metadataStore; Entity = entity; }
protected DatabaseAction(IMetadataStore metadataStore, IHydrator hydrator, IDbConnection connection, IEnvironmentSettings environment) { this.MetadataStore = metadataStore; this.Hydrator = hydrator; Connection = connection; Environment = environment; }
/// <summary> /// /// </summary> /// <param name="url"></param> /// <param name="userName"></param> /// <param name="password"></param> /// <param name="access"></param> /// <param name="management"></param> /// <param name="connectionString"></param> /// <param name="fileNamespace"></param> internal FedoraCommonsRepo(string url, string userName, string password, string access, string management, string connectionString, string fileNamespace, string identity="") { _metadataStore = new MySqlMetadataStore(connectionString); _fileStore = new FedoraFileStore(url, userName, password, access, management, fileNamespace); //_fileStore = new LocalFileSystemStore(); _identity = identity; }
/// <summary> /// /// </summary> /// <param name="url"></param> /// <param name="userName"></param> /// <param name="password"></param> /// <param name="access"></param> /// <param name="management"></param> /// <param name="connectionString"></param> /// <param name="fileNamespace"></param> internal FedoraCommonsRepo(string url, string userName, string password, string access, string management, string connectionString, string fileNamespace, string identity = "") { _metadataStore = new MySqlMetadataStore(connectionString); _fileStore = new FedoraFileStore(url, userName, password, access, management, fileNamespace); //_fileStore = new LocalFileSystemStore(); _identity = identity; }
public DefaultEventProcessingService( ILogger <DefaultEventProcessingService> logger, IMetadataStore metadataStore, ISubscriberStore subscriberStore, ISubscriberQueueStore subscriberQueueStore) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.metadataStore = metadataStore ?? throw new ArgumentNullException(nameof(metadataStore)); this.subscriberStore = subscriberStore ?? throw new ArgumentNullException(nameof(subscriberStore)); this.subscriberQueueStore = subscriberQueueStore ?? throw new ArgumentNullException(nameof(subscriberQueueStore)); }
/// <summary> /// This will construct the representative data table for the entity to be set /// in the <seealso cref="IMetadataStore">metadata storage</seealso> for resolving /// entities and columns to data tables and rows. /// </summary> /// <param name="metadataStore"></param> /// <returns></returns> public TableInfo Build(IMetadataStore metadataStore) { var tableInfo = new TableInfo(typeof(T), TableName, metadataStore, PrimaryKey, Columns, References, Collections, Components); return(tableInfo); }
public TwinReceivingLinkHandler( IIdentity identity, IReceivingAmqpLink link, Uri requestUri, IDictionary <string, string> boundVariables, IConnectionHandler connectionHandler, IMessageConverter <AmqpMessage> messageConverter, IMetadataStore metadataStore) : base(identity, link, requestUri, boundVariables, connectionHandler, messageConverter, metadataStore) { }
public InstanceReindexer( IMetadataStore metadataStore, IIndexDataStore indexDataStore, IReindexDatasetValidator dicomDatasetReindexValidator, ILogger <InstanceReindexer> logger) { _metadataStore = EnsureArg.IsNotNull(metadataStore, nameof(metadataStore)); _indexDataStore = EnsureArg.IsNotNull(indexDataStore, nameof(indexDataStore)); _dicomDatasetReindexValidator = EnsureArg.IsNotNull(dicomDatasetReindexValidator, nameof(dicomDatasetReindexValidator)); _logger = EnsureArg.IsNotNull(logger, nameof(logger)); }
public RetrieveMetadataServiceTests() { _instanceStore = Substitute.For <IInstanceStore>(); _metadataStore = Substitute.For <IMetadataStore>(); _eTagGenerator = Substitute.For <IETagGenerator>(); _dicomRequestContextAccessor = Substitute.For <IDicomRequestContextAccessor>(); _dicomRequestContextAccessor.RequestContext.DataPartitionEntry = new PartitionEntry(DefaultPartition.Key, DefaultPartition.Name); _retrieveMetadataService = new RetrieveMetadataService(_instanceStore, _metadataStore, _eTagGenerator, _dicomRequestContextAccessor); }
public RetrieveMetadataServiceTests(DataStoreTestsFixture storagefixture) { EnsureArg.IsNotNull(storagefixture, nameof(storagefixture)); _instanceStore = Substitute.For <IInstanceStore>(); _metadataStore = storagefixture.MetadataStore; _eTagGenerator = Substitute.For <IETagGenerator>(); _dicomRequestContextAccessor = Substitute.For <IDicomRequestContextAccessor>(); _dicomRequestContextAccessor.RequestContext.DataPartitionEntry = new PartitionEntry(DefaultPartition.Key, DefaultPartition.Name); _retrieveMetadataService = new RetrieveMetadataService(_instanceStore, _metadataStore, _eTagGenerator, _dicomRequestContextAccessor); }
public AlbumFacade( ILocation root, IAlbumIDProvider idProvider, IEnumerable<IAlbumProvider> albumProviders, IAlbumFilter[] albumFilters, IMetadataStore<object>[] metadataStores ) { this.Root = root; this.idProvider = idProvider; this.albumProviders = albumProviders.ToDictionary(p => p.ProviderKey); this.albumFilters = albumFilters; this.metadataStores = metadataStores; }
public DefaultSearchProxy(string connectionString, string identity) { _connectionString = connectionString; _dataStore = new MySqlMetadataStore(_connectionString); _identity = identity; }