Пример #1
0
 public virtual List<MetadataReference> GetReferences()
 {
     var provider = new MetadataReferencesProvider();
     NamedReferences.ForEach(name => provider.AddReferenceFromName(name));
     References.ForEach(r => provider.Add(r));
     return provider.GetApplicationReferences();
 }
Пример #2
0
        public RazorTemplating(
            [NotNull] ICompilationService compilationService,
            [NotNull] MetadataReferencesProvider metadataReferencesProvider, 
            [NotNull] ModelUtilities modelUtilities, 
            [NotNull] CSharpUtilities csharpUtiliies)
        {
            Check.NotNull(compilationService, nameof(compilationService));
            Check.NotNull(metadataReferencesProvider, nameof(metadataReferencesProvider));
            Check.NotNull(modelUtilities, nameof(modelUtilities));
            Check.NotNull(csharpUtiliies, nameof(csharpUtiliies));

            _compilationService = compilationService;
            _metadataReferencesProvider = metadataReferencesProvider;
            _modelUtilities = modelUtilities;
            _csharpUtiliies = csharpUtiliies;
        }