Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
33c54be
Update OC versions to preview.
sarahelsaig Jan 7, 2026
9e243c9
Fix some build errors.
sarahelsaig Jan 8, 2026
fee2db0
Remove old compatibility suppressions files.
sarahelsaig Jan 8, 2026
4066254
Fix HL warnings.
sarahelsaig Jan 8, 2026
b1e31f0
Fix various errors.
sarahelsaig Jan 9, 2026
1ae336c
Add GetAllElasticsearchIndexesAsync extension.
sarahelsaig Jan 9, 2026
fd066aa
Fix obsolete IActionContextAccessor usage.
sarahelsaig Jan 9, 2026
d561e51
Fix remaining warnings.
sarahelsaig Jan 9, 2026
c622d5b
Upgrade Moq.AutoMock.
sarahelsaig Jan 9, 2026
d8bda24
Remove System.Linq.Async package references, since that's now part of…
sarahelsaig Jan 9, 2026
86c585f
Use "await foreach" instead of ".GetAsyncEnumerator()".
sarahelsaig Jan 9, 2026
0a64492
Fix IsMvcRoute.
sarahelsaig Jan 9, 2026
4517d63
IDE0055: Fix formatting
sarahelsaig Jan 9, 2026
e319a3b
Fix incorrect GetEndpoint usage in ContentSecurityPolicyAttributeCont…
sarahelsaig Jan 10, 2026
2a6a3c2
Same but for real this time.
sarahelsaig Jan 10, 2026
84baacb
Unusing.
sarahelsaig Jan 10, 2026
1f97165
Update all Microsoft packages.
sarahelsaig Jan 10, 2026
de9f327
Fix LinqToDbSamplesShouldWorkCorrectly.
sarahelsaig Jan 11, 2026
ea8fbcf
Fix LinqToDbSamplesShouldWorkCorrectly.
sarahelsaig Jan 11, 2026
f48952e
Upgrade OC preview.
sarahelsaig Jan 14, 2026
6e5e292
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Jan 16, 2026
57dabee
Add NullIfWhiteSpace.
sarahelsaig Jan 17, 2026
ee1b5b3
Update branch selector.
sarahelsaig Jan 19, 2026
4e0bbae
Update branch selectors.
sarahelsaig Jan 19, 2026
deb53fe
Update NuGet.config.
sarahelsaig Jan 20, 2026
f8403f5
CompatibilitySuppressions.xml
sarahelsaig Jan 20, 2026
38ac2d1
CompatibilitySuppressions.xml
sarahelsaig Jan 20, 2026
39bcc8c
CompatibilitySuppressions.xml
sarahelsaig Jan 20, 2026
7e98898
CompatibilitySuppressions.xml
sarahelsaig Jan 20, 2026
fcd80b7
CompatibilitySuppressions.xml
sarahelsaig Jan 20, 2026
dbe2ca5
Grammar
Piedone Jan 22, 2026
684501b
Upgrade STJ.
sarahelsaig Jan 22, 2026
808f68c
Nothing to do here.
sarahelsaig Jan 22, 2026
edb7824
Is this file actually needed?
sarahelsaig Jan 22, 2026
e413f82
Upgrade OC preview.
sarahelsaig Jan 22, 2026
fdcfb0e
Add DeleteAllIndexesAsync
sarahelsaig Jan 22, 2026
67fa7c1
Big fix.
sarahelsaig Jan 22, 2026
99ffc1d
Fix LangVersion and AnalysisLevel.
sarahelsaig Jan 22, 2026
92b3091
Fix CA2263.
sarahelsaig Jan 22, 2026
6317599
UC preview update.
sarahelsaig Jan 23, 2026
415a56d
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Jan 23, 2026
e9d98c4
Formatting
Piedone Jan 24, 2026
90aae04
Update OC preview.
sarahelsaig Jan 27, 2026
6535391
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Jan 27, 2026
dfe37b1
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Jan 29, 2026
0f370c7
Add CreatingOrUpdatingPartHandler.
sarahelsaig Jan 30, 2026
043c559
AddDefaultTenantFeatures
sarahelsaig Jan 31, 2026
f0e41b9
Make Request.Form access safer.
sarahelsaig Jan 31, 2026
66e3214
Update OC preview.
sarahelsaig Feb 4, 2026
64a495c
Update OC preview.
sarahelsaig Feb 5, 2026
262dd25
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Feb 5, 2026
e0dd953
Fix analyzer warning.
sarahelsaig Feb 5, 2026
f287b35
Upda
sarahelsaig Feb 6, 2026
a9cf5ce
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Feb 10, 2026
e2f278d
Post-merge fixup.
sarahelsaig Feb 10, 2026
e385ac9
Fix formatting.
sarahelsaig Feb 10, 2026
88b27aa
Remove unnecessary nullability constraints.
sarahelsaig Feb 12, 2026
75bfa59
Update OC to avoid missing method exceptions.
sarahelsaig Feb 12, 2026
4f45284
Update OC previews to fix package downgrade.
sarahelsaig Feb 13, 2026
6b4e69a
Update OC preview and fix build errors.
sarahelsaig Feb 21, 2026
83a12dc
Update OC preview.
sarahelsaig Feb 22, 2026
f0210f0
OC preview version
sarahelsaig Feb 22, 2026
c22dc8d
Fix documentation.
sarahelsaig Feb 24, 2026
bac2e8d
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Feb 27, 2026
1d8f273
I don't think this is necessary.
sarahelsaig Feb 28, 2026
f45749c
Update OC preview.
sarahelsaig Mar 7, 2026
7e05d13
Update OC preview.
sarahelsaig Mar 7, 2026
325df52
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Mar 20, 2026
49db6c9
Fix package consolidation.
sarahelsaig Mar 20, 2026
73e7bdb
Update OC preview.
sarahelsaig Mar 20, 2026
93d8f1b
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Mar 29, 2026
6f8ef27
Update OC preview.
sarahelsaig Mar 29, 2026
fae49bb
Use OC module SDKs.
sarahelsaig Mar 30, 2026
0defd29
Formatting
Piedone Mar 31, 2026
27909ec
Update NuGet versions.
sarahelsaig Mar 31, 2026
82269a9
Use Tests SDK.
sarahelsaig Mar 31, 2026
0f61a2a
Use UI Test SDK where applicable.
sarahelsaig Mar 31, 2026
0299fd7
Create new SLNX files.
sarahelsaig Apr 2, 2026
1f8f716
Update validate-nuget-publish.yml issue branch.
sarahelsaig Apr 2, 2026
bfc56aa
Remove SLN files.
sarahelsaig Apr 3, 2026
6f680a2
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Apr 8, 2026
812fb3f
Update OC preview.
sarahelsaig Apr 8, 2026
08c32ec
Fix obsolete "As".
sarahelsaig Apr 11, 2026
e2dcb51
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Apr 11, 2026
48972b5
Fix new problems after OC update and merge from dev.
sarahelsaig Apr 11, 2026
d7e4628
Fix new problems after OC update and merge from dev.
sarahelsaig Apr 11, 2026
eccbb37
Fix SA1210, SA1210, MA0127.
sarahelsaig Apr 11, 2026
00aaca8
Fix and clean up GetOrCreate usages.
sarahelsaig Apr 11, 2026
f467409
AddDefaultTenantFeatures on BuildVersionDisplay.
sarahelsaig Apr 11, 2026
c76db74
Prevent NRE.
sarahelsaig Apr 13, 2026
74530be
Try to fix NRE for real.
sarahelsaig Apr 13, 2026
8f66939
Update OC preview.
sarahelsaig Apr 13, 2026
2b1eda8
Merge remote-tracking branch 'origin/issue/OSOE-925' into issue/OSOE-925
sarahelsaig Apr 13, 2026
a30771f
Add EqualsOrdinal to fix CA1309.
sarahelsaig Apr 18, 2026
2bf772a
Cleanup.
sarahelsaig Apr 24, 2026
58cab74
Merge remote-tracking branch 'origin/issue/OSOE-925' into issue/OSOE-…
sarahelsaig Apr 24, 2026
245e8ab
More post-merge fixing.
sarahelsaig Apr 24, 2026
75e9499
Update NuGet and apply library SDK where applicable
sarahelsaig Apr 24, 2026
d8499ed
Update SDK NuGet.
sarahelsaig Apr 25, 2026
a39eb6b
Add missing targets file.
sarahelsaig Apr 25, 2026
62c42d2
Merge remote-tracking branch 'origin/issue/OSOE-1208' into issue/OSOE…
sarahelsaig Apr 25, 2026
7076db9
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Apr 25, 2026
09323d7
Merge remote-tracking branch 'origin/issue/OSOE-925' into issue/OSOE-…
sarahelsaig Apr 25, 2026
ff224f8
Merge remote-tracking branch 'origin/issue/OSOE-1208' into issue/OSOE…
sarahelsaig Apr 25, 2026
96d0866
Merge pull request #390 from Lombiq/issue/OSOE-1199
DemeSzabolcs Apr 27, 2026
44e666d
Update GHA branch selectors.
sarahelsaig Apr 27, 2026
6b65a64
Update OC preview.
sarahelsaig Apr 28, 2026
3a8ad19
Update OC preview.
sarahelsaig May 16, 2026
efa5d14
Update SDKs.
sarahelsaig May 16, 2026
0218a06
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig May 16, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/publish-cloudsmith.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
publish-nuget:
name: Publish to Cloudsmith
uses: Lombiq/GitHub-Actions/.github/workflows/publish-nuget.yml@dev
uses: Lombiq/GitHub-Actions/.github/workflows/publish-nuget.yml@issue/OSOE-925
with:
source: https://nuget.cloudsmith.io/lombiq/open-source-orchard-core-extensions/v3/index.json
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
publish-nuget:
name: Publish to NuGet
if: ${{ !contains(github.ref_name, '-preview.') }}
uses: Lombiq/GitHub-Actions/.github/workflows/publish-nuget.yml@dev
uses: Lombiq/GitHub-Actions/.github/workflows/publish-nuget.yml@issue/OSOE-925
secrets:
API_KEY: ${{ secrets.DEFAULT_NUGET_PUBLISH_API_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/validate-nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ on:
jobs:
validate-nuget-publish:
name: Validate NuGet Publish
uses: Lombiq/GitHub-Actions/.github/workflows/validate-nuget-publish.yml@dev
uses: Lombiq/GitHub-Actions/.github/workflows/validate-nuget-publish.yml@issue/OSOE-925
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net8.0</Target>
</Suppression>
</Suppressions>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static IApplicationBuilder UseForwardedHeadersForCloudflareAndAzure(this
};

// These are not all known for Cloudflare and Azure.
forwardedHeadersOptions.KnownNetworks.Clear();
forwardedHeadersOptions.KnownIPNetworks.Clear();
forwardedHeadersOptions.KnownProxies.Clear();

builder.UseForwardedHeaders(forwardedHeadersOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,27 @@ public static bool IsAction<TController>(
string? area = null)
where TController : ControllerBase =>
request.IsAction(actionSelector.StripResult(), area);

/// <summary>
/// If the <paramref name="request"/> has a form body, it tries to find the value for <paramref name="key"/> amd
/// trims it. If that fails or if the result is an empty string, <see langword="null"/> is returned instead.
/// </summary>
public static string? GetFormValueMaybe(this HttpRequest request, string key)
{
if (!request.HasFormContentType) return null;

// We use try-catch in case the request is somehow broken or invalid because then just accessing the form can
// throw an exception.
try
{
return request.Form.TryGetValue(key, out var values) &&
values.WhereNot(string.IsNullOrWhiteSpace).FirstOrDefault()?.Trim() is { } value
? value
: null;
}
catch
{
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ public static class ServiceCollectionExtensions
/// </summary>
public static void AddAsyncResultFilter<TFilter>(this IServiceCollection services)
where TFilter : IAsyncResultFilter =>
services.Configure<MvcOptions>(options => options.Filters.Add(typeof(TFilter)));
services.Configure<MvcOptions>(options => options.Filters.Add<TFilter>());
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);.git*</DefaultItemExcludes>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="../../../Utilities/Lombiq.MSBuild.Targets/Lombiq.MSBuild.Library.Sdk/Sdk/Import.props" />
<Import Condition="'$(NuGetBuild)' == 'true'" Project="Sdk.props" Sdk="Lombiq.MSBuild.Library.Sdk" Version="1.0.1-alpha.15.osoe-1208" />

<PropertyGroup>
<Title>Lombiq Helpful Libraries - ASP.NET Core Libraries</Title>
<Authors>Lombiq Technologies</Authors>
<Copyright>Copyright © 2011, Lombiq Technologies Ltd.</Copyright>
<Description>Lombiq Helpful Libraries - ASP.NET Core Libraries: Some useful extensions and other helpers for ASP.NET Core. See the project website for detailed documentation.</Description>
<CopyrightYear>2011</CopyrightYear>
<DescriptionBody>Some useful extensions and other helpers for ASP.NET Core. See the project website for detailed documentation.</DescriptionBody>
<PackageTags>OrchardCore;Lombiq;AspNetCore;</PackageTags>
<PackageIcon>NuGetIcon.png</PackageIcon>
<RepositoryUrl>https://github.com/Lombiq/Helpful-Libraries</RepositoryUrl>
<PackageProjectUrl>https://github.com/Lombiq/Helpful-Libraries/blob/dev/Lombiq.HelpfulLibraries.AspNetCore/Readme.md</PackageProjectUrl>
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
</PropertyGroup>

<ItemGroup>
<None Include="Readme.md" />
<None Include="NuGetIcon.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
Expand All @@ -31,4 +24,6 @@
<ProjectReference Include="..\Lombiq.HelpfulLibraries.Common\Lombiq.HelpfulLibraries.Common.csproj" />
</ItemGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="../../../Utilities/Lombiq.MSBuild.Targets/Lombiq.MSBuild.Library.Sdk/Sdk/Import.targets" />
<Import Condition="'$(NuGetBuild)' == 'true'" Project="Sdk.targets" Sdk="Lombiq.MSBuild.Library.Sdk" Version="1.0.1-alpha.15.osoe-1208" />
</Project>
Comment thread
Piedone marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<LangVersion>14.0</LangVersion>
</PropertyGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="../../../Utilities/Lombiq.MSBuild.Targets/Lombiq.MSBuild.Library.Sdk/Sdk/Import.props" />
<Import Condition="'$(NuGetBuild)' == 'true'" Project="Sdk.props" Sdk="Lombiq.MSBuild.Library.Sdk" Version="1.0.1-alpha.15.osoe-1208" />

<PropertyGroup>
<Title>Lombiq Helpful Libraries - Attributes for Orchard Core</Title>
<Authors>Lombiq Technologies</Authors>
<Copyright>Copyright © 2011, Lombiq Technologies Ltd.</Copyright>
<Description>Lombiq Helpful Libraries - Attributes for Orchard Core: Adds attributes used by other projects. See the project website for detailed documentation.</Description>
<PackageIcon>NuGetIcon.png</PackageIcon>
<CopyrightYear>2011</CopyrightYear>
<DescriptionBody>Adds attributes used by other projects. See the project website for detailed documentation.</DescriptionBody>
<PackageTags>OrchardCore;Lombiq;Attributes</PackageTags>
<RepositoryUrl>https://github.com/Lombiq/Helpful-Libraries</RepositoryUrl>
<PackageProjectUrl>https://github.com/Lombiq/Helpful-Libraries/blob/dev/Lombiq.HelpfulLibraries.Attributes/Readme.md</PackageProjectUrl>
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
</PropertyGroup>

<ItemGroup>
<None Include="Readme.md" />
<None Include="NuGetIcon.png" Pack="true" PackagePath="" />
</ItemGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="../../../Utilities/Lombiq.MSBuild.Targets/Lombiq.MSBuild.Library.Sdk/Sdk/Import.targets" />
<Import Condition="'$(NuGetBuild)' == 'true'" Project="Sdk.targets" Sdk="Lombiq.MSBuild.Library.Sdk" Version="1.0.1-alpha.15.osoe-1208" />
</Project>
8 changes: 8 additions & 0 deletions Lombiq.HelpfulLibraries.Cli/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net8.0</Target>
</Suppression>
</Suppressions>
9 changes: 4 additions & 5 deletions Lombiq.HelpfulLibraries.Cli/Extensions/CommandExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,15 @@ public static async Task ExecuteUntilOutputAsync(
Action<StandardErrorCommandEvent>? stdErrHandler = default,
CancellationToken cancellationToken = default)
{
await using var enumerator = command.ListenAsync(cancellationToken).GetAsyncEnumerator(cancellationToken);

while (await enumerator.MoveNextAsync(cancellationToken))
await foreach (var commandEvent in command.ListenAsync(cancellationToken))
{
if (enumerator.Current is StandardOutputCommandEvent stdOut && stdOut.Text.ContainsOrdinalIgnoreCase(outputToWaitFor))
if (commandEvent is StandardOutputCommandEvent stdOut &&
stdOut.Text.ContainsOrdinalIgnoreCase(outputToWaitFor))
{
return;
}

if (enumerator.Current is StandardErrorCommandEvent stdErr)
if (commandEvent is StandardErrorCommandEvent stdErr)
{
stdErrHandler?.Invoke(stdErr);
}
Expand Down
22 changes: 9 additions & 13 deletions Lombiq.HelpfulLibraries.Cli/Lombiq.HelpfulLibraries.Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="../../../Utilities/Lombiq.MSBuild.Targets/Lombiq.MSBuild.Library.Sdk/Sdk/Import.props" />
<Import Condition="'$(NuGetBuild)' == 'true'" Project="Sdk.props" Sdk="Lombiq.MSBuild.Library.Sdk" Version="1.0.1-alpha.15.osoe-1208" />

<PropertyGroup>
<Title>Lombiq Helpful Libraries - Command Line Libraries</Title>
<Authors>Lombiq Technologies</Authors>
<Copyright>Copyright © 2011, Lombiq Technologies Ltd.</Copyright>
<Description>Lombiq Helpful Libraries - Command Line Libraries. This project helps with executing command line calls. See the project website for detailed documentation.</Description>
<CopyrightYear>2011</CopyrightYear>
<DescriptionBody>This project helps with executing command line calls. See the project website for detailed documentation.</DescriptionBody>
<PackageTags>Lombiq;cli;CliWrap</PackageTags>
<PackageIcon>NuGetIcon.png</PackageIcon>
<RepositoryUrl>https://github.com/Lombiq/Helpful-Libraries</RepositoryUrl>
<PackageProjectUrl>https://github.com/Lombiq/Helpful-Libraries/blob/dev/Lombiq.HelpfulLibraries.Cli/Readme.md</PackageProjectUrl>
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
</PropertyGroup>

<ItemGroup>
<None Include="Readme.md" />
<None Include="NuGetIcon.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CliWrap" Version="3.10.1" />
</ItemGroup>
Expand All @@ -30,4 +24,6 @@
<ProjectReference Include="..\Lombiq.HelpfulLibraries.Common\Lombiq.HelpfulLibraries.Common.csproj" />
</ItemGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="../../../Utilities/Lombiq.MSBuild.Targets/Lombiq.MSBuild.Library.Sdk/Sdk/Import.targets" />
<Import Condition="'$(NuGetBuild)' == 'true'" Project="Sdk.targets" Sdk="Lombiq.MSBuild.Library.Sdk" Version="1.0.1-alpha.15.osoe-1208" />
</Project>
8 changes: 8 additions & 0 deletions Lombiq.HelpfulLibraries.Common/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net8.0</Target>
</Suppression>
</Suppressions>
8 changes: 4 additions & 4 deletions Lombiq.HelpfulLibraries.Common/Extensions/ArrayExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static class ArrayExtensions
/// it's better to use this instead of the general `Any()` extension method.
/// </para>
/// </remarks>
public static bool Exists<T>(this T?[] array, Predicate<T?> match) => Array.Exists(array, match);
public static bool Exists<T>(this T[] array, Predicate<T> match) => Array.Exists(array, match);

/// <summary>
/// A fluid alternative to <see cref="Array.Find{T}(T[], Predicate{T})"/>.
Expand All @@ -22,12 +22,12 @@ public static class ArrayExtensions
/// it's better to use this instead of the general `FirstOrDefault()` extension method.
/// </para>
/// </remarks>
public static T? Find<T>(this T?[] array, Predicate<T?> match) => Array.Find(array, match);
public static T? Find<T>(this T[] array, Predicate<T> match) => Array.Find(array, match);

/// <summary>
/// A fluid alternative to <see cref="Array.FindAll{T}(T[], Predicate{T})"/>.
/// </summary>
public static T?[] FindAll<T>(this T?[] array, Predicate<T?> match) => Array.FindAll(array, match);
public static T[] FindAll<T>(this T[] array, Predicate<T> match) => Array.FindAll(array, match);

/// <summary>
/// A fluid alternative to <see cref="Array.FindIndex{T}(T[], Predicate{T})"/>.
Expand All @@ -38,5 +38,5 @@ public static class ArrayExtensions
/// it's better to use this instead of the general `All()` extension method.
/// </para>
/// </remarks>
public static bool TrueForAll<T>(this T?[] array, Predicate<T?> match) => Array.TrueForAll(array, match);
public static bool TrueForAll<T>(this T[] array, Predicate<T> match) => Array.TrueForAll(array, match);
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static async Task AwaitEachAsync<TItem>(
}

/// <summary>
/// Awaits the tasks sequentially while the action returns <see langword="false"/>.
/// Awaits the tasks sequentially while the action returns <see langword="true"/>.
/// </summary>
/// <returns><see langword="true"/> if the <see langword="foreach"/> was never broken.</returns>
public static async Task<bool> AwaitWhileAsync<TItem>(
Expand Down
13 changes: 13 additions & 0 deletions Lombiq.HelpfulLibraries.Common/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ public static string[] SplitByNewLines(this string? text) =>
public static bool ContainsLoose(this string? text, string? toFind) =>
text != null && toFind != null && text.Contains(toFind, StringComparison.InvariantCultureIgnoreCase);

/// <summary>
/// A shortcut for <c>string.Equals(string, StringComparison.Ordinal)</c>.
/// </summary>
public static bool EqualsOrdinal(this string? text, string? value) =>
text?.Equals(value, StringComparison.Ordinal) == true;

/// <summary>
/// A shortcut for <c>string.Equals(string, StringComparison.OrdinalIgnoreCase)</c>.
/// </summary>
Expand Down Expand Up @@ -435,4 +441,11 @@ public static string Concat(this string text, IList<Range> ranges)

/// <inheritdoc cref="Concat"/>
public static string Join(this IList<Range> ranges, string text) => text.Concat(ranges);

/// <summary>
/// Returns <see langword="null"/> if the <paramref name="value"/> is <see langword="null"/> or whitespace. This
/// makes chaining with the null-coalescing operator (<c>??</c>) easier.
/// </summary>
public static string? NullIfWhiteSpace(this string value) =>
string.IsNullOrWhiteSpace(value) ? null : value;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class ZipArchiveExtensions
/// </summary>
public static async Task CreateTextEntryAsync(this ZipArchive zip, string entryName, IEnumerable<string?>? lines)
{
await using var writer = new StreamWriter(zip.CreateEntry(entryName).Open());
await using var writer = new StreamWriter(await zip.CreateEntry(entryName).OpenAsync());

if (lines == null) return;

Expand All @@ -31,7 +31,7 @@ public static Task CreateTextEntryAsync(this ZipArchive zip, string entryName, s
/// </summary>
public static async Task CreateBinaryEntryAsync(this ZipArchive zip, string entryName, ReadOnlyMemory<byte> data)
{
await using var stream = zip.CreateEntry(entryName).Open();
await using var stream = await zip.CreateEntry(entryName).OpenAsync();
await stream.WriteAsync(data);
}
}
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);.git*</DefaultItemExcludes>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="../../../Utilities/Lombiq.MSBuild.Targets/Lombiq.MSBuild.Library.Sdk/Sdk/Import.props" />
<Import Condition="'$(NuGetBuild)' == 'true'" Project="Sdk.props" Sdk="Lombiq.MSBuild.Library.Sdk" Version="1.0.1-alpha.15.osoe-1208" />

<PropertyGroup>
<Title>Lombiq Helpful Libraries - Common Libraries</Title>
<Authors>Lombiq Technologies</Authors>
<Copyright>Copyright © 2011, Lombiq Technologies Ltd.</Copyright>
<Description>Lombiq Helpful Libraries - Common Libraries: Various useful libraries that can be handy when developing for .NET. See the project website for detailed documentation.</Description>
<CopyrightYear>2011</CopyrightYear>
<DescriptionBody>Various useful libraries that can be handy when developing for .NET. See the project website for detailed documentation.</DescriptionBody>
<PackageTags>Lombiq;DateTime;DependencyInjection;Utilities</PackageTags>
<PackageIcon>NuGetIcon.png</PackageIcon>
<RepositoryUrl>https://github.com/Lombiq/Helpful-Libraries</RepositoryUrl>
<PackageProjectUrl>https://github.com/Lombiq/Helpful-Libraries/blob/dev/Lombiq.HelpfulLibraries.Common/Readme.md</PackageProjectUrl>
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
</PropertyGroup>

<ItemGroup>
<None Include="Readme.md" />
<None Include="NuGetIcon.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AngleSharp" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="System.Linq.Async" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.1" />
</ItemGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="../../../Utilities/Lombiq.MSBuild.Targets/Lombiq.MSBuild.Library.Sdk/Sdk/Import.targets" />
<Import Condition="'$(NuGetBuild)' == 'true'" Project="Sdk.targets" Sdk="Lombiq.MSBuild.Library.Sdk" Version="1.0.1-alpha.15.osoe-1208" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net8.0</Target>
</Suppression>
</Suppressions>
Loading
Loading