Interface IRazorClient
Defines the contract for a client that interacts with a Razor API service.
Namespace: Noxum.Nova.Razor.Client
Assembly: Noxum.Nova.Razor.Client.dll
Syntax
public interface IRazorClient
Properties
BaseUrl
Gets the base URL of the Razor API service.
Declaration
string BaseUrl { get; }
Property Value
| Type | Description |
|---|---|
| string |
HttpClient
Gets the underlying HttpClient used to make requests.
Declaration
HttpClient HttpClient { get; }
Property Value
| Type | Description |
|---|---|
| HttpClient |
Timeout
Gets or sets the timespan to wait before the request times out.
Declaration
TimeSpan Timeout { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Methods
GetBinaryAsync(Guid)
Get a database binary by MD5 hash code
Declaration
Task<FileResponse> GetBinaryAsync(Guid md5)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | md5 | The binary MD5 as a Guid-formatted string |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetBinaryAsync(Guid, CancellationToken)
Get a database binary by MD5 hash code
Declaration
Task<FileResponse> GetBinaryAsync(Guid md5, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | md5 | The binary MD5 as a Guid-formatted string |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetBpoExternalBinaryAsync(int, int)
Get an external binary (a file) by binary proxy object id
Declaration
Task<FileResponse> GetBpoExternalBinaryAsync(int branchId, int bpoId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| int | bpoId | The binary proxy object ID |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetBpoExternalBinaryAsync(int, int, CancellationToken)
Get an external binary (a file) by binary proxy object id
Declaration
Task<FileResponse> GetBpoExternalBinaryAsync(int branchId, int bpoId, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| int | bpoId | The binary proxy object ID |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetExternalBinaryAsync(string, string)
Get an external binary (a file) by file name (Guid + Extension)
Declaration
Task<FileResponse> GetExternalBinaryAsync(string name, string range)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Name of the file including the extension. |
| string | range | Range header value. For more information, visit https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetExternalBinaryAsync(string, string, CancellationToken)
Get an external binary (a file) by file name (Guid + Extension)
Declaration
Task<FileResponse> GetExternalBinaryAsync(string name, string range, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Name of the file including the extension. |
| string | range | Range header value. For more information, visit https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetNovaFontsCssAsync(int)
Get the nova-fonts.css created from system objects
Declaration
Task<FileResponse> GetNovaFontsCssAsync(int branchId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetNovaFontsCssAsync(int, CancellationToken)
Get the nova-fonts.css created from system objects
Declaration
Task<FileResponse> GetNovaFontsCssAsync(int branchId, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetNovaStylesCssAsync(int)
Get the nova-styles.css created from system objects
Declaration
Task<FileResponse> GetNovaStylesCssAsync(int branchId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetNovaStylesCssAsync(int, CancellationToken)
Get the nova-styles.css created from system objects
Declaration
Task<FileResponse> GetNovaStylesCssAsync(int branchId, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetRenderedTemplateAsync(int, int, string, string, string, string, bool?)
Render a preview from a list of objects.
Declaration
Task<FileResponse> GetRenderedTemplateAsync(int branchId, int templateId, string uiCulture, string objects, string variants, string languages, bool? hyphenate)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| int | templateId | The template ID |
| string | uiCulture | The UI culture |
| string | objects | A comma separated list of object IDs |
| string | variants | A comma separated list of variant IDs |
| string | languages | A comma separated list of language IDs |
| bool? | hyphenate | True to insert hyphenation points in the the output |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetRenderedTemplateAsync(int, int, string, string, string, string, bool?, CancellationToken)
Render a preview from a list of objects.
Declaration
Task<FileResponse> GetRenderedTemplateAsync(int branchId, int templateId, string uiCulture, string objects, string variants, string languages, bool? hyphenate, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| int | templateId | The template ID |
| string | uiCulture | The UI culture |
| string | objects | A comma separated list of object IDs |
| string | variants | A comma separated list of variant IDs |
| string | languages | A comma separated list of language IDs |
| bool? | hyphenate | True to insert hyphenation points in the the output |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetStylesheetAsync(int, int)
Get the stylesheet created from an object of type TypeCascadingStyleSheet
Declaration
Task<FileResponse> GetStylesheetAsync(int objectId, int branchId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | objectId | The object ID |
| int | branchId | The branch ID |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
GetStylesheetAsync(int, int, CancellationToken)
Get the stylesheet created from an object of type TypeCascadingStyleSheet
Declaration
Task<FileResponse> GetStylesheetAsync(int objectId, int branchId, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| int | objectId | The object ID |
| int | branchId | The branch ID |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
RenderBatchAsync(int, BatchRequest)
Render a preview from a list of objects
Declaration
Task<BatchResponse> RenderBatchAsync(int branchId, BatchRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| BatchRequest | request | The render request parameters |
Returns
| Type | Description |
|---|---|
| Task<BatchResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
RenderBatchAsync(int, BatchRequest, CancellationToken)
Render a preview from a list of objects
Declaration
Task<BatchResponse> RenderBatchAsync(int branchId, BatchRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| BatchRequest | request | The render request parameters |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<BatchResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
RenderTemplateAsync(int, int, bool?, RenderRequest)
Render a preview from a list of objects
Declaration
Task<FileResponse> RenderTemplateAsync(int branchId, int templateId, bool? hyphenate, RenderRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| int | templateId | The template ID |
| bool? | hyphenate | True to insert hyphenation points in the the output |
| RenderRequest | request | The render request parameters |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |
RenderTemplateAsync(int, int, bool?, RenderRequest, CancellationToken)
Render a preview from a list of objects
Declaration
Task<FileResponse> RenderTemplateAsync(int branchId, int templateId, bool? hyphenate, RenderRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| int | branchId | The branch ID |
| int | templateId | The template ID |
| bool? | hyphenate | True to insert hyphenation points in the the output |
| RenderRequest | request | The render request parameters |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FileResponse> | OK |
Exceptions
| Type | Condition |
|---|---|
| RazorApiException | A server side error occurred. |