Esempio n. 1
0
        public static ELResolver LookupResolver( )
        {
            //IEnumerable<IProcessApplicationElResolver> providers = new List<IProcessApplicationElResolver>();
            //using (var scope = ObjectContainer.BeginLifetimeScope())
            //{
            //    providers = scope.Resolve<IEnumerable<IProcessApplicationElResolver>>();
            //}
            //IList<IProcessApplicationElResolver> sortedProviders = new List<IProcessApplicationElResolver>();
            //foreach (IProcessApplicationElResolver provider in providers)
            //{
            //    sortedProviders.Add(provider);
            //}

            //if (sortedProviders.Count == 0)
            //{
            //    return null;
            //}
            // sort providers first
            //sortedProviders.Sort(new ProcessApplicationElResolverProcessApplicationElResolverSorter());

            // add all providers to a composite resolver
            var compositeResolver = new CompositeELResolver();

            //var summary = new StringBuilder();
            //summary.Append(string.Format("ElResolvers found for Process Application {0}", processApplication.Name));

            //foreach (var processApplicationElResolver in sortedProviders)
            //{
            //    var elResolver = processApplicationElResolver.GetElResolver(processApplication);

            //    if (elResolver != null)
            //    {
            //        compositeResolver.Add(elResolver);
            //        summary.Append(string.Format("Class {0}", processApplicationElResolver.GetType().FullName));
            //    }
            //    else
            //    {
            //        Log.NoElResolverProvided(processApplication.Name, processApplicationElResolver.GetType().FullName);
            //    }
            //}

            //Log.PaElResolversDiscovered(summary.ToString());


            compositeResolver.Add(new ProcessApplicationElResolver());


            return(compositeResolver);
        }
Esempio n. 2
0
        protected internal static ELResolver CreateDefaultResolver()
        {
            CompositeELResolver resolver = new CompositeELResolver();

            resolver.Add(new VariableContextElResolver());
            resolver.Add(new ArrayELResolver(true));
            resolver.Add(new ListELResolver(true));
            resolver.Add(new MapELResolver(true));
            resolver.Add(new ResourceBundleElResolver());
            resolver.Add(new ObjectELResolver());
            return(resolver);
        }
Esempio n. 3
0
        protected internal virtual ELResolver CreateElResolver()
        {
            var elResolver = new CompositeELResolver();

            elResolver.Add(new VariableScopeElResolver());
            elResolver.Add(new VariableContextElResolver());

            if (Beans != null)
            {
                elResolver.Add(new ReadOnlyMapElResolver(Beans));
            }


            elResolver.Add(new ArrayELResolver());
            elResolver.Add(new MapELResolver());
            elResolver.Add(new ListELResolver());
            elResolver.Add(new ProcessApplicationObjectElResolverDelegate());

            elResolver.Add(new ProcessApplicationElResolverDelegate());
            return(elResolver);
        }
Esempio n. 4
0
 /// <summary>
 /// Create a resolver capable of resolving top-level identifiers. Everything else is passed to
 /// the supplied delegate.
 /// </summary>
 public SimpleResolver(ELResolver resolver, bool readOnly)
 {
     @delegate          = new CompositeELResolver();
     @delegate.Add(root = new RootPropertyResolver(readOnly));
     @delegate.Add(resolver);
 }