Skip to content

Commit

Permalink
Fix failures in build.sh
Browse files Browse the repository at this point in the history
build.sh was failing to build due to different the code being updated with C#7 syntax instead of C#6. This commit reverts those syntax changes. More detail #48 (comment)
  • Loading branch information
JakeQuilty committed May 27, 2020
1 parent a120722 commit ca74f0f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
8 changes: 6 additions & 2 deletions conjur-api/ApiConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public int HttpRequestTimeout {
}
return httpRequestTimeout.Value;
}
set => httpRequestTimeout = value;
set {
httpRequestTimeout = value;
}
}

private uint? tokenRefreshTimeout = null;
Expand All @@ -70,7 +72,9 @@ public uint TokenRefreshTimeout {
}
return tokenRefreshTimeout.Value;
}
set => tokenRefreshTimeout = value;
set {
tokenRefreshTimeout = value;
}
}

private class Nested
Expand Down
10 changes: 6 additions & 4 deletions conjur-api/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ internal Client(Client other, string role) : this(other.ApplianceUri.AbsoluteUri
/// <value>The credential of user name and API key, where user name is
/// for example "bob" or "host/jenkins".</value>
public NetworkCredential Credential {
set => this.Authenticator = new ApiKeyAuthenticator (
new Uri (this.ApplianceUri + "authn"),
this.GetAccountName (),
value);
set {
this.Authenticator = new ApiKeyAuthenticator (
new Uri (this.ApplianceUri + "authn"),
this.GetAccountName (),
value);
}
}

/// <summary>
Expand Down
30 changes: 24 additions & 6 deletions test/WebMocker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,36 @@ public class MockRequest : WebRequest
public override Uri RequestUri => uri;

public override string Method {
get => this.method;
set => this.method = value;
get
{
return this.method;
}
set
{
this.method = value;
}
}

public override bool PreAuthenticate {
get => base.PreAuthenticate;
set => base.PreAuthenticate = value;
get
{
return base.PreAuthenticate;
}
set
{
base.PreAuthenticate = value;
}
}

public override ICredentials Credentials {
get => credentials;
set => credentials = value;
get
{
return credentials;
}
set
{
credentials = value;
}
}

public Action<WebRequest> Verifier;
Expand Down

0 comments on commit ca74f0f

Please sign in to comment.