Exemplo n.º 1
0
 public override void BeginDataCooking(
     ICookedDataRetrieval dependencyRetrieval,
     CancellationToken cancellationToken)
 {
     base.BeginDataCooking(dependencyRetrieval, cancellationToken);
     this.dependencyRetrieval = dependencyRetrieval;
 }
        /// <summary>
        ///     Creates an instance.
        /// </summary>
        /// <param name="sourceCookerData">
        ///     Provides access to source data cooker output.
        /// </param>
        /// <param name="dataExtensionRepository">
        ///     Provides a way to generate data extensions other than source data cookers.
        /// </param>
        public DataExtensionRetrievalFactory(
            ICookedDataRetrieval sourceCookerData,
            IDataExtensionRepository dataExtensionRepository)
        {
            Guard.NotNull(sourceCookerData, nameof(sourceCookerData));
            Guard.NotNull(dataExtensionRepository, nameof(dataExtensionRepository));

            this.CookedSourceData        = sourceCookerData;
            this.DataExtensionRepository = dataExtensionRepository;
        }
 /// <summary>
 ///     Attempts to get the direct cooker retrieval for the specified
 ///     cooker.
 /// </summary>
 /// <param name="cookerPath">
 ///     The path to the cooker to retrieve.
 /// </param>
 /// <param name="retrieval">
 ///     The found retrieval, if any.
 /// </param>
 /// <returns>
 ///     <c>true</c> if the cooker can be queried;
 ///     <c>false</c> otherwise.
 /// </returns>
 public bool TryGetCookedData(DataCookerPath cookerPath, out ICookedDataRetrieval retrieval)
 {
     try
     {
         retrieval = this.GetCookedData(cookerPath);
         return(true);
     }
     catch
     {
         retrieval = null;
         return(false);
     }
 }
        /// <summary>
        ///     Initializes a new instance of the <see cref="RuntimeExecutionResults"/>
        ///     class.
        /// </summary>
        /// <param name="cookedDataRetrieval">
        ///     The retrieval interface for getting to cooked data.
        /// </param>
        /// <param name="retrievalFactory">
        ///     The factory for creating retrievals for composite cookers.
        /// </param>
        /// <param name="repository">
        ///     The repository that was used to process the data.
        /// </param>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="cookedDataRetrieval"/> is <c>null</c>.
        ///     - or -
        ///     <paramref name="retrievalFactory"/> is <c>null</c>.
        ///     - or -
        ///     <paramref name="repository"/> is <c>null</c>.
        /// </exception>
        public RuntimeExecutionResults(
            ICookedDataRetrieval cookedDataRetrieval,
            IDataExtensionRetrievalFactory retrievalFactory,
            IDataExtensionRepository repository)
        {
            Guard.NotNull(cookedDataRetrieval, nameof(cookedDataRetrieval));
            Guard.NotNull(retrievalFactory, nameof(retrievalFactory));
            Guard.NotNull(repository, nameof(repository));

            this.cookedDataRetrieval = cookedDataRetrieval;
            this.retrievalFactory    = retrievalFactory;
            this.repository          = repository;
            this.sourceCookers       = new HashSet <DataCookerPath>(this.repository.SourceDataCookers);
        }
 /// <summary>
 ///     When overridden in a derived class, performs any processing that
 ///     must be performed before cooking actually begins. By default,
 ///     this method does nothing.
 /// </summary>
 /// <param name="dependencyRetrieval">
 ///     Provides a means of retrieving the dependencies of this cooker.
 /// </param>
 /// <param name="cancellationToken">
 ///     Signals that the caller wishes to cancel the operation.
 /// </param>
 public virtual void BeginDataCooking(ICookedDataRetrieval dependencyRetrieval, CancellationToken cancellationToken)
 {
 }
 public void BeginDataCooking(ICookedDataRetrieval dependencyRetrieval, CancellationToken cancellationToken)
 {
     logEntries = new List <LogEntry>();
 }
 public void BeginDataCooking(ICookedDataRetrieval dependencyRetrieval, CancellationToken cancellationToken)
 {
     this.BeginDataCookingCallCount++;
     this.BeginDataCookingAction?.Invoke(cancellationToken);
 }