protected override void Configure()
        {
            var validatingProfileMetadataProvider = new ValidatingProfileMetadataProvider(TemplateContext.ProjectPath, ResourceModelProvider);

            ProfileResourceNamesProvider = validatingProfileMetadataProvider;
            ProfileResourceModelProvider = new ProfileResourceModelProvider(ResourceModelProvider, validatingProfileMetadataProvider);
            ProjectHasProfileDefinition  = validatingProfileMetadataProvider.HasProfileData;
        }
Ejemplo n.º 2
0
        public object Generate(TemplateContext templateContext)
        {
            TemplateContext       = Preconditions.ThrowIfNull(templateContext, nameof(templateContext));
            ResourceModelProvider = new ResourceModelProvider(TemplateContext.DomainModelProvider);

            ValidatingProfileMetadataProvider = new ValidatingProfileMetadataProvider(TemplateContext.ProjectPath, ResourceModelProvider);
            ProfileResourceNamesProvider      = ValidatingProfileMetadataProvider;
            ProfileResourceModelProvider      = new ProfileResourceModelProvider(ResourceModelProvider, ValidatingProfileMetadataProvider);
            ProjectHasProfileDefinition       = ValidatingProfileMetadataProvider.HasProfileData;

            Configure();

            return(Build());
        }
Ejemplo n.º 3
0
        public ResourceProfileProvider(
            IResourceModelProvider resourceModelProvider,
            TemplateContext templateContext)
        {
            var validatingProfileMetadataProvider = new ValidatingProfileMetadataProvider(
                templateContext.ProjectPath,
                resourceModelProvider);

            _profileResourceNamesProvider = validatingProfileMetadataProvider;

            _profileResourceModelProvider = new ProfileResourceModelProvider(
                resourceModelProvider,
                validatingProfileMetadataProvider);

            ProjectHasProfileDefinition = validatingProfileMetadataProvider.HasProfileData;

            ResourceModel = resourceModelProvider.GetResourceModel();
        }