public async Task <bool> ExistsAsync(IDecisionModelIdentity decision)
        {
            try
            {
                this._log.Write($"Exist decision {decision} on persister {this._decorated}");
                bool existsDecision = await this._decorated.ExistsAsync(decision);

                this._log.Write("Decision Existed");
                return(existsDecision);
            }
            catch (Exception e)
            {
                this._log.Write($"Error while existing decision {decision} on persister {this._decorated}");
                this._log.Write(e.ToString());
                throw;
            }
        }
Ejemplo n.º 2
0
 public Task <bool> ExistsAsync(IDecisionModelIdentity decision)
 {
     return(Task.Run(() => this.Exists(decision)));
 }
Ejemplo n.º 3
0
 public bool Exists(IDecisionModelIdentity decision)
 {
     return(this._models.Contains(decision));
 }
 public async Task <bool> ExistsAsync(IDecisionModelIdentity decision)
 {
     return((await this.FetchAllAsync()).Any(decision.Equals));
 }
 private static bool DesignateSameDecision(IDecisionModelIdentity decision, RssItem item)
 {
     return(DecisionModel.IdentityEqualityComparer.Equals(decision, new DecisionModelRssItemConverter(item).BuildModel()));
 }
Ejemplo n.º 6
0
 public async Task <bool> ExistsAsync(IDecisionModelIdentity decision)
 {
     return(await Task.Run(() => this._decisionList.Any(element => element.Equals(decision))));
 }
 public async Task <bool> ExistsAsync(IDecisionModelIdentity decision)
 {
     return(await this.Proxied.ExistsAsync(decision));
 }