Esempio n. 1
0
 public LoggerWrapper(ILoggerFactory loggerFactory)
 {
     logger = new LoggerWrapper(typeof(T).FullName, loggerFactory);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AssemblyProcessor"/> class.
 /// </summary>
 /// <param name="typeCache">
 /// The type cache.
 /// </param>
 /// <param name="serializationManager">
 /// The serialization manager.
 /// </param>
 /// <param name="codeGeneratorManager">
 /// The code generator.
 /// </param>
 /// <param name="logger"> the logger to use</param>
 public AssemblyProcessor(TypeMetadataCache typeCache, SerializationManager serializationManager, CodeGeneratorManager codeGeneratorManager, LoggerWrapper <AssemblyProcessor> logger)
 {
     this.logger               = logger;
     this.typeCache            = typeCache;
     this.serializationManager = serializationManager;
     this.codeGeneratorManager = codeGeneratorManager;
 }
Esempio n. 3
0
 public LoggerWrapper(ILogger logger, ILoggerFactory loggerFactory)
 {
     this.logger = new LoggerWrapper(logger, typeof(T).FullName, loggerFactory);
 }
        public SiloAssemblyLoader(NodeConfiguration nodeConfig, MultiClusterRegistrationStrategyManager registrationManager, LoggerWrapper <SiloAssemblyLoader> logger)
        {
            this.logger = logger;
            IDictionary <string, SearchOption> additionalDirectories = nodeConfig.AdditionalAssemblyDirectories;

            this.registrationManager = registrationManager;
            this.excludedGrains      = nodeConfig.ExcludedGrainTypes != null
                ? new List <string>(nodeConfig.ExcludedGrainTypes)
                : new List <string>();
            var exeRoot = Path.GetDirectoryName(typeof(SiloAssemblyLoader).GetTypeInfo().Assembly.Location);
            var appRoot = Path.Combine(exeRoot, "Applications");
            var cwd     = Directory.GetCurrentDirectory();

            directories = new Dictionary <string, SearchOption>
            {
                { exeRoot, SearchOption.TopDirectoryOnly },
                { appRoot, SearchOption.AllDirectories }
            };

            foreach (var kvp in additionalDirectories)
            {
                // Make sure the path is clean (get rid of ..\'s)
                directories[new DirectoryInfo(kvp.Key).FullName] = kvp.Value;
            }


            if (!directories.ContainsKey(cwd))
            {
                directories.Add(cwd, SearchOption.TopDirectoryOnly);
            }

            LoadApplicationAssemblies();
        }