Skip to content

Commit 669c811

Browse files
committedFeb 16, 2021
Cleanup of projects, frameworks
1 parent 035f9ff commit 669c811

File tree

11 files changed

+44
-41
lines changed

11 files changed

+44
-41
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.user
77
*.userosscache
88
*.sln.docstates
9+
.vscode/
910

1011
# User-specific files (MonoDevelop/Xamarin Studio)
1112
*.userprefs
@@ -139,7 +140,7 @@ publish/
139140
*.[Pp]ublish.xml
140141
*.azurePubxml
141142

142-
# TODO: Un-comment the next line if you do not want to checkin
143+
# TODO: Un-comment the next line if you do not want to checkin
143144
# your web deploy settings because they may include unencrypted
144145
# passwords
145146
#*.pubxml

‎Directory.Build.props

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<Project>
4+
<Import Project="version.props"/>
5+
6+
<PropertyGroup>
7+
<LangVersion>latest</LangVersion>
8+
<Nullable>disable</Nullable>
9+
<NoPackageAnalysis>true</NoPackageAnalysis>
10+
<Copyright>Copyright © Medidata Solutions, Inc. $([System.DateTime]::Now.Year)</Copyright>
11+
<Authors>Medidata Solutions</Authors>
12+
<RepositoryType>git</RepositoryType>
13+
<RepositoryUrl>https://github.com/mdsol/mauth-client-dotnet</RepositoryUrl>
14+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
15+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
16+
<Company>Medidata Solutions, Inc.</Company>
17+
<PackageProjectUrl>https://github.com/mdsol/mauth-client-dotnet</PackageProjectUrl>
18+
<PackageLicenseUrl>https://github.com/mdsol/mauth-client-dotnet/blob/master/LICENSE.md</PackageLicenseUrl>
19+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
20+
<Product>Medidata Platform</Product>
21+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
22+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
23+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
24+
<IncludeSourceRevisionInInformationalVersion>true</IncludeSourceRevisionInInformationalVersion>
25+
</PropertyGroup>
26+
27+
<ItemGroup>
28+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
29+
</ItemGroup>
30+
</Project>

‎build/common.props

-22
This file was deleted.

‎src/Medidata.MAuth.AspNetCore/Medidata.MAuth.AspNetCore.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\build\common.props" />
32

43
<PropertyGroup>
5-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netstandard2.0</TargetFramework>
65
<Description>This package contains an ASP.NET Core middleware to validate signed http requests with the Medidata MAuth protocol. The middleware communicates with an MAuth server in order to confirm the validity of the request authentication header. Include this package in your ASP.NET Core web api if you want to authenticate the api requests signed with the MAuth protocol.</Description>
76
<AssemblyTitle>Medidata.MAuth.AspNetCore</AssemblyTitle>
87
<AssemblyName>Medidata.MAuth.AspNetCore</AssemblyName>

‎src/Medidata.MAuth.Core/AsyncLazy.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Medidata.MAuth.Core
66
{
7-
public class AsyncLazy<T> : Lazy<Task<T>>
7+
internal class AsyncLazy<T> : Lazy<Task<T>>
88
{
99
public AsyncLazy(Func<T> valueFactory)
1010
: base(() => Task.Factory.StartNew(valueFactory))
@@ -18,7 +18,7 @@ public AsyncLazy(Func<Task<T>> taskFactory)
1818

1919
public TaskAwaiter<T> GetAwaiter() => Value.GetAwaiter();
2020

21-
public ConfiguredTaskAwaitable<T> ConfigureAwait(bool continueOnCapturedContext)
21+
public ConfiguredTaskAwaitable<T> ConfigureAwait(bool continueOnCapturedContext)
2222
=> Value.ConfigureAwait(continueOnCapturedContext);
2323
}
2424
}

‎src/Medidata.MAuth.Core/MAuthCoreExtensions.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Medidata.MAuth.Core
2020
internal static class MAuthCoreExtensions
2121
{
2222
/// <summary>
23-
/// Deserializes an <see cref="ApplicationInfo"/> object from a content of a Http message.
23+
/// Deserializes an <see cref="ApplicationInfo"/> object from a content of a Http message.
2424
/// </summary>
2525
/// <param name="content">The content to deserialize the information from.</param>
2626
/// <returns>A Task object which will result the application information when it completes.</returns>
@@ -32,23 +32,23 @@ public static async Task<ApplicationInfo> FromResponse(this HttpContent content)
3232
}
3333

