public static ClientAppSettings Enable(IPipelines pipelines)
        {
            var appSettings = new ClientAppSettings();

            pipelines.BeforeRequest.AddItemToEndOfPipeline(ctx =>
            {
                ctx.Items[ContextKey] = new ClientAppSettings(appSettings);
                return(null);
            });

            return(appSettings);
        }
        public static ClientAppSettings GetClientAppSettings(this NancyContext context)
        {
            var settings = context.Items[ClientAppSettings.ContextKey] as ClientAppSettings;

            if (settings != null)
            {
                return(settings);
            }

            settings = new ClientAppSettings();
            context.Items[ClientAppSettings.ContextKey] = settings;

            return(settings);
        }
 public ClientAppSettings(ClientAppSettings parent) : this()
 {
     _parent = parent;
 }