public LiveModelsProvider(ILogger logger, IModelsBuilderConfig config, ModelsGenerator modelGenerator, ModelsGenerationError mbErrors) { _logger = logger; _config = config ?? throw new ArgumentNullException(nameof(config)); _modelGenerator = modelGenerator; _mbErrors = mbErrors; }
public PureLiveModelFactory(Lazy <UmbracoServices> umbracoServices, IProfilingLogger logger, IModelsBuilderConfig config) { _umbracoServices = umbracoServices; _logger = logger; _config = config; _errors = new ModelsGenerationError(config); _ver = 1; // zero is for when we had no version _skipver = -1; // nothing to skip RazorBuildProvider.CodeGenerationStarted += RazorBuildProvider_CodeGenerationStarted; if (!HostingEnvironment.IsHosted) { return; } var modelsDirectory = _config.ModelsDirectory; if (!Directory.Exists(modelsDirectory)) { Directory.CreateDirectory(modelsDirectory); } // BEWARE! if the watcher is not properly released then for some reason the // BuildManager will start confusing types - using a 'registered object' here // though we should probably plug into Umbraco's MainDom - which is internal HostingEnvironment.RegisterObject(this); _watcher = new FileSystemWatcher(modelsDirectory); _watcher.Changed += WatcherOnChanged; _watcher.EnableRaisingEvents = true; // get it here, this need to be fast _debugLevel = _config.DebugLevel; }
public ModelsBuilderDashboardController(IModelsBuilderConfig config, ModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors) { //_umbracoServices = umbracoServices; _config = config; _modelGenerator = modelsGenerator; _outOfDateModels = outOfDateModels; _mbErrors = mbErrors; _dashboardReport = new DashboardReport(config, outOfDateModels, mbErrors); }
/// <summary> /// Initializes a new instance of the <see cref="Builder"/> class with a list of models to generate, /// the result of code parsing, and a models namespace. /// </summary> /// <param name="typeModels">The list of models to generate.</param> /// <param name="modelsNamespace">The models namespace.</param> protected Builder(IModelsBuilderConfig config, IList <TypeModel> typeModels) { _typeModels = typeModels ?? throw new ArgumentNullException(nameof(typeModels)); Config = config ?? throw new ArgumentNullException(nameof(config)); // can be null or empty, we'll manage ModelsNamespace = Config.ModelsNamespace; // but we want it to prepare Prepare(); }
public ModelsGenerator(UmbracoServices umbracoService, IModelsBuilderConfig config, OutOfDateModelsStatus outOfDateModels) { _umbracoService = umbracoService; _config = config; _outOfDateModels = outOfDateModels; }
public DashboardReport(IModelsBuilderConfig config, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors) { _config = config; _outOfDateModels = outOfDateModels; _mbErrors = mbErrors; }
/// <summary> /// Initializes a new instance of the <see cref="TextBuilder"/> class with a list of models to generate /// and the result of code parsing. /// </summary> /// <param name="typeModels">The list of models to generate.</param> public TextBuilder(IModelsBuilderConfig config, IList <TypeModel> typeModels) : base(config, typeModels) { }
public ContentTypeModelValidator(IModelsBuilderConfig config) : base(config) { }
public ContentTypeModelValidatorBase(IModelsBuilderConfig config) { _config = config; }
public ModelsBuilderComponent(IModelsBuilderConfig config, LiveModelsProvider liveModelsProvider, OutOfDateModelsStatus outOfDateModels) { _config = config; _liveModelsProvider = liveModelsProvider; _outOfDateModels = outOfDateModels; }
public MemberTypeModelValidator(IModelsBuilderConfig config) : base(config) { }
public OutOfDateModelsStatus(IModelsBuilderConfig config) { _config = config; }
public ModelsGenerationError(IModelsBuilderConfig config) { _config = config; }