Enforce rule IDE0005 on build

This commit is contained in:
Bogdan 2023-05-24 03:18:39 +03:00
parent f05405fe1c
commit 7c07f14fe7
3 changed files with 14 additions and 7 deletions

View File

@ -30,6 +30,13 @@
<!-- A test project gets the test sdk packages automatically added --> <!-- A test project gets the test sdk packages automatically added -->
<TestProject>false</TestProject> <TestProject>false</TestProject>
<TestProject Condition="$(MSBuildProjectName.EndsWith('.Test'))">true</TestProject> <TestProject Condition="$(MSBuildProjectName.EndsWith('.Test'))">true</TestProject>
<!-- XML documentation comments are needed to enforce rule IDE0005 on build -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!--
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
-->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View File

@ -29,7 +29,7 @@ namespace NzbDrone.Common.OAuth
public virtual string Version { get; set; } public virtual string Version { get; set; }
public virtual string SessionHandle { get; set; } public virtual string SessionHandle { get; set; }
/// <seealso cref="http://oauth.net/core/1.0#request_urls"/> /// <seealso href="http://oauth.net/core/1.0#request_urls"/>
public virtual string RequestUrl { get; set; } public virtual string RequestUrl { get; set; }
#if !WINRT #if !WINRT

View File

@ -35,13 +35,13 @@ namespace NzbDrone.Core.Indexers.TorrentRss
/// </summary> /// </summary>
/// <param name="settings">Indexer Settings to use for Parser</param> /// <param name="settings">Indexer Settings to use for Parser</param>
/// <returns>Parsed Settings or <c>null</c></returns> /// <returns>Parsed Settings or <c>null</c></returns>
public TorrentRssIndexerParserSettings Detect(TorrentRssIndexerSettings indexerSettings) public TorrentRssIndexerParserSettings Detect(TorrentRssIndexerSettings settings)
{ {
_logger.Debug("Evaluating TorrentRss feed '{0}'", indexerSettings.BaseUrl); _logger.Debug("Evaluating TorrentRss feed '{0}'", settings.BaseUrl);
try try
{ {
var requestGenerator = new TorrentRssIndexerRequestGenerator { Settings = indexerSettings }; var requestGenerator = new TorrentRssIndexerRequestGenerator { Settings = settings };
var request = requestGenerator.GetRecentRequests().GetAllTiers().First().First(); var request = requestGenerator.GetRecentRequests().GetAllTiers().First().First();
HttpResponse httpResponse = null; HttpResponse httpResponse = null;
@ -56,14 +56,14 @@ namespace NzbDrone.Core.Indexers.TorrentRss
} }
var indexerResponse = new IndexerResponse(request, httpResponse); var indexerResponse = new IndexerResponse(request, httpResponse);
return GetParserSettings(indexerResponse, indexerSettings); return GetParserSettings(indexerResponse, settings);
} }
catch (Exception ex) catch (Exception ex)
{ {
ex.WithData("FeedUrl", indexerSettings.BaseUrl); ex.WithData("FeedUrl", settings.BaseUrl);
throw; throw;
} }
} }
private TorrentRssIndexerParserSettings GetParserSettings(IndexerResponse response, TorrentRssIndexerSettings indexerSettings) private TorrentRssIndexerParserSettings GetParserSettings(IndexerResponse response, TorrentRssIndexerSettings indexerSettings)
{ {