Ejemplo n.º 1
0
		Rules LoadRules()
		{
			if (fileSystem.FileExists("Rules")) {
				string ruleProxyPartial = fileSystem.ReadStringFromFile("Rules");
				
				var ruleProxyInvoker = new RuleProxyInvoker(ruleProxyPartial);
				ruleProxyInvoker.InvokeLoadRules();
				
				var compileRules = ruleProxyInvoker.GetCompileRules();
				var routeRules = ruleProxyInvoker.GetRouteRules();
				var layoutRules = ruleProxyInvoker.GetLayoutRules();
				
				return new Rules {
					CompileRules = compileRules,
					RouteRules = routeRules,
					LayoutRules = layoutRules
				};
			}
			
			return new Rules {
				CompileRules = new List<CompileRule>(),
				RouteRules = new List<RouteRule>(),
				LayoutRules = new List<LayoutRule>()
			};
		}
Ejemplo n.º 2
0
        Rules LoadRules()
        {
            if (fileSystem.FileExists("Rules"))
            {
                string ruleProxyPartial = fileSystem.ReadStringFromFile("Rules");

                var ruleProxyInvoker = new RuleProxyInvoker(ruleProxyPartial);
                ruleProxyInvoker.InvokeLoadRules();

                var compileRules = ruleProxyInvoker.GetCompileRules();
                var routeRules   = ruleProxyInvoker.GetRouteRules();
                var layoutRules  = ruleProxyInvoker.GetLayoutRules();

                return(new Rules {
                    CompileRules = compileRules,
                    RouteRules = routeRules,
                    LayoutRules = layoutRules
                });
            }

            return(new Rules {
                CompileRules = new List <CompileRule>(),
                RouteRules = new List <RouteRule>(),
                LayoutRules = new List <LayoutRule>()
            });
        }