Ejemplo n.º 1
0
        public void RegisterHalBuilderFactory(ControllerActionSignature signature, Func <HalBuildContext, IBuilder> halBuilderFactory)
        {
            if (this.items.Any(item => item.Signature == signature))
            {
                return;
            }

            this.items.Add(new HalBuildConfigurationItem(signature, halBuilderFactory));
        }
Ejemplo n.º 2
0
        public Func <HalBuildContext, IBuilder> RetrieveHalBuilderFactory(ControllerActionSignature signature)
        {
            var item = this.items.FirstOrDefault(x => x.Signature == signature);

            if (item == null)
            {
                return(null);
            }

            return(item.HalBuilderFactory);
        }
 public HalBuildConfigurationItem(ControllerActionSignature signature, Func <HalBuildContext, IBuilder> halBuilderFactory)
 {
     this.Signature         = signature;
     this.HalBuilderFactory = halBuilderFactory;
 }