Example #1
0
        public void Setup()
        {
            Reset();

            _dataProviderDependenciesFactory = SetupMock <IDataProviderDependenciesFactory>();
            _nameManager            = SetupMock <INameManager>();
            _dataCatalog            = SetupMock <IDataCatalog>();
            _dataSupplierFactory    = SetupMock <IDataSupplierFactory>();
            _dataDependencyFactory  = SetupMock <IDataDependencyFactory>();
            _requestRouter          = SetupMock <IRequestRouter>();
            _frameworkConfiguration = SetupMock <IFrameworkConfiguration>();

            _elementConfiguror = new ElementConfiguror(
                _dataSupplierFactory,
                _dataDependencyFactory,
                _nameManager,
                _requestRouter);

            _fluentBuilder = new FluentBuilder(
                _nameManager,
                _dataCatalog,
                _dataProviderDependenciesFactory.DataDependencyFactory,
                _dataProviderDependenciesFactory.DataSupplierFactory,
                _frameworkConfiguration);

            _fluentBuilder.DataProviderBuilder = new DataProviderBuilder(
                _dataProviderDependenciesFactory,
                _elementConfiguror,
                _nameManager,
                _fluentBuilder);
        }
        private FluentBuilder(
            FluentBuilder parent,
            Func <Type, object> factory,
            IPackage packageContext,
            IDataCatalog dataCatalog,
            IDataDependencyFactory dataDependencyFactory,
            IDataSupplierFactory dataSupplierFactory)
        {
            _nameManager           = parent._nameManager;
            _assemblies            = parent._assemblies;
            _types                 = parent._types;
            _packageContext        = packageContext;
            _dataCatalog           = dataCatalog;
            _dataDependencyFactory = dataDependencyFactory;
            _dataSupplierFactory   = dataSupplierFactory;
            _factory               = factory;

            ModuleBuilder       = parent.ModuleBuilder;
            PageBuilder         = parent.PageBuilder;
            LayoutBuilder       = parent.LayoutBuilder;
            RegionBuilder       = parent.RegionBuilder;
            ComponentBuilder    = parent.ComponentBuilder;
            ServiceBuilder      = parent.ServiceBuilder;
            PackageBuilder      = parent.PackageBuilder;
            DataProviderBuilder = parent.DataProviderBuilder;
        }
 public PageDependenciesFactory(
     IRenderContextFactory renderContextFactory,
     IIdManager idManager,
     IAssetManager assetManager,
     INameManager nameManager,
     ICssWriterFactory cssWriterFactory,
     IJavascriptWriterFactory javascriptWriterFactory,
     IDataScopeProviderFactory dataScopeProviderFactory,
     IDataConsumerFactory dataConsumerFactory,
     IDictionaryFactory dictionaryFactory,
     IDataContextBuilderFactory dataContextBuilderFactory,
     IDataCatalog dataCatalog,
     IDataDependencyFactory dataDependencyFactory)
 {
     _renderContextFactory      = renderContextFactory;
     _idManager                 = idManager;
     _assetManager              = assetManager;
     _nameManager               = nameManager;
     _cssWriterFactory          = cssWriterFactory;
     _javascriptWriterFactory   = javascriptWriterFactory;
     _dataScopeProviderFactory  = dataScopeProviderFactory;
     _dataConsumerFactory       = dataConsumerFactory;
     _dictionaryFactory         = dictionaryFactory;
     _dataContextBuilderFactory = dataContextBuilderFactory;
     _dataCatalog               = dataCatalog;
     _dataDependencyFactory     = dataDependencyFactory;
 }
Example #4
0
 public DataProviderDependenciesFactory(
     IDataConsumerFactory dataConsumerFactory,
     IDataSupplierFactory dataSupplierFactory,
     IDataDependencyFactory dataDependencyFactory)
 {
     DataConsumerFactory   = dataConsumerFactory;
     DataSupplierFactory   = dataSupplierFactory;
     DataDependencyFactory = dataDependencyFactory;
 }
Example #5
0
 public ElementConfiguror(
     IDataSupplierFactory dataSupplierFactory,
     IDataDependencyFactory dataDependencyFactory,
     INameManager nameManager,
     IRequestRouter requestRouter)
 {
     _dataSupplierFactory   = dataSupplierFactory;
     _dataDependencyFactory = dataDependencyFactory;
     _nameManager           = nameManager;
     _requestRouter         = requestRouter;
 }
Example #6
0
 public FluentBuilder(
     INameManager nameManager,
     IDataCatalog dataCatalog,
     IDataDependencyFactory dataDependencyFactory,
     IDataSupplierFactory dataSupplierFactory)
 {
     _nameManager           = nameManager;
     _dataCatalog           = dataCatalog;
     _dataDependencyFactory = dataDependencyFactory;
     _dataSupplierFactory   = dataSupplierFactory;
     _assemblies            = new HashSet <string>();
     _types = new HashSet <Type>();
 }
Example #7
0
        public DataContext(
            IDictionaryFactory dictionaryFactory,
            DataContextFactory dataContextFactory,
            IDataDependencyFactory dataDependencyFactory,
            IIdManager idManager)
        {
            _dataContextFactory    = dataContextFactory;
            _dataDependencyFactory = dataDependencyFactory;
            _properties            = new System.Collections.Generic.LinkedList <PropertyEntry>();
#if DEBUG
            _id = idManager.GetUniqueId();
#endif
        }
Example #8
0
        public DataContextFactory(
            IQueueFactory queueFactory,
            IDictionaryFactory dictionaryFactory,
            IDataDependencyFactory dataDependencyFactory,
            IIdManager idManager)
            : base(queueFactory)
        {
            _dictionaryFactory     = dictionaryFactory;
            _dataDependencyFactory = dataDependencyFactory;
            _idManager             = idManager;

            Initialize(100);
        }
 public RegionDependenciesFactory(
     IDataScopeProviderFactory dataScopeProviderFactory,
     IDataConsumerFactory dataConsumerFactory,
     IDataDependencyFactory dataDependencyFactory,
     IDataSupplierFactory dataSupplierFactory,
     IDataScopeFactory dataScopeFactory)
 {
     DataScopeProviderFactory = dataScopeProviderFactory;
     DataConsumerFactory      = dataConsumerFactory;
     DataDependencyFactory    = dataDependencyFactory;
     DataSupplierFactory      = dataSupplierFactory;
     DataScopeFactory         = dataScopeFactory;
 }
Example #10
0
 public ServiceDependenciesFactory(
     IRenderContextFactory renderContextFactory,
     IAssetManager assetManager,
     INameManager nameManager,
     IRequestRouter requestRouter,
     IDataCatalog dataCatalog,
     IDataDependencyFactory dataDependencyFactory)
 {
     _renderContextFactory = renderContextFactory;
     AssetManager          = assetManager;
     NameManager           = nameManager;
     RequestRouter         = requestRouter;
     DataCatalog           = dataCatalog;
     DataDependencyFactory = dataDependencyFactory;
 }
        public FluentBuilder(
            INameManager nameManager,
            IDataCatalog dataCatalog,
            IDataDependencyFactory dataDependencyFactory,
            IDataSupplierFactory dataSupplierFactory,
            IFrameworkConfiguration frameworkConfiguration)
        {
            _nameManager           = nameManager;
            _dataCatalog           = dataCatalog;
            _dataDependencyFactory = dataDependencyFactory;
            _dataSupplierFactory   = dataSupplierFactory;
            _assemblies            = new HashSet <string>();
            _types = new HashSet <Type>();

            frameworkConfiguration.Subscribe(config => _debugLogging = config.DebugLogging);
        }
Example #12
0
        public DataProviderDefinition(
            DataProvider dataProvider,
            IFluentBuilder builder,
            IDataDependencyFactory dataDependencyFactory,
            INameManager nameManager,
            IPackage package)
        {
            _dataProvider          = dataProvider;
            _builder               = builder;
            _dataDependencyFactory = dataDependencyFactory;
            _nameManager           = nameManager;

            if (package != null)
            {
                _dataProvider.Package = package;
            }
        }
Example #13
0
 public RegionDependenciesFactory(
     IDataScopeProviderFactory dataScopeProviderFactory,
     IDataConsumerFactory dataConsumerFactory,
     IDataDependencyFactory dataDependencyFactory,
     IDataSupplierFactory dataSupplierFactory,
     IDataScopeFactory dataScopeFactory,
     ICssWriterFactory cssWriterFactory,
     IJavascriptWriterFactory javascriptWriterFactory)
 {
     DataScopeProviderFactory = dataScopeProviderFactory;
     DataConsumerFactory      = dataConsumerFactory;
     DataDependencyFactory    = dataDependencyFactory;
     DataSupplierFactory      = dataSupplierFactory;
     DataScopeFactory         = dataScopeFactory;
     CssWriterFactory         = cssWriterFactory;
     JavascriptWriterFactory  = javascriptWriterFactory;
 }
Example #14
0
        public EndpointRequest(
            Action <IOwinContext, Func <string> > trace,
            IRequestRouter requestRouter,
            IOwinContext context,
            IDataCatalog dataCatalog,
            IDataDependencyFactory dataDependencyFactory,
            IRequestDeserializer deserializer,
            IResponseSerializer serializer,
            EndpointParameter[] parameters)
        {
            _trace                 = trace;
            _requestRouter         = requestRouter;
            _context               = context;
            _dataCatalog           = dataCatalog;
            _dataDependencyFactory = dataDependencyFactory;
            _deserializer          = deserializer;
            _serializer            = serializer;
            _parameters            = parameters;

            Success();
        }
 public ServiceEndpoint(
     string path,
     Method[] methods,
     Action <IEndpointRequest> method,
     MethodInfo methodInfo,
     string userSegmentKey,
     AnalyticsLevel analytics,
     IDataCatalog dataCatalog,
     IDataDependencyFactory dataDependencyFactory,
     IRequestRouter requestRouter)
 {
     Path                   = path;
     MethodInfo             = methodInfo;
     _userSegmentKey        = userSegmentKey;
     _method                = method;
     _dataCatalog           = dataCatalog;
     _dataDependencyFactory = dataDependencyFactory;
     _requestRouter         = requestRouter;
     _pathElements          = path
                              .Split('/')
                              .Where(p => !string.IsNullOrEmpty(p))
                              .ToArray();
     AddStatistics(analytics, path, methods);
 }
 public DataConsumer(
     IDataDependencyFactory dataDependencyFactory)
 {
     _dataDependencyFactory = dataDependencyFactory;
 }