Exemplo n.º 1
0
 /// <summary>
 /// Configures the Apworks framework by using a default sequence generator.
 /// </summary>
 /// <param name="configurator">The <see cref="IIdentityGeneratorConfigurator"/> instance to be extended.</param>
 /// <returns>The <see cref="ISequenceGeneratorConfigurator"/> instance.</returns>
 public static ISequenceGeneratorConfigurator WithDefaultSequenceGenerator(this IIdentityGeneratorConfigurator configurator)
 {
     return(WithSequenceGenerator <SequentialIdentityGenerator>(configurator));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Configures the Apworks framework by using the specified sequence generator.
 /// </summary>
 /// <typeparam name="TSequenceGenerator">The type of the sequence generator to be used by the framework.</typeparam>
 /// <param name="configurator">The <see cref="IIdentityGeneratorConfigurator"/> instance to be extended.</param>
 /// <returns>The <see cref="ISequenceGeneratorConfigurator"/> instance.</returns>
 public static ISequenceGeneratorConfigurator WithSequenceGenerator <TSequenceGenerator>(this IIdentityGeneratorConfigurator configurator)
     where TSequenceGenerator : ISequenceGenerator
 {
     return(new SequenceGeneratorConfigurator(configurator, typeof(TSequenceGenerator)));
 }