Generates the key string for the provided values

Namespace: BrightstarDB.EntityFramework
Assembly: BrightstarDB (in BrightstarDB.dll) Version: 1.9.0.0 (1.9.0.0)

Syntax

C#
public virtual string GenerateKey(
	Object[] keyValues,
	string keySeparator,
	Type forType
)
Visual Basic
Public Overridable Function GenerateKey ( 
	keyValues As Object(),
	keySeparator As String,
	forType As Type
) As String
Visual C++
public:
virtual String^ GenerateKey(
	array<Object^>^ keyValues, 
	String^ keySeparator, 
	Type^ forType
)
F#
abstract GenerateKey : 
        keyValues : Object[] * 
        keySeparator : string * 
        forType : Type -> string 
override GenerateKey : 
        keyValues : Object[] * 
        keySeparator : string * 
        forType : Type -> string 

Parameters

keyValues
Type: array<System..::..Object>[]()[][]
The values to be serialized into a key
keySeparator
Type: System..::..String
The separator to insert between key values
forType
Type: System..::..Type
The type of entity the key is generated for

Return Value

Type: String
The generated key string or null if keyValues is empty after all null values are removed.

Implements

IKeyConverter..::..GenerateKey(array<Object>[]()[][], String, Type)

Remarks

Null values in keyValues are ignored. Int, long and decimal values are converted to a string using the InvariantCulture format. String values are copied as is. Values of other types are converted to a string by calling their ToString()()()() method. The resulting strings are then encoded and if there are multiple non-null values they are joined using keySeparator as the separator. The value of keySeparator is NOT URI-encoded.

See Also