public GenerateEntityIdOnTheClient(DocumentConvention conventions, Func <object, string> generateKey) { this.conventions = conventions; this.generateKey = generateKey; }
internal Subscription(SubscriptionConnectionOptions options, IDocumentStore documentStore, DocumentConvention conventions, string dbName) { _options = options; if (_options.SubscriptionId == 0) { throw new ArgumentException("SubscriptionConnectionOptions must specify the SubscriptionId, but was set to zero.", nameof(options)); } _store = documentStore; _conventions = conventions; _dbName = dbName; _generateEntityIdOnTheClient = new GenerateEntityIdOnTheClient(conventions, entity => { throw new InvalidOperationException("Shouldn't be generating new ids here"); }); }
/// <summary> /// Generates the document key using identity. /// </summary> /// <param name="conventions">The conventions.</param> /// <param name="entity">The entity.</param> /// <returns></returns> public static string GenerateDocumentKeyUsingIdentity(DocumentConvention conventions, object entity) { return(conventions.GetDynamicTagName(entity) + "/"); }
public Task <string> Generate(string dbName, DocumentConvention conventions, object entity) { throw new NotImplementedException(); }
public JsonNetBlittableEntitySerializer(DocumentConvention conventions) { _conventions = conventions; }