Exemple #1
0
 internal RootsDirectory(IStemsCoreServices configuration, IRootStartInfoFactory startInfoFactory, IRequestContext request, CollectionCreatorCache creatorCache)
 {
     _configuration    = configuration;
     _startInfoFactory = startInfoFactory;
     _request          = request;
     _creatorCache     = creatorCache;
 }
        public IAxis GetAxis(IStemsCoreServices configuration, IRestUser user)
        {
            _root.Services = configuration;
            _root.User     = user;

            return(_root);
        }
 public IAxis GetAxis(IStemsCoreServices configuration, IRestUser user)
 {
     return(new Vase
     {
         Services = configuration,
         User = user
     });
 }
        public IRootStartInfo Get(IStemsCoreServices stemsServices, string startResourceName)
        {
            var autoActivator = new AutoActivator(stemsServices.DependencyResolver);

            var rootType = _rootTypeDictionary.GetType(startResourceName);
            var root     = (Root)autoActivator.CreateInstance(rootType);

            return(new DerivedRootStartInfo(root));
        }
        public IEnumerable <Type> GetStemTypes(IStemsCoreServices stemsServices)
        {
            var autoActivator = new AutoActivator(stemsServices.DependencyResolver);

            return(_rootTypeDictionary.GetAllTypes().Select(delegate(Type rootType)
            {
                var root = (Root)autoActivator.CreateInstance(rootType);
                return root.StartStemType;
            }));
        }
        public IEnumerable <Type> GetStemTypes(IStemsCoreServices configuration)
        {
            _stemTypeDictionary = new SuffixedNamedTypeDictionary("Stem");

            var validator = new AggregateTypeValidator(
                GetAttributedTypeValidator(),
                new DerivedTypeValidator(typeof(Stem))
                );

            var populator = new TypeDictionaryPopulator(_stemTypeDictionary, validator);

            populator.AddValidTypes(_stemTypeGetter);

            return(_stemTypeDictionary.GetAllTypes());
        }
 public IRootStartInfo Get(IStemsCoreServices configuration, string startResourceName)
 {
     return(new DataSourceVaseStartInfo(_dataSource, _stemTypeDictionary, startResourceName));
 }
 public IRestResource GetStartResource(IStemsCoreServices configuration, IRequestContext requestContext)
 {
     return(new RootsDirectory(configuration, _startInfoFactory, requestContext, _creators));
 }
        public IEnumerable <Type> GetStemTypes(IStemsCoreServices configuration)
        {
            _startInfoFactory = CreateStartInfoFactory();

            return(_startInfoFactory.GetStemTypes(configuration));
        }
Exemple #10
0
 public RootsDirectory(IStemsCoreServices configuration, IRootStartInfoFactory startInfoFactory, IRequestContext request)
     : this(configuration, startInfoFactory, request, new CollectionCreatorCache())
 {
 }