예제 #1
0
        public override ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(
            string processorName,
            ChangeFeedStreamHandler onChangesDelegate)
        {
            return(this.container.GetChangeFeedProcessorBuilder(
                       processorName,
                       async(
                           ChangeFeedProcessorContext context,
                           Stream changes,
                           CancellationToken cancellationToken) =>
            {
                EncryptionSettings encryptionSettings = await this.GetOrUpdateEncryptionSettingsFromCacheAsync(
                    obsoleteEncryptionSettings: null,
                    cancellationToken: cancellationToken);

                Stream decryptedChanges = await EncryptionProcessor.DeserializeAndDecryptResponseAsync(
                    changes,
                    encryptionSettings,
                    operationDiagnostics: null,
                    cancellationToken);

                // Call the original passed in delegate
                await onChangesDelegate(context, decryptedChanges, cancellationToken);
            }));
        }
예제 #2
0
        public override ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(
            string processorName,
            ChangeFeedStreamHandler onChangesDelegate)
        {
            return(this.container.GetChangeFeedProcessorBuilder(
                       processorName,
                       async(
                           ChangeFeedProcessorContext context,
                           Stream changes,
                           CancellationToken cancellationToken) =>
            {
                Stream decryptedChanges = await EncryptionProcessor.DeserializeAndDecryptResponseAsync(
                    changes,
                    this.Encryptor,
                    cancellationToken);

                // Call the original passed in delegate
                await onChangesDelegate(context, decryptedChanges, cancellationToken);
            }));
        }
 public override ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(
     string processorName,
     ChangeFeedStreamHandler onChangesDelegate)
 {
     throw new NotImplementedException();
 }
예제 #4
0
 public ChangeFeedObserverFactoryCore(ChangeFeedStreamHandler onChanges)
 {
     this.onChanges = onChanges ?? throw new ArgumentNullException(nameof(onChanges));
 }