C# Class Raven.Light.Conventions.DocumentConvention

The set of conventions used by the EmbeddedDocumentStore which allow the users to customize the way the Raven client API behaves
Mostra file Open project: hibernating-rhinos/Raven.Light Class Usage Examples

Public Methods

Method Description
CreateSerializer ( ) : JsonSerializer

Creates the serializer.

DefaultFindFullDocumentKeyFromValueTypeIdentifier ( ValueType id, Type type ) : string

Find the full document name assuming that we are using the standard conventions for generating a document key

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 ) : string

Generates the document key.

GenerateDocumentKeyUsingIdentity ( DocumentConvention conventions, object entity ) : string

Generates the document key using identity.

GetClrType ( string id, RavenJObject document, RavenJObject metadata ) : string

Get the CLR type (if exists) from the document

GetIdentityProperty ( Type type ) : PropertyInfo

Gets the identity property.

GetTypeTagName ( Type type ) : string

Gets the name of the type tag.

Method Details

CreateSerializer() public method

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

DefaultFindFullDocumentKeyFromValueTypeIdentifier() public method

Find the full document name assuming that we are using the standard conventions for generating a document key
public DefaultFindFullDocumentKeyFromValueTypeIdentifier ( ValueType id, Type type ) : string
id System.ValueType
type System.Type
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 ) : string
entity object The entity.
return string

GenerateDocumentKeyUsingIdentity() public static method

Generates the document key using identity.
public static GenerateDocumentKeyUsingIdentity ( DocumentConvention conventions, object entity ) : string
conventions DocumentConvention The conventions.
entity object The entity.
return string

GetClrType() public method

Get the CLR type (if exists) from the document
public GetClrType ( string id, RavenJObject document, RavenJObject metadata ) : string
id string
document RavenJObject
metadata RavenJObject
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