Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit 76c3d64

Browse files
committed
fix: Marked all implementations as Obsolete
BREAKING CHANGE: Deprecated package
1 parent fa77f6c commit 76c3d64

File tree

3 files changed

+51
-9
lines changed

3 files changed

+51
-9
lines changed

src/Constants/MediaTypeNames.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1-
namespace PowerUtils.Net.Constants
1+
using System;
2+
3+
namespace PowerUtils.Net.Constants
24
{
5+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
36
public static class ExtendedMediaTypeNames
47
{
8+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
59
public static class ProblemApplication
610
{
11+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
712
public const string JSON = "application/problem+json";
13+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
814
public const string XML = "application/problem+xml";
915
}
1016

1117

18+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
1219
public static class Multipart
1320
{
21+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
1422
public const string FORM_DATA = "multipart/form-data";
1523
}
1624
}

src/Constants/StatusCodeLink.cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,87 @@ namespace PowerUtils.Net.Constants
1414
/// <summary>
1515
/// Status code information links to https://tools.ietf.org/html/rfc7231.
1616
/// </summary>
17+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
1718
public static class StatusCodeLink
1819
{
1920
private const string BASE_URL = "https://tools.ietf.org/html/";
2021

22+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
2123
public const string STATUS_CODES = BASE_URL + "rfc7231#section-6";
2224

25+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
2326
public const string BAD_REQUEST = BASE_URL + "rfc7231#section-6.5.1";
27+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
2428
public const string UNAUTHORIZED = BASE_URL + "rfc7235#section-3.1";
29+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
2530
public const string PAYMENT_REQUIRED = BASE_URL + "rfc7231#section-6.5.2";
31+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
2632
public const string FORBIDDEN = BASE_URL + "rfc7231#section-6.5.3";
33+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
2734
public const string NOT_FOUND = BASE_URL + "rfc7231#section-6.5.4";
35+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
2836
public const string METHOD_NOT_ALLOWED = BASE_URL + "rfc7231#section-6.5.5";
37+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
2938
public const string NOT_ACCEPTABLE = BASE_URL + "rfc7231#section-6.5.6";
39+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3040
public const string PROXY_AUTHENTICATION_REQUIRED = BASE_URL + "rfc7235#section-3.2";
41+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3142
public const string REQUEST_TIMEOUT = BASE_URL + "rfc7231#section-6.5.7";
43+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3244
public const string CONFLICT = BASE_URL + "rfc7231#section-6.5.8";
45+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3346
public const string GONE = BASE_URL + "rfc7231#section-6.5.9";
47+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3448
public const string LENGTH_REQUIRED = BASE_URL + "rfc7231#section-6.5.10";
49+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3550
public const string PRECONDITION_FAILED = BASE_URL + "rfc7232#section-4.2";
51+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3652
public const string REQUEST_ENTITY_TOO_LARGE = BASE_URL + "rfc7231#section-6.5.11";
53+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3754
public const string REQUEST_URI_TOO_LONG = BASE_URL + "rfc7231#section-6.5.12";
55+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3856
public const string UNSUPPORTED_MEDIA_TYPE = BASE_URL + "rfc7231#section-6.5.13";
57+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
3958
public const string REQUESTED_RANGE_NOT_SATISFIABLE = BASE_URL + "rfc7233#section-4.4";
59+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4060
public const string EXPECTATION_FAILED = BASE_URL + "rfc7231#section-6.5.14";
61+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4162
public const string I_AM_A_TEAPOT = BASE_URL + "rfc2324#section-2.3.2";
63+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4264
public const string UNPROCESSABLE_ENTITY = BASE_URL + "rfc4918#section-11.2";
65+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4366
public const string TOO_EARLY = "https://httpwg.org/specs/rfc8470.html#status";
67+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4468
public const string UPGRADE_REQUIRED = BASE_URL + "rfc7231#section-6.5.15";
69+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4570
public const string PRECONDITION_REQUIRED = BASE_URL + "rfc6585#section-3";
71+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4672
public const string TOO_MANY_REQUESTS = BASE_URL + "rfc6585#section-4";
73+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4774
public const string REQUEST_HEADER_FIELDS_TOO_LARGE = BASE_URL + "rfc6585#section-5";
75+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4876
public const string UNAVAILABLE_FOR_LEGAL_REASONS = "https://httpwg.org/specs/rfc7725.html#n-451-unavailable-for-legal-reasons";
77+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
4978
public const string INTERNAL_SERVER_ERROR = BASE_URL + "rfc7231#section-6.6.1";
79+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5080
public const string NOT_IMPLEMENTED = BASE_URL + "rfc7231#section-6.6.2";
81+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5182
public const string BAD_GATEWAY = BASE_URL + "rfc7231#section-6.6.3";
83+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5284
public const string SERVICE_UNAVAILABLE = BASE_URL + "rfc7231#section-6.6.4";
85+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5386
public const string GATEWAY_TIMEOUT = BASE_URL + "rfc7231#section-6.6.5";
87+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5488
public const string HTTP_VERSION_NOT_SUPPORTED = BASE_URL + "rfc7231#section-6.6.6";
89+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5590
public const string VARIANT_ALSO_NEGOTIATES = BASE_URL + "rfc2295#section-8.1";
91+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5692
public const string INSUFFICIENT_STORAGE = BASE_URL + "rfc4918#section-11.5";
93+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5794
public const string LOOP_DETECTED = BASE_URL + "rfc5842#section-7.2";
95+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5896
public const string NOT_EXTENDED = BASE_URL + "rfc2774#section-7";
97+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
5998
public const string NETWORK_AUTHENTICATION_REQUIRED = BASE_URL + "rfc6585#section-6";
6099

61100

@@ -64,6 +103,7 @@ public static class StatusCodeLink
64103
/// </summary>
65104
/// <param name="statuCode">Http status code</param>
66105
/// <returns>Documentation link. If the status code does not exists return NULL</returns>
106+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
67107
public static string? GetStatusCodeLinkOrDefault(this int statuCode)
68108
=> statuCode switch
69109
{
@@ -117,6 +157,7 @@ public static class StatusCodeLink
117157
/// <param name="statuCode">Http status code</param>
118158
/// <exception cref="ArgumentException">The <paramref name="statuCode">info</paramref> parameter does not exist.</exception>
119159
/// <returns>Documentation link</returns>
160+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
120161
public static string GetStatusCodeLink(this int statuCode)
121162
=> statuCode.GetStatusCodeLinkOrDefault() ?? throw new ArgumentException($"Unknown status code: '{statuCode}'");
122163

@@ -126,6 +167,7 @@ public static string GetStatusCodeLink(this int statuCode)
126167
/// <param name="statuCode">Http status code</param>
127168
/// <exception cref="ArgumentException">The <paramref name="statuCode">info</paramref> parameter does not exist.</exception>
128169
/// <returns>Documentation link</returns>
170+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
129171
public static string GetStatusCodeLink(this int? statuCode)
130172
=> statuCode switch
131173
{

tests/PowerUtils.Net.Primitives.Tests/PowerUtils.Net.Primitives.Tests.csproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
</PropertyGroup>
1717

1818

19-
<Target Name="CopyHook" AfterTargets="AfterBuild" Condition="'$(GITHUB_ACTIONS)' != 'true' ">
20-
<ItemGroup>
21-
<CommitHookFile Include="../../.github/hooks/commit-msg" />
22-
</ItemGroup>
23-
<Copy SourceFiles="@(CommitHookFile)" DestinationFolder="../../.git/hooks" />
24-
</Target>
25-
26-
2719
<ItemGroup>
2820
<PackageReference Include="FluentAssertions" Version="7.0.0" />
2921
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />

0 commit comments

Comments
 (0)