Skip to main content

RtTypeWithAttributes

Namespace: Meshmakers.Octo.Runtime.Contracts.RepositoryEntities

Represents a runtime type with attributes.

public abstract class RtTypeWithAttributes

Inheritance ObjectRtTypeWithAttributes

Properties

Attributes

Returns a dictionary of attributes.

public IReadOnlyDictionary<string, object> Attributes { get; }

Property Value

IReadOnlyDictionary<String, Object>

Remarks:

Vor getting/setting values use the GetAttribute/SetAttribute-Methods

Methods

GetLocation()

Returns a string that represents a location information for error messages

protected abstract string GetLocation()

Returns

String

ToString()

public string ToString()

Returns

String

GetAttributeValueOrStandard<TValue>(String, TValue)

Gets the attribute value or the standard value if the attribute is not set. This method allows non-nullable types

public TValue GetAttributeValueOrStandard<TValue>(string attributeName, TValue standardValue)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

standardValue TValue

Returns

TValue

GetAttributeValueOrDefault<TValue>(String, Nullable<TValue>)

Gets the attribute value or the default value if the attribute is not set. This method allow nullable types

public Nullable<TValue> GetAttributeValueOrDefault<TValue>(string attributeName, Nullable<TValue> defaultValue)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

defaultValue Nullable<TValue>

Returns

Nullable<TValue>

GetAttributeValues<TValue>(String)

Gets the value of an attribute when the value is a list This method allows non-nullable types

public IAttributeValueList<TValue> GetAttributeValues<TValue>(string attributeName)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

Returns

IAttributeValueList<TValue>

GetAttributeStringValues(String)

Gets the value of an attribute when the value is a list This method allows non-nullable types

public IAttributeValueList<string> GetAttributeStringValues(string attributeName)

Parameters

attributeName String
The name of the property in PascalCase

Returns

IAttributeValueList<String>

GetRtRecordAttributeValues<TValue>(String)

Gets the value of an attribute when the value is a list This method allows non-nullable types

public IAttributeValueList<TValue> GetRtRecordAttributeValues<TValue>(string attributeName)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

Returns

IAttributeValueList<TValue>

GetAttributeValuesOrDefault<TValue>(String)

Gets the value of an attribute when the value is a list This method allows nullable types

public IAttributeValueList<TValue> GetAttributeValuesOrDefault<TValue>(string attributeName)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

Returns

IAttributeValueList<TValue>

GetRtRecordAttributeValuesOrDefault<TValue>(String)

Gets the value of an attribute when the value is a list This method allows non-nullable types

public IAttributeValueList<TValue> GetRtRecordAttributeValuesOrDefault<TValue>(string attributeName)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

Returns

IAttributeValueList<TValue>

GetAttributeStringValuesOrDefault(String)

Gets the value of an attribute when the value is a list This method allows non-nullable types

public IAttributeValueList<string> GetAttributeStringValuesOrDefault(string attributeName)

Parameters

attributeName String
The name of the property in PascalCase

Returns

IAttributeValueList<String>

GetAttributeValue<TValue>(String, TValue)

Gets the value of an attribute when the value is non-nullable

public TValue GetAttributeValue<TValue>(string attributeName, TValue defaultValue)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

defaultValue TValue

Returns

TValue

GetAttributeBytesValueOrDefault(String)

Gets the byte array value of an attribute when the value is nullable

public Byte[] GetAttributeBytesValueOrDefault(string attributeName)

Parameters

attributeName String
The name of the property in PascalCase

Returns

Byte[]

GetAttributeBytesValue(String)

Gets the byte array value of an attribute when the value is non-nullable

public Byte[] GetAttributeBytesValue(string attributeName)

Parameters

attributeName String
The name of the property in PascalCase

Returns

Byte[]

GetAttributeGeometryObjectValueOrDefault<TValue>(String)

Gets the value of an RtRecord attribute when the value is nullable

public TValue GetAttributeGeometryObjectValueOrDefault<TValue>(string attributeName)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

Returns

TValue

GetAttributeLinkedBinaryValueOrDefault(String)

Gets the value of a linked binary attribute when the value is nullable

public EntityBinaryInfo GetAttributeLinkedBinaryValueOrDefault(string attributeName)

Parameters

attributeName String
The name of the property in PascalCase

Returns

EntityBinaryInfo

GetAttributeGeometryObjectValue<TValue>(String)

Gets the value of an attribute when the value is non-nullable

public TValue GetAttributeGeometryObjectValue<TValue>(string attributeName)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

Returns

TValue

GetAttributeLinkedBinaryValue(String)

Gets the value of a linked binary attribute when the value is non-nullable

public EntityBinaryInfo GetAttributeLinkedBinaryValue(string attributeName)

Parameters

attributeName String
The name of the property in PascalCase

Returns

EntityBinaryInfo

GetAttributeValueOrDefault(String, Object)

Gets the value of an attribute if the value is nullable

public object GetAttributeValueOrDefault(string attributeName, object defaultValue)

Parameters

attributeName String
The name of the property in PascalCase

defaultValue Object

Returns

Object

GetRtRecordAttributeValue<TValue>(String)

Gets the value of an RtRecord attribute when the value is non-nullable

public TValue GetRtRecordAttributeValue<TValue>(string attributeName)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

Returns

TValue

GetRtRecordAttributeValueOrDefault<TValue>(String)

Gets the value of an RtRecord attribute when the value is non-nullable

public TValue GetRtRecordAttributeValueOrDefault<TValue>(string attributeName)

Type Parameters

TValue

Parameters

attributeName String
The name of the property in PascalCase

Returns

TValue

GetAttributeStringValueOrDefault(String, String)

Gets the value of an attribute if the value is nullable and a string

public string GetAttributeStringValueOrDefault(string attributeName, string defaultValue)

Parameters

attributeName String
The name of the property in PascalCase

defaultValue String

Returns

String

GetAttributeStringValue(String)

Gets the value of an attribute if the value is non-nullable and a string

public string GetAttributeStringValue(string attributeName)

Parameters

attributeName String
The name of the property in PascalCase

Returns

String

Exceptions

Exception

GetAttributeValueByAccessPath(ICkCacheService, String, IEnumerable<PathTerm>)

Gets the value of an attribute in the current object or an embedded document using the given path

public object GetAttributeValueByAccessPath(ICkCacheService ckCacheService, string tenantId, IEnumerable<PathTerm> path)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

path IEnumerable<PathTerm>
Path list to the attribute

Returns

Object
The value of the attribute or otherwise null

GetAttributeValueByAccessPath(ICkCacheService, String, String)

Gets the value of an attribute in the current object or an embedded document using the given path

public object GetAttributeValueByAccessPath(ICkCacheService ckCacheService, string tenantId, string path)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

path String
Path list to the attribute

Returns

Object
The value of the attribute or otherwise null

SetAttributeValueByAccessPath(ICkCacheService, String, IEnumerable<PathTerm>, Object)

Sets the value of an attribute in the current object or an embedded document using the given path

public void SetAttributeValueByAccessPath(ICkCacheService ckCacheService, string tenantId, IEnumerable<PathTerm> path, object value)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

path IEnumerable<PathTerm>
Path list to the attribute

value Object
Value to set

SetAttributeValue(String, AttributeValueTypesDto, Object)

Sets the value of an attribute when the value is nullable

public void SetAttributeValue(string attributeName, AttributeValueTypesDto attributeValueTypes, object attributeValue)

Parameters

attributeName String
The name of the property in PascalCase

attributeValueTypes AttributeValueTypesDto
Type of attribute value

attributeValue Object
The value of the attribute

SetAttributeValueNonNullable(String, AttributeValueTypesDto, Object)

Sets the value of an attribute when the value is non-nullable

public void SetAttributeValueNonNullable(string attributeName, AttributeValueTypesDto attributeValueTypes, object attributeValue)

Parameters

attributeName String
The name of the property in PascalCase

attributeValueTypes AttributeValueTypesDto
Type of attribute value

attributeValue Object
The value of the attribute