C# Class Clearwave.SqlDocDB.Client.Document.DocumentConvention

Show file Open project: clearwavebuild/SqlDocDB Class Usage Examples

Public Methods

Method Description
CreateSerializer ( ) : JsonSerializer

Creates the serializer.

DefaultTransformTypeTagNameToDocumentKeyPrefix ( string typeTagName ) : string
DefaultTypeTagName ( Type t ) : string

Get the default tag name for the specified type.

DocumentConvention ( ) : System

Initializes a new instance of the DocumentConvention class.

GenerateDocumentKey ( object entity ) : System.Guid

Generates the document key.

GetClrType ( System.Guid id, RavenJObject document, RavenJObject metadata ) : string

Get the CLR type (if exists) from the document

GetClrTypeName ( Type entityType ) : string

Get the CLR type name to be stored in the entity metadata

GetIdentityProperty ( Type type ) : PropertyInfo

Gets the identity property.

GetTypeTagName ( Type type ) : string

Gets the name of the type tag.

Private Methods

Method Description
GetPropertiesForType ( Type type ) : IEnumerable

Method Details

CreateSerializer() public method

Creates the serializer.
public CreateSerializer ( ) : JsonSerializer
return Newtonsoft.Json.JsonSerializer

DefaultTransformTypeTagNameToDocumentKeyPrefix() public static method

public static DefaultTransformTypeTagNameToDocumentKeyPrefix ( string typeTagName ) : string
typeTagName string
return string

DefaultTypeTagName() public static method

Get the default tag name for the specified type.
public static DefaultTypeTagName ( Type t ) : string
t System.Type
return string

DocumentConvention() public method

Initializes a new instance of the DocumentConvention class.
public DocumentConvention ( ) : System
return System

GenerateDocumentKey() public method

Generates the document key.
public GenerateDocumentKey ( object entity ) : System.Guid
entity object The entity.
return System.Guid

GetClrType() public method

Get the CLR type (if exists) from the document
public GetClrType ( System.Guid id, RavenJObject document, RavenJObject metadata ) : string
id System.Guid
document RavenJObject
metadata RavenJObject
return string

GetClrTypeName() public method

Get the CLR type name to be stored in the entity metadata
public GetClrTypeName ( Type entityType ) : string
entityType System.Type
return string

GetIdentityProperty() public method

Gets the identity property.
public GetIdentityProperty ( Type type ) : PropertyInfo
type System.Type The type.
return System.Reflection.PropertyInfo

GetTypeTagName() public method

Gets the name of the type tag.
public GetTypeTagName ( Type type ) : string
type System.Type The type.
return string