예제 #1
0
        public MaterialFactory(string configRoot)
        {
            var configPath = Path.Combine(configRoot, ConfigurationConstants.MaterialConfigName);

            if (File.Exists(configPath) == false)
            {
                throw new ArgumentException("Material config file does not exist.", nameof(configRoot));
            }

            ReadMaterialMappingConfig(configPath);

            configWatcher = new FileWatcher(configPath);
            configWatcher.AddListener(ReadMaterialMappingConfig);
        }