Ejemplo n.º 1
0
        public EmbeddedViewTable GetEmbeddedViews()
        {
            var assemblies = _typeFinder.GetAssemblies();

            if (assemblies == null || assemblies.Count == 0)
            {
                return(null);
            }

            var table = new EmbeddedViewTable();

            foreach (var assembly in assemblies)
            {
                var names = GetNamesOfAssemblyResources(assembly);
                if (names == null || names.Length == 0)
                {
                    continue;
                }

                foreach (var name in
                         from name in names
                         let key = name.ToLowerInvariant()
                                   where key.Contains(".views.")
                                   select name)
                {
                    table.AddView(name, assembly.FullName);
                }
            }

            return(table);
        }
        public EmbeddedViewVirtualPathProvider(EmbeddedViewTable embeddedViews)
        {
            if (embeddedViews == null)
            {
                throw new ArgumentNullException("embeddedViews");
            }

            _embeddedViews = embeddedViews;
        }