C# 클래스 Divan.CouchDocument

This is a base class that domain objects can inherit in order to get Id and Rev instance variables. You can also implement ICouchDocument yourself if you are not free to pick this class as your base. Some static methods to read and write CouchDB documents are also kept here. This class can also be used if you only need to retrieve id and revision from CouchDB. See sample subclasses to understand how to use this class.
상속: ICouchDocument, IReconcilingDocument
파일 보기 프로젝트 열기: kolosy/Divan 1 사용 예제들

공개 메소드들

메소드 설명
CouchDocument ( ) : System
CouchDocument ( JToken>.IDictionary doc ) : System
CouchDocument ( string id ) : System
CouchDocument ( string id, string rev ) : System
GetDatabaseCopy ( ICouchDatabase db ) : IReconcilingDocument
ReadIdAndRev ( ICouchDocument doc, Newtonsoft.Json.Linq.JObject obj ) : void
ReadIdAndRev ( ICouchDocument doc, JsonReader reader ) : void
ReadJson ( Newtonsoft.Json.Linq.JObject obj ) : void
Reconcile ( ICouchDocument databaseCopy ) : void

Called by the runtime when a conflict is detected during save. The supplied parameter is the database copy of the document being saved.

SaveCommited ( ) : void
WriteIdAndRev ( ICouchDocument doc, JsonWriter writer ) : void
WriteJson ( ICanJson doc ) : string
WriteJson ( JsonWriter writer ) : void
WriteJsonObject ( JsonWriter writer ) : void

보호된 메소드들

메소드 설명
AutoClone ( ) : CouchDocument
AutoReconcile ( ICouchDocument databaseCopy ) : void

Automatically reconcile the database copy with the target instance. This method uses reflection to perform the reconcilliation, and as such won't perform as well as other version, but is available for low-occurance scenarios

Clone ( ) : CouchDocument

비공개 메소드들

메소드 설명
EqualFields ( object v1, object v2 ) : bool

메소드 상세

AutoClone() 보호된 메소드

protected AutoClone ( ) : CouchDocument
리턴 CouchDocument

AutoReconcile() 보호된 메소드

Automatically reconcile the database copy with the target instance. This method uses reflection to perform the reconcilliation, and as such won't perform as well as other version, but is available for low-occurance scenarios
protected AutoReconcile ( ICouchDocument databaseCopy ) : void
databaseCopy ICouchDocument
리턴 void

Clone() 보호된 메소드

protected Clone ( ) : CouchDocument
리턴 CouchDocument

CouchDocument() 공개 메소드

public CouchDocument ( ) : System
리턴 System

CouchDocument() 공개 메소드

public CouchDocument ( JToken>.IDictionary doc ) : System
doc JToken>.IDictionary
리턴 System

CouchDocument() 공개 메소드

public CouchDocument ( string id ) : System
id string
리턴 System

CouchDocument() 공개 메소드

public CouchDocument ( string id, string rev ) : System
id string
rev string
리턴 System

GetDatabaseCopy() 공개 메소드

public GetDatabaseCopy ( ICouchDatabase db ) : IReconcilingDocument
db ICouchDatabase
리턴 IReconcilingDocument

ReadIdAndRev() 공개 정적인 메소드

public static ReadIdAndRev ( ICouchDocument doc, Newtonsoft.Json.Linq.JObject obj ) : void
doc ICouchDocument
obj Newtonsoft.Json.Linq.JObject
리턴 void

ReadIdAndRev() 공개 정적인 메소드

public static ReadIdAndRev ( ICouchDocument doc, JsonReader reader ) : void
doc ICouchDocument
reader Newtonsoft.Json.JsonReader
리턴 void

ReadJson() 공개 메소드

public ReadJson ( Newtonsoft.Json.Linq.JObject obj ) : void
obj Newtonsoft.Json.Linq.JObject
리턴 void

Reconcile() 공개 메소드

Called by the runtime when a conflict is detected during save. The supplied parameter is the database copy of the document being saved.
public Reconcile ( ICouchDocument databaseCopy ) : void
databaseCopy ICouchDocument
리턴 void

SaveCommited() 공개 메소드

public SaveCommited ( ) : void
리턴 void

WriteIdAndRev() 공개 정적인 메소드

public static WriteIdAndRev ( ICouchDocument doc, JsonWriter writer ) : void
doc ICouchDocument
writer Newtonsoft.Json.JsonWriter
리턴 void

WriteJson() 공개 정적인 메소드

public static WriteJson ( ICanJson doc ) : string
doc ICanJson
리턴 string

WriteJson() 공개 메소드

public WriteJson ( JsonWriter writer ) : void
writer Newtonsoft.Json.JsonWriter
리턴 void

WriteJsonObject() 공개 메소드

public WriteJsonObject ( JsonWriter writer ) : void
writer Newtonsoft.Json.JsonWriter
리턴 void