public async Task <ClassificationResponse> Classify(IClassification classificationToRun, DateTime?asOfDate = null) { if (null != _classificationProcessor) { ClassificationResponse ret = await _classificationProcessor.Classify(classificationToRun, asOfDate); if (null != _notificationDispatcher) { await _notificationDispatcher.ClassificationCompleted(this, ClassificationNameAttribute.GetClassificationName(classificationToRun.GetType()), _classificationProcessor.Parameters, ret.AsOfSequence, asOfDate, ret); } return(ret); } else { return(await Task.FromException <ClassificationResponse>( new Exception("Classification processor not initialised"))); } }
public async Task <ClassificationResponse> Classify <TClassification>(DateTime?asOfDate = null) where TClassification : IClassification, new() { if (null != _classificationProcessor) { ClassificationResponse ret = await _classificationProcessor.Classify <TClassification>(asOfDate); if (null != _notificationDispatcher) { await _notificationDispatcher.ClassificationCompleted(this, ClassifierTypeName, _classificationProcessor.Parameters, ret.AsOfSequence, asOfDate, ret); } return(ret); } else { return(await Task.FromException <ClassificationResponse>(new Exception("Classification processor not initialised"))); } }