Skip to content

Commit

Permalink
"scan" pipeline logic is generalized, various fixes and polishes
Browse files Browse the repository at this point in the history
  • Loading branch information
malstraem committed Oct 1, 2024
1 parent f33d8a5 commit 81566ba
Show file tree
Hide file tree
Showing 45 changed files with 384 additions and 315 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
site/
artifacts/

tests/data/private/
docs/api/**.yml

.manifest
Expand Down
56 changes: 56 additions & 0 deletions Arinc424.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ Global
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
NoParallel|Any CPU = NoParallel|Any CPU
NoParallel|ARM32 = NoParallel|ARM32
NoParallel|ARM64 = NoParallel|ARM64
NoParallel|x64 = NoParallel|x64
NoParallel|x86 = NoParallel|x86
Release|Any CPU = Release|Any CPU
Release|ARM32 = Release|ARM32
Release|ARM64 = Release|ARM64
Expand All @@ -53,6 +58,16 @@ Global
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.Debug|x64.Build.0 = Debug|x64
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.Debug|x86.ActiveCfg = Debug|x86
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.Debug|x86.Build.0 = Debug|x86
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|Any CPU.ActiveCfg = NoParallel|Any CPU
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|Any CPU.Build.0 = NoParallel|Any CPU
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|ARM32.ActiveCfg = NoParallel|ARM32
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|ARM32.Build.0 = NoParallel|ARM32
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|ARM64.ActiveCfg = NoParallel|ARM64
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|ARM64.Build.0 = NoParallel|ARM64
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|x64.ActiveCfg = NoParallel|x64
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|x64.Build.0 = NoParallel|x64
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|x86.ActiveCfg = NoParallel|x86
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.NoParallel|x86.Build.0 = NoParallel|x86
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.Release|Any CPU.Build.0 = Release|Any CPU
{342A9F66-58E0-4583-ABD4-FBA7C553FBFF}.Release|ARM32.ActiveCfg = Release|ARM32
Expand All @@ -73,6 +88,11 @@ Global
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.Debug|x64.Build.0 = Debug|x64
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.Debug|x86.ActiveCfg = Debug|x86
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.Debug|x86.Build.0 = Debug|x86
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.NoParallel|Any CPU.ActiveCfg = NoParallel|Any CPU
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.NoParallel|ARM32.ActiveCfg = Debug|ARM32
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.NoParallel|ARM64.ActiveCfg = Debug|ARM64
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.NoParallel|x64.ActiveCfg = Debug|x64
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.NoParallel|x86.ActiveCfg = Debug|x86
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.Release|Any CPU.Build.0 = Release|Any CPU
{A3AC33B6-1C87-453A-A6A8-39A2A17CEF24}.Release|ARM32.ActiveCfg = Release|ARM32
Expand All @@ -93,6 +113,12 @@ Global
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.Debug|x64.Build.0 = Debug|x64
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.Debug|x86.ActiveCfg = Debug|x86
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.Debug|x86.Build.0 = Debug|x86
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.NoParallel|Any CPU.ActiveCfg = NoParallel|Any CPU
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.NoParallel|ARM32.ActiveCfg = Debug|ARM32
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.NoParallel|ARM64.ActiveCfg = Debug|ARM64
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.NoParallel|x64.ActiveCfg = Debug|x64
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.NoParallel|x64.Build.0 = Debug|x64
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.NoParallel|x86.ActiveCfg = Debug|x86
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.Release|Any CPU.Build.0 = Release|Any CPU
{AF48F5D2-D2BE-41FC-95D5-AB425BBA3388}.Release|ARM32.ActiveCfg = Release|ARM32
Expand All @@ -113,6 +139,16 @@ Global
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.Debug|x64.Build.0 = Debug|x64
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.Debug|x86.ActiveCfg = Debug|x86
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.Debug|x86.Build.0 = Debug|x86
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|Any CPU.ActiveCfg = NoParallel|Any CPU
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|Any CPU.Build.0 = NoParallel|Any CPU
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|ARM32.ActiveCfg = NoParallel|ARM32
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|ARM32.Build.0 = NoParallel|ARM32
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|ARM64.ActiveCfg = NoParallel|ARM64
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|ARM64.Build.0 = NoParallel|ARM64
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|x64.ActiveCfg = NoParallel|x64
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|x64.Build.0 = NoParallel|x64
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|x86.ActiveCfg = NoParallel|x86
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.NoParallel|x86.Build.0 = NoParallel|x86
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.Release|Any CPU.Build.0 = Release|Any CPU
{A1DF49EA-81E4-4AC2-8AF3-5C8F36424815}.Release|ARM32.ActiveCfg = Release|ARM32
Expand All @@ -133,6 +169,16 @@ Global
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.Debug|x64.Build.0 = Debug|x64
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.Debug|x86.ActiveCfg = Debug|x86
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.Debug|x86.Build.0 = Debug|x86
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|Any CPU.ActiveCfg = NoParallel|Any CPU
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|Any CPU.Build.0 = NoParallel|Any CPU
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|ARM32.ActiveCfg = NoParallel|ARM32
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|ARM32.Build.0 = NoParallel|ARM32
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|ARM64.ActiveCfg = NoParallel|ARM64
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|ARM64.Build.0 = NoParallel|ARM64
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|x64.ActiveCfg = NoParallel|x64
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|x64.Build.0 = NoParallel|x64
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|x86.ActiveCfg = NoParallel|x86
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.NoParallel|x86.Build.0 = NoParallel|x86
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.Release|Any CPU.Build.0 = Release|Any CPU
{0EC5A959-869C-4F79-A44B-D5BC73FC2A2E}.Release|ARM32.ActiveCfg = Release|ARM32
Expand All @@ -153,6 +199,11 @@ Global
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.Debug|x64.Build.0 = Debug|x64
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.Debug|x86.ActiveCfg = Debug|x86
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.Debug|x86.Build.0 = Debug|x86
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.NoParallel|Any CPU.ActiveCfg = NoParallel|Any CPU
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.NoParallel|ARM32.ActiveCfg = Debug|ARM32
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.NoParallel|ARM64.ActiveCfg = Debug|ARM64
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.NoParallel|x64.ActiveCfg = Debug|x64
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.NoParallel|x86.ActiveCfg = Debug|x86
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.Release|Any CPU.Build.0 = Release|Any CPU
{989FABB9-3676-4746-AE8C-F14369DCDCBA}.Release|ARM32.ActiveCfg = Release|ARM32
Expand All @@ -173,6 +224,11 @@ Global
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.Debug|x64.Build.0 = Debug|x64
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.Debug|x86.ActiveCfg = Debug|x86
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.Debug|x86.Build.0 = Debug|x86
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.NoParallel|Any CPU.ActiveCfg = NoParallel|Any CPU
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.NoParallel|ARM32.ActiveCfg = Debug|ARM32
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.NoParallel|ARM64.ActiveCfg = Debug|ARM64
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.NoParallel|x64.ActiveCfg = Debug|x64
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.NoParallel|x86.ActiveCfg = Debug|x86
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.Release|Any CPU.Build.0 = Release|Any CPU
{8236EEB2-1AA0-4DF8-9596-1C21D50E9462}.Release|ARM32.ActiveCfg = Release|ARM32
Expand Down
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<PropertyGroup>
<Platforms>AnyCPU;x86;x64;ARM32;ARM64</Platforms>

<Configurations>Debug;Release;NoParallel</Configurations>

<TargetFrameworks>net8.0</TargetFrameworks>

<Nullable>enable</Nullable>
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />

<PackageVersion Include="xunit" Version="2.9.1" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2"
PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />

Expand All @@ -19,8 +19,8 @@
<PackageVersion Include="Avalonia.Fonts.Inter" Version="11.1.3" />

<PackageVersion Include="Semi.Avalonia" Version="11.1.0.4" />
<PackageVersion Include="Irihi.Ursa" Version="1.3.0" />
<PackageVersion Include="Irihi.Ursa.Themes.Semi" Version="1.3.0" />
<PackageVersion Include="Irihi.Ursa" Version="1.4.0" />
<PackageVersion Include="Irihi.Ursa.Themes.Semi" Version="1.4.0" />

<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.3.2" />
</ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions codegen/Arinc424.Generators.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers"
PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive"/>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Arinc424.Generators;

internal static class MemberDeclarationSyntaxExtensions
internal static class MemberDeclarationExtensions
{
internal static bool HaveAttribute(this MemberDeclarationSyntax member, string attributeName)
=> member.AttributeLists.Any(x => x.Attributes.Any(x => x.Name.ToString() == attributeName));
Expand Down
16 changes: 0 additions & 16 deletions codegen/StringBuilderExtensions.cs

This file was deleted.

4 changes: 4 additions & 0 deletions source/library/Arinc424.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='NoParallel'">
<DefineConstants>$(DefineConstants);NOPARALLEL</DefineConstants>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../../codegen/Arinc424.Generators.csproj" OutputItemType="analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion source/library/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Arinc424.Tests"), InternalsVisibleTo("Arinc424.Bench")]
[assembly: InternalsVisibleTo("Arinc424.Tests"), InternalsVisibleTo("Arinc424.Bench"), InternalsVisibleTo("Arinc424.View")]
4 changes: 2 additions & 2 deletions source/library/Meta424.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ internal Meta424(Supplement supplement)
TypeInfo = typeInfo.ToFrozenDictionary();
}

internal RecordInfo[] Info { get; }

internal FrozenDictionary<Section, Type> Types { get; }

internal FrozenDictionary<Type, RecordInfo> TypeInfo { get; }

internal RecordInfo[] Info { get; }
}
19 changes: 12 additions & 7 deletions source/library/Parser424.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,23 @@ bool TryEnqueue(string @string)
}

private void Build()
#if !NOPARALLEL
=> Parallel.ForEach(meta.Info, info => builds[info.Section] = info.Build(strings[info.Section].Primary));
#else
{
/*foreach (var info in meta.Info)
builds[info.Section] = info.Build(strings[info.Section].Primary);*/

_ = Parallel.ForEach(meta.Info, info => builds[info.Section] = info.Build(strings[info.Section].Primary));
foreach (var info in meta.Info)
builds[info.Section] = info.Build(strings[info.Section].Primary);
}

#endif
private void Link(Unique unique)
#if !NOPARALLEL
=> Parallel.ForEach(meta.Info, info => info.Link(builds[info.Section], unique, meta));
#else
{
_ = Parallel.ForEach(meta.Info, info => info.Link(builds[info.Section], unique, meta));
foreach (var info in meta.Info)
info.Link(builds[info.Section], unique, meta);
}

#endif
internal Parser424(Supplement supplement)
{
meta = new(supplement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ namespace Arinc424.Attributes;
internal abstract class DecodeAttribute(Supplement start) : SupplementAttribute(start);

/// <inheritdoc/>
/// <typeparam name="TType">Type in which the value will be decoded from the string.</typeparam>
/// <typeparam name="TType">The type of value being converted from the string.</typeparam>
internal abstract class DecodeAttribute<TType>(Supplement start = Supplement.V18) : DecodeAttribute(start) where TType : notnull
{
internal abstract Result<TType> Convert(ReadOnlySpan<char> @string);
}

/// <inheritdoc/>
/// <typeparam name="TConverter">Associated <see cref="IStringConverter{TType}"/>.</typeparam>
/// <typeparam name="TType"> <inheritdoc/> </typeparam>
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Property, AllowMultiple = true)]
internal class DecodeAttribute<TConverter, TType>(Supplement start = Supplement.V18) : DecodeAttribute<TType>(start)
where TConverter : IStringConverter<TType>
Expand All @@ -23,6 +25,8 @@ internal class DecodeAttribute<TConverter, TType>(Supplement start = Supplement.

/// <inheritdoc/>
/// <typeparam name="TConverter">Associated <see cref="IStringConverter{TType}"/>.</typeparam>
/// <typeparam name="TType"> <inheritdoc/> </typeparam>
/// <typeparam name="TRecord">The target record type for which the attribute applies.</typeparam>
internal sealed class DecodeAttribute<TConverter, TType, TRecord>(Supplement start = Supplement.V18) : DecodeAttribute<TConverter, TType>(start)
where TConverter : IStringConverter<TType>
where TType : notnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ namespace Arinc424.Attributes;
internal abstract class TransformAttribute(Supplement start) : SupplementAttribute(start);

/// <inheritdoc/>
/// <typeparam name="TType">The type to which the character will be converted.</typeparam>
/// <typeparam name="TType">The type of value being converted from the character.</typeparam>
internal abstract class TransformAttribute<TType>(Supplement start) : TransformAttribute(start) where TType : Enum
{
internal abstract bool TryConvert(char @char, out TType value);
}

/// <inheritdoc/>
/// <typeparam name="TConverter">Associated <see cref="ICharConverter{TType}"/>.</typeparam>
/// <typeparam name="TType"> <inheritdoc/> </typeparam>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Enum, AllowMultiple = true)]
internal sealed class TransformAttribute<TConverter, TType>(Supplement start = Supplement.V18) : TransformAttribute<TType>(start)
where TConverter : ICharConverter<TType>
Expand Down
39 changes: 0 additions & 39 deletions source/library/attributes/processing/PipelineAttribute.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Arinc424.Processing;

namespace Arinc424.Attributes;

internal abstract class PipelineAttribute<TSource>(Type outType, Supplement start, Supplement end) : SupplementAttribute(start, end)
where TSource : Record424
{
internal abstract IPipeline<TSource> GetPipeline(Supplement supplement);

internal Type OutType { get; } = outType;
}

internal sealed class PipelineAttribute<TPipeline, TSource>(Supplement start = Supplement.V18, Supplement end = Supplement.V23)
: PipelineAttribute<TSource>
(
TPipeline.OutType, /* garantee by design */
start, end
)
where TSource : Record424
where TPipeline : IPipeline<TSource>
{
internal override IPipeline<TSource> GetPipeline(Supplement supplement)
{
var type = typeof(TPipeline);

var constructor = type.GetConstructor([typeof(Supplement)]);

/* garantee by design */
return (IPipeline<TSource>)
(constructor is null
? type.GetConstructor([])!.Invoke(null)
: constructor.Invoke([supplement]));
}
}
6 changes: 3 additions & 3 deletions source/library/converters/airspace/RegionTypeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public static bool TryConvert(char @char, out RegionType value)
case (char)32:
value = RegionType.Unknown; return true;
case 'F':
value = RegionType.FlightInfo; return true;
value = RegionType.Flight; return true;
case 'U':
value = RegionType.UpperInfo; return true;
value = RegionType.Upper; return true;
case 'B':
value = RegionType.FlightInfo | RegionType.UpperInfo; return true;
value = RegionType.Flight | RegionType.Upper; return true;
default:
value = RegionType.Unknown; return false;
}
Expand Down
6 changes: 1 addition & 5 deletions source/library/extensions/MemberExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,5 @@ internal static bool TryAttribute<TRecord, TAttribute>(this MemberInfo member, S

internal static TAttribute? BySupplement<TAttribute>(this IEnumerable<TAttribute> attributes, Supplement supplement)
where TAttribute : SupplementAttribute
{
var drop = attributes.TakeWhile(x => x.Start <= supplement);

return drop.LastOrDefault();
}
=> attributes.TakeWhile(x => x.Start <= supplement).LastOrDefault();
}
2 changes: 1 addition & 1 deletion source/library/linking/LinkInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Arinc424.Linking;
namespace Arinc424;

public class LinkInfo
{
Expand Down
Loading

0 comments on commit 81566ba

Please sign in to comment.