Interface IErrorService
Represents the error API service.
Namespace: Relativity.Testing.Framework.Api.Services
Assembly: Relativity.Testing.Framework.Api.dll
Syntax
public interface IErrorService
Examples
_errorService = relativityFacade.Resolve<IErrorService>();
Methods
| Improve this Doc View SourceCreate(Error)
Creates the specified error.
Declaration
Error Create(Error entity)
Parameters
Type | Name | Description |
---|---|---|
Error | entity | The entity to create. |
Returns
Type | Description |
---|---|
Error | The created entity. |
Examples
var entity = new Error { Message = "Test message" };
var error = _errorService.Create(entity);
|
Improve this Doc
View Source
Get(Int32)
Gets the error by the specified ID.
Declaration
Error Get(int entityId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | entityId | The Artifact ID of the error. |
Returns
Type | Description |
---|---|
Error |
|
Examples
var error = _errorService.Get(someExistingErrorArtifactId);
|
Improve this Doc
View Source
GetAll()
Gets all errors.
Declaration
Error[] GetAll()
Returns
Type | Description |
---|---|
Error[] | The collection of Error errors. |
Examples
var errors = _errorService.GetAll(entity);
|
Improve this Doc
View Source
GetAllByDate(DateTime, DateTime)
Gets all errors by specific date.
Declaration
Error[] GetAllByDate(DateTime from, DateTime to)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | from | The start of a date range. |
System.DateTime | to | The end of a date range. |
Returns
Type | Description |
---|---|
Error[] | The collection of Error errors. |
Examples
var currentDateTime = DateTime.Now;
var error = _errorService.GetAllByDate(currentDateTime.AddDays(-1), currentDateTime);