public void Configure(FubuRegistry registry) { registry.ApplyConvention <SpecialPolicy>(); registry.Import <SubModule>(); Applied++; }
public void ConfigureRegistry(FubuRegistry registry) { registry.Services(x => { var handler = x.SetServiceIfNone(typeof(IValidationFailureHandler), typeof(ValidationFailureHandler)); handler.Dependencies.Add(_policies); }); registry .ApplyConvention(new ValidationConvention(_callMatcher.CallFilters.Matches)); }
void IFubuRegistryExtension.Configure(FubuRegistry registry) { registry.Services(services => { // This isn't something that changes very often at all var encodings = new IHttpContentEncoding[] { new GZipHttpContentEncoding(), new DeflateHttpContentEncoding() }; var encoders = new HttpContentEncoders(encodings); services.SetServiceIfNone<IHttpContentEncoders>(encoders); }); registry.ApplyConvention(new ContentCompressionConvention(_filters.Matches)); }
void IFubuRegistryExtension.Configure(FubuRegistry registry) { registry.Services(services => { // This isn't something that changes very often at all var encodings = new IHttpContentEncoding[] { new GZipHttpContentEncoding(), new DeflateHttpContentEncoding() }; var encoders = new HttpContentEncoders(encodings); services.SetServiceIfNone <IHttpContentEncoders>(encoders); }); registry.ApplyConvention(new ContentCompressionConvention(_filters.Matches)); }
public static void ApplySmartGridConventions(this FubuRegistry registry, Action <AppliesToExpression> configure) { var pool = new TypePool(null); pool.IgnoreCallingAssembly(); var expression = new AppliesToExpression(pool); configure(expression); registry.ApplyConvention(new SmartGridConvention(pool)); }
public ViewExpression RegisterActionLessViews(Func <Type, bool> viewTypeFilter, Action <BehaviorChain> configureChain) { _registry.ApplyConvention(new ActionLessViewConvention(_viewAttacher.Facilities, _viewAttacher.Types, viewTypeFilter, configureChain)); return(this); }