Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (22 sloc) 822 Bytes
package ravendb
// AfterSaveChangesEventArgs describes arguments for "after save changes" listener
type AfterSaveChangesEventArgs struct {
documentMetadata *MetadataAsDictionary
Session *InMemoryDocumentSessionOperations
DocumentID string
Entity interface{}
}
func newAfterSaveChangesEventArgs(session *InMemoryDocumentSessionOperations, documentID string, entity interface{}) *AfterSaveChangesEventArgs {
return &AfterSaveChangesEventArgs{
Session: session,
DocumentID: documentID,
Entity: entity,
}
}
// GetDocumentMetadata returns metadata for the entity represented by this event
func (a *AfterSaveChangesEventArgs) GetDocumentMetadata() *MetadataAsDictionary {
if a.documentMetadata == nil {
a.documentMetadata, _ = a.Session.GetMetadataFor(a.Entity)
}
return a.documentMetadata
}
You can’t perform that action at this time.