Example #1
0
        public static FunctionRegistry Initialise()
        {
            var registry = new FunctionRegistry();

            // TODO - could use reflection here
            registry.Register(new QueryableGenerator());
            registry.Register(new StringGenerator());
            registry.Register(new DateTimeGenerator());
            registry.Register(new ICollectionGenerator());

            return registry;
        }
        public void Register(FunctionRegistry functionRegistry)
        {
            foreach (var generator in MethodRegistry)
            {
                foreach (var method in generator.SupportedMethods)
                {
                    functionRegistry.RegisterMethodGenerator(method, generator);
                }
            }

            foreach (var generator in PropertyRegistry)
            {
                foreach (var property in generator.SupportedProperties)
                {
                    functionRegistry.RegisterPropertyGenerator(property, generator);
                }
            }
        }