예제 #1
0
        public T AsIndexedCollection <TIndex>(string indexColumn, Action <IndexPart> customIndexMapping)
        {
            CreateIndexMapping(customIndexMapping);

            if (!indexMapping.IsSpecified("Type"))
            {
                indexMapping.SetDefaultValue(x => x.Type, new TypeReference(typeof(TIndex)));
            }

            if (indexMapping.Columns.IsEmpty())
            {
                indexMapping.AddDefaultColumn(new ColumnMapping {
                    Name = indexColumn
                });
            }

            return((T)this);
        }