Skip to content

Commit

Permalink
Add missing SecurityCritical attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Zuber committed Oct 13, 2016
1 parent 4bd3a44 commit 4be25ba
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Octokit/Exceptions/ApiException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Runtime.Serialization;
using System.Security;
using Octokit.Internal;

namespace Octokit
Expand Down Expand Up @@ -158,6 +159,7 @@ protected ApiException(SerializationInfo info, StreamingContext context)
ApiError = (ApiError) info.GetValue("ApiError", typeof(ApiError));
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/RateLimitExceededException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -94,6 +95,7 @@ protected RateLimitExceededException(SerializationInfo info, StreamingContext co
?? new RateLimit(new Dictionary<string, string>());
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/RepositoryExistsException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -117,6 +118,7 @@ protected RepositoryExistsException(SerializationInfo info, StreamingContext con
ExistingRepositoryWebUrl = (Uri) info.GetValue("ExistingRepositoryWebUrl", typeof(Uri));
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/RepositoryFormatException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -51,6 +52,7 @@ protected RepositoryFormatException(SerializationInfo info, StreamingContext con
message = info.GetString("Message");
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/RepositoryWebHookConfigException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -48,6 +49,7 @@ protected RepositoryWebHookConfigException(SerializationInfo info, StreamingCont
message = info.GetString("Message");
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/TwoFactorAuthorizationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -80,6 +81,7 @@ protected TwoFactorAuthorizationException(SerializationInfo info, StreamingConte
TwoFactorType = (TwoFactorType) info.GetInt32("TwoFactorType");
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
3 changes: 2 additions & 1 deletion Octokit/Exceptions/TwoFactorChallengeFailedException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -64,7 +65,7 @@ protected TwoFactorChallengeFailedException(SerializationInfo info, StreamingCon
if (info == null) return;
AuthorizationCode = info.GetString("AuthorizationCode");
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Http/RateLimit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.Serialization;
using System.Security;
using Octokit.Helpers;
using Octokit.Internal;

Expand Down Expand Up @@ -82,6 +83,7 @@ protected RateLimit(SerializationInfo info, StreamingContext context)
ResetAsUtcEpochSeconds = info.GetInt64("ResetAsUtcEpochSeconds");
}

[SecurityCritical]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
Ensure.ArgumentNotNull(info, "info");
Expand Down

0 comments on commit 4be25ba

Please sign in to comment.