Skip to content

Commit

Permalink
IsPackable set via Directory.Build.props
Browse files Browse the repository at this point in the history
  • Loading branch information
gfoidl committed May 17, 2021
1 parent 8d183cb commit 5b8213f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
9 changes: 7 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
<Project>
<PropertyGroup>
<MinClientVersion>2.12</MinClientVersion>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<Authors>MyCSharp.de, Benjamin Abt, Günther Foidl and Contributors</Authors>
<PackageProjectUrl>https://github.com/mycsharp/HttpUserAgentParser</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<DefaultLanguage>en-US</DefaultLanguage>
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
<Description>HTTP User Agent Parser for .NET</Description>
<NoPackageAnalysis>true</NoPackageAnalysis>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<DebugType>embedded</DebugType>
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
<IsBenchmarkProject>$(MsBuildProjectName.Contains('Benchmark'))</IsBenchmarkProject>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true'">
<IsPackable>true</IsPackable>
<GenerateDocumentationFile Condition="'$(Configuration)' == 'Release'">true</GenerateDocumentationFile>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<Product>HTTP User Agent Parser Extensions for ASP.NET Core</Product>
<Description>HTTP User Agent Parser Extensions for ASP.NET Core</Description>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace MyCSharp.HttpUserAgentParser.MemoryCache
{
/// <inheritdoc/>
public class HttpUserAgentParserMemoryCachedProvider : IHttpUserAgentParserProvider
{
private readonly IMemoryCache _memoryCache;
Expand All @@ -17,6 +18,7 @@ public HttpUserAgentParserMemoryCachedProvider(IMemoryCache memoryCache, HttpUse
_options = options;
}

/// <inheritdoc/>
public HttpUserAgentInformation Parse(string userAgent)
{
CacheKey key = this.GetKey(userAgent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<Product>HTTP User Agent Parser Extensions for IMemoryCache</Product>
<Description>HTTP User Agent Parser Extensions for IMemoryCache</Description>
<TargetFramework>netstandard2.1</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<Product>HTTP User Agent Parser</Product>
<Description>Parses user agents for Browser, Platform and Bots.</Description>
<TargetFramework>netstandard2.1</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
// Copyright © myCSharp 2020-2021, all rights reserved
// Copyright © myCSharp 2020-2021, all rights reserved

namespace MyCSharp.HttpUserAgentParser.Providers
{
/// <summary>
/// Provides the basic parsing of user agent strings.
/// </summary>
public interface IHttpUserAgentParserProvider
{
/// <summary>
/// Parsed the <paramref name="userAgent"/>-string.
/// </summary>
/// <param name="userAgent">The user agent to parse.</param>
/// <returns>The parsed user agent information</returns>
HttpUserAgentInformation Parse(string userAgent);
}
}
}

0 comments on commit 5b8213f

Please sign in to comment.