public TemplateRewriter(ModelDescriptor descriptor)
 {
     _descriptor = descriptor ?? throw new ArgumentNullException(nameof(descriptor));
 }
示例#2
0
 protected ModelPartialGenerator(ModelDescriptor descriptor, ImmutableArray <TemplateDescriptor> templateDescriptors, CancellationToken cancellationToken)
     : base(descriptor, templateDescriptors, cancellationToken)
 {
 }
示例#3
0
        public static TypeDeclarationSyntax Generate(ModelDescriptor descriptor, ImmutableArray <TemplateDescriptor> templateDescriptors, CancellationToken cancellationToken)
        {
            var generator = new ModelPartialGenerator(descriptor, templateDescriptors, cancellationToken);

            return(generator.GenerateTypeDeclaration());
        }
示例#4
0
 protected PartialGeneratorBase(ModelDescriptor descriptor, ImmutableArray <TemplateDescriptor> templateDescriptors, CancellationToken cancellationToken)
 {
     Descriptor          = descriptor;
     TemplateDescriptors = templateDescriptors;
     CancellationToken   = cancellationToken;
 }