Example #1
0
 public GenerateEntityIdOnTheClient(DocumentConvention conventions, Func <object, string> generateKey)
 {
     this.conventions = conventions;
     this.generateKey = generateKey;
 }
Example #2
0
        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"); });
        }
Example #3
0
 /// <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) + "/");
 }
Example #4
0
 public Task <string> Generate(string dbName, DocumentConvention conventions,
                               object entity)
 {
     throw new NotImplementedException();
 }
Example #5
0
 public JsonNetBlittableEntitySerializer(DocumentConvention conventions)
 {
     _conventions = conventions;
 }