Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump System.Formats.Asn1 from 8.0.1 to 9.0.0 in the system group #4

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/StructId.Analyzer/ConstructorGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public void Initialize(IncrementalGeneratorInitializationContext context)

void GenerateCode(SourceProductionContext context, INamedTypeSymbol symbol)
{
var ns = symbol.ContainingNamespace.Equals(symbol.ContainingModule.GlobalNamespace, SymbolEqualityComparer.Default)
? null
var ns = symbol.ContainingNamespace.Equals(symbol.ContainingModule.GlobalNamespace, SymbolEqualityComparer.Default)
? null
: symbol.ContainingNamespace.ToDisplayString();

// Generic IStructId<T> -> T, otherwise string
Expand Down
2 changes: 1 addition & 1 deletion src/StructId.Analyzer/JsonConverterGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ namespace StructId;
[Generator(LanguageNames.CSharp)]
public class JsonConverterGenerator() : TemplateGenerator(
"System.IParsable`1",
ThisAssembly.Resources.Templates.JsonConverter.Text,
ThisAssembly.Resources.Templates.JsonConverter.Text,
ThisAssembly.Resources.Templates.JsonConverterT.Text);
5 changes: 2 additions & 3 deletions src/StructId.Analyzer/TemplateGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
Expand Down Expand Up @@ -35,7 +34,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
.Select((x, _) => (InterfaceType: x.GetTypeByMetadataName(valueType), StringType: x.GetTypeByMetadataName("System.String")));

var ids = context.CompilationProvider
.SelectMany((x, _) => x.Assembly.GetAllTypes().OfType<INamedTypeSymbol>())
.SelectMany((x, _) => x.Assembly.GetAllTypes().OfType<INamedTypeSymbol>())
.Where(x => x.IsStructId())
.Where(x => x.IsPartial());

Expand Down
12 changes: 2 additions & 10 deletions src/StructId.FunctionalTests/Functional.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;

namespace StructId.Functional;

Expand All @@ -26,7 +18,7 @@ public void Test()
var guid = Guid.NewGuid();
var id1 = new ProductId(guid);
var id2 = new ProductId(guid);

Assert.Equal(id1, id2);
Assert.True(id1 == id2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Include="System.Formats.Asn1" Version="9.0.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
2 changes: 1 addition & 1 deletion src/StructId.Tests/StructId.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Include="System.Formats.Asn1" Version="9.0.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
Expand Down