Skip to content

Commit

Permalink
Merge pull request #201 from AArnott/warningClean
Browse files Browse the repository at this point in the history
Fix compiler warnings
  • Loading branch information
Claire Novotny authored Mar 14, 2020
2 parents 0df8367 + 885e190 commit e258751
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pool:
variables:
BuildConfiguration: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
TreatWarningsAsErrors: true
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages

steps:
- task: UseDotNet@2
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pool:
variables:
BuildConfiguration: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
TreatWarningsAsErrors: true
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages

steps:
- task: UseDotNet@2
Expand Down
3 changes: 2 additions & 1 deletion src/InstallUtility/OptionalClaims.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using System.Text;
using System.Threading.Tasks;

#pragma warning disable IDE1006 // Naming Styles

namespace InstallUtility
{
public class OptionalClaims
Expand All @@ -17,5 +19,4 @@ public class ClaimInformation
public string source { get; set; }
public bool essential { get; set; }
}

}
3 changes: 2 additions & 1 deletion src/SignService/Services/AdminService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ static string GetRandomPassword()
return new string(builder);
}

#pragma warning disable IDE1006 // Naming Styles
class OptionalClaims
{
public ClaimInformation[] accessToken { get; set; }
Expand All @@ -337,6 +338,6 @@ class ClaimInformation
public string source { get; set; }
public bool essential { get; set; }
}

#pragma warning restore IDE1006 // Naming Styles
}
}
12 changes: 6 additions & 6 deletions src/SignService/Utils/CoreContractResolver.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
using System;
using System;
using Newtonsoft.Json.Serialization;

namespace SignService.Utils
{
public sealed class CoreContractResolver : DefaultContractResolver
{
readonly IServiceProvider _provider;
readonly IServiceProvider provider;

public CoreContractResolver(IServiceProvider provider)
{
_provider = provider;
this.provider = provider;
}

protected override JsonObjectContract CreateObjectContract(Type objectType)
{
var contract = base.CreateObjectContract(objectType);
var svc = _provider.GetService(objectType);
var svc = provider.GetService(objectType);
if (svc != null)
{
contract.DefaultCreator = () => _provider.GetService(objectType);
contract.DefaultCreator = () => provider.GetService(objectType);
}

return contract;
}

}
}
}

0 comments on commit e258751

Please sign in to comment.