Skip to content

Commit a198566

Browse files
refactor(internal): default headers
1 parent 72cfd07 commit a198566

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Orb/Core/ParamsBase.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ internal static void AddDefaultHeaders(HttpRequestMessage request, ClientOptions
203203

204204
static string GetUserAgent() => $"{typeof(OrbClient).Name}/C# {GetPackageVersion()}";
205205

206+
static string GetPackageVersion() =>
207+
Assembly
208+
.GetExecutingAssembly()
209+
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
210+
?.InformationalVersion
211+
?? "unknown";
212+
206213
static string GetOSArch() =>
207214
RuntimeInformation.OSArchitecture switch
208215
{
@@ -237,13 +244,6 @@ static string GetOS()
237244
return $"Other:{RuntimeInformation.OSDescription}";
238245
}
239246

240-
static string GetPackageVersion() =>
241-
Assembly
242-
.GetExecutingAssembly()
243-
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
244-
?.InformationalVersion
245-
?? "unknown";
246-
247247
static Runtime GetRuntime()
248248
{
249249
var runtimeDescription = RuntimeInformation.FrameworkDescription;

0 commit comments

Comments
 (0)