Пример #1
0
 public AutoMapIndexDefinition(string collection, AutoIndexField[] fields)
     : base(AutoIndexNameFinder.FindMapIndexName(collection, fields), collection, fields)
 {
     if (fields.Length == 0)
     {
         throw new ArgumentException("You must specify at least one field.", nameof(fields));
     }
 }
        public void IndexNameFinderShouldPreservePascalCaseFieldNames()
        {
            var name = AutoIndexNameFinder.FindMapIndexName("Users", new[]
            {
                new AutoIndexField()
                {
                    Name     = "LastName",
                    Indexing = AutoFieldIndexing.Default | AutoFieldIndexing.Search
                }
            });

            Assert.Equal("Auto/Users/BySearch(LastName)", name);
        }
Пример #3
0
 public AutoMapIndexDefinition(string collection, AutoIndexField[] fields)
     : base(AutoIndexNameFinder.FindMapIndexName(collection, fields), collection, fields)
 {
 }
Пример #4
0
 public AutoMapIndexDefinition(string collection, AutoIndexField[] fields, IndexDeploymentMode?deploymentMode, long?indexVersion = null)
     : base(AutoIndexNameFinder.FindMapIndexName(collection, fields), collection, fields, deploymentMode, indexVersion)
 {
 }