3434
/// <summary>
35-
/// Converts a <see cref="DateTimeOffset"/> value to a Unix equivalent time value.
35+
/// Converts a <see cref="DateTimeOffset"/> value to a Unix equivalent time value.
3636
/// </summary>
3737
/// <param name="value">The date and time to be converted.</param>
3838
/// <returns>The total seconds elapsed from the Unix epoch (1970-01-01 00:00:00).</returns>
3939
public static long ToUnixTimeSeconds(this DateTimeOffset value) =>
4040
(long)(value - Constants.UnixEpoch).TotalSeconds;
4141

4242
/// <summary>
43-
/// Converts a <see cref="long"/> value that is a Unix time in seconds to a UTC <see cref="DateTimeOffset"/>.
43+
/// Converts a <see cref="long"/> value that is a Unix time in seconds to a UTC <see cref="DateTimeOffset"/>.
4444
/// </summary>
4545
/// <param name="value">The Unix time seconds to be converted.</param>
4646
/// <returns>The <see cref="DateTimeOffset"/> equivalent of the Unix time.</returns>
4747
public static DateTimeOffset FromUnixTimeSeconds(this long value) =>
4848
Constants.UnixEpoch.AddSeconds(value);
4949

5050
/// <summary>
51-
/// Returns the hyphenated representation of a <see cref="Guid"/> as a <see cref="string"/>.
51+
/// Returns the hyphenated representation of a <see cref="Guid"/> as a <see cref="string"/>.
5252
/// </summary>
5353
/// <param name="uuid">The <see cref="Guid"/> to convert to the hyphenated string.</param>
5454
/// <returns>The uuid in a format with hyphens.</returns>
@@ -66,7 +66,7 @@ public static string ToHyphenString(this Guid uuid) =>
6666
public static TValue GetFirstValueOrDefault<TValue>(this HttpHeaders headers, string key) =>
6767
headers.TryGetValues(key, out IEnumerable<string> values) ?
6868
(TValue)Convert.ChangeType(values.First(), typeof(TValue)) :
69-
default(TValue);
69+
default;
7070

7171
/// <summary>
7272
/// Provides an SHA512 hash value of a string.

‎src/Medidata.MAuth.Core/Medidata.MAuth.Core.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\build\common.props" />
32

43
<PropertyGroup>
54
<Description>A core package for Medidata HMAC protocol implementation. This package contains the core functionality which used by the MAuth authentication protocol-specific components. This package also can be used standalone if you want to sign HTTP/HTTPS requests with Medidata MAuth keys using the .NET HttpClient message handler mechanism.</Description>

‎src/Medidata.MAuth.Owin/Medidata.MAuth.Owin.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\build\common.props" />
32

43
<PropertyGroup>
54
<Description>This package contains an OWIN middleware to validate signed http requests with the Medidata MAuth protocol. The middleware communicates with an MAuth server in order to confirm the validity of the request authentication header. Include this package in your OWIN-enabled web api if you want to authenticate the api requests signed with the MAuth protocol.</Description>

‎src/Medidata.MAuth.WebApi/Medidata.MAuth.WebApi.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\build\common.props" />
32

43
<PropertyGroup>
54
<Description>This package contains an HTTP message handler to validate signed http requests with the Medidata MAuth protocol. The handler communicates with an MAuth server in order to confirm the validity of the request authentication header. Include this package in your WebAPI application if you want to authenticate the api requests signed with the MAuth protocol.</Description>

‎tests/Medidata.MAuth.Tests/Medidata.MAuth.Tests.csproj

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
<PropertyGroup>
44
<Description>Assembly which contains unit tests of the Medidata.MAuth framework.</Description>
5-
<Copyright>Copyright © Medidata Solutions, Inc. 2017</Copyright>
65
<AssemblyTitle>Medidata.MAuth.Tests</AssemblyTitle>
7-
<Authors>Medidata Solutions, Inc.</Authors>
86
<TargetFrameworks>net461;netcoreapp2.1;net5.0</TargetFrameworks>
97
<AssemblyName>Medidata.MAuth.Tests</AssemblyName>
10-
<PackageId>Medidata.MAuth.Tests</PackageId>
11-
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
8+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
9+
<GenerateDocumentationFile>false</GenerateDocumentationFile>
1210
</PropertyGroup>
1311

1412
<ItemGroup>
@@ -75,7 +73,7 @@
7573
<Compile Remove="MAuthOwinTests.cs" />
7674
<Compile Remove="MAuthWebApiTests.cs" />
7775
</ItemGroup>
78-
76+
7977
<ItemGroup>
8078
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.1" />
8179
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />

‎version.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<Version>5.1.0</Version>
4+
<Version>5.2.0</Version>
55
</PropertyGroup>
66
</Project>

0 commit comments

Comments
 (0)
Please sign in to comment.