Class TableAttributeUtils
Extension methods for serializing / deserializing custom attributes.
Inheritance
TableAttributeUtils
Namespace: BiExcellence.OpenBi.Api.Commands.TableAttributes.Internal
Assembly: BiExcellence.OpenBi.Api.TableAttribute.dll
Syntax
public static class TableAttributeUtils
Methods
ParseCustomAttributes(JsonElement, ITableAttributes?)
Tries to parse the custom attributes for this type.
Declaration
public static IDictionary<string, object?> ParseCustomAttributes(this JsonElement element, ITableAttributes? tableAttributes)
Parameters
Type | Name | Description |
---|---|---|
JsonElement | element | The json element. |
ITableAttributes | tableAttributes | The table attributes. |
Returns
Type | Description |
---|---|
IDictionary<string, object> | A dictionay of string, object. This is empty if something went wrong. |
ParseCustomAttributesNative<T>(JsonElement, ITableAttributes<T>)
Tries to parse the custom attributes for this type.
Declaration
public static IDictionary<string, object?> ParseCustomAttributesNative<T>(JsonElement customAttributes, ITableAttributes<T> tableAttributes) where T : ITableAttribute
Parameters
Type | Name | Description |
---|---|---|
JsonElement | customAttributes | The custom attributes. |
ITableAttributes<T> | tableAttributes | The table attributes. |
Returns
Type | Description |
---|---|
IDictionary<string, object> | A dictionay of string, object. This is empty if something went wrong. |
Type Parameters
Name | Description |
---|---|
T | The type. |
SerializeCustomAttributes<T>(ICustomAttributes, ITableAttributes<T>, Action<string, object?>)
Tries to serialize the custom attributes for this instance.
Declaration
public static void SerializeCustomAttributes<T>(ICustomAttributes instance, ITableAttributes<T> tableAttributes, Action<string, object?> serializeCallback) where T : ITableAttribute
Parameters
Type | Name | Description |
---|---|---|
ICustomAttributes | instance | The instance. |
ITableAttributes<T> | tableAttributes | The table attributes (can be |
Action<string, object> | serializeCallback | The serialize callback. |
Type Parameters
Name | Description |
---|---|
T |
SerializeCustomAttributesAsync(IOpenBiRequest, ICustomAttributes, CancellationToken)
Tries to serialize the custom attributes for this instance. This method is using the ITableAttributeCache.
Declaration
public static Task SerializeCustomAttributesAsync(this IOpenBiRequest request, ICustomAttributes instance, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiRequest | request | The request. |
ICustomAttributes | instance | The instance. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |