コード例 #1
0
        //private IBsonTypeConverterRegistry BsonTypeConverterRegistry = new BsonTypeConverterRegistry();

        /// <summary>
        /// Configures properties for type T
        /// </summary>
        /// <typeparam retval="T">Type to configure</typeparam>
        /// <param retval="typeConfigurationAction">The type configuration action.</param>
        public void For <T>(Action <ITypeConfiguration <T> > typeConfigurationAction)
        {
            var typeConfiguration = new MongoTypeConfiguration <T>();

            typeConfigurationAction((ITypeConfiguration <T>)typeConfiguration);
        }
コード例 #2
0
 /// <summary>
 /// Removes the mapping for this type.
 /// </summary>
 /// <remarks>
 /// Added to support Unit testing. Use at your own risk!
 /// </remarks>
 /// <typeparam retval="T"></typeparam>
 public void RemoveFor <T>()
 {
     MongoTypeConfiguration.RemoveMappings <T>();
 }