Skip to content

Commit

Permalink
Merge pull request #109 from DedAnton/rc-alpha-10
Browse files Browse the repository at this point in the history
Release 0.1.0-alpha.10
  • Loading branch information
DedAnton authored Feb 22, 2023
2 parents 425cba3 + 77600cc commit 3bc3558
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions NextGenMapper/MapperGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
using NextGenMapper.Mapping.Maps.Models;
using NextGenMapper.PostInitialization;
using NextGenMapper.Utils;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;

namespace NextGenMapper;

[Generator(LanguageNames.CSharp)]
public class MapperGenerator : IIncrementalGenerator
{
public void Initialize(IncrementalGeneratorInitializationContext context)
Expand Down Expand Up @@ -102,7 +102,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
var sourceBuilder = new ConfiguredMapsSourceBuilder();
var mapperClassSource = sourceBuilder.BuildMapperClass(maps);
sourceProductionContext.AddSource("Mapper_ConfiguredMaps.g", mapperClassSource);
sourceProductionContext.AddSource("Mapper_ConfiguredMaps.g.cs", mapperClassSource);
});

var configuredMapsMockMethods = uniqueConfiguredMaps
Expand Down Expand Up @@ -137,7 +137,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
var sourceBuilder = new ConfiguredMapsSourceBuilder();
var mapperClassSource = sourceBuilder.BuildMapperClass(mockMethods);
sourceProductionContext.AddSource("Mapper_ConfiguredMaps_MockMethods.g", mapperClassSource);
sourceProductionContext.AddSource("Mapper_ConfiguredMaps_MockMethods.g.cs", mapperClassSource);
});

var userMapsTargets = context.SyntaxProvider.CreateSyntaxProvider(
Expand Down Expand Up @@ -195,7 +195,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
var sourceBuilder = new ClassMapsSourceBuilder();
var mapperClassSource = sourceBuilder.BuildMapperClass(maps);
sourceProductionContext.AddSource("Mapper_ClassMaps.g", mapperClassSource);
sourceProductionContext.AddSource("Mapper_ClassMaps.g.cs", mapperClassSource);
});

var relatedCollectionMaps = configuredMapsAndRelated
Expand All @@ -218,7 +218,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
var sourceBuilder = new CollectionMapsSourceBuilder();
var mapperClassSource = sourceBuilder.BuildMapperClass(maps);
sourceProductionContext.AddSource("Mapper_CollectionMaps.g", mapperClassSource);
sourceProductionContext.AddSource("Mapper_CollectionMaps.g.cs", mapperClassSource);
});

var relatedEnumMaps = configuredMapsAndRelated
Expand All @@ -241,7 +241,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
var sourceBuilder = new EnumMapsSourceBuilder();
var mapperClassSource = sourceBuilder.BuildMapperClass(maps);
sourceProductionContext.AddSource("Mapper_EnumMaps.g", mapperClassSource);
sourceProductionContext.AddSource("Mapper_EnumMaps.g.cs", mapperClassSource);
});

var potentialErrorsFromRelated = configuredMapsAndRelated
Expand Down Expand Up @@ -359,11 +359,11 @@ void ValidatePropertyMap(IMap map, PropertyMap propertyMap, ref ValueListBuilder
private void PostInitialization(IncrementalGeneratorInitializationContext context)
{
context.RegisterPostInitializationOutput(ctx => ctx.AddSource(
"MapperExtensions.g",
"MapperExtensions.g.cs",
SourceText.From(ExtensionsSource.Source, Encoding.UTF8)));

context.RegisterPostInitializationOutput(ctx => ctx.AddSource(
"StartMapper.g",
"StartMapper.g.cs",
SourceText.From(StartMapperSource.StartMapper, Encoding.UTF8)));
}
}
2 changes: 1 addition & 1 deletion NextGenMapper/NextGenMapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<PackageId>NextGenMapper</PackageId>
<Version>0.1.0-alpha.9</Version>
<Version>0.1.0-alpha.10</Version>
<Authors>Anton Ryabchikov</Authors>
<Copyright>Copyright (c) Anton Ryabchikov 2021</Copyright>
<Title>NextGenMapper</Title>
Expand Down

0 comments on commit 3bc3558

Please sign in to comment.