protected AbstractParallelReflector(IMetamodelBuilder metamodel,
                                     IEnumerable <IFacetDecorator> facetDecorators,
                                     ILoggerFactory loggerFactory,
                                     ILogger <AbstractParallelReflector> logger)
 {
     InitialMetamodel  = metamodel ?? throw new InitialisationException($"{nameof(metamodel)} is null");
     LoggerFactory     = loggerFactory ?? throw new InitialisationException($"{nameof(loggerFactory)} is null");
     Logger            = logger ?? throw new InitialisationException($"{nameof(logger)} is null");
     FacetDecoratorSet = new FacetDecoratorSet(facetDecorators.ToArray());
 }
示例#2
0
 public Reflector(IClassStrategy classStrategy,
                  IMetamodelBuilder metamodel,
                  IReflectorConfiguration config,
                  IMenuFactory menuFactory,
                  IEnumerable <IFacetDecorator> facetDecorators,
                  IEnumerable <IFacetFactory> facetFactories,
                  ILoggerFactory loggerFactory,
                  ILogger <Reflector> logger)
 {
     ClassStrategy      = classStrategy ?? throw new InitialisationException($"{nameof(classStrategy)} is null");
     this.metamodel     = metamodel ?? throw new InitialisationException($"{nameof(metamodel)} is null");
     this.config        = config ?? throw new InitialisationException($"{nameof(config)} is null");
     this.menuFactory   = menuFactory ?? throw new InitialisationException($"{nameof(menuFactory)} is null");
     this.loggerFactory = loggerFactory ?? throw new InitialisationException($"{nameof(loggerFactory)} is null");
     this.logger        = logger ?? throw new InitialisationException($"{nameof(logger)} is null");
     facetDecoratorSet  = new FacetDecoratorSet(facetDecorators.ToArray());
     FacetFactorySet    = new FacetFactorySet(facetFactories.ToArray());
 }
        public Reflector(IClassStrategy classStrategy,
                         IMetamodelBuilder metamodel,
                         IReflectorConfiguration config,
                         IMenuFactory menuFactory,
                         IFacetDecorator[] facetDecorators,
                         IFacetFactory[] facetFactories)
        {
            Assert.AssertNotNull(classStrategy);
            Assert.AssertNotNull(metamodel);
            Assert.AssertNotNull(config);
            Assert.AssertNotNull(menuFactory);

            this.classStrategy = classStrategy;
            this.metamodel     = metamodel;
            this.config        = config;
            this.menuFactory   = menuFactory;
            facetDecoratorSet  = new FacetDecoratorSet(facetDecorators);
            FacetFactorySet    = new FacetFactorySet(facetFactories);
        }
示例#4
0
        public ParallelReflector(IClassStrategy classStrategy,
                                 IMetamodelBuilder metamodel,
                                 IReflectorConfiguration config,
                                 IFunctionalReflectorConfiguration functionalConfig,
                                 IMenuFactory menuFactory,
                                 IEnumerable <IFacetDecorator> facetDecorators,
                                 IEnumerable <IFacetFactory> facetFactories,
                                 ILoggerFactory loggerFactory,
                                 ILogger <ParallelReflector> logger)
        {
            ClassStrategy         = classStrategy ?? throw new InitialisationException($"{nameof(classStrategy)} is null");
            initialMetamodel      = metamodel ?? throw new InitialisationException($"{nameof(metamodel)} is null");
            this.config           = config ?? throw new InitialisationException($"{nameof(config)} is null");
            this.functionalConfig = functionalConfig;
            this.menuFactory      = menuFactory ?? throw new InitialisationException($"{nameof(menuFactory)} is null");
            this.loggerFactory    = loggerFactory ?? throw new InitialisationException($"{nameof(loggerFactory)} is null");
            this.logger           = logger ?? throw new InitialisationException($"{nameof(logger)} is null");
            facetDecoratorSet     = new FacetDecoratorSet(facetDecorators.ToArray());
            FacetFactorySet       = new FacetFactorySet(facetFactories.Where(f => f.ReflectionTypes.HasFlag(ReflectionType.ObjectOriented)).ToArray());

            FunctionalFacetFactorySet = new FacetFactorySet(facetFactories.Where(f => f.ReflectionTypes.HasFlag(ReflectionType.Functional)).ToArray());
        }