Skip to content

Commit

Permalink
PR feedback - optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek committed Apr 5, 2024
1 parent 0e6b2ae commit fa7bae9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Shared/InstrumentationScopeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public static string GetPackageVersion<T>()
// fills AssemblyInformationalVersionAttribute by
// `{NuGetPackageVersion}+{CommitHash}`, e.g. `1.7.0-beta.1.86+33d5521a73e881ac59d4bf1213765270ec2422ff`.
// For Scope version, value of AssemblyInformationalVersionAttribute without commit hash is returned.
return typeof(T).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!.InformationalVersion.Split('+')[0];
return typeof(T).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!.InformationalVersion.Split(new[] { '+' }, 2)[0];
}
}

0 comments on commit fa7bae9

Please sign in to comment.