소스 검색

Merge pull request #5317 from Bond-009/notnullwhen

MaybeNullWhen(false) -> NotNullWhen(true)
Bond-009 4 년 전
부모
커밋
9390dd2df8
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      MediaBrowser.Model/Entities/ProviderIdsExtensions.cs

+ 2 - 2
MediaBrowser.Model/Entities/ProviderIdsExtensions.cs

@@ -16,7 +16,7 @@ namespace MediaBrowser.Model.Entities
         /// <param name="name">The name.</param>
         /// <param name="id">The provider id.</param>
         /// <returns><c>true</c> if a provider id with the given name was found; otherwise <c>false</c>.</returns>
-        public static bool TryGetProviderId(this IHasProviderIds instance, string name, [MaybeNullWhen(false)] out string id)
+        public static bool TryGetProviderId(this IHasProviderIds instance, string name, [NotNullWhen(true)] out string? id)
         {
             if (instance == null)
             {
@@ -39,7 +39,7 @@ namespace MediaBrowser.Model.Entities
         /// <param name="provider">The provider.</param>
         /// <param name="id">The provider id.</param>
         /// <returns><c>true</c> if a provider id with the given name was found; otherwise <c>false</c>.</returns>
-        public static bool TryGetProviderId(this IHasProviderIds instance, MetadataProvider provider, [MaybeNullWhen(false)] out string id)
+        public static bool TryGetProviderId(this IHasProviderIds instance, MetadataProvider provider, [NotNullWhen(true)] out string? id)
         {
             return instance.TryGetProviderId(provider.ToString(), out id);
         }