Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System;
10 : using System.Linq.Expressions;
11 : using Cqrs.Entities;
12 :
13 : namespace Cqrs.Mongo.DataStores.Indexes
14 : {
15 : /// <summary>
16 : /// A <see cref="MongoIndex{TEntity}"/> for <see cref="IEntity.Rsn"/>
17 : /// </summary>
18 : /// <typeparam name="TEntity">The <see cref="Type"/> of <see cref="IEntity"/> this index is for.</typeparam>
19 : public abstract class ByRsnMongoIndex<TEntity> : MongoIndex<TEntity>
20 : where TEntity : Entities.MongoEntity
21 1 : {
22 : /// <summary>
23 : /// Instantiate a new instance of <see cref="ByRsnMongoIndex{TEntity}"/>.
24 : /// </summary>
25 1 : protected ByRsnMongoIndex()
26 : {
27 : Selectors = new Expression<Func<TEntity, object>>[]
28 : {
29 : entity => entity.Rsn
30 : };
31 :
32 : IsUnique = true;
33 : }
34 : }
35 : }
|