Exemplo n.º 1
0
        public TagsStorage(JobStorage jobStorage)
        {
            _jobStorage = jobStorage;
            var connection = jobStorage.GetConnection();

            connection = connection ?? throw new ArgumentNullException(nameof(connection));

            if (!(connection is JobStorageConnection jobStorageConnection))
            {
                throw new NotSupportedException("Storage connection must implement JobStorageConnection");
            }

            ServiceStorage = jobStorage.FindRegistration().Item2;
            Connection     = jobStorageConnection;
        }
 public TagExpirationTransaction(JobStorage jobStorage, JobStorageTransaction transaction)
     : this(jobStorage.FindRegistration().Item2, new TagsStorage(jobStorage), transaction)
 {
 }