-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address all fxcop violations and wire up command line support to run it in CI #7
Changes from all commits
4adf259
ea4e86a
f86c49e
bf3d391
bc0b94c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames", Justification="We do give it strong name and sign it when build in CI server and verify it")] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Scope = "member", Target = "Microsoft.Rest.TransientFaultHandling.ShouldRetryHandler.#Invoke(System.Int32,System.Exception,System.TimeSpan&)")] | ||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames", Justification="We do give it strong name and sign it when build in CI server and verify it")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would just say |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,11 @@ | |
|
||
namespace Microsoft.Rest | ||
{ | ||
public class PlatformTaskEx | ||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", | ||
"CA1711:IdentifiersShouldNotHaveIncorrectSuffix", | ||
Justification="We think with Ex is better than using 2")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, it is providing a platform neutral way of calling Task or TaskEx. We could just call it PlatformTask. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree. |
||
public static class PlatformTaskEx | ||
{ | ||
//Per FxCop performance rule to prevent the compiler from generating a default constructor. | ||
private PlatformTaskEx() { } | ||
|
||
public static Task FromResult(object result) | ||
{ | ||
#if NET45 | ||
|
@@ -21,12 +21,12 @@ public static Task FromResult(object result) | |
#endif | ||
} | ||
|
||
public static Task Delay(TimeSpan delay) | ||
public static Task Delay(TimeSpan delayTime) | ||
{ | ||
#if NET45 | ||
return Task.Delay(delay); | ||
return Task.Delay(delayTime); | ||
#else | ||
return TaskEx.Delay(delay); | ||
return TaskEx.Delay(delayTime); | ||
#endif | ||
} | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just say
"Signed before publishing."