RtTypeWithAttributes
Namespace: Meshmakers.Octo.Runtime.Contracts.RepositoryEntities
Represents a runtime type with attributes.
public abstract class RtTypeWithAttributes
Inheritance Object → RtTypeWithAttributes
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
ToString()
public string ToString()
Returns
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Exceptions
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