public virtual List<MetadataReference> GetReferences()
 {
     var provider = new MetadataReferencesProvider();
     NamedReferences.ForEach(name => provider.AddReferenceFromName(name));
     References.ForEach(r => provider.Add(r));
     return provider.GetApplicationReferences();
 }
        public RazorTemplating([NotNull]ICompilationService compilationService,
            [NotNull]MetadataReferencesProvider metadataReferencesProvider)
        {
            Check.NotNull(compilationService, nameof(compilationService));
            Check.NotNull(metadataReferencesProvider, nameof(metadataReferencesProvider));

            _compilationService = compilationService;
            _metadataReferencesProvider = metadataReferencesProvider;
        }
        public DatabaseTool(
            [CanBeNull] IServiceProvider serviceProvider,
            [NotNull] ILoggerProvider loggerProvider)
        {
            Check.NotNull(loggerProvider, nameof(loggerProvider));

            _serviceProvider = new ServiceProvider(serviceProvider);
            var loggerFactory = new LoggerFactory();
            loggerFactory.AddProvider(loggerProvider);
            _logger = new LazyRef<ILogger>(() => loggerFactory.CreateLogger<DatabaseTool>());
            _serviceProvider.AddService(typeof(ILogger), _logger.Value);
            _serviceProvider.AddService(typeof(IFileService), new FileSystemFileService());
            _serviceProvider.AddService(typeof(CSharpCodeGeneratorHelper), new CSharpCodeGeneratorHelper());
            _serviceProvider.AddService(typeof(ModelUtilities), new ModelUtilities());
            var metadataReferencesProvider = new MetadataReferencesProvider(_serviceProvider);
            _serviceProvider.AddService(typeof(MetadataReferencesProvider), metadataReferencesProvider);
            var compilationService = new RoslynCompilationService();
            _serviceProvider.AddService(typeof(ITemplating), new RazorTemplating(compilationService, metadataReferencesProvider));
        }
 public virtual void AddReferencesForTemplates(MetadataReferencesProvider metadataReferencesProvider)
 {
 }