Class InvoiceAnalysisFoundationService
- Assembly
- arolariu.Backend.Domain.Invoices.dll
The invoice analysis foundation service interface represents the foundation analysis service for the invoice domain.
public class InvoiceAnalysisFoundationService : IInvoiceAnalysisFoundationService
- Inheritance
-
InvoiceAnalysisFoundationService
- Implements
- Inherited Members
Constructors
InvoiceAnalysisFoundationService(IOpenAiBroker, ITranslatorBroker, IFormRecognizerBroker, ILoggerFactory)
DI Constructor.
public InvoiceAnalysisFoundationService(IOpenAiBroker analysisBroker, ITranslatorBroker translatorBroker, IFormRecognizerBroker receiptRecognizerBroker, ILoggerFactory loggerFactory)
Parameters
analysisBroker
IOpenAiBrokertranslatorBroker
ITranslatorBrokerreceiptRecognizerBroker
IFormRecognizerBrokerloggerFactory
ILoggerFactory
Fields
analysisBroker
private readonly IOpenAiBroker analysisBroker
Field Value
logger
private readonly ILogger<IInvoiceAnalysisFoundationService> logger
Field Value
receiptRecognizerBroker
private readonly IFormRecognizerBroker receiptRecognizerBroker
Field Value
translatorBroker
private readonly ITranslatorBroker translatorBroker
Field Value
Methods
AnalyzeInvoiceAsync(Invoice, AnalysisOptions)
Analyze an invoice.
public Task<Invoice> AnalyzeInvoiceAsync(Invoice invoice, AnalysisOptions options)
Parameters
invoice
Invoiceoptions
AnalysisOptions
Returns
CreateAndLogDependencyException(Exception)
private InvoiceFoundationDependencyException CreateAndLogDependencyException(Exception exception)
Parameters
exception
Exception
Returns
CreateAndLogDependencyValidationException(Exception)
private InvoiceFoundationDependencyValidationException CreateAndLogDependencyValidationException(Exception exception)
Parameters
exception
Exception
Returns
CreateAndLogServiceException(Exception)
private InvoiceFoundationServiceException CreateAndLogServiceException(Exception exception)
Parameters
exception
Exception
Returns
CreateAndLogValidationException(Exception)
private InvoiceFoundationValidationException CreateAndLogValidationException(Exception exception)
Parameters
exception
Exception
Returns
PerformGptAnalysis(Invoice, AnalysisOptions)
private Task<Invoice> PerformGptAnalysis(Invoice invoice, AnalysisOptions options)
Parameters
invoice
Invoiceoptions
AnalysisOptions
Returns
PerformOcrAnalysis(Invoice, AnalysisOptions)
private Task<Invoice> PerformOcrAnalysis(Invoice invoice, AnalysisOptions options)
Parameters
invoice
Invoiceoptions
AnalysisOptions
Returns
PerformTranslationAnalysis(Invoice)
private Task<Invoice> PerformTranslationAnalysis(Invoice invoice)
Parameters
invoice
Invoice
Returns
TryCatchAsync(ReturningAnalysisFunction)
private Task<Invoice> TryCatchAsync(InvoiceAnalysisFoundationService.ReturningAnalysisFunction returningAnalysisFunction)
Parameters
returningAnalysisFunction
InvoiceAnalysisFoundationService.ReturningAnalysisFunction