public override void WithResolvingModelHost(ModelHostResolveContext context)
        {
            var farmAppModelHost = context.ModelHost.WithAssertAndCast <FarmModelHost>("modelHost", value => value.RequireNotNull());
            var definition       = context.Model.WithAssertAndCast <SecureStoreApplicationDefinition>("model", value => value.RequireNotNull());

            var currentObject = GetCurrentSecureStoreApplication(farmAppModelHost.HostFarm, definition);

            context.Action(new SecureStoreApplicationModelHost
            {
                HostFarm        = farmAppModelHost.HostFarm,
                HostSecureStore = currentObject
            });
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Resolves a new model host per particular child definition type.
 /// </summary>
 /// <param name="context"></param>
 public virtual void WithResolvingModelHost(ModelHostResolveContext context)
 {
     context.Action(context.ModelHost);
 }