mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-12-27 09:56:33 +00:00
Merge pull request #12777 from fice-t/MemberNotNull
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
OpenAPI / OpenAPI - HEAD (push) Has been cancelled
OpenAPI / OpenAPI - BASE (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
OpenAPI / OpenAPI - Difference (push) Has been cancelled
OpenAPI / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI / OpenAPI - Publish Stable Spec (push) Has been cancelled
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
OpenAPI / OpenAPI - HEAD (push) Has been cancelled
OpenAPI / OpenAPI - BASE (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
OpenAPI / OpenAPI - Difference (push) Has been cancelled
OpenAPI / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI / OpenAPI - Publish Stable Spec (push) Has been cancelled
NetworkManager: Use MemberNotNull attribute
This commit is contained in:
commit
822d407584
|
@ -81,7 +81,6 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||
/// <param name="configurationManager">The <see cref="IConfigurationManager"/> instance.</param>
|
||||
/// <param name="startupConfig">The <see cref="IConfiguration"/> instance holding startup parameters.</param>
|
||||
/// <param name="logger">Logger to use for messages.</param>
|
||||
#pragma warning disable CS8618 // Non-nullable field is uninitialized. : Values are set in UpdateSettings function. Compiler doesn't yet recognise this.
|
||||
public NetworkManager(IConfigurationManager configurationManager, IConfiguration startupConfig, ILogger<NetworkManager> logger)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(logger);
|
||||
|
@ -109,7 +108,6 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||
|
||||
_configurationManager.NamedConfigurationUpdated += ConfigurationUpdated;
|
||||
}
|
||||
#pragma warning restore CS8618 // Non-nullable field is uninitialized.
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered on network changes.
|
||||
|
@ -312,6 +310,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||
/// <summary>
|
||||
/// Initializes internal LAN cache.
|
||||
/// </summary>
|
||||
[MemberNotNull(nameof(_lanSubnets), nameof(_excludedSubnets))]
|
||||
private void InitializeLan(NetworkConfiguration config)
|
||||
{
|
||||
lock (_initLock)
|
||||
|
@ -591,6 +590,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||
/// Reloads all settings and re-Initializes the instance.
|
||||
/// </summary>
|
||||
/// <param name="configuration">The <see cref="NetworkConfiguration"/> to use.</param>
|
||||
[MemberNotNull(nameof(_lanSubnets), nameof(_excludedSubnets))]
|
||||
public void UpdateSettings(object configuration)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(configuration);
|
||||
|
|
Loading…
Reference in a new issue