Files
OpenNest/OpenNest/PostProcessorMaterials.cs
T
aj aec0523062 style: apply CSharpier formatting to all C# sources
Repo-wide sweep with the pinned CSharpier 1.3.0 tool. Whitespace and
line-wrapping only; OpenNest.Engine.Tests (109) and OpenNest.IO.Tests
pass after reformat, full solution builds 0 errors.

Added .csharpierignore so csproj/config XML keeps its existing layout
(CSharpier's XML wrapping churns attributes with zero benefit).

Formatting is now enforceable: dotnet csharpier check . passes.
2026-09-20 16:41:50 -04:00

33 lines
841 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenNest
{
public static class PostProcessorMaterials
{
private static readonly List<string> materials = new();
public static IReadOnlyList<string> Names => materials;
public static void AddFrom(IMaterialProvidingPostProcessor provider)
{
if (provider == null)
return;
foreach (var name in provider.GetMaterialNames())
{
if (
!string.IsNullOrWhiteSpace(name)
&& !materials.Contains(name, StringComparer.OrdinalIgnoreCase)
)
{
materials.Add(name);
}
}
materials.Sort(StringComparer.OrdinalIgnoreCase);
}
}
}