From efffbaeabc6d53c4c1ec05b11cea58331ff38e3c Mon Sep 17 00:00:00 2001 From: JoannaaKL Date: Fri, 2 Jun 2023 21:47:59 +0200 Subject: [PATCH] Add utf8 with bom (#2641) * Change default file encoding --- .editorconfig | 9 --- src/.editorconfig | 2 +- src/Runner.Common/ActionCommand.cs | 2 +- src/Runner.Common/ActionResult.cs | 4 +- src/Runner.Common/BrokerServer.cs | 2 +- src/Runner.Common/CommandLineParser.cs | 2 +- src/Runner.Common/ConfigurationStore.cs | 2 +- src/Runner.Common/Constants.cs | 2 +- src/Runner.Common/ExtensionManager.cs | 2 +- src/Runner.Common/HostContext.cs | 2 +- src/Runner.Common/HostTraceListener.cs | 2 +- src/Runner.Common/HttpClientHandlerFactory.cs | 4 +- src/Runner.Common/JobNotification.cs | 8 +- src/Runner.Common/JobServer.cs | 2 +- src/Runner.Common/JobServerQueue.cs | 2 +- src/Runner.Common/JobStatusEventArgs.cs | 2 +- src/Runner.Common/LaunchServer.cs | 2 +- src/Runner.Common/Logging.cs | 2 +- src/Runner.Common/ProcessInvoker.cs | 2 +- src/Runner.Common/ResultsServer.cs | 2 +- src/Runner.Common/RunServer.cs | 2 +- src/Runner.Common/RunnerDotcomServer.cs | 2 +- src/Runner.Common/RunnerServer.cs | 2 +- src/Runner.Common/RunnerService.cs | 2 +- src/Runner.Common/StdoutTraceListener.cs | 4 +- src/Runner.Common/ThrottlingReportHandler.cs | 2 +- src/Runner.Common/TraceManager.cs | 2 +- src/Runner.Common/Tracing.cs | 2 +- src/Runner.Common/Unit.cs | 4 +- src/Runner.Common/Util/EncodingUtil.cs | 2 +- src/Runner.Common/Util/EnumUtil.cs | 2 +- src/Runner.Common/Util/MessageUtil.cs | 2 +- src/Runner.Common/Util/VarUtil.cs | 2 +- src/Runner.Listener/BrokerMessageListener.cs | 2 +- src/Runner.Listener/Checks/ActionsCheck.cs | 4 +- src/Runner.Listener/Checks/CheckUtil.cs | 4 +- src/Runner.Listener/Checks/GitCheck.cs | 2 +- src/Runner.Listener/Checks/ICheckExtension.cs | 4 +- src/Runner.Listener/Checks/InternetCheck.cs | 4 +- src/Runner.Listener/Checks/NodeJsCheck.cs | 2 +- src/Runner.Listener/CommandSettings.cs | 2 +- .../Configuration/ConfigurationManager.cs | 2 +- .../Configuration/CredentialManager.cs | 2 +- .../NativeWindowsServiceHelper.cs | 2 +- .../Configuration/PromptManager.cs | 2 +- .../RSAEncryptedFileKeyManager.cs | 2 +- .../Configuration/RSAFileKeyManager.cs | 2 +- .../Configuration/ServiceControlManager.cs | 14 ++-- .../Configuration/SystemdControlManager.cs | 2 +- .../Configuration/Validators.cs | 2 +- .../WindowsServiceControlManager.cs | 2 +- src/Runner.Listener/InternalsVisibleTo.cs | 2 +- src/Runner.Listener/JobDispatcher.cs | 2 +- src/Runner.Listener/MessageListener.cs | 2 +- src/Runner.Listener/Program.cs | 2 +- src/Runner.Listener/Runner.cs | 2 +- src/Runner.Listener/RunnerJobRequestRef.cs | 2 +- src/Runner.Listener/SelfUpdater.cs | 2 +- src/Runner.PluginHost/Program.cs | 2 +- .../Artifact/FileContainerServer.cs | 2 +- .../Artifact/PipelinesServer.cs | 4 +- .../Artifact/PublishArtifact.cs | 6 +- .../Repository/GitCliManager.cs | 2 +- .../Repository/v1.0/GitSourceProvider.cs | 2 +- .../Repository/v1.0/RepositoryPlugin.cs | 2 +- .../Repository/v1.1/GitSourceProvider.cs | 2 +- .../Repository/v1.1/RepositoryPlugin.cs | 2 +- src/Runner.Sdk/ActionPlugin.cs | 20 ++--- src/Runner.Sdk/BuildConstants.cs | 2 +- src/Runner.Sdk/ProcessInvoker.cs | 2 +- src/Runner.Sdk/RunnerWebProxy.cs | 2 +- src/Runner.Sdk/Util/ArgUtil.cs | 2 +- src/Runner.Sdk/Util/IOUtil.cs | 2 +- src/Runner.Sdk/Util/PathUtil.cs | 2 +- src/Runner.Sdk/Util/StringUtil.cs | 2 +- src/Runner.Sdk/Util/UrlUtil.cs | 2 +- src/Runner.Sdk/Util/WhichUtil.cs | 4 +- src/Runner.Service/Windows/Program.cs | 2 +- src/Runner.Worker/ActionCommandManager.cs | 2 +- src/Runner.Worker/ActionManager.cs | 2 +- src/Runner.Worker/ActionManifestManager.cs | 4 +- src/Runner.Worker/ActionNotFoundException.cs | 4 +- src/Runner.Worker/ActionRunner.cs | 2 +- src/Runner.Worker/ConditionTraceWriter.cs | 2 +- .../Container/ContainerHooks/HookInput.cs | 2 +- .../Container/ContainerHooks/HookResponse.cs | 2 +- src/Runner.Worker/Container/DockerUtil.cs | 2 +- src/Runner.Worker/DiagnosticLogManager.cs | 2 +- src/Runner.Worker/ExecutionContext.cs | 2 +- .../Expressions/HashFilesFunction.cs | 4 +- src/Runner.Worker/FileCommandManager.cs | 4 +- src/Runner.Worker/GitHubContext.cs | 2 +- src/Runner.Worker/GlobalContext.cs | 2 +- .../Handlers/CompositeActionHandler.cs | 2 +- src/Runner.Worker/Handlers/Handler.cs | 4 +- .../Handlers/NodeScriptActionHandler.cs | 2 +- src/Runner.Worker/Handlers/OutputManager.cs | 2 +- .../Handlers/ScriptHandlerHelpers.cs | 2 +- src/Runner.Worker/IEnvironmentContextData.cs | 2 +- src/Runner.Worker/IssueMatcher.cs | 6 +- src/Runner.Worker/JobContext.cs | 4 +- src/Runner.Worker/JobExtension.cs | 2 +- src/Runner.Worker/JobExtensionRunner.cs | 2 +- src/Runner.Worker/JobRunner.cs | 2 +- src/Runner.Worker/RunnerContext.cs | 4 +- src/Runner.Worker/StepsContext.cs | 2 +- src/Runner.Worker/StepsRunner.cs | 2 +- src/Runner.Worker/Variables.cs | 2 +- .../Authentication/FederatedCredential.cs | 2 +- .../Authentication/IssuedTokenProvider.cs | 4 +- .../Common/GenerateConstantAttributes.cs | 2 +- .../Common/RawClientHttpRequestSettings.cs | 2 +- src/Sdk/Common/Common/RawHttpHeaders.cs | 2 +- .../Common/Common/RawHttpMessageHandler.cs | 2 +- src/Sdk/Common/Common/Utility/ArrayUtility.cs | 6 +- src/Sdk/Common/Common/Utility/HttpHeaders.cs | 2 +- .../Common/Utility/PropertyValidation.cs | 2 +- .../Common/Common/Utility/SecretUtility.cs | 2 +- src/Sdk/Common/Common/Utility/StreamParser.cs | 6 +- src/Sdk/Common/Common/Utility/UriUtility.cs | 58 +++++++-------- .../Common/Utility/VssStringComparer.cs | 6 +- src/Sdk/Common/Common/Utility/XmlUtility.cs | 2 +- src/Sdk/Common/Common/VssCommonConstants.cs | 2 +- src/Sdk/Common/Common/VssException.cs | 6 +- .../Common/Common/VssHttpMessageHandler.cs | 2 +- .../Common/Common/VssHttpRequestSettings.cs | 2 +- src/Sdk/Common/Common/VssHttpRetryOptions.cs | 2 +- .../Common/VssPerformanceEventSource.cs | 8 +- .../Expressions2/ExpressionParser.cs | 2 +- .../Expressions2/Sdk/Functions/FromJson.cs | 3 +- .../Expressions2/Sdk/Operators/Index.cs | 2 +- .../Generated/TaskHttpClientBase.cs | 4 +- src/Sdk/DTLogging/Logging/ValueEncoders.cs | 4 +- .../ObjectTemplating/Schema/Definition.cs | 2 +- .../ObjectTemplating/Schema/TemplateSchema.cs | 4 +- .../ObjectTemplating/TemplateReader.cs | 2 +- .../ObjectTemplating/Tokens/BooleanToken.cs | 4 +- .../ObjectTemplating/Tokens/NullToken.cs | 4 +- .../ObjectTemplating/Tokens/NumberToken.cs | 2 +- .../ObjectTemplating/Tokens/StringToken.cs | 20 ++--- .../ActionStepDefinitionReference.cs | 2 +- .../Pipelines/ContextData/JTokenExtensions.cs | 4 +- .../PipelineTemplateConstants.cs | 2 +- .../ObjectTemplating/YamlObjectReader.cs | 2 +- .../Pipelines/ResourceReference.cs | 2 +- .../Pipelines/RunnerShutdownMessage.cs | 4 +- src/Sdk/DTWebApi/WebApi/Exceptions.cs | 2 +- src/Sdk/DTWebApi/WebApi/JobEvent.cs | 4 +- .../DTWebApi/WebApi/ListRunnersResponse.cs | 2 +- src/Sdk/DTWebApi/WebApi/Runner.cs | 2 +- src/Sdk/DTWebApi/WebApi/RunnerGroup.cs | 2 +- .../DTWebApi/WebApi/RunnerRefreshMessage.cs | 2 +- src/Sdk/DTWebApi/WebApi/TaskAgentSession.cs | 2 +- src/Sdk/DTWebApi/WebApi/TaskAttachment.cs | 2 +- src/Sdk/DTWebApi/WebApi/TaskHttpClient.cs | 4 +- src/Sdk/DTWebApi/WebApi/TimelineRecord.cs | 2 +- .../WebApi/TimelineRecordFeedLinesWrapper.cs | 2 +- .../DTWebApi/WebApi/TimelineRecordLogLine.cs | 4 +- .../WellKnownDistributedTaskVariables.cs | 2 +- src/Sdk/InternalsVisibleTo.cs | 4 +- .../Contracts/ActionsStorageArtifact.cs | 2 +- src/Sdk/PipelinesWebApi/Contracts/Artifact.cs | 2 +- .../PipelinesWebApi/Contracts/ArtifactType.cs | 2 +- .../ArtifactTypeEnumJsonConverter.cs | 2 +- .../RSWebApi/Contracts/AcquireJobRequest.cs | 2 +- src/Sdk/RSWebApi/Contracts/Annotation.cs | 2 +- src/Sdk/RSWebApi/Contracts/AnnotationLevel.cs | 2 +- .../RSWebApi/Contracts/CompleteJobRequest.cs | 2 +- src/Sdk/RSWebApi/Contracts/IssueExtensions.cs | 2 +- src/Sdk/RSWebApi/Contracts/IssueKeys.cs | 2 +- src/Sdk/RSWebApi/Contracts/RenewJobRequest.cs | 2 +- .../RSWebApi/Contracts/RenewJobResponse.cs | 2 +- src/Sdk/RSWebApi/Contracts/StepResult.cs | 2 +- src/Sdk/RSWebApi/RunServiceHttpClient.cs | 2 +- src/Sdk/WebApi/WebApi/Attributes.cs | 2 +- src/Sdk/WebApi/WebApi/BrokerHttpClient.cs | 2 +- src/Sdk/WebApi/WebApi/Constants.cs | 2 +- src/Sdk/WebApi/WebApi/Contracts.cs | 2 +- .../Contracts/FileContainer/FileContainer.cs | 8 +- .../FileContainer/FileContainerItem.cs | 6 +- .../Contracts/Identity/IdentityDescriptor.cs | 2 +- .../Contracts/Location/AccessMapping.cs | 2 +- .../Contracts/Location/ConnectionData.cs | 2 +- .../Contracts/Location/ServiceDefinition.cs | 14 ++-- .../Contracts/Patch/AddPatchOperation.cs | 2 +- .../WebApi/Contracts/Patch/IPatchOperation.cs | 2 +- .../Contracts/Patch/ReplacePatchOperation.cs | 2 +- .../Contracts/Patch/TestPatchOperation.cs | 4 +- .../Contracts/Profile/AttributeDescriptor.cs | 4 +- .../Contracts/Profile/AttributesContainer.cs | 3 +- .../WebApi/Contracts/Profile/Profile.cs | 2 +- .../Contracts/Profile/ProfileQueryContext.cs | 10 +-- .../WebApi/Contracts/PropertiesCollection.cs | 2 +- .../Contracts/ReferenceLink/ReferenceLinks.cs | 2 +- .../Exceptions/FileContainerExceptions.cs | 8 +- .../Exceptions/VssApiResourceExceptions.cs | 2 +- .../WebApi/WebApi/HttpClients/Constants.cs | 2 +- .../HttpClients/FileContainerHttpClient.cs | 4 +- src/Sdk/WebApi/WebApi/JsonUtility.cs | 10 +-- src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs | 8 +- .../Jwt/JsonWebTokenValidationParameters.cs | 4 +- .../WebApi/Jwt/UnixEpochDateTimeConverter.cs | 2 +- src/Sdk/WebApi/WebApi/LaunchContracts.cs | 2 +- src/Sdk/WebApi/WebApi/LaunchHttpClient.cs | 2 +- src/Sdk/WebApi/WebApi/Location/Interfaces.cs | 8 +- .../WebApi/Location/LocationCacheManager.cs | 6 +- .../WebApi/WebApi/Location/LocationService.cs | 2 +- .../WebApi/Location/LocationXmlOperator.cs | 2 +- .../WebApi/Location/ServerDataProvider.cs | 2 +- .../WebApi/OAuth/VssOAuthAccessToken.cs | 2 +- .../OAuth/VssOAuthAccessTokenCredential.cs | 8 +- .../WebApi/OAuth/VssOAuthClientCredential.cs | 2 +- src/Sdk/WebApi/WebApi/RawConnection.cs | 2 +- src/Sdk/WebApi/WebApi/RawHttpClientBase.cs | 2 +- src/Sdk/WebApi/WebApi/RawHttpClientResult.cs | 2 +- src/Sdk/WebApi/WebApi/ResourceLocationIds.cs | 2 +- src/Sdk/WebApi/WebApi/ResultsHttpClient.cs | 2 +- src/Sdk/WebApi/WebApi/TaskExtensions.cs | 2 +- .../WebApi/Utilities/BaseSecuredObject.cs | 2 +- .../XmlSerializableDataContractExtensions.cs | 2 +- .../WebApi/VssClientHttpRequestSettings.cs | 4 +- src/Sdk/WebApi/WebApi/VssEventId.cs | 6 +- src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs | 2 +- .../WebApi/WebApi/VssJsonCollectionWrapper.cs | 6 +- src/Sdk/WebApi/WebApi/VssResponseContext.cs | 2 +- .../WebApi/VssServiceResponseException.cs | 2 +- .../WebApi/WebApi/VssSigningCredentials.cs | 2 +- src/Test/L0/Container/DockerUtilL0.cs | 2 +- .../WebApi/TimelineRecordL0.cs | 2 +- src/Test/L0/Listener/CommandSettingsL0.cs | 12 +-- .../Configuration/ConfigurationManagerL0.cs | 2 +- .../Configuration/PromptManagerTestsL0.cs | 2 +- .../Configuration/RunnerCredentialL0.cs | 2 +- src/Test/L0/Listener/JobDispatcherL0.cs | 2 +- src/Test/L0/Listener/RunnerL0.cs | 16 ++-- src/Test/L0/Listener/SelfUpdaterL0.cs | 2 +- src/Test/L0/PagingLoggerL0.cs | 4 +- src/Test/L0/ProcessInvokerL0.cs | 4 +- src/Test/L0/RunnerWebProxyL0.cs | 2 +- .../L0/Sdk/RSWebApi/AcquireJobRequestL0.cs | 2 +- src/Test/L0/Sdk/RSWebApi/AnnotationsL0.cs | 2 +- src/Test/L0/ServiceControlManagerL0.cs | 74 +++++++++---------- src/Test/L0/ServiceInterfacesL0.cs | 2 +- src/Test/L0/Util/ArgUtilL0.cs | 2 +- src/Test/L0/Util/IOUtilL0.cs | 2 +- src/Test/L0/Util/UrlUtilL0.cs | 2 +- src/Test/L0/Util/VssUtilL0.cs | 2 +- src/Test/L0/Util/WhichUtilL0.cs | 4 +- src/Test/L0/Worker/ActionCommandManagerL0.cs | 2 +- src/Test/L0/Worker/ActionManagerL0.cs | 4 +- src/Test/L0/Worker/ActionManifestManagerL0.cs | 2 +- src/Test/L0/Worker/ActionRunnerL0.cs | 2 +- .../L0/Worker/ContainerOperationProviderL0.cs | 4 +- .../L0/Worker/CreateStepSummaryCommandL0.cs | 2 +- src/Test/L0/Worker/ExecutionContextL0.cs | 2 +- .../Expressions/ConditionFunctionsL0.cs | 2 +- src/Test/L0/Worker/HandlerL0.cs | 2 +- src/Test/L0/Worker/IssueMatcherL0.cs | 2 +- src/Test/L0/Worker/JobExtensionL0.cs | 22 +++--- src/Test/L0/Worker/JobRunnerL0.cs | 14 ++-- src/Test/L0/Worker/OutputManagerL0.cs | 2 +- .../L0/Worker/PipelineDirectoryManagerL0.cs | 2 +- src/Test/L0/Worker/SaveStateFileCommandL0.cs | 2 +- src/Test/L0/Worker/SetEnvFileCommandL0.cs | 2 +- src/Test/L0/Worker/SetOutputFileCommandL0.cs | 2 +- src/Test/L0/Worker/StepHostL0.cs | 2 +- src/Test/L0/Worker/StepsRunnerL0.cs | 2 +- src/Test/L0/Worker/VariablesL0.cs | 2 +- 268 files changed, 477 insertions(+), 488 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 76e6ed4e6..000000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -# https://editorconfig.org/ - -[*] -charset = utf-8 # Set default charset to utf-8 -insert_final_newline = true # ensure all files end with a single newline -trim_trailing_whitespace = true # attempt to remove trailing whitespace on save - -[*.md] -trim_trailing_whitespace = false # in markdown, "two trailing spaces" is unfortunately meaningful; it means `
` diff --git a/src/.editorconfig b/src/.editorconfig index f5a86e66b..863bd3fcb 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -1,5 +1,5 @@ [*.cs] -charset = utf-8 +charset = utf-8-bom insert_final_newline = true csharp_new_line_before_else = true diff --git a/src/Runner.Common/ActionCommand.cs b/src/Runner.Common/ActionCommand.cs index 0ed1362ac..080f613cc 100644 --- a/src/Runner.Common/ActionCommand.cs +++ b/src/Runner.Common/ActionCommand.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Sdk; +using GitHub.Runner.Sdk; using System; using System.Collections.Generic; diff --git a/src/Runner.Common/ActionResult.cs b/src/Runner.Common/ActionResult.cs index bb1622d67..3992ae1df 100644 --- a/src/Runner.Common/ActionResult.cs +++ b/src/Runner.Common/ActionResult.cs @@ -1,4 +1,4 @@ -namespace GitHub.Runner.Common +namespace GitHub.Runner.Common { public enum ActionResult { @@ -10,4 +10,4 @@ namespace GitHub.Runner.Common Skipped = 3 } -} \ No newline at end of file +} diff --git a/src/Runner.Common/BrokerServer.cs b/src/Runner.Common/BrokerServer.cs index bb0691771..f3a3a5715 100644 --- a/src/Runner.Common/BrokerServer.cs +++ b/src/Runner.Common/BrokerServer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/src/Runner.Common/CommandLineParser.cs b/src/Runner.Common/CommandLineParser.cs index abcd8bd4d..7880f65f3 100644 --- a/src/Runner.Common/CommandLineParser.cs +++ b/src/Runner.Common/CommandLineParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using GitHub.DistributedTask.Logging; using GitHub.Runner.Sdk; diff --git a/src/Runner.Common/ConfigurationStore.cs b/src/Runner.Common/ConfigurationStore.cs index 3dd5a8032..ae9f4cc7e 100644 --- a/src/Runner.Common/ConfigurationStore.cs +++ b/src/Runner.Common/ConfigurationStore.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Sdk; +using GitHub.Runner.Sdk; using System; using System.IO; using System.Linq; diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs index 95b3039d0..a022d7484 100644 --- a/src/Runner.Common/Constants.cs +++ b/src/Runner.Common/Constants.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace GitHub.Runner.Common { diff --git a/src/Runner.Common/ExtensionManager.cs b/src/Runner.Common/ExtensionManager.cs index 340b52676..2b7810eca 100644 --- a/src/Runner.Common/ExtensionManager.cs +++ b/src/Runner.Common/ExtensionManager.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Sdk; +using GitHub.Runner.Sdk; using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/Runner.Common/HostContext.cs b/src/Runner.Common/HostContext.cs index 4d9ff24c5..d8d912178 100644 --- a/src/Runner.Common/HostContext.cs +++ b/src/Runner.Common/HostContext.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Runner.Common/HostTraceListener.cs b/src/Runner.Common/HostTraceListener.cs index 90ef9938a..c1953d889 100644 --- a/src/Runner.Common/HostTraceListener.cs +++ b/src/Runner.Common/HostTraceListener.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Sdk; +using GitHub.Runner.Sdk; using System; using System.Diagnostics; using System.Globalization; diff --git a/src/Runner.Common/HttpClientHandlerFactory.cs b/src/Runner.Common/HttpClientHandlerFactory.cs index 010bb0396..4e0a88db7 100644 --- a/src/Runner.Common/HttpClientHandlerFactory.cs +++ b/src/Runner.Common/HttpClientHandlerFactory.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net.Http; using GitHub.Runner.Sdk; @@ -24,4 +24,4 @@ namespace GitHub.Runner.Common return client; } } -} \ No newline at end of file +} diff --git a/src/Runner.Common/JobNotification.cs b/src/Runner.Common/JobNotification.cs index c171e4e69..73d075741 100644 --- a/src/Runner.Common/JobNotification.cs +++ b/src/Runner.Common/JobNotification.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net; using System.Net.Sockets; using System.Text; @@ -37,10 +37,10 @@ namespace GitHub.Runner.Common { ConnectMonitor(monitorSocketAddress); } - + private void StartMonitor(Guid jobId, string accessToken, Uri serverUri) { - if(String.IsNullOrEmpty(accessToken)) + if (String.IsNullOrEmpty(accessToken)) { Trace.Info("No access token could be retrieved to start the monitor."); return; @@ -82,7 +82,7 @@ namespace GitHub.Runner.Common _monitorSocket.Send(Encoding.UTF8.GetBytes(message)); Trace.Info("Finished EndMonitor writing to socket"); - await Task.Delay(TimeSpan.FromSeconds(2)); + await Task.Delay(TimeSpan.FromSeconds(2)); } } catch (SocketException e) diff --git a/src/Runner.Common/JobServer.cs b/src/Runner.Common/JobServer.cs index a66260999..ec90d879c 100644 --- a/src/Runner.Common/JobServer.cs +++ b/src/Runner.Common/JobServer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Runner.Common/JobServerQueue.cs b/src/Runner.Common/JobServerQueue.cs index d494645f1..5717894bf 100644 --- a/src/Runner.Common/JobServerQueue.cs +++ b/src/Runner.Common/JobServerQueue.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; diff --git a/src/Runner.Common/JobStatusEventArgs.cs b/src/Runner.Common/JobStatusEventArgs.cs index 3e59fbf00..5f3bdedda 100644 --- a/src/Runner.Common/JobStatusEventArgs.cs +++ b/src/Runner.Common/JobStatusEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; using GitHub.DistributedTask.WebApi; namespace GitHub.Runner.Common diff --git a/src/Runner.Common/LaunchServer.cs b/src/Runner.Common/LaunchServer.cs index 338e5b884..e1b1b0f4f 100644 --- a/src/Runner.Common/LaunchServer.cs +++ b/src/Runner.Common/LaunchServer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/src/Runner.Common/Logging.cs b/src/Runner.Common/Logging.cs index 0bc2a13f0..9200ca592 100644 --- a/src/Runner.Common/Logging.cs +++ b/src/Runner.Common/Logging.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace GitHub.Runner.Common diff --git a/src/Runner.Common/ProcessInvoker.cs b/src/Runner.Common/ProcessInvoker.cs index 7b5fbb7fc..021c6db5e 100644 --- a/src/Runner.Common/ProcessInvoker.cs +++ b/src/Runner.Common/ProcessInvoker.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Common.Util; +using GitHub.Runner.Common.Util; using GitHub.Runner.Sdk; using System; using System.Collections.Generic; diff --git a/src/Runner.Common/ResultsServer.cs b/src/Runner.Common/ResultsServer.cs index 9ba49349d..4b5afb557 100644 --- a/src/Runner.Common/ResultsServer.cs +++ b/src/Runner.Common/ResultsServer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http.Headers; diff --git a/src/Runner.Common/RunServer.cs b/src/Runner.Common/RunServer.cs index 47cd62b63..3bd60ece0 100644 --- a/src/Runner.Common/RunServer.cs +++ b/src/Runner.Common/RunServer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/src/Runner.Common/RunnerDotcomServer.cs b/src/Runner.Common/RunnerDotcomServer.cs index 41cc0816d..64cef9255 100644 --- a/src/Runner.Common/RunnerDotcomServer.cs +++ b/src/Runner.Common/RunnerDotcomServer.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; using System; using System.Collections.Generic; using System.Threading; diff --git a/src/Runner.Common/RunnerServer.cs b/src/Runner.Common/RunnerServer.cs index 8ba6cee1b..620b893e8 100644 --- a/src/Runner.Common/RunnerServer.cs +++ b/src/Runner.Common/RunnerServer.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; using System; using System.Collections.Generic; using System.Threading; diff --git a/src/Runner.Common/RunnerService.cs b/src/Runner.Common/RunnerService.cs index 4694af1ce..a18ff9674 100644 --- a/src/Runner.Common/RunnerService.cs +++ b/src/Runner.Common/RunnerService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using GitHub.Runner.Sdk; diff --git a/src/Runner.Common/StdoutTraceListener.cs b/src/Runner.Common/StdoutTraceListener.cs index 26822c545..150263ac7 100644 --- a/src/Runner.Common/StdoutTraceListener.cs +++ b/src/Runner.Common/StdoutTraceListener.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.Globalization; using System.IO; @@ -93,4 +93,4 @@ namespace GitHub.Runner.Common IndentLevel--; } } -} \ No newline at end of file +} diff --git a/src/Runner.Common/ThrottlingReportHandler.cs b/src/Runner.Common/ThrottlingReportHandler.cs index 7b08ae0db..7617bdeef 100644 --- a/src/Runner.Common/ThrottlingReportHandler.cs +++ b/src/Runner.Common/ThrottlingReportHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; diff --git a/src/Runner.Common/TraceManager.cs b/src/Runner.Common/TraceManager.cs index 1321d10b2..2da4fc6c3 100644 --- a/src/Runner.Common/TraceManager.cs +++ b/src/Runner.Common/TraceManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Diagnostics; using GitHub.DistributedTask.Logging; diff --git a/src/Runner.Common/Tracing.cs b/src/Runner.Common/Tracing.cs index 7a5845db6..3cc1d0393 100644 --- a/src/Runner.Common/Tracing.cs +++ b/src/Runner.Common/Tracing.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json; +using Newtonsoft.Json; using System; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Runner.Common/Unit.cs b/src/Runner.Common/Unit.cs index 31f4ad55f..7ebc0fbeb 100644 --- a/src/Runner.Common/Unit.cs +++ b/src/Runner.Common/Unit.cs @@ -1,8 +1,8 @@ -// Represents absence of value. +// Represents absence of value. namespace GitHub.Runner.Common { public readonly struct Unit { public static readonly Unit Value = default; } -} \ No newline at end of file +} diff --git a/src/Runner.Common/Util/EncodingUtil.cs b/src/Runner.Common/Util/EncodingUtil.cs index 2b6c393fb..0bb58a16a 100644 --- a/src/Runner.Common/Util/EncodingUtil.cs +++ b/src/Runner.Common/Util/EncodingUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using GitHub.Runner.Sdk; diff --git a/src/Runner.Common/Util/EnumUtil.cs b/src/Runner.Common/Util/EnumUtil.cs index 468ac8a0d..7adbcd1ef 100644 --- a/src/Runner.Common/Util/EnumUtil.cs +++ b/src/Runner.Common/Util/EnumUtil.cs @@ -4,7 +4,7 @@ public static class EnumUtil { - public static T? TryParse(string value) where T: struct + public static T? TryParse(string value) where T : struct { T val; if (Enum.TryParse(value ?? string.Empty, ignoreCase: true, result: out val)) diff --git a/src/Runner.Common/Util/MessageUtil.cs b/src/Runner.Common/Util/MessageUtil.cs index 4489b447c..c53f3a80e 100644 --- a/src/Runner.Common/Util/MessageUtil.cs +++ b/src/Runner.Common/Util/MessageUtil.cs @@ -1,4 +1,4 @@ -namespace GitHub.Runner.Common.Util +namespace GitHub.Runner.Common.Util { using System; using GitHub.DistributedTask.WebApi; diff --git a/src/Runner.Common/Util/VarUtil.cs b/src/Runner.Common/Util/VarUtil.cs index 4fcd69d61..97273a1ad 100644 --- a/src/Runner.Common/Util/VarUtil.cs +++ b/src/Runner.Common/Util/VarUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace GitHub.Runner.Common.Util { diff --git a/src/Runner.Listener/BrokerMessageListener.cs b/src/Runner.Listener/BrokerMessageListener.cs index aa3e81886..f26c683d6 100644 --- a/src/Runner.Listener/BrokerMessageListener.cs +++ b/src/Runner.Listener/BrokerMessageListener.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; diff --git a/src/Runner.Listener/Checks/ActionsCheck.cs b/src/Runner.Listener/Checks/ActionsCheck.cs index a2a373f0a..ac85d2559 100644 --- a/src/Runner.Listener/Checks/ActionsCheck.cs +++ b/src/Runner.Listener/Checks/ActionsCheck.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; @@ -90,4 +90,4 @@ namespace GitHub.Runner.Listener.Check return result; } } -} \ No newline at end of file +} diff --git a/src/Runner.Listener/Checks/CheckUtil.cs b/src/Runner.Listener/Checks/CheckUtil.cs index 0802e11b0..b55101256 100644 --- a/src/Runner.Listener/Checks/CheckUtil.cs +++ b/src/Runner.Listener/Checks/CheckUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics.Tracing; using System.IO; @@ -415,4 +415,4 @@ namespace GitHub.Runner.Listener.Check } } } -} \ No newline at end of file +} diff --git a/src/Runner.Listener/Checks/GitCheck.cs b/src/Runner.Listener/Checks/GitCheck.cs index 203abd3b4..89d7c37e9 100644 --- a/src/Runner.Listener/Checks/GitCheck.cs +++ b/src/Runner.Listener/Checks/GitCheck.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Runner.Listener/Checks/ICheckExtension.cs b/src/Runner.Listener/Checks/ICheckExtension.cs index d366b8095..002eec07b 100644 --- a/src/Runner.Listener/Checks/ICheckExtension.cs +++ b/src/Runner.Listener/Checks/ICheckExtension.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; using GitHub.Runner.Common; @@ -27,4 +27,4 @@ namespace GitHub.Runner.Listener.Check public List Logs { get; set; } } -} \ No newline at end of file +} diff --git a/src/Runner.Listener/Checks/InternetCheck.cs b/src/Runner.Listener/Checks/InternetCheck.cs index 69d550ca1..f87aa4d08 100644 --- a/src/Runner.Listener/Checks/InternetCheck.cs +++ b/src/Runner.Listener/Checks/InternetCheck.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; @@ -56,4 +56,4 @@ namespace GitHub.Runner.Listener.Check return result; } } -} \ No newline at end of file +} diff --git a/src/Runner.Listener/Checks/NodeJsCheck.cs b/src/Runner.Listener/Checks/NodeJsCheck.cs index df750fe8b..34bf7fdcd 100644 --- a/src/Runner.Listener/Checks/NodeJsCheck.cs +++ b/src/Runner.Listener/Checks/NodeJsCheck.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Runner.Listener/CommandSettings.cs b/src/Runner.Listener/CommandSettings.cs index 1bc548378..7c29e2b6d 100644 --- a/src/Runner.Listener/CommandSettings.cs +++ b/src/Runner.Listener/CommandSettings.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Listener.Configuration; +using GitHub.Runner.Listener.Configuration; using GitHub.Runner.Common.Util; using System; using System.Collections; diff --git a/src/Runner.Listener/Configuration/ConfigurationManager.cs b/src/Runner.Listener/Configuration/ConfigurationManager.cs index ea0dc06c3..b98216938 100644 --- a/src/Runner.Listener/Configuration/ConfigurationManager.cs +++ b/src/Runner.Listener/Configuration/ConfigurationManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; diff --git a/src/Runner.Listener/Configuration/CredentialManager.cs b/src/Runner.Listener/Configuration/CredentialManager.cs index 80cff904c..d480dac9c 100644 --- a/src/Runner.Listener/Configuration/CredentialManager.cs +++ b/src/Runner.Listener/Configuration/CredentialManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Runtime.Serialization; using GitHub.Runner.Common; diff --git a/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs b/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs index a8e3e109d..7ebc2a158 100644 --- a/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs +++ b/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs @@ -1,4 +1,4 @@ -#if OS_WINDOWS +#if OS_WINDOWS #pragma warning disable CA1416 using System; using System.Collections; diff --git a/src/Runner.Listener/Configuration/PromptManager.cs b/src/Runner.Listener/Configuration/PromptManager.cs index f04f17069..771b91a30 100644 --- a/src/Runner.Listener/Configuration/PromptManager.cs +++ b/src/Runner.Listener/Configuration/PromptManager.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Common; +using GitHub.Runner.Common; using GitHub.Runner.Sdk; using System; diff --git a/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs b/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs index 239daecdf..15291be43 100644 --- a/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs +++ b/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs @@ -1,4 +1,4 @@ -#if OS_WINDOWS +#if OS_WINDOWS using System.IO; using System.Security.Cryptography; using System.Text; diff --git a/src/Runner.Listener/Configuration/RSAFileKeyManager.cs b/src/Runner.Listener/Configuration/RSAFileKeyManager.cs index 2552a9f2e..532128a57 100644 --- a/src/Runner.Listener/Configuration/RSAFileKeyManager.cs +++ b/src/Runner.Listener/Configuration/RSAFileKeyManager.cs @@ -1,4 +1,4 @@ -#if OS_LINUX || OS_OSX +#if OS_LINUX || OS_OSX using System; using System.IO; using System.Security.Cryptography; diff --git a/src/Runner.Listener/Configuration/ServiceControlManager.cs b/src/Runner.Listener/Configuration/ServiceControlManager.cs index e8a749484..6129034eb 100644 --- a/src/Runner.Listener/Configuration/ServiceControlManager.cs +++ b/src/Runner.Listener/Configuration/ServiceControlManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Text.RegularExpressions; using GitHub.Runner.Common; @@ -68,7 +68,7 @@ namespace GitHub.Runner.Listener.Configuration // Lets add a suffix with a random number to reduce the chance of collisions between runner names once we truncate var random = new Random(); var num = random.Next(1000, 9999).ToString(); - runnerNameSubstring +=$"-{num}"; + runnerNameSubstring += $"-{num}"; serviceName = StringUtil.Format(serviceNamePattern, repoOrOrgNameSubstring, runnerNameSubstring); } @@ -76,12 +76,12 @@ namespace GitHub.Runner.Listener.Configuration Trace.Info($"Service name '{serviceName}' display name '{serviceDisplayName}' will be used for service configuration."); } - #if (OS_LINUX || OS_OSX) - const int MaxServiceNameLength = 150; - const int MaxRepoOrgCharacters = 70; - #elif OS_WINDOWS +#if (OS_LINUX || OS_OSX) + const int MaxServiceNameLength = 150; + const int MaxRepoOrgCharacters = 70; +#elif OS_WINDOWS const int MaxServiceNameLength = 80; const int MaxRepoOrgCharacters = 45; - #endif +#endif } } diff --git a/src/Runner.Listener/Configuration/SystemdControlManager.cs b/src/Runner.Listener/Configuration/SystemdControlManager.cs index 9024416a3..e962fc2b6 100644 --- a/src/Runner.Listener/Configuration/SystemdControlManager.cs +++ b/src/Runner.Listener/Configuration/SystemdControlManager.cs @@ -1,4 +1,4 @@ -#if OS_LINUX +#if OS_LINUX using System; using System.Collections.Generic; using System.IO; diff --git a/src/Runner.Listener/Configuration/Validators.cs b/src/Runner.Listener/Configuration/Validators.cs index 3dc0b2a07..7f7ce0614 100644 --- a/src/Runner.Listener/Configuration/Validators.cs +++ b/src/Runner.Listener/Configuration/Validators.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Common.Util; +using GitHub.Runner.Common.Util; using GitHub.Runner.Sdk; using System; using System.Linq; diff --git a/src/Runner.Listener/Configuration/WindowsServiceControlManager.cs b/src/Runner.Listener/Configuration/WindowsServiceControlManager.cs index d67985e24..085aaffc9 100644 --- a/src/Runner.Listener/Configuration/WindowsServiceControlManager.cs +++ b/src/Runner.Listener/Configuration/WindowsServiceControlManager.cs @@ -1,4 +1,4 @@ -#if OS_WINDOWS +#if OS_WINDOWS #pragma warning disable CA1416 using System; using System.IO; diff --git a/src/Runner.Listener/InternalsVisibleTo.cs b/src/Runner.Listener/InternalsVisibleTo.cs index 0012a2949..a825116a6 100644 --- a/src/Runner.Listener/InternalsVisibleTo.cs +++ b/src/Runner.Listener/InternalsVisibleTo.cs @@ -1,3 +1,3 @@ -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Test")] diff --git a/src/Runner.Listener/JobDispatcher.cs b/src/Runner.Listener/JobDispatcher.cs index 9402cd2d7..894f63d56 100644 --- a/src/Runner.Listener/JobDispatcher.cs +++ b/src/Runner.Listener/JobDispatcher.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; diff --git a/src/Runner.Listener/MessageListener.cs b/src/Runner.Listener/MessageListener.cs index cb8edb607..31f71bc21 100644 --- a/src/Runner.Listener/MessageListener.cs +++ b/src/Runner.Listener/MessageListener.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; diff --git a/src/Runner.Listener/Program.cs b/src/Runner.Listener/Program.cs index b12eda66b..ef468574c 100644 --- a/src/Runner.Listener/Program.cs +++ b/src/Runner.Listener/Program.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Common; +using GitHub.Runner.Common; using GitHub.Runner.Sdk; using System; using System.Globalization; diff --git a/src/Runner.Listener/Runner.cs b/src/Runner.Listener/Runner.cs index c367f8852..efa5cf707 100644 --- a/src/Runner.Listener/Runner.cs +++ b/src/Runner.Listener/Runner.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Runner.Listener/RunnerJobRequestRef.cs b/src/Runner.Listener/RunnerJobRequestRef.cs index 70ed34146..df8a4d793 100644 --- a/src/Runner.Listener/RunnerJobRequestRef.cs +++ b/src/Runner.Listener/RunnerJobRequestRef.cs @@ -1,4 +1,4 @@ -using System.Runtime.Serialization; +using System.Runtime.Serialization; namespace GitHub.Runner.Listener { diff --git a/src/Runner.Listener/SelfUpdater.cs b/src/Runner.Listener/SelfUpdater.cs index 23ba0a0cf..a63e81d5d 100644 --- a/src/Runner.Listener/SelfUpdater.cs +++ b/src/Runner.Listener/SelfUpdater.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Runner.PluginHost/Program.cs b/src/Runner.PluginHost/Program.cs index 1cacb6a28..19b6cb3b1 100644 --- a/src/Runner.PluginHost/Program.cs +++ b/src/Runner.PluginHost/Program.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Reflection; diff --git a/src/Runner.Plugins/Artifact/FileContainerServer.cs b/src/Runner.Plugins/Artifact/FileContainerServer.cs index 043bc3bec..d924ae59b 100644 --- a/src/Runner.Plugins/Artifact/FileContainerServer.cs +++ b/src/Runner.Plugins/Artifact/FileContainerServer.cs @@ -682,4 +682,4 @@ namespace GitHub.Runner.Plugins.Artifact : base(message, inner) { } } -} \ No newline at end of file +} diff --git a/src/Runner.Plugins/Artifact/PipelinesServer.cs b/src/Runner.Plugins/Artifact/PipelinesServer.cs index 8b51dbd72..cf21ee163 100644 --- a/src/Runner.Plugins/Artifact/PipelinesServer.cs +++ b/src/Runner.Plugins/Artifact/PipelinesServer.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using System.Threading.Tasks; using GitHub.Actions.Pipelines.WebApi; using GitHub.Services.WebApi; @@ -36,7 +36,7 @@ namespace GitHub.Runner.Plugins.Artifact return await _pipelinesHttpClient.CreateArtifactAsync( parameters, - pipelineId, + pipelineId, runId, cancellationToken: cancellationToken) as Pipelines.ActionsStorageArtifact; } diff --git a/src/Runner.Plugins/Artifact/PublishArtifact.cs b/src/Runner.Plugins/Artifact/PublishArtifact.cs index 19b316fe0..56408ea65 100644 --- a/src/Runner.Plugins/Artifact/PublishArtifact.cs +++ b/src/Runner.Plugins/Artifact/PublishArtifact.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -97,8 +97,8 @@ namespace GitHub.Runner.Plugins.Artifact size, token); - context.Output($"Associated artifact {artifactName} ({artifact.ContainerId}) with run #{buildId}"); + context.Output($"Associated artifact {artifactName} ({artifact.ContainerId}) with run #{buildId}"); } } } -} \ No newline at end of file +} diff --git a/src/Runner.Plugins/Repository/GitCliManager.cs b/src/Runner.Plugins/Repository/GitCliManager.cs index cadba0004..5a0790e7f 100644 --- a/src/Runner.Plugins/Repository/GitCliManager.cs +++ b/src/Runner.Plugins/Repository/GitCliManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/src/Runner.Plugins/Repository/v1.0/GitSourceProvider.cs b/src/Runner.Plugins/Repository/v1.0/GitSourceProvider.cs index a63eaaf3e..bff5eccd6 100644 --- a/src/Runner.Plugins/Repository/v1.0/GitSourceProvider.cs +++ b/src/Runner.Plugins/Repository/v1.0/GitSourceProvider.cs @@ -1,4 +1,4 @@ -using Pipelines = GitHub.DistributedTask.Pipelines; +using Pipelines = GitHub.DistributedTask.Pipelines; using System; using System.Collections.Generic; using System.Threading; diff --git a/src/Runner.Plugins/Repository/v1.0/RepositoryPlugin.cs b/src/Runner.Plugins/Repository/v1.0/RepositoryPlugin.cs index 8f7c27df0..fd78da849 100644 --- a/src/Runner.Plugins/Repository/v1.0/RepositoryPlugin.cs +++ b/src/Runner.Plugins/Repository/v1.0/RepositoryPlugin.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using GitHub.Runner.Sdk; diff --git a/src/Runner.Plugins/Repository/v1.1/GitSourceProvider.cs b/src/Runner.Plugins/Repository/v1.1/GitSourceProvider.cs index e138cb1db..1eddc0ba1 100644 --- a/src/Runner.Plugins/Repository/v1.1/GitSourceProvider.cs +++ b/src/Runner.Plugins/Repository/v1.1/GitSourceProvider.cs @@ -1,4 +1,4 @@ -using Pipelines = GitHub.DistributedTask.Pipelines; +using Pipelines = GitHub.DistributedTask.Pipelines; using System; using System.Collections.Generic; using System.Threading; diff --git a/src/Runner.Plugins/Repository/v1.1/RepositoryPlugin.cs b/src/Runner.Plugins/Repository/v1.1/RepositoryPlugin.cs index 04c62b301..e314ecdc7 100644 --- a/src/Runner.Plugins/Repository/v1.1/RepositoryPlugin.cs +++ b/src/Runner.Plugins/Repository/v1.1/RepositoryPlugin.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using GitHub.Runner.Sdk; diff --git a/src/Runner.Sdk/ActionPlugin.cs b/src/Runner.Sdk/ActionPlugin.cs index 441f8ec02..98c552b72 100644 --- a/src/Runner.Sdk/ActionPlugin.cs +++ b/src/Runner.Sdk/ActionPlugin.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http.Headers; @@ -220,20 +220,12 @@ namespace GitHub.Runner.Sdk return input; } - private Dictionary _commandEscapeMappings = new(StringComparer.OrdinalIgnoreCase) + private Dictionary _commandEscapeMappings = new Dictionary(StringComparer.OrdinalIgnoreCase) { - { - ";", "%3B" - }, - { - "\r", "%0D" - }, - { - "\n", "%0A" - }, - { - "]", "%5D" - }, + { ";", "%3B" }, + { "\r", "%0D" }, + { "\n", "%0A" }, + { "]", "%5D" }, }; } } diff --git a/src/Runner.Sdk/BuildConstants.cs b/src/Runner.Sdk/BuildConstants.cs index 8d97bffcb..75fadfbda 100644 --- a/src/Runner.Sdk/BuildConstants.cs +++ b/src/Runner.Sdk/BuildConstants.cs @@ -1,4 +1,4 @@ -namespace GitHub.Runner.Sdk +namespace GitHub.Runner.Sdk { /*** * WARNING: This file is automatically regenerated on layout so the runner can provide version/commit info (do not manually edit it). diff --git a/src/Runner.Sdk/ProcessInvoker.cs b/src/Runner.Sdk/ProcessInvoker.cs index e46b2a057..7270faf5d 100644 --- a/src/Runner.Sdk/ProcessInvoker.cs +++ b/src/Runner.Sdk/ProcessInvoker.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; diff --git a/src/Runner.Sdk/RunnerWebProxy.cs b/src/Runner.Sdk/RunnerWebProxy.cs index ccf83f6fa..680d40ef5 100644 --- a/src/Runner.Sdk/RunnerWebProxy.cs +++ b/src/Runner.Sdk/RunnerWebProxy.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Net; using System.Text.RegularExpressions; diff --git a/src/Runner.Sdk/Util/ArgUtil.cs b/src/Runner.Sdk/Util/ArgUtil.cs index 4bf9213fd..ebc937da6 100644 --- a/src/Runner.Sdk/Util/ArgUtil.cs +++ b/src/Runner.Sdk/Util/ArgUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace GitHub.Runner.Sdk diff --git a/src/Runner.Sdk/Util/IOUtil.cs b/src/Runner.Sdk/Util/IOUtil.cs index 2ecca6787..1433e198b 100644 --- a/src/Runner.Sdk/Util/IOUtil.cs +++ b/src/Runner.Sdk/Util/IOUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; diff --git a/src/Runner.Sdk/Util/PathUtil.cs b/src/Runner.Sdk/Util/PathUtil.cs index 7a7575d20..98bf82d05 100644 --- a/src/Runner.Sdk/Util/PathUtil.cs +++ b/src/Runner.Sdk/Util/PathUtil.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace GitHub.Runner.Sdk { diff --git a/src/Runner.Sdk/Util/StringUtil.cs b/src/Runner.Sdk/Util/StringUtil.cs index 69cff219b..03f68f521 100644 --- a/src/Runner.Sdk/Util/StringUtil.cs +++ b/src/Runner.Sdk/Util/StringUtil.cs @@ -1,4 +1,4 @@ -using GitHub.Services.WebApi; +using GitHub.Services.WebApi; using Newtonsoft.Json; using System; using System.Globalization; diff --git a/src/Runner.Sdk/Util/UrlUtil.cs b/src/Runner.Sdk/Util/UrlUtil.cs index 91c3a522e..8a51b8344 100644 --- a/src/Runner.Sdk/Util/UrlUtil.cs +++ b/src/Runner.Sdk/Util/UrlUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace GitHub.Runner.Sdk { diff --git a/src/Runner.Sdk/Util/WhichUtil.cs b/src/Runner.Sdk/Util/WhichUtil.cs index d1bf5dba7..3c1ab3268 100644 --- a/src/Runner.Sdk/Util/WhichUtil.cs +++ b/src/Runner.Sdk/Util/WhichUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; @@ -134,7 +134,7 @@ namespace GitHub.Runner.Sdk { var fileInfo = new FileInfo(path); var linkTargetFullPath = fileInfo.Directory?.FullName + Path.DirectorySeparatorChar + fileInfo.LinkTarget; - if(fileInfo.LinkTarget == null || File.Exists(linkTargetFullPath) || File.Exists(fileInfo.LinkTarget)) return true; + if (fileInfo.LinkTarget == null || File.Exists(linkTargetFullPath) || File.Exists(fileInfo.LinkTarget)) return true; trace?.Info($"the target '{fileInfo.LinkTarget}' of the symbolic link '{path}', does not exist"); return false; } diff --git a/src/Runner.Service/Windows/Program.cs b/src/Runner.Service/Windows/Program.cs index c34cb14cb..88548f1dd 100644 --- a/src/Runner.Service/Windows/Program.cs +++ b/src/Runner.Service/Windows/Program.cs @@ -36,7 +36,7 @@ namespace RunnerService catch (Win32Exception ex) { Console.WriteLine("[ERROR] Unable to create '{0}' event source under 'Application' event log.", RunnerService.EventSourceName); - Console.WriteLine("[ERROR] {0}",ex.Message); + Console.WriteLine("[ERROR] {0}", ex.Message); Console.WriteLine("[ERROR] Error Code: {0}", ex.ErrorCode); return 1; } diff --git a/src/Runner.Worker/ActionCommandManager.cs b/src/Runner.Worker/ActionCommandManager.cs index 66cab8f8b..2a487df3d 100644 --- a/src/Runner.Worker/ActionCommandManager.cs +++ b/src/Runner.Worker/ActionCommandManager.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.Pipelines.ContextData; +using GitHub.DistributedTask.Pipelines.ContextData; using GitHub.DistributedTask.WebApi; using GitHub.Runner.Worker.Container; using System; diff --git a/src/Runner.Worker/ActionManager.cs b/src/Runner.Worker/ActionManager.cs index 95acbec89..6fe22e6fb 100644 --- a/src/Runner.Worker/ActionManager.cs +++ b/src/Runner.Worker/ActionManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; diff --git a/src/Runner.Worker/ActionManifestManager.cs b/src/Runner.Worker/ActionManifestManager.cs index 1b3f562a7..31ea708d8 100644 --- a/src/Runner.Worker/ActionManifestManager.cs +++ b/src/Runner.Worker/ActionManifestManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Threading; @@ -448,7 +448,7 @@ namespace GitHub.Runner.Worker }; } } - else if (string.Equals(usingToken.Value, "node12", StringComparison.OrdinalIgnoreCase)|| + else if (string.Equals(usingToken.Value, "node12", StringComparison.OrdinalIgnoreCase) || string.Equals(usingToken.Value, "node16", StringComparison.OrdinalIgnoreCase)) { if (string.IsNullOrEmpty(mainToken?.Value)) diff --git a/src/Runner.Worker/ActionNotFoundException.cs b/src/Runner.Worker/ActionNotFoundException.cs index 9e67af44f..41f899ef2 100644 --- a/src/Runner.Worker/ActionNotFoundException.cs +++ b/src/Runner.Worker/ActionNotFoundException.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.Serialization; namespace GitHub.Runner.Worker @@ -30,4 +30,4 @@ namespace GitHub.Runner.Worker return $"An action could not be found at the URI '{actionUri}'"; } } -} \ No newline at end of file +} diff --git a/src/Runner.Worker/ActionRunner.cs b/src/Runner.Worker/ActionRunner.cs index 62fbbb812..a17e332b5 100644 --- a/src/Runner.Worker/ActionRunner.cs +++ b/src/Runner.Worker/ActionRunner.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading.Tasks; using GitHub.DistributedTask.ObjectTemplating; diff --git a/src/Runner.Worker/ConditionTraceWriter.cs b/src/Runner.Worker/ConditionTraceWriter.cs index a298113eb..1afc6ea03 100644 --- a/src/Runner.Worker/ConditionTraceWriter.cs +++ b/src/Runner.Worker/ConditionTraceWriter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text; using GitHub.Runner.Common; using GitHub.Runner.Sdk; diff --git a/src/Runner.Worker/Container/ContainerHooks/HookInput.cs b/src/Runner.Worker/Container/ContainerHooks/HookInput.cs index ac390000d..2e2da5442 100644 --- a/src/Runner.Worker/Container/ContainerHooks/HookInput.cs +++ b/src/Runner.Worker/Container/ContainerHooks/HookInput.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/src/Runner.Worker/Container/ContainerHooks/HookResponse.cs b/src/Runner.Worker/Container/ContainerHooks/HookResponse.cs index 5d81cea96..304beac0d 100644 --- a/src/Runner.Worker/Container/ContainerHooks/HookResponse.cs +++ b/src/Runner.Worker/Container/ContainerHooks/HookResponse.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Newtonsoft.Json.Linq; diff --git a/src/Runner.Worker/Container/DockerUtil.cs b/src/Runner.Worker/Container/DockerUtil.cs index e8b094298..b1aa5c6c6 100644 --- a/src/Runner.Worker/Container/DockerUtil.cs +++ b/src/Runner.Worker/Container/DockerUtil.cs @@ -96,7 +96,7 @@ namespace GitHub.Runner.Worker.Container // https://docs.microsoft.com/en-us/dotnet/api/system.environment.getcommandlineargs?redirectedfrom=MSDN&view=net-6.0#remarks // First, find any \ followed by a " and double the number of \ + 1. - value = QuoteEscape.Replace(value, @"$1$1\" + "\""); + value = QuoteEscape.Replace(value, @"$1$1\" + "\""); // Next, what if it ends in `\`, it would escape the end quote. So, we need to detect that at the end of the string and perform the same escape // Luckily, we can just use the $ character with detects the end of string in regex value = EndOfStringEscape.Replace(value, @"$1$1"); diff --git a/src/Runner.Worker/DiagnosticLogManager.cs b/src/Runner.Worker/DiagnosticLogManager.cs index 698f2112c..a2718ab1d 100644 --- a/src/Runner.Worker/DiagnosticLogManager.cs +++ b/src/Runner.Worker/DiagnosticLogManager.cs @@ -32,7 +32,7 @@ namespace GitHub.Runner.Worker { private static string DateTimeFormat = "yyyyMMdd-HHmmss"; public void UploadDiagnosticLogs(IExecutionContext executionContext, - IExecutionContext parentContext, + IExecutionContext parentContext, Pipelines.AgentJobRequestMessage message, DateTime jobStartTimeUtc) { diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index 70b78cc63..c2a3ad2f7 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/src/Runner.Worker/Expressions/HashFilesFunction.cs b/src/Runner.Worker/Expressions/HashFilesFunction.cs index 290f41239..2610c9f11 100644 --- a/src/Runner.Worker/Expressions/HashFilesFunction.cs +++ b/src/Runner.Worker/Expressions/HashFilesFunction.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using GitHub.DistributedTask.Expressions2.Sdk; using GitHub.DistributedTask.Pipelines.ContextData; @@ -136,4 +136,4 @@ namespace GitHub.Runner.Worker.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Runner.Worker/FileCommandManager.cs b/src/Runner.Worker/FileCommandManager.cs index 646e56548..a084a5757 100644 --- a/src/Runner.Worker/FileCommandManager.cs +++ b/src/Runner.Worker/FileCommandManager.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; using GitHub.Runner.Worker.Container; using GitHub.Runner.Common; using System; @@ -281,7 +281,7 @@ namespace GitHub.Runner.Worker } } - public sealed class EnvFileKeyValuePairs: IEnumerable> + public sealed class EnvFileKeyValuePairs : IEnumerable> { private IExecutionContext _context; private string _filePath; diff --git a/src/Runner.Worker/GitHubContext.cs b/src/Runner.Worker/GitHubContext.cs index c7482c2e3..710469ddb 100644 --- a/src/Runner.Worker/GitHubContext.cs +++ b/src/Runner.Worker/GitHubContext.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.Pipelines.ContextData; +using GitHub.DistributedTask.Pipelines.ContextData; using System; using System.Collections.Generic; diff --git a/src/Runner.Worker/GlobalContext.cs b/src/Runner.Worker/GlobalContext.cs index d8ff1ecde..32b58384f 100644 --- a/src/Runner.Worker/GlobalContext.cs +++ b/src/Runner.Worker/GlobalContext.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using GitHub.Actions.RunService.WebApi; using GitHub.DistributedTask.WebApi; diff --git a/src/Runner.Worker/Handlers/CompositeActionHandler.cs b/src/Runner.Worker/Handlers/CompositeActionHandler.cs index 7728ad886..ee746cfc8 100644 --- a/src/Runner.Worker/Handlers/CompositeActionHandler.cs +++ b/src/Runner.Worker/Handlers/CompositeActionHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/src/Runner.Worker/Handlers/Handler.cs b/src/Runner.Worker/Handlers/Handler.cs index 109f26755..5d77a0517 100644 --- a/src/Runner.Worker/Handlers/Handler.cs +++ b/src/Runner.Worker/Handlers/Handler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -36,7 +36,7 @@ namespace GitHub.Runner.Worker.Handlers protected IActionCommandManager ActionCommandManager { get; private set; } public Pipelines.ActionStepDefinitionReference Action { get; set; } - public bool IsActionStep => Action != null; + public bool IsActionStep => Action != null; public Dictionary Environment { get; set; } public Variables RuntimeVariables { get; set; } public IExecutionContext ExecutionContext { get; set; } diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index fb77137d9..b5de017d6 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Runner.Worker/Handlers/OutputManager.cs b/src/Runner.Worker/Handlers/OutputManager.cs index 5dd94059b..f424f33f7 100644 --- a/src/Runner.Worker/Handlers/OutputManager.cs +++ b/src/Runner.Worker/Handlers/OutputManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs b/src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs index 9a22c7590..6ec953b78 100644 --- a/src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs +++ b/src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs @@ -1,4 +1,4 @@ - + using System; using System.Collections.Generic; using System.IO; diff --git a/src/Runner.Worker/IEnvironmentContextData.cs b/src/Runner.Worker/IEnvironmentContextData.cs index 52b43e52b..c33e55b3d 100644 --- a/src/Runner.Worker/IEnvironmentContextData.cs +++ b/src/Runner.Worker/IEnvironmentContextData.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; public interface IEnvironmentContextData { diff --git a/src/Runner.Worker/IssueMatcher.cs b/src/Runner.Worker/IssueMatcher.cs index 0a6eb0fc4..35c1f881c 100644 --- a/src/Runner.Worker/IssueMatcher.cs +++ b/src/Runner.Worker/IssueMatcher.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; @@ -29,7 +29,7 @@ namespace GitHub.Runner.Worker { _owner = config.Owner; _defaultSeverity = config.Severity; - _patterns = config.Patterns.Select(x => new IssuePattern(x , timeout)).ToArray(); + _patterns = config.Patterns.Select(x => new IssuePattern(x, timeout)).ToArray(); Reset(); } @@ -455,7 +455,7 @@ namespace GitHub.Runner.Worker if (Loop && Message == null) { throw new ArgumentException($"The {_loopPropertyName} pattern must set '{_messagePropertyName}'"); - } + } var regex = new Regex(Pattern ?? string.Empty, RegexOptions); var groupCount = regex.GetGroupNumbers().Length; diff --git a/src/Runner.Worker/JobContext.cs b/src/Runner.Worker/JobContext.cs index d824fbe91..e3760560f 100644 --- a/src/Runner.Worker/JobContext.cs +++ b/src/Runner.Worker/JobContext.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.Pipelines.ContextData; +using GitHub.DistributedTask.Pipelines.ContextData; using GitHub.Runner.Common.Util; using GitHub.Runner.Common; @@ -57,4 +57,4 @@ namespace GitHub.Runner.Worker } } } -} \ No newline at end of file +} diff --git a/src/Runner.Worker/JobExtension.cs b/src/Runner.Worker/JobExtension.cs index 75789f899..5e6646953 100644 --- a/src/Runner.Worker/JobExtension.cs +++ b/src/Runner.Worker/JobExtension.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; diff --git a/src/Runner.Worker/JobExtensionRunner.cs b/src/Runner.Worker/JobExtensionRunner.cs index eeb0a8393..9add2ecd2 100644 --- a/src/Runner.Worker/JobExtensionRunner.cs +++ b/src/Runner.Worker/JobExtensionRunner.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using GitHub.DistributedTask.ObjectTemplating.Tokens; using GitHub.DistributedTask.Pipelines.ContextData; diff --git a/src/Runner.Worker/JobRunner.cs b/src/Runner.Worker/JobRunner.cs index 2a540a730..5e3db1e67 100644 --- a/src/Runner.Worker/JobRunner.cs +++ b/src/Runner.Worker/JobRunner.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Runner.Worker/RunnerContext.cs b/src/Runner.Worker/RunnerContext.cs index 904caf6ec..a36ea90f9 100644 --- a/src/Runner.Worker/RunnerContext.cs +++ b/src/Runner.Worker/RunnerContext.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.Pipelines.ContextData; +using GitHub.DistributedTask.Pipelines.ContextData; using System; using System.Collections.Generic; @@ -14,4 +14,4 @@ namespace GitHub.Runner.Worker } } } -} \ No newline at end of file +} diff --git a/src/Runner.Worker/StepsContext.cs b/src/Runner.Worker/StepsContext.cs index 5dcf258b4..6f16956e5 100644 --- a/src/Runner.Worker/StepsContext.cs +++ b/src/Runner.Worker/StepsContext.cs @@ -28,7 +28,7 @@ namespace GitHub.Runner.Worker if (_contextData.TryGetValue(scopeName, out _)) { _contextData[scopeName] = new DictionaryContextData(); - } + } } /// diff --git a/src/Runner.Worker/StepsRunner.cs b/src/Runner.Worker/StepsRunner.cs index 05d21d4bb..4c88726da 100644 --- a/src/Runner.Worker/StepsRunner.cs +++ b/src/Runner.Worker/StepsRunner.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/src/Runner.Worker/Variables.cs b/src/Runner.Worker/Variables.cs index 2969bf610..916b82dc6 100644 --- a/src/Runner.Worker/Variables.cs +++ b/src/Runner.Worker/Variables.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; diff --git a/src/Sdk/Common/Common/Authentication/FederatedCredential.cs b/src/Sdk/Common/Common/Authentication/FederatedCredential.cs index 2a03c63bb..c710ee8f4 100644 --- a/src/Sdk/Common/Common/Authentication/FederatedCredential.cs +++ b/src/Sdk/Common/Common/Authentication/FederatedCredential.cs @@ -13,7 +13,7 @@ namespace GitHub.Services.Common { protected FederatedCredential(IssuedToken initialToken) : base(initialToken) - { + { } public override bool IsAuthenticationChallenge(IHttpResponse webResponse) diff --git a/src/Sdk/Common/Common/Authentication/IssuedTokenProvider.cs b/src/Sdk/Common/Common/Authentication/IssuedTokenProvider.cs index 550bbcb5c..e098bfd75 100644 --- a/src/Sdk/Common/Common/Authentication/IssuedTokenProvider.cs +++ b/src/Sdk/Common/Common/Authentication/IssuedTokenProvider.cs @@ -262,7 +262,7 @@ namespace GitHub.Services.Common aadAuthTokenTimer.Stop(); TimeSpan getTokenTime = aadAuthTokenTimer.Elapsed; - if(getTokenTime.TotalSeconds >= c_slowTokenAcquisitionTimeInSeconds) + if (getTokenTime.TotalSeconds >= c_slowTokenAcquisitionTimeInSeconds) { // It may seem strange to pass the string value of TotalSeconds into this method, but testing // showed that ETW is persnickety when you register a method in an EventSource that doesn't @@ -513,7 +513,7 @@ namespace GitHub.Services.Common { VssHttpEventSource.Log.IssuedTokenWaitStart(traceActivity, this.Provider, this.ActivityId); - token = await Task.Factory.ContinueWhenAll(new Task[] { CompletionSource.Task }, (x) => CompletionSource.Task.Result, cancellationToken).ConfigureAwait(false); + token = await Task.Factory.ContinueWhenAll(new Task[] { CompletionSource.Task }, (x) => CompletionSource.Task.Result, cancellationToken).ConfigureAwait(false); } finally { diff --git a/src/Sdk/Common/Common/GenerateConstantAttributes.cs b/src/Sdk/Common/Common/GenerateConstantAttributes.cs index a976d6cdd..1746cffa6 100644 --- a/src/Sdk/Common/Common/GenerateConstantAttributes.cs +++ b/src/Sdk/Common/Common/GenerateConstantAttributes.cs @@ -44,7 +44,7 @@ namespace GitHub.Services.Common [EditorBrowsable(EditorBrowsableState.Never)] public class GenerateAllConstantsAttribute : GenerateConstantAttribute { - public GenerateAllConstantsAttribute(string alternateName = null) + public GenerateAllConstantsAttribute(string alternateName = null) : base(alternateName) { } diff --git a/src/Sdk/Common/Common/RawClientHttpRequestSettings.cs b/src/Sdk/Common/Common/RawClientHttpRequestSettings.cs index c6956f29f..d18649838 100644 --- a/src/Sdk/Common/Common/RawClientHttpRequestSettings.cs +++ b/src/Sdk/Common/Common/RawClientHttpRequestSettings.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; diff --git a/src/Sdk/Common/Common/RawHttpHeaders.cs b/src/Sdk/Common/Common/RawHttpHeaders.cs index 49dae2d6d..f4f6beabe 100644 --- a/src/Sdk/Common/Common/RawHttpHeaders.cs +++ b/src/Sdk/Common/Common/RawHttpHeaders.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; diff --git a/src/Sdk/Common/Common/RawHttpMessageHandler.cs b/src/Sdk/Common/Common/RawHttpMessageHandler.cs index 6774d3712..fdd5a2cd0 100644 --- a/src/Sdk/Common/Common/RawHttpMessageHandler.cs +++ b/src/Sdk/Common/Common/RawHttpMessageHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net; using System.Net.Http; using System.Threading; diff --git a/src/Sdk/Common/Common/Utility/ArrayUtility.cs b/src/Sdk/Common/Common/Utility/ArrayUtility.cs index 8c3e8b790..39745d273 100644 --- a/src/Sdk/Common/Common/Utility/ArrayUtility.cs +++ b/src/Sdk/Common/Common/Utility/ArrayUtility.cs @@ -30,7 +30,7 @@ namespace GitHub.Services.Common { Debug.Assert(a1 != null, "a1 was null"); Debug.Assert(a2 != null, "a2 was null"); - + // Check if the lengths are the same. if (a1.Length != a2.Length) { @@ -91,7 +91,7 @@ namespace GitHub.Services.Common int i; for (i = length >> 2; i > 0; --i) { - if (*((int*) q1) != *((int*) q2)) + if (*((int*)q1) != *((int*)q2)) { return false; } @@ -114,7 +114,7 @@ namespace GitHub.Services.Common } return true; } - + //**************************************************************************************** /// /// Convert the byte array to a lower case hex string. diff --git a/src/Sdk/Common/Common/Utility/HttpHeaders.cs b/src/Sdk/Common/Common/Utility/HttpHeaders.cs index 892fcd270..fd1f50b91 100644 --- a/src/Sdk/Common/Common/Utility/HttpHeaders.cs +++ b/src/Sdk/Common/Common/Utility/HttpHeaders.cs @@ -21,7 +21,7 @@ namespace GitHub.Services.Common.Internal public const String VssRateLimitDelay = "X-RateLimit-Delay"; public const String VssRateLimitReset = "X-RateLimit-Reset"; - + public const String VssHostOfflineError = "X-VSS-HostOfflineError"; public const string VssRequestPriority = "X-VSS-RequestPriority"; diff --git a/src/Sdk/Common/Common/Utility/PropertyValidation.cs b/src/Sdk/Common/Common/Utility/PropertyValidation.cs index 6e682115a..e56222a7e 100644 --- a/src/Sdk/Common/Common/Utility/PropertyValidation.cs +++ b/src/Sdk/Common/Common/Utility/PropertyValidation.cs @@ -75,7 +75,7 @@ namespace GitHub.Services.Common.Internal /// /// public static void ValidatePropertyName(String propertyName) - { + { ValidatePropertyString(propertyName, c_maxPropertyNameLengthInChars, "propertyName"); // Key must not start or end in whitespace. ValidatePropertyString() checks for null and empty strings, diff --git a/src/Sdk/Common/Common/Utility/SecretUtility.cs b/src/Sdk/Common/Common/Utility/SecretUtility.cs index ec804836d..20713ad60 100644 --- a/src/Sdk/Common/Common/Utility/SecretUtility.cs +++ b/src/Sdk/Common/Common/Utility/SecretUtility.cs @@ -121,7 +121,7 @@ namespace GitHub.Services.Common return message; } - private static string ScrubSecret(string message, string token, string mask, bool assertOnDetection, bool maskToken=false) + private static string ScrubSecret(string message, string token, string mask, bool assertOnDetection, bool maskToken = false) { int startIndex = -1; diff --git a/src/Sdk/Common/Common/Utility/StreamParser.cs b/src/Sdk/Common/Common/Utility/StreamParser.cs index f67b0f88e..1f2dd613d 100644 --- a/src/Sdk/Common/Common/Utility/StreamParser.cs +++ b/src/Sdk/Common/Common/Utility/StreamParser.cs @@ -58,7 +58,7 @@ namespace GitHub.Services.Common public override bool CanRead { - get + get { return m_stream.CanRead && m_stream.Position <= this.EndingPostionOnOuterStream; } @@ -81,7 +81,7 @@ namespace GitHub.Services.Common public override long Length { - get + get { return m_length; } @@ -150,7 +150,7 @@ namespace GitHub.Services.Common } else if (origin == SeekOrigin.End && 0 >= offset && offset > -m_length) { - return m_stream.Seek(offset - ((m_stream.Length-1) - this.EndingPostionOnOuterStream), origin); + return m_stream.Seek(offset - ((m_stream.Length - 1) - this.EndingPostionOnOuterStream), origin); } else if (origin == SeekOrigin.Current && (offset + m_stream.Position) >= this.StartingPostionOnOuterStream && (offset + m_stream.Position) < this.EndingPostionOnOuterStream) { diff --git a/src/Sdk/Common/Common/Utility/UriUtility.cs b/src/Sdk/Common/Common/Utility/UriUtility.cs index 875fdc065..c80cb592c 100644 --- a/src/Sdk/Common/Common/Utility/UriUtility.cs +++ b/src/Sdk/Common/Common/Utility/UriUtility.cs @@ -696,7 +696,7 @@ namespace GitHub.Services.Common.Internal return uri; } -#region functionality forked from System.Web.HttpUtility + #region functionality forked from System.Web.HttpUtility //************************************************************************************************* // This region UriUtility contains functionality forked from System.Web.HttpUtility. // Only our server assemblies can take a dependency on System.Web because it is not part of the @@ -710,7 +710,7 @@ namespace GitHub.Services.Common.Internal // Don't entity encode high chars (160 to 256), to fix bugs VSWhidbey 85857/111927 // REVIEW: comment out this line to fix VSWhidbey 85857/111927, after we verify that it's safe to do so -#region ParseFragmentString + #region ParseFragmentString public static NameValueCollection ParseFragmentString(string fragment) { @@ -735,9 +735,9 @@ namespace GitHub.Services.Common.Internal return new HttpValueCollection(fragment, false, urlEncoded, encoding); } -#endregion + #endregion -#region ParseQueryString + #region ParseQueryString // *** Source: ndp/fx/src/xsp/system/web/httpserverutility.cs @@ -764,9 +764,9 @@ namespace GitHub.Services.Common.Internal return new HttpValueCollection(query, false, urlEncoded, encoding); } -#endregion + #endregion -#region UrlEncode implementation + #region UrlEncode implementation // *** Source: ndp/fx/src/xsp/system/web/util/httpencoder.cs @@ -887,9 +887,9 @@ namespace GitHub.Services.Common.Internal return expandedBytes; } -#endregion + #endregion -#region UrlEncode public methods + #region UrlEncode public methods // *** Source: ndp/fx/src/xsp/system/web/httpserverutility.cs @@ -972,9 +972,9 @@ namespace GitHub.Services.Common.Internal return UrlEncodeSpaces(UrlEncodeNonAscii(str, Encoding.UTF8)); } -#endregion + #endregion -#region UrlEncodeUnicode + #region UrlEncodeUnicode // *** Source: ndp/fx/src/xsp/system/web/util/httpencoder.cs @@ -1022,9 +1022,9 @@ namespace GitHub.Services.Common.Internal return sb.ToString(); } -#endregion + #endregion -#region HttpValueCollection nested class + #region HttpValueCollection nested class // *** Source: ndp/fx/src/xsp/system/web/httpvaluecollection.cs @@ -1260,9 +1260,9 @@ namespace GitHub.Services.Common.Internal } } -#endregion + #endregion -#region HtmlEncode + #region HtmlEncode // *** Source: ndp/fx/src/net/system/net/webutility.cs @@ -1362,7 +1362,7 @@ namespace GitHub.Services.Common.Internal #endregion -#region HtmlEncode/Decode helper methods + #region HtmlEncode/Decode helper methods // *** Source: ndp/fx/src/net/system/net/webutility.cs @@ -1400,9 +1400,9 @@ namespace GitHub.Services.Common.Internal return -1; } -#endregion + #endregion -#region UrlDecode implementation + #region UrlDecode implementation // *** Source: ndp/fx/src/xsp/system/web/util/httpencoder.cs @@ -1579,9 +1579,9 @@ namespace GitHub.Services.Common.Internal return helper.GetString(); } -#endregion + #endregion -#region UrlDecode public methods + #region UrlDecode public methods // *** Source: ndp/fx/src/xsp/system/web/httpserverutility.cs @@ -1649,9 +1649,9 @@ namespace GitHub.Services.Common.Internal return UrlDecodeInternal(bytes, offset, count); } -#endregion + #endregion -#region Helper methods + #region Helper methods // *** Source: ndp/fx/src/xsp/system/web/util/httpencoderutility.cs @@ -1729,9 +1729,9 @@ namespace GitHub.Services.Common.Internal return (b >= 0x7F || b < 0x20); } -#endregion + #endregion -#region UrlDecoder nested class + #region UrlDecoder nested class // *** Source: ndp/fx/src/xsp/system/web/util/httpencoder.cs @@ -1797,9 +1797,9 @@ namespace GitHub.Services.Common.Internal } } -#endregion + #endregion -#region HtmlDecode + #region HtmlDecode // *** Source: ndp/fx/src/net/system/net/webutility.cs @@ -1904,9 +1904,9 @@ namespace GitHub.Services.Common.Internal } } -#endregion + #endregion -#region HtmlEntities nested class + #region HtmlEntities nested class // *** Source: ndp/fx/src/net/system/net/webutility.cs @@ -2195,10 +2195,10 @@ namespace GitHub.Services.Common.Internal } } -#endregion + #endregion // *** Source: ndp/fx/src/net/system/net/webutility.cs private static char[] _htmlEntityEndingChars = new char[] { ';', '&' }; -#endregion + #endregion } } diff --git a/src/Sdk/Common/Common/Utility/VssStringComparer.cs b/src/Sdk/Common/Common/Utility/VssStringComparer.cs index b08ffb68d..7d7935a8c 100644 --- a/src/Sdk/Common/Common/Utility/VssStringComparer.cs +++ b/src/Sdk/Common/Common/Utility/VssStringComparer.cs @@ -152,7 +152,7 @@ namespace GitHub.Services.Common public static VssStringComparer LinkName { get { return s_ordinalIgnoreCase; } } public static VssStringComparer MachineName { get { return s_ordinalIgnoreCase; } } public static VssStringComparer MailAddress { get { return s_ordinalIgnoreCase; } } - public static VssStringComparer PropertyName { get { return s_ordinalIgnoreCase; } } + public static VssStringComparer PropertyName { get { return s_ordinalIgnoreCase; } } public static VssStringComparer RegistrationAttributeName { get { return s_ordinalIgnoreCase; } } public static VssStringComparer ReservedGroupName { get { return s_ordinalIgnoreCase; } } public static VssStringComparer WMDSchemaClassName { get { return s_ordinalIgnoreCase; } } @@ -188,7 +188,7 @@ namespace GitHub.Services.Common public static VssStringComparer Collation { get { return s_ordinalIgnoreCase; } } public static VssStringComparer FeatureAvailabilityName { get { return s_ordinalIgnoreCase; } } public static VssStringComparer TagName { get { return s_currentCultureIgnoreCase; } } - + //Framework Hosting comparers. public static VssStringComparer HostingAccountPropertyName { get { return s_ordinalIgnoreCase; } } public static VssStringComparer MessageBusName { get { return s_ordinalIgnoreCase; } } @@ -213,7 +213,7 @@ namespace GitHub.Services.Common public static VssStringComparer DomainUrl { get { return s_ordinalIgnoreCase; } } public static VssStringComparer AccountInfoAccount { get { return s_ordinalIgnoreCase; } } public static VssStringComparer AccountInfoPassword { get { return s_ordinal; } } - public static VssStringComparer AttributesDescriptor { get { return s_ordinalIgnoreCase; } } + public static VssStringComparer AttributesDescriptor { get { return s_ordinalIgnoreCase; } } // Converters comparer public static VssStringComparer VSSServerPath { get { return s_ordinalIgnoreCase; } } diff --git a/src/Sdk/Common/Common/Utility/XmlUtility.cs b/src/Sdk/Common/Common/Utility/XmlUtility.cs index a6ef0bda7..369dc2d28 100644 --- a/src/Sdk/Common/Common/Utility/XmlUtility.cs +++ b/src/Sdk/Common/Common/Utility/XmlUtility.cs @@ -63,7 +63,7 @@ namespace GitHub.Services.Common.Internal } file = new FileStream(path, fileMode, fileAccess, sharing); - + if (loadAsXmlDocument) { XmlReaderSettings settings = new XmlReaderSettings() diff --git a/src/Sdk/Common/Common/VssCommonConstants.cs b/src/Sdk/Common/Common/VssCommonConstants.cs index d713a75df..596ef6503 100644 --- a/src/Sdk/Common/Common/VssCommonConstants.cs +++ b/src/Sdk/Common/Common/VssCommonConstants.cs @@ -163,7 +163,7 @@ namespace GitHub.Services.Common public static readonly IReadOnlyDictionary IdentityTypeMap; } - + /// /// Common attributes tags used in the collection of properties of TeamFoundationIdentity. /// diff --git a/src/Sdk/Common/Common/VssException.cs b/src/Sdk/Common/Common/VssException.cs index 8226a0e0c..7cead7865 100644 --- a/src/Sdk/Common/Common/VssException.cs +++ b/src/Sdk/Common/Common/VssException.cs @@ -137,8 +137,8 @@ namespace GitHub.Services.Common info.AddValue("m_eventId", EventId); } - /// Indicate whether this exception instance should be logged - /// True (false) if the exception should (should not) be logged + /// Indicate whether this exception instance should be logged + /// True (false) if the exception should (should not) be logged public bool LogException { get @@ -213,7 +213,7 @@ namespace GitHub.Services.Common typeName = GetBackCompatAssemblyQualifiedName(exceptionType); } } - + if (typeName == null) { diff --git a/src/Sdk/Common/Common/VssHttpMessageHandler.cs b/src/Sdk/Common/Common/VssHttpMessageHandler.cs index 39be573b8..b40f7ea21 100644 --- a/src/Sdk/Common/Common/VssHttpMessageHandler.cs +++ b/src/Sdk/Common/Common/VssHttpMessageHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net; diff --git a/src/Sdk/Common/Common/VssHttpRequestSettings.cs b/src/Sdk/Common/Common/VssHttpRequestSettings.cs index 8a86eea08..06c1554ce 100644 --- a/src/Sdk/Common/Common/VssHttpRequestSettings.cs +++ b/src/Sdk/Common/Common/VssHttpRequestSettings.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; diff --git a/src/Sdk/Common/Common/VssHttpRetryOptions.cs b/src/Sdk/Common/Common/VssHttpRetryOptions.cs index 6f3b9c6cd..5d57ef27d 100644 --- a/src/Sdk/Common/Common/VssHttpRetryOptions.cs +++ b/src/Sdk/Common/Common/VssHttpRetryOptions.cs @@ -15,7 +15,7 @@ namespace GitHub.Services.Common public class VssHttpRetryOptions { public VssHttpRetryOptions() - : this (new VssHttpRetryableStatusCodeFilter[] { s_hostShutdownFilter } ) + : this(new VssHttpRetryableStatusCodeFilter[] { s_hostShutdownFilter }) { } diff --git a/src/Sdk/Common/Common/VssPerformanceEventSource.cs b/src/Sdk/Common/Common/VssPerformanceEventSource.cs index dd65becb4..23c8a4acd 100644 --- a/src/Sdk/Common/Common/VssPerformanceEventSource.cs +++ b/src/Sdk/Common/Common/VssPerformanceEventSource.cs @@ -79,7 +79,7 @@ namespace GitHub.Services.Common fixed (char* pcSt = st) { dataDesc[1].DataPointer = (IntPtr)(pcSt); - + WriteEventCore(eventId, parameters, dataDesc); } } @@ -224,7 +224,7 @@ namespace GitHub.Services.Common fixed (char* pcst1 = st1, pcst2 = st2, pcst3 = st3) { dataDesc[1].DataPointer = (IntPtr)(pcst1); - dataDesc[2].DataPointer = (IntPtr)(pcst2); + dataDesc[2].DataPointer = (IntPtr)(pcst2); dataDesc[3].DataPointer = (IntPtr)(pcst3); WriteEventCore(eventId, parameters, dataDesc); @@ -312,10 +312,10 @@ namespace GitHub.Services.Common dataDesc[3].Size = sizeof(long); fixed (char* pcst1 = st1, pcst2 = st2) - { + { dataDesc[1].DataPointer = (IntPtr)(pcst1); dataDesc[2].DataPointer = (IntPtr)(pcst2); - + WriteEventCore(eventId, parameters, dataDesc); } } diff --git a/src/Sdk/DTExpressions2/Expressions2/ExpressionParser.cs b/src/Sdk/DTExpressions2/Expressions2/ExpressionParser.cs index 17638deda..70725ba29 100644 --- a/src/Sdk/DTExpressions2/Expressions2/ExpressionParser.cs +++ b/src/Sdk/DTExpressions2/Expressions2/ExpressionParser.cs @@ -321,7 +321,7 @@ namespace GitHub.DistributedTask.Expressions2 context.Operators.Pop(); } var functionOperands = PopOperands(context, parameterCount); - + // Node already exists on the operand stack function = (Function)context.Operands.Peek(); diff --git a/src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/FromJson.cs b/src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/FromJson.cs index 347c70467..5dc800355 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/FromJson.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/FromJson.cs @@ -21,4 +21,5 @@ namespace GitHub.DistributedTask.Expressions2.Sdk.Functions return token.ToPipelineContextData(); } } - }} + } +} diff --git a/src/Sdk/DTExpressions2/Expressions2/Sdk/Operators/Index.cs b/src/Sdk/DTExpressions2/Expressions2/Sdk/Operators/Index.cs index d151818d5..13975580b 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Sdk/Operators/Index.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Sdk/Operators/Index.cs @@ -213,7 +213,7 @@ namespace GitHub.DistributedTask.Expressions2.Sdk.Operators resultMemory = null; return null; } - + private class FilteredArray : IReadOnlyArray { public FilteredArray() diff --git a/src/Sdk/DTGenerated/Generated/TaskHttpClientBase.cs b/src/Sdk/DTGenerated/Generated/TaskHttpClientBase.cs index 6d5a2fdc8..e5214b4a0 100644 --- a/src/Sdk/DTGenerated/Generated/TaskHttpClientBase.cs +++ b/src/Sdk/DTGenerated/Generated/TaskHttpClientBase.cs @@ -1,4 +1,4 @@ -/* +/* * --------------------------------------------------------- * Copyright(C) Microsoft Corporation. All rights reserved. * --------------------------------------------------------- @@ -341,7 +341,7 @@ namespace GitHub.DistributedTask.WebApi Guid locationId = new Guid("27d7f831-88c1-4719-8ca1-6a061dad90eb"); object routeValues = new { scopeIdentifier = scopeIdentifier, hubName = hubName, planId = planId }; HttpContent content = new ObjectContent(actionReferenceList, new VssJsonMediaTypeFormatter(true)); - + List> queryParams = new List>(); queryParams.Add("jobId", jobId); return SendAsync( diff --git a/src/Sdk/DTLogging/Logging/ValueEncoders.cs b/src/Sdk/DTLogging/Logging/ValueEncoders.cs index c3c065bc2..d7f02ae6a 100644 --- a/src/Sdk/DTLogging/Logging/ValueEncoders.cs +++ b/src/Sdk/DTLogging/Logging/ValueEncoders.cs @@ -85,10 +85,10 @@ namespace GitHub.DistributedTask.Logging { // if the secret is passed to PS as a command and it causes an error, sections of it can be surrounded by color codes // or printed individually. - + // The secret secretpart1&secretpart2&secretpart3 would be split into 2 sections: // 'secretpart1&secretpart2&' and 'secretpart3'. This method masks for the first section. - + // The secret secretpart1&+secretpart2&secretpart3 would be split into 2 sections: // 'secretpart1&+' and (no 's') 'ecretpart2&secretpart3'. This method masks for the first section. diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/Definition.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/Definition.cs index e74656fee..0a35eecb8 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/Definition.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/Definition.cs @@ -16,7 +16,7 @@ namespace GitHub.DistributedTask.ObjectTemplating.Schema protected Definition(MappingToken definition) { - for (var i = 0; i < definition.Count; ) + for (var i = 0; i < definition.Count;) { var definitionKey = definition[i].Key.AssertString($"{TemplateConstants.Definition} key"); if (String.Equals(definitionKey.Value, TemplateConstants.Context, StringComparison.Ordinal)) diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/TemplateSchema.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/TemplateSchema.cs index 699af9ba9..69e02fa63 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/TemplateSchema.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/TemplateSchema.cs @@ -376,7 +376,7 @@ namespace GitHub.DistributedTask.ObjectTemplating.Schema // string-definition-properties mappingDefinition = new MappingDefinition(); mappingDefinition.Properties.Add(TemplateConstants.Constant, new PropertyValue(new StringToken(null, null, null, TemplateConstants.NonEmptyString))); - mappingDefinition.Properties.Add(TemplateConstants.IgnoreCase, new PropertyValue(new StringToken(null, null, null,TemplateConstants.Boolean))); + mappingDefinition.Properties.Add(TemplateConstants.IgnoreCase, new PropertyValue(new StringToken(null, null, null, TemplateConstants.Boolean))); mappingDefinition.Properties.Add(TemplateConstants.RequireNonEmpty, new PropertyValue(new StringToken(null, null, null, TemplateConstants.Boolean))); schema.Definitions.Add(TemplateConstants.StringDefinitionProperties, mappingDefinition); @@ -490,4 +490,4 @@ namespace GitHub.DistributedTask.ObjectTemplating.Schema private static readonly Regex s_definitionNameRegex = new Regex("^[a-zA-Z_][a-zA-Z0-9_-]*$", RegexOptions.Compiled); private static TemplateSchema s_schema; } -} \ No newline at end of file +} diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs index 886bea4c3..b4af6d2fb 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs @@ -271,7 +271,7 @@ namespace GitHub.DistributedTask.ObjectTemplating List nonDuplicates = new List(); foreach (String key in hitCount.Keys) { - if(hitCount[key] == 1) + if (hitCount[key] == 1) { nonDuplicates.Add(key); } diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/BooleanToken.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/BooleanToken.cs index 8b138bf23..3f58c095f 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/BooleanToken.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/BooleanToken.cs @@ -25,12 +25,12 @@ namespace GitHub.DistributedTask.ObjectTemplating.Tokens public override TemplateToken Clone(Boolean omitSource) { - return omitSource ? new BooleanToken(null, null, null, m_value) : new BooleanToken(FileId, Line, Column, m_value); + return omitSource ? new BooleanToken(null, null, null, m_value) : new BooleanToken(FileId, Line, Column, m_value); } public override String ToString() { - return m_value ? "true" : "false"; + return m_value ? "true" : "false"; } Boolean IBoolean.GetBoolean() diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NullToken.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NullToken.cs index cff91add1..e45a98320 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NullToken.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NullToken.cs @@ -21,12 +21,12 @@ namespace GitHub.DistributedTask.ObjectTemplating.Tokens public override TemplateToken Clone(Boolean omitSource) { - return omitSource ? new NullToken(null, null, null) : new NullToken(FileId, Line, Column); + return omitSource ? new NullToken(null, null, null) : new NullToken(FileId, Line, Column); } public override String ToString() { - return String.Empty; + return String.Empty; } } } diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NumberToken.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NumberToken.cs index 31d270304..79d2f8bdb 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NumberToken.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NumberToken.cs @@ -26,7 +26,7 @@ namespace GitHub.DistributedTask.ObjectTemplating.Tokens public override TemplateToken Clone(Boolean omitSource) { - return omitSource ? new NumberToken(null, null, null, m_value) : new NumberToken(FileId, Line, Column, m_value); + return omitSource ? new NumberToken(null, null, null, m_value) : new NumberToken(FileId, Line, Column, m_value); } public override String ToString() diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/StringToken.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/StringToken.cs index 308a51a38..018268c8d 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/StringToken.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/StringToken.cs @@ -23,25 +23,25 @@ namespace GitHub.DistributedTask.ObjectTemplating.Tokens public String Value { - get - { - if (m_value == null) - { - m_value = String.Empty; - } + get + { + if (m_value == null) + { + m_value = String.Empty; + } - return m_value; - } + return m_value; + } } public override TemplateToken Clone(Boolean omitSource) { - return omitSource ? new StringToken(null, null, null, m_value) : new StringToken(FileId, Line, Column, m_value); + return omitSource ? new StringToken(null, null, null, m_value) : new StringToken(FileId, Line, Column, m_value); } public override String ToString() { - return m_value ?? String.Empty; + return m_value ?? String.Empty; } String IString.GetString() diff --git a/src/Sdk/DTPipelines/Pipelines/ActionStepDefinitionReference.cs b/src/Sdk/DTPipelines/Pipelines/ActionStepDefinitionReference.cs index eb089d33f..0a41cce54 100644 --- a/src/Sdk/DTPipelines/Pipelines/ActionStepDefinitionReference.cs +++ b/src/Sdk/DTPipelines/Pipelines/ActionStepDefinitionReference.cs @@ -22,7 +22,7 @@ namespace GitHub.DistributedTask.Pipelines [DataContract] [KnownType(typeof(ContainerRegistryReference))] [KnownType(typeof(RepositoryPathReference))] - [KnownType(typeof(ScriptReference))] + [KnownType(typeof(ScriptReference))] [JsonConverter(typeof(ActionStepDefinitionReferenceConverter))] [EditorBrowsable(EditorBrowsableState.Never)] public abstract class ActionStepDefinitionReference diff --git a/src/Sdk/DTPipelines/Pipelines/ContextData/JTokenExtensions.cs b/src/Sdk/DTPipelines/Pipelines/ContextData/JTokenExtensions.cs index 4d83a4498..c9ca04315 100644 --- a/src/Sdk/DTPipelines/Pipelines/ContextData/JTokenExtensions.cs +++ b/src/Sdk/DTPipelines/Pipelines/ContextData/JTokenExtensions.cs @@ -13,8 +13,8 @@ namespace GitHub.DistributedTask.Pipelines.ContextData } public static PipelineContextData ToPipelineContextData( - this JToken value, - Int32 depth, + this JToken value, + Int32 depth, Int32 maxDepth) { if (depth < maxDepth) diff --git a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConstants.cs b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConstants.cs index e2e635622..d2d925350 100644 --- a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConstants.cs +++ b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConstants.cs @@ -11,7 +11,7 @@ namespace GitHub.DistributedTask.Pipelines.ObjectTemplating public const String BooleanStrategyContext = "boolean-strategy-context"; public const String CancelTimeoutMinutes = "cancel-timeout-minutes"; public const String Cancelled = "cancelled"; - public const String Clean= "clean"; + public const String Clean = "clean"; public const String Container = "container"; public const String ContinueOnError = "continue-on-error"; public const String Credentials = "credentials"; diff --git a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/YamlObjectReader.cs b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/YamlObjectReader.cs index 982a9c487..431cceac0 100644 --- a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/YamlObjectReader.cs +++ b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/YamlObjectReader.cs @@ -569,4 +569,4 @@ namespace GitHub.DistributedTask.Pipelines.ObjectTemplating private readonly Parser m_parser; private ParsingEvent m_current; } -} \ No newline at end of file +} diff --git a/src/Sdk/DTPipelines/Pipelines/ResourceReference.cs b/src/Sdk/DTPipelines/Pipelines/ResourceReference.cs index 0462d76c6..668778592 100644 --- a/src/Sdk/DTPipelines/Pipelines/ResourceReference.cs +++ b/src/Sdk/DTPipelines/Pipelines/ResourceReference.cs @@ -42,7 +42,7 @@ namespace GitHub.DistributedTask.Pipelines { return s; } - + s = name.Expression; if (!String.IsNullOrEmpty(s)) { diff --git a/src/Sdk/DTPipelines/Pipelines/RunnerShutdownMessage.cs b/src/Sdk/DTPipelines/Pipelines/RunnerShutdownMessage.cs index af9217e34..ccd8d22b5 100644 --- a/src/Sdk/DTPipelines/Pipelines/RunnerShutdownMessage.cs +++ b/src/Sdk/DTPipelines/Pipelines/RunnerShutdownMessage.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.Serialization; using GitHub.Services.WebApi; using Newtonsoft.Json; @@ -36,4 +36,4 @@ namespace GitHub.DistributedTask.Pipelines }; } } -} \ No newline at end of file +} diff --git a/src/Sdk/DTWebApi/WebApi/Exceptions.cs b/src/Sdk/DTWebApi/WebApi/Exceptions.cs index aed702b7e..29bf26240 100644 --- a/src/Sdk/DTWebApi/WebApi/Exceptions.cs +++ b/src/Sdk/DTWebApi/WebApi/Exceptions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.Serialization; using GitHub.Services.Common; diff --git a/src/Sdk/DTWebApi/WebApi/JobEvent.cs b/src/Sdk/DTWebApi/WebApi/JobEvent.cs index b838cf58b..b6281f965 100644 --- a/src/Sdk/DTWebApi/WebApi/JobEvent.cs +++ b/src/Sdk/DTWebApi/WebApi/JobEvent.cs @@ -153,8 +153,8 @@ namespace GitHub.DistributedTask.WebApi { this.ActionsEnvironment = actionsEnvironment; this.ActionsStepsTelemetry = actionsStepsTelemetry; - } - + } + public JobCompletedEvent( Int64 requestId, Guid jobId, diff --git a/src/Sdk/DTWebApi/WebApi/ListRunnersResponse.cs b/src/Sdk/DTWebApi/WebApi/ListRunnersResponse.cs index ddc83813f..156c20fa9 100644 --- a/src/Sdk/DTWebApi/WebApi/ListRunnersResponse.cs +++ b/src/Sdk/DTWebApi/WebApi/ListRunnersResponse.cs @@ -1,4 +1,4 @@ -using GitHub.Services.WebApi; +using GitHub.Services.WebApi; using System; using System.Collections.Generic; using System.Runtime.Serialization; diff --git a/src/Sdk/DTWebApi/WebApi/Runner.cs b/src/Sdk/DTWebApi/WebApi/Runner.cs index dc871c1ca..cc7ae2e2c 100644 --- a/src/Sdk/DTWebApi/WebApi/Runner.cs +++ b/src/Sdk/DTWebApi/WebApi/Runner.cs @@ -1,4 +1,4 @@ -using System; +using System; using Newtonsoft.Json; namespace GitHub.DistributedTask.WebApi diff --git a/src/Sdk/DTWebApi/WebApi/RunnerGroup.cs b/src/Sdk/DTWebApi/WebApi/RunnerGroup.cs index e1171bb66..492fee5b8 100644 --- a/src/Sdk/DTWebApi/WebApi/RunnerGroup.cs +++ b/src/Sdk/DTWebApi/WebApi/RunnerGroup.cs @@ -1,4 +1,4 @@ -using GitHub.Services.WebApi; +using GitHub.Services.WebApi; using System; using System.Runtime.Serialization; using System.ComponentModel; diff --git a/src/Sdk/DTWebApi/WebApi/RunnerRefreshMessage.cs b/src/Sdk/DTWebApi/WebApi/RunnerRefreshMessage.cs index 93197c260..b25068168 100644 --- a/src/Sdk/DTWebApi/WebApi/RunnerRefreshMessage.cs +++ b/src/Sdk/DTWebApi/WebApi/RunnerRefreshMessage.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json; +using Newtonsoft.Json; using System; using System.Runtime.Serialization; diff --git a/src/Sdk/DTWebApi/WebApi/TaskAgentSession.cs b/src/Sdk/DTWebApi/WebApi/TaskAgentSession.cs index 4ddbac8f1..8135de83b 100644 --- a/src/Sdk/DTWebApi/WebApi/TaskAgentSession.cs +++ b/src/Sdk/DTWebApi/WebApi/TaskAgentSession.cs @@ -19,7 +19,7 @@ namespace GitHub.DistributedTask.WebApi /// The name of the owner for this session. This should typically be the agent machine /// The target agent for the session public TaskAgentSession( - String ownerName, + String ownerName, TaskAgentReference agent) { this.Agent = agent; diff --git a/src/Sdk/DTWebApi/WebApi/TaskAttachment.cs b/src/Sdk/DTWebApi/WebApi/TaskAttachment.cs index 1bb2a628e..572b1f642 100644 --- a/src/Sdk/DTWebApi/WebApi/TaskAttachment.cs +++ b/src/Sdk/DTWebApi/WebApi/TaskAttachment.cs @@ -1,4 +1,4 @@ -using GitHub.Services.Common; +using GitHub.Services.Common; using GitHub.Services.WebApi; using System; using System.Runtime.Serialization; diff --git a/src/Sdk/DTWebApi/WebApi/TaskHttpClient.cs b/src/Sdk/DTWebApi/WebApi/TaskHttpClient.cs index 6a5515552..f312b9d0e 100644 --- a/src/Sdk/DTWebApi/WebApi/TaskHttpClient.cs +++ b/src/Sdk/DTWebApi/WebApi/TaskHttpClient.cs @@ -50,7 +50,7 @@ namespace GitHub.DistributedTask.WebApi : base(baseUrl, pipeline, disposeHandler) { } - + public Task AppendTimelineRecordFeedAsync( Guid scopeIdentifier, String planType, @@ -91,7 +91,7 @@ namespace GitHub.DistributedTask.WebApi userState, cancellationToken); } - + public Task AppendTimelineRecordFeedAsync( Guid scopeIdentifier, String planType, diff --git a/src/Sdk/DTWebApi/WebApi/TimelineRecord.cs b/src/Sdk/DTWebApi/WebApi/TimelineRecord.cs index 4d4157223..4e69762f9 100644 --- a/src/Sdk/DTWebApi/WebApi/TimelineRecord.cs +++ b/src/Sdk/DTWebApi/WebApi/TimelineRecord.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; diff --git a/src/Sdk/DTWebApi/WebApi/TimelineRecordFeedLinesWrapper.cs b/src/Sdk/DTWebApi/WebApi/TimelineRecordFeedLinesWrapper.cs index edaaf314a..eb7781dd0 100644 --- a/src/Sdk/DTWebApi/WebApi/TimelineRecordFeedLinesWrapper.cs +++ b/src/Sdk/DTWebApi/WebApi/TimelineRecordFeedLinesWrapper.cs @@ -38,7 +38,7 @@ namespace GitHub.DistributedTask.WebApi [DataMember(EmitDefaultValue = false)] public Guid StepId { get; set; } - [DataMember (EmitDefaultValue = false)] + [DataMember(EmitDefaultValue = false)] public Int64? StartLine { get; private set; } } } diff --git a/src/Sdk/DTWebApi/WebApi/TimelineRecordLogLine.cs b/src/Sdk/DTWebApi/WebApi/TimelineRecordLogLine.cs index 2761390c9..3ead2f32a 100644 --- a/src/Sdk/DTWebApi/WebApi/TimelineRecordLogLine.cs +++ b/src/Sdk/DTWebApi/WebApi/TimelineRecordLogLine.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.Serialization; namespace GitHub.DistributedTask.WebApi @@ -19,7 +19,7 @@ namespace GitHub.DistributedTask.WebApi set; } - [DataMember (EmitDefaultValue = false)] + [DataMember(EmitDefaultValue = false)] public long? LineNumber { get; diff --git a/src/Sdk/DTWebApi/WebApi/WellKnownDistributedTaskVariables.cs b/src/Sdk/DTWebApi/WebApi/WellKnownDistributedTaskVariables.cs index 213117285..c6ca7b0b4 100644 --- a/src/Sdk/DTWebApi/WebApi/WellKnownDistributedTaskVariables.cs +++ b/src/Sdk/DTWebApi/WebApi/WellKnownDistributedTaskVariables.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace GitHub.DistributedTask.WebApi { diff --git a/src/Sdk/InternalsVisibleTo.cs b/src/Sdk/InternalsVisibleTo.cs index 1aeebd320..d443dcf23 100644 --- a/src/Sdk/InternalsVisibleTo.cs +++ b/src/Sdk/InternalsVisibleTo.cs @@ -1,4 +1,4 @@ -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Runner.Worker")] -[assembly: InternalsVisibleTo("Test")] \ No newline at end of file +[assembly: InternalsVisibleTo("Test")] diff --git a/src/Sdk/PipelinesWebApi/Contracts/ActionsStorageArtifact.cs b/src/Sdk/PipelinesWebApi/Contracts/ActionsStorageArtifact.cs index 097f435ce..de63d248c 100644 --- a/src/Sdk/PipelinesWebApi/Contracts/ActionsStorageArtifact.cs +++ b/src/Sdk/PipelinesWebApi/Contracts/ActionsStorageArtifact.cs @@ -15,7 +15,7 @@ namespace GitHub.Actions.Pipelines.WebApi /// File Container ID /// [DataMember] - public long ContainerId + public long ContainerId { get; set; diff --git a/src/Sdk/PipelinesWebApi/Contracts/Artifact.cs b/src/Sdk/PipelinesWebApi/Contracts/Artifact.cs index 23eb33c11..f78065ff1 100644 --- a/src/Sdk/PipelinesWebApi/Contracts/Artifact.cs +++ b/src/Sdk/PipelinesWebApi/Contracts/Artifact.cs @@ -42,5 +42,5 @@ namespace GitHub.Actions.Pipelines.WebApi get; set; } - } + } } diff --git a/src/Sdk/PipelinesWebApi/Contracts/ArtifactType.cs b/src/Sdk/PipelinesWebApi/Contracts/ArtifactType.cs index 58beb8b3a..48004fa6f 100644 --- a/src/Sdk/PipelinesWebApi/Contracts/ArtifactType.cs +++ b/src/Sdk/PipelinesWebApi/Contracts/ArtifactType.cs @@ -11,4 +11,4 @@ namespace GitHub.Actions.Pipelines.WebApi Unknown = 0, Actions_Storage = 1 } -} +} diff --git a/src/Sdk/PipelinesWebApi/Contracts/ArtifactTypeEnumJsonConverter.cs b/src/Sdk/PipelinesWebApi/Contracts/ArtifactTypeEnumJsonConverter.cs index 2fac308e6..cf11ab949 100644 --- a/src/Sdk/PipelinesWebApi/Contracts/ArtifactTypeEnumJsonConverter.cs +++ b/src/Sdk/PipelinesWebApi/Contracts/ArtifactTypeEnumJsonConverter.cs @@ -17,7 +17,7 @@ namespace GitHub.Actions.Pipelines.WebApi writer.WriteValue("actions_storage"); } else - { + { base.WriteJson(writer, enumValue, serializer); } } diff --git a/src/Sdk/RSWebApi/Contracts/AcquireJobRequest.cs b/src/Sdk/RSWebApi/Contracts/AcquireJobRequest.cs index d3f155cde..c010f8208 100644 --- a/src/Sdk/RSWebApi/Contracts/AcquireJobRequest.cs +++ b/src/Sdk/RSWebApi/Contracts/AcquireJobRequest.cs @@ -1,4 +1,4 @@ -using System.Runtime.Serialization; +using System.Runtime.Serialization; namespace GitHub.Actions.RunService.WebApi { diff --git a/src/Sdk/RSWebApi/Contracts/Annotation.cs b/src/Sdk/RSWebApi/Contracts/Annotation.cs index 522dccad9..fab07bec9 100644 --- a/src/Sdk/RSWebApi/Contracts/Annotation.cs +++ b/src/Sdk/RSWebApi/Contracts/Annotation.cs @@ -1,4 +1,4 @@ -using System.Runtime.Serialization; +using System.Runtime.Serialization; namespace Sdk.RSWebApi.Contracts { diff --git a/src/Sdk/RSWebApi/Contracts/AnnotationLevel.cs b/src/Sdk/RSWebApi/Contracts/AnnotationLevel.cs index 826ac40d7..6ccff41da 100644 --- a/src/Sdk/RSWebApi/Contracts/AnnotationLevel.cs +++ b/src/Sdk/RSWebApi/Contracts/AnnotationLevel.cs @@ -1,4 +1,4 @@ -using System.Runtime.Serialization; +using System.Runtime.Serialization; namespace Sdk.RSWebApi.Contracts { diff --git a/src/Sdk/RSWebApi/Contracts/CompleteJobRequest.cs b/src/Sdk/RSWebApi/Contracts/CompleteJobRequest.cs index 5c8813f98..00b3a1002 100644 --- a/src/Sdk/RSWebApi/Contracts/CompleteJobRequest.cs +++ b/src/Sdk/RSWebApi/Contracts/CompleteJobRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Runtime.Serialization; using GitHub.DistributedTask.WebApi; diff --git a/src/Sdk/RSWebApi/Contracts/IssueExtensions.cs b/src/Sdk/RSWebApi/Contracts/IssueExtensions.cs index 88272cca1..559935ba6 100644 --- a/src/Sdk/RSWebApi/Contracts/IssueExtensions.cs +++ b/src/Sdk/RSWebApi/Contracts/IssueExtensions.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; namespace Sdk.RSWebApi.Contracts { diff --git a/src/Sdk/RSWebApi/Contracts/IssueKeys.cs b/src/Sdk/RSWebApi/Contracts/IssueKeys.cs index d7a14a847..61df3b8be 100644 --- a/src/Sdk/RSWebApi/Contracts/IssueKeys.cs +++ b/src/Sdk/RSWebApi/Contracts/IssueKeys.cs @@ -1,4 +1,4 @@ -namespace Sdk.RSWebApi.Contracts +namespace Sdk.RSWebApi.Contracts { public static class RunIssueKeys { diff --git a/src/Sdk/RSWebApi/Contracts/RenewJobRequest.cs b/src/Sdk/RSWebApi/Contracts/RenewJobRequest.cs index 7afb0e3b7..c6bcad487 100644 --- a/src/Sdk/RSWebApi/Contracts/RenewJobRequest.cs +++ b/src/Sdk/RSWebApi/Contracts/RenewJobRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.Serialization; namespace GitHub.Actions.RunService.WebApi diff --git a/src/Sdk/RSWebApi/Contracts/RenewJobResponse.cs b/src/Sdk/RSWebApi/Contracts/RenewJobResponse.cs index 387a3ac01..4be202dd4 100644 --- a/src/Sdk/RSWebApi/Contracts/RenewJobResponse.cs +++ b/src/Sdk/RSWebApi/Contracts/RenewJobResponse.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.Serialization; namespace Sdk.RSWebApi.Contracts diff --git a/src/Sdk/RSWebApi/Contracts/StepResult.cs b/src/Sdk/RSWebApi/Contracts/StepResult.cs index e24489817..1da4a2f97 100644 --- a/src/Sdk/RSWebApi/Contracts/StepResult.cs +++ b/src/Sdk/RSWebApi/Contracts/StepResult.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Runtime.Serialization; using System.Threading.Tasks; diff --git a/src/Sdk/RSWebApi/RunServiceHttpClient.cs b/src/Sdk/RSWebApi/RunServiceHttpClient.cs index 8d45ece06..3098f8350 100644 --- a/src/Sdk/RSWebApi/RunServiceHttpClient.cs +++ b/src/Sdk/RSWebApi/RunServiceHttpClient.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Net; using System.Net.Http; diff --git a/src/Sdk/WebApi/WebApi/Attributes.cs b/src/Sdk/WebApi/WebApi/Attributes.cs index 51e13db1e..c484852ce 100644 --- a/src/Sdk/WebApi/WebApi/Attributes.cs +++ b/src/Sdk/WebApi/WebApi/Attributes.cs @@ -65,7 +65,7 @@ namespace GitHub.Services.WebApi /// /// Set to false if you need the item to appear in the TypeScript declare (d.ts) file for use by extensions. /// - public bool OmitFromTypeScriptDeclareFile { get; set; } + public bool OmitFromTypeScriptDeclareFile { get; set; } } [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] diff --git a/src/Sdk/WebApi/WebApi/BrokerHttpClient.cs b/src/Sdk/WebApi/WebApi/BrokerHttpClient.cs index e02541866..755fba8af 100644 --- a/src/Sdk/WebApi/WebApi/BrokerHttpClient.cs +++ b/src/Sdk/WebApi/WebApi/BrokerHttpClient.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Net; using System.Net.Http; diff --git a/src/Sdk/WebApi/WebApi/Constants.cs b/src/Sdk/WebApi/WebApi/Constants.cs index 782772c16..5ea63d3cc 100644 --- a/src/Sdk/WebApi/WebApi/Constants.cs +++ b/src/Sdk/WebApi/WebApi/Constants.cs @@ -10,7 +10,7 @@ namespace GitHub.Services.WebApi { public const String TFSOnPremisesString = "87966EAA-CB2A-443F-BE3C-47BD3B5BF3CB"; public static readonly Guid TFSOnPremises = new Guid(TFSOnPremisesString); - } + } /// /// Enumeration of the options that can be passed in on Connect. diff --git a/src/Sdk/WebApi/WebApi/Contracts.cs b/src/Sdk/WebApi/WebApi/Contracts.cs index 45cd20fdd..95279e8ec 100644 --- a/src/Sdk/WebApi/WebApi/Contracts.cs +++ b/src/Sdk/WebApi/WebApi/Contracts.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/src/Sdk/WebApi/WebApi/Contracts/FileContainer/FileContainer.cs b/src/Sdk/WebApi/WebApi/Contracts/FileContainer/FileContainer.cs index e00fff597..867fc8e7e 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/FileContainer/FileContainer.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/FileContainer/FileContainer.cs @@ -20,7 +20,7 @@ namespace GitHub.Services.FileContainer /// Project Id. /// [DataMember(IsRequired = false)] - public Guid ScopeIdentifier { get;[EditorBrowsable(EditorBrowsableState.Never)] set; } + public Guid ScopeIdentifier { get; [EditorBrowsable(EditorBrowsableState.Never)] set; } /// /// Uri of the artifact associated with the container. @@ -103,10 +103,10 @@ namespace GitHub.Services.FileContainer return false; } - return this.ArtifactUri == other.ArtifactUri && + return this.ArtifactUri == other.ArtifactUri && this.Description == other.Description && - this.Id == other.Id && - this.Name == other.Name && + this.Id == other.Id && + this.Name == other.Name && this.ScopeIdentifier == other.ScopeIdentifier; } diff --git a/src/Sdk/WebApi/WebApi/Contracts/FileContainer/FileContainerItem.cs b/src/Sdk/WebApi/WebApi/Contracts/FileContainer/FileContainerItem.cs index e1c26e6c8..d6052e78b 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/FileContainer/FileContainerItem.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/FileContainer/FileContainerItem.cs @@ -21,7 +21,7 @@ namespace GitHub.Services.FileContainer /// Project Id. /// [DataMember(IsRequired = false)] - public Guid ScopeIdentifier { get;[EditorBrowsable(EditorBrowsableState.Never)] set; } + public Guid ScopeIdentifier { get; [EditorBrowsable(EditorBrowsableState.Never)] set; } /// /// Unique path that identifies the item. @@ -33,7 +33,7 @@ namespace GitHub.Services.FileContainer { return m_path; } - [EditorBrowsable(EditorBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] set { m_path = EnsurePathFormat(value); @@ -127,7 +127,7 @@ namespace GitHub.Services.FileContainer [EditorBrowsable(EditorBrowsableState.Never)] [DataMember(IsRequired = false, EmitDefaultValue = false)] public String Ticket { get; set; } - + public static string EnsurePathFormat(string path) { if (string.IsNullOrWhiteSpace(path)) diff --git a/src/Sdk/WebApi/WebApi/Contracts/Identity/IdentityDescriptor.cs b/src/Sdk/WebApi/WebApi/Contracts/Identity/IdentityDescriptor.cs index 1cf584d1b..9d6b7e141 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Identity/IdentityDescriptor.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Identity/IdentityDescriptor.cs @@ -333,7 +333,7 @@ namespace GitHub.Services.Identity string identityType = obj.IdentityType; //until all service principals are in the system store, we treat them as Claims identities for hash code - if(obj.IsSystemServicePrincipalType()) + if (obj.IsSystemServicePrincipalType()) { identityType = IdentityConstants.ClaimsType; } diff --git a/src/Sdk/WebApi/WebApi/Contracts/Location/AccessMapping.cs b/src/Sdk/WebApi/WebApi/Contracts/Location/AccessMapping.cs index 622daf2db..31b00a9df 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Location/AccessMapping.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Location/AccessMapping.cs @@ -16,7 +16,7 @@ namespace GitHub.Services.Location public AccessMapping() { } public AccessMapping(String moniker, String displayName, String accessPoint, Guid serviceOwner = new Guid()) - :this (moniker, displayName, accessPoint, serviceOwner, null) + : this(moniker, displayName, accessPoint, serviceOwner, null) { } diff --git a/src/Sdk/WebApi/WebApi/Contracts/Location/ConnectionData.cs b/src/Sdk/WebApi/WebApi/Contracts/Location/ConnectionData.cs index 3221dc29d..a3916c22d 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Location/ConnectionData.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Location/ConnectionData.cs @@ -361,7 +361,7 @@ namespace GitHub.Services.Location default: // Allow attributes such as xsi:type to fall through break; - } + } } } diff --git a/src/Sdk/WebApi/WebApi/Contracts/Location/ServiceDefinition.cs b/src/Sdk/WebApi/WebApi/Contracts/Location/ServiceDefinition.cs index bbf1635e7..4954914b7 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Location/ServiceDefinition.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Location/ServiceDefinition.cs @@ -139,10 +139,10 @@ namespace GitHub.Services.Location /// The service which owns this definition e.g. TFS, ELS, etc. /// [DataMember] - public Guid ServiceOwner - { - get; - set; + public Guid ServiceOwner + { + get; + set; } /// @@ -338,7 +338,7 @@ namespace GitHub.Services.Location return null; } else - { + { return MaxVersion.ToString(2); } } @@ -376,7 +376,7 @@ namespace GitHub.Services.Location return null; } else - { + { return ReleasedVersion.ToString(2); } } @@ -634,7 +634,7 @@ namespace GitHub.Services.Location #region ISecuredObject Guid ISecuredObject.NamespaceId => LocationSecurityConstants.NamespaceId; - + int ISecuredObject.RequiredPermissions => LocationSecurityConstants.Read; string ISecuredObject.GetToken() diff --git a/src/Sdk/WebApi/WebApi/Contracts/Patch/AddPatchOperation.cs b/src/Sdk/WebApi/WebApi/Contracts/Patch/AddPatchOperation.cs index 959e16210..6242ecfb3 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Patch/AddPatchOperation.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Patch/AddPatchOperation.cs @@ -16,7 +16,7 @@ namespace GitHub.Services.WebApi.Patch this.Operation = Operation.Add; } - public AddPatchOperation(string path, object value): this() + public AddPatchOperation(string path, object value) : this() { this.Path = path; this.Value = value; diff --git a/src/Sdk/WebApi/WebApi/Contracts/Patch/IPatchOperation.cs b/src/Sdk/WebApi/WebApi/Contracts/Patch/IPatchOperation.cs index e7109867a..03abda630 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Patch/IPatchOperation.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Patch/IPatchOperation.cs @@ -26,7 +26,7 @@ namespace GitHub.Services.WebApi.Patch /// /// The path to copy/move from, applies only to the Copy/Move operation. /// - string From { get; } + string From { get; } /// /// The value to set with this patch operation. Only applies to diff --git a/src/Sdk/WebApi/WebApi/Contracts/Patch/ReplacePatchOperation.cs b/src/Sdk/WebApi/WebApi/Contracts/Patch/ReplacePatchOperation.cs index dda4e91b1..281da154a 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Patch/ReplacePatchOperation.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Patch/ReplacePatchOperation.cs @@ -16,7 +16,7 @@ namespace GitHub.Services.WebApi.Patch this.Operation = Operation.Replace; } - public ReplacePatchOperation(string path, object value): this() + public ReplacePatchOperation(string path, object value) : this() { this.Path = path; this.Value = value; diff --git a/src/Sdk/WebApi/WebApi/Contracts/Patch/TestPatchOperation.cs b/src/Sdk/WebApi/WebApi/Contracts/Patch/TestPatchOperation.cs index 832ccf8ef..aff55d20f 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Patch/TestPatchOperation.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Patch/TestPatchOperation.cs @@ -9,13 +9,13 @@ namespace GitHub.Services.WebApi.Patch /// /// The model the patch operation applies to. public class TestPatchOperation : PatchOperation - { + { public TestPatchOperation() { this.Operation = Operation.Test; } - public TestPatchOperation(string path, object value): this() + public TestPatchOperation(string path, object value) : this() { this.Path = path; this.Value = value; diff --git a/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributeDescriptor.cs b/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributeDescriptor.cs index 62c63b818..b6f99a851 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributeDescriptor.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributeDescriptor.cs @@ -78,7 +78,7 @@ namespace GitHub.Services.Profile return false; } - return CompareTo((AttributeDescriptor) obj) == 0; + return CompareTo((AttributeDescriptor)obj) == 0; } public override int GetHashCode() @@ -93,7 +93,7 @@ namespace GitHub.Services.Profile public override string ToString() { - return string.Concat(ContainerName,";",AttributeName); + return string.Concat(ContainerName, ";", AttributeName); } } diff --git a/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributesContainer.cs b/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributesContainer.cs index 07c03beab..79ad73be8 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributesContainer.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributesContainer.cs @@ -26,7 +26,8 @@ namespace GitHub.Services.Profile /// The name of the container. /// [DataMember(IsRequired = true, EmitDefaultValue = false)] - public string ContainerName { + public string ContainerName + { get { return m_containerName; diff --git a/src/Sdk/WebApi/WebApi/Contracts/Profile/Profile.cs b/src/Sdk/WebApi/WebApi/Contracts/Profile/Profile.cs index 7ba1e71a5..42fb13324 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Profile/Profile.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Profile/Profile.cs @@ -173,7 +173,7 @@ namespace GitHub.Services.Profile Profile newProfile = MemberwiseClone() as Profile; // Since core attributes are cloned on read, we can get away with a shallow copy - newProfile.CoreAttributes = CoreAttributes != null ? CoreAttributes.ToDictionary(x => x.Key, x => (CoreProfileAttribute) x.Value.Clone()) : null; + newProfile.CoreAttributes = CoreAttributes != null ? CoreAttributes.ToDictionary(x => x.Key, x => (CoreProfileAttribute)x.Value.Clone()) : null; newProfile.ApplicationContainer = ApplicationContainer != null ? (AttributesContainer)ApplicationContainer.Clone() : null; return newProfile; diff --git a/src/Sdk/WebApi/WebApi/Contracts/Profile/ProfileQueryContext.cs b/src/Sdk/WebApi/WebApi/Contracts/Profile/ProfileQueryContext.cs index 7d29e478f..b7e6b67bd 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Profile/ProfileQueryContext.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Profile/ProfileQueryContext.cs @@ -6,11 +6,11 @@ namespace GitHub.Services.Profile [Flags] public enum CoreProfileAttributes { - Minimal = 0x0000, // Does not contain email, avatar, display name, or marketing preferences - Email = 0x0001, - Avatar = 0x0002, - DisplayName = 0x0004, + Minimal = 0x0000, // Does not contain email, avatar, display name, or marketing preferences + Email = 0x0001, + Avatar = 0x0002, + DisplayName = 0x0004, ContactWithOffers = 0x0008, - All = 0xFFFF, + All = 0xFFFF, } } diff --git a/src/Sdk/WebApi/WebApi/Contracts/PropertiesCollection.cs b/src/Sdk/WebApi/WebApi/Contracts/PropertiesCollection.cs index 5b7748df4..03e868ac5 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/PropertiesCollection.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/PropertiesCollection.cs @@ -25,7 +25,7 @@ namespace GitHub.Services.WebApi //and come back as that from the service. There is a special TryGetValue that can be used to try to convert the type //from string back to the type it is supposed to be. - + /// /// The class represents a property bag as a collection of key-value pairs. Values of all primitive types (any type with a `TypeCode != TypeCode.Object`) /// except for `DBNull` are accepted. Values of type Byte[], Int32, Double, DateType and String preserve their type, diff --git a/src/Sdk/WebApi/WebApi/Contracts/ReferenceLink/ReferenceLinks.cs b/src/Sdk/WebApi/WebApi/Contracts/ReferenceLink/ReferenceLinks.cs index 35d5d9be5..aa348892b 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/ReferenceLink/ReferenceLinks.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/ReferenceLink/ReferenceLinks.cs @@ -139,7 +139,7 @@ namespace GitHub.Services.WebApi } } } - + XmlSchema IXmlSerializable.GetSchema() { return null; diff --git a/src/Sdk/WebApi/WebApi/Exceptions/FileContainerExceptions.cs b/src/Sdk/WebApi/WebApi/Exceptions/FileContainerExceptions.cs index 9381ced29..4216c95e7 100644 --- a/src/Sdk/WebApi/WebApi/Exceptions/FileContainerExceptions.cs +++ b/src/Sdk/WebApi/WebApi/Exceptions/FileContainerExceptions.cs @@ -194,7 +194,7 @@ namespace GitHub.Services.FileContainer base(message, ex) { } -} + } [Serializable] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")] @@ -215,7 +215,7 @@ namespace GitHub.Services.FileContainer base(message, ex) { } -} + } [Serializable] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")] @@ -231,7 +231,7 @@ namespace GitHub.Services.FileContainer base(message, ex) { } -} + } [Serializable] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")] @@ -252,7 +252,7 @@ namespace GitHub.Services.FileContainer base(message, ex) { } -} + } [Serializable] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")] diff --git a/src/Sdk/WebApi/WebApi/Exceptions/VssApiResourceExceptions.cs b/src/Sdk/WebApi/WebApi/Exceptions/VssApiResourceExceptions.cs index 5200a2e3d..9eac0865f 100644 --- a/src/Sdk/WebApi/WebApi/Exceptions/VssApiResourceExceptions.cs +++ b/src/Sdk/WebApi/WebApi/Exceptions/VssApiResourceExceptions.cs @@ -57,7 +57,7 @@ namespace GitHub.Services.WebApi [Serializable] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")] [ExceptionMapping("0.0", "3.0", "VssApiResourceDuplicateIdException", "GitHub.Services.WebApi.VssApiResourceDuplicateIdException, GitHub.Services.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] - public class VssApiResourceDuplicateIdException: VssApiRouteRegistrationException + public class VssApiResourceDuplicateIdException : VssApiRouteRegistrationException { public VssApiResourceDuplicateIdException(Guid locationId) : base(WebApiResources.ApiResourceDuplicateIdMessage(locationId)) diff --git a/src/Sdk/WebApi/WebApi/HttpClients/Constants.cs b/src/Sdk/WebApi/WebApi/HttpClients/Constants.cs index f0c8361a3..c6d853a72 100644 --- a/src/Sdk/WebApi/WebApi/HttpClients/Constants.cs +++ b/src/Sdk/WebApi/WebApi/HttpClients/Constants.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; namespace GitHub.Services diff --git a/src/Sdk/WebApi/WebApi/HttpClients/FileContainerHttpClient.cs b/src/Sdk/WebApi/WebApi/HttpClients/FileContainerHttpClient.cs index 531b928a0..e6c8e4efe 100644 --- a/src/Sdk/WebApi/WebApi/HttpClients/FileContainerHttpClient.cs +++ b/src/Sdk/WebApi/WebApi/HttpClients/FileContainerHttpClient.cs @@ -97,7 +97,7 @@ namespace GitHub.Services.FileContainer.Client { throw new ArgumentException(WebApiResources.ContainerIdMustBeGreaterThanZero(), "containerId"); } - + List> query = AppendItemQueryString(itemPath, scopeIdentifier, includeDownloadTickets, isShallow); return SendAsync>(HttpMethod.Get, FileContainerResourceIds.FileContainer, routeValues: new { containerId = containerId }, version: s_currentApiVersion, queryParameters: query, userState: userState, cancellationToken: cancellationToken); } @@ -445,7 +445,7 @@ namespace GitHub.Services.FileContainer.Client int statusCode = (int)response?.StatusCode; return statusCode >= 400 && statusCode <= 499; } - + protected override bool ShouldThrowError(HttpResponseMessage response) { return !response.IsSuccessStatusCode && !IsFastFailResponse(response); diff --git a/src/Sdk/WebApi/WebApi/JsonUtility.cs b/src/Sdk/WebApi/WebApi/JsonUtility.cs index b8cbd911d..9dd6824d1 100644 --- a/src/Sdk/WebApi/WebApi/JsonUtility.cs +++ b/src/Sdk/WebApi/WebApi/JsonUtility.cs @@ -65,7 +65,7 @@ namespace GitHub.Services.WebApi } public static String ToString( - Object toSerialize, + Object toSerialize, Boolean indent) { if (toSerialize == null) @@ -144,9 +144,9 @@ namespace GitHub.Services.WebApi { // no map funcs, just clones mapFuncs = mapFuncs ?? new Dictionary>(); - + Func mapperFunc; - + // process token switch (token.Type) { @@ -189,7 +189,7 @@ namespace GitHub.Services.WebApi } return copy; - + case JTokenType.String: if (mapFuncs.TryGetValue(JTokenType.String, out mapperFunc)) { @@ -197,7 +197,7 @@ namespace GitHub.Services.WebApi } return token; - + case JTokenType.Boolean: case JTokenType.Null: case JTokenType.Guid: diff --git a/src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs b/src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs index 73c507688..15216cb14 100644 --- a/src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs +++ b/src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs @@ -321,7 +321,7 @@ namespace GitHub.Services.WebApi.Jwt this._header = JsonWebTokenUtilities.JsonDecode(fields[0]); this._payload = JsonWebTokenUtilities.JsonDecode(fields[1]); - if(!string.IsNullOrEmpty(fields[2])) + if (!string.IsNullOrEmpty(fields[2])) { this._signature = fields[2].FromBase64StringNoPadding(); } @@ -340,7 +340,7 @@ namespace GitHub.Services.WebApi.Jwt protected T TryGetValueOrDefault(string key) { object ret; - if(TryGetValue(key, out ret)) + if (TryGetValue(key, out ret)) { //we have to special case DateTime if (typeof(T) == typeof(DateTime)) @@ -359,7 +359,7 @@ namespace GitHub.Services.WebApi.Jwt protected System.DateTime ConvertDateTime(object obj) { - if(obj is DateTime) + if (obj is DateTime) { return (DateTime)obj; } @@ -426,7 +426,7 @@ namespace GitHub.Services.WebApi.Jwt } set { - if(string.IsNullOrEmpty(value)) + if (string.IsNullOrEmpty(value)) { this.Remove(JsonWebTokenHeaderParameters.X509CertificateThumbprint); } diff --git a/src/Sdk/WebApi/WebApi/Jwt/JsonWebTokenValidationParameters.cs b/src/Sdk/WebApi/WebApi/Jwt/JsonWebTokenValidationParameters.cs index 9e039fe23..0a704c23c 100644 --- a/src/Sdk/WebApi/WebApi/Jwt/JsonWebTokenValidationParameters.cs +++ b/src/Sdk/WebApi/WebApi/Jwt/JsonWebTokenValidationParameters.cs @@ -85,8 +85,8 @@ namespace GitHub.Services.WebApi.Jwt public string IdentityNameClaimType { - get; - set; + get; + set; } } } diff --git a/src/Sdk/WebApi/WebApi/Jwt/UnixEpochDateTimeConverter.cs b/src/Sdk/WebApi/WebApi/Jwt/UnixEpochDateTimeConverter.cs index a2cbf66d0..a9ea246d5 100644 --- a/src/Sdk/WebApi/WebApi/Jwt/UnixEpochDateTimeConverter.cs +++ b/src/Sdk/WebApi/WebApi/Jwt/UnixEpochDateTimeConverter.cs @@ -9,7 +9,7 @@ namespace GitHub.Services.WebApi.Jwt { public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - long unixVal = reader.Value is string ? long.Parse((string) reader.Value) : (long)reader.Value; + long unixVal = reader.Value is string ? long.Parse((string)reader.Value) : (long)reader.Value; return unixVal.FromUnixEpochTime(); } diff --git a/src/Sdk/WebApi/WebApi/LaunchContracts.cs b/src/Sdk/WebApi/WebApi/LaunchContracts.cs index 0815a116b..41a67113e 100644 --- a/src/Sdk/WebApi/WebApi/LaunchContracts.cs +++ b/src/Sdk/WebApi/WebApi/LaunchContracts.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Runtime.Serialization; diff --git a/src/Sdk/WebApi/WebApi/LaunchHttpClient.cs b/src/Sdk/WebApi/WebApi/LaunchHttpClient.cs index 54a718b39..bf2f4c00e 100644 --- a/src/Sdk/WebApi/WebApi/LaunchHttpClient.cs +++ b/src/Sdk/WebApi/WebApi/LaunchHttpClient.cs @@ -1,4 +1,4 @@ -#nullable enable +#nullable enable using System; using System.Linq; diff --git a/src/Sdk/WebApi/WebApi/Location/Interfaces.cs b/src/Sdk/WebApi/WebApi/Location/Interfaces.cs index 487d09189..7abbe24c1 100644 --- a/src/Sdk/WebApi/WebApi/Location/Interfaces.cs +++ b/src/Sdk/WebApi/WebApi/Location/Interfaces.cs @@ -253,7 +253,7 @@ namespace GitHub.Services.WebApi.Location /// String LocationForCurrentConnection( String serviceType, - Guid serviceIdentifier); + Guid serviceIdentifier); /// /// Returns the location for the ServiceDefintion that should be used based on @@ -276,7 +276,7 @@ namespace GitHub.Services.WebApi.Location /// used based on the current connection. /// String LocationForCurrentConnection( - ServiceDefinition serviceDefinition); + ServiceDefinition serviceDefinition); /// /// Returns the location for the ServiceDefinition that has the specified @@ -299,7 +299,7 @@ namespace GitHub.Services.WebApi.Location String LocationForAccessMapping( String serviceType, Guid serviceIdentifier, - AccessMapping accessMapping); + AccessMapping accessMapping); /// /// Returns the location for the ServiceDefinition for the provided @@ -374,7 +374,7 @@ namespace GitHub.Services.WebApi.Location /// The AccessMapping with the supplied moniker or null if one does not exist. /// AccessMapping GetAccessMapping( - String moniker); + String moniker); // // Removes an AccessMapping and all of the locations that are mapped diff --git a/src/Sdk/WebApi/WebApi/Location/LocationCacheManager.cs b/src/Sdk/WebApi/WebApi/Location/LocationCacheManager.cs index e2c921b20..0013e5841 100644 --- a/src/Sdk/WebApi/WebApi/Location/LocationCacheManager.cs +++ b/src/Sdk/WebApi/WebApi/Location/LocationCacheManager.cs @@ -25,7 +25,7 @@ namespace GitHub.Services.WebApi.Location public LocationCacheManager(Guid serverGuid, Guid serviceOwner, Uri connectionBaseUrl) { m_cacheAvailable = (serverGuid.Equals(Guid.Empty)) ? false : true; - + m_lastChangeId = -1; m_cacheExpirationDate = DateTime.MinValue; @@ -387,7 +387,7 @@ namespace GitHub.Services.WebApi.Location { String absoluteUriTrimmed = accessMapping.AccessPoint.TrimEnd('/'); String relativeDirectoryTrimmed = WebApplicationRelativeDirectory.TrimEnd('/'); - + if (VssStringComparer.ServerUrl.EndsWith(absoluteUriTrimmed, relativeDirectoryTrimmed)) { accessMapping.AccessPoint = absoluteUriTrimmed.Substring(0, absoluteUriTrimmed.Length - relativeDirectoryTrimmed.Length); @@ -437,7 +437,7 @@ namespace GitHub.Services.WebApi.Location finally { Debug.Assert(m_lastChangeId == -1 || m_services.Count > 0); - + m_accessLock.ExitWriteLock(); } } diff --git a/src/Sdk/WebApi/WebApi/Location/LocationService.cs b/src/Sdk/WebApi/WebApi/Location/LocationService.cs index f5839d391..09a6b9676 100644 --- a/src/Sdk/WebApi/WebApi/Location/LocationService.cs +++ b/src/Sdk/WebApi/WebApi/Location/LocationService.cs @@ -103,7 +103,7 @@ namespace GitHub.Services.WebApi.Location { providerLookup = actualProvider; } - } + } if (!providerLookup.TryGetValue(locationAreaIdentifier, out locationData)) { diff --git a/src/Sdk/WebApi/WebApi/Location/LocationXmlOperator.cs b/src/Sdk/WebApi/WebApi/Location/LocationXmlOperator.cs index 33f442ffe..417e370d9 100644 --- a/src/Sdk/WebApi/WebApi/Location/LocationXmlOperator.cs +++ b/src/Sdk/WebApi/WebApi/Location/LocationXmlOperator.cs @@ -93,7 +93,7 @@ namespace GitHub.Services.WebApi.Location XmlNode parentServiceTypeNode = definitionNode.SelectSingleNode("./" + s_parentServiceType); definition.ParentServiceType = (parentServiceTypeNode != null) ? parentServiceTypeNode.InnerText : null; - + XmlNode parentIdentifierNode = definitionNode.SelectSingleNode("./" + s_parentIdentifier); definition.ParentIdentifier = (parentIdentifierNode != null) ? XmlConvert.ToGuid(parentIdentifierNode.InnerText) : Guid.Empty; diff --git a/src/Sdk/WebApi/WebApi/Location/ServerDataProvider.cs b/src/Sdk/WebApi/WebApi/Location/ServerDataProvider.cs index 7cbcd80c9..c1997a1b7 100644 --- a/src/Sdk/WebApi/WebApi/Location/ServerDataProvider.cs +++ b/src/Sdk/WebApi/WebApi/Location/ServerDataProvider.cs @@ -809,7 +809,7 @@ namespace GitHub.Services.WebApi.Location { return await m_locationClient.GetConnectionDataAsync(connectOptions, lastChangeId, cancellationToken).ConfigureAwait(false); } - catch(TimeoutException) when (timeoutRetries-- > 0) { } // Catch TimeoutException when we have retries remaining; otherwise, let it go. + catch (TimeoutException) when (timeoutRetries-- > 0) { } // Catch TimeoutException when we have retries remaining; otherwise, let it go. } } } diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthAccessToken.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthAccessToken.cs index 530d4c4d9..bcbd49a61 100644 --- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthAccessToken.cs +++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthAccessToken.cs @@ -24,7 +24,7 @@ namespace GitHub.Services.OAuth /// The value of the access token, encoded as a string /// The date and time when this token is no longer valid public VssOAuthAccessToken( - String value, + String value, DateTime validTo) { ArgumentUtility.CheckStringForNullOrEmpty(value, nameof(value)); diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthAccessTokenCredential.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthAccessTokenCredential.cs index 03cf0c012..77fd9f913 100644 --- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthAccessTokenCredential.cs +++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthAccessTokenCredential.cs @@ -66,11 +66,11 @@ namespace GitHub.Services.OAuth private class VssOAuthAccessTokenProvider : IssuedTokenProvider { public VssOAuthAccessTokenProvider( - IssuedTokenCredential credential, - Uri serverUrl, - Uri signInUrl) + IssuedTokenCredential credential, + Uri serverUrl, + Uri signInUrl) : base(credential, serverUrl, signInUrl) - { + { } public override Boolean GetTokenIsInteractive diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthClientCredential.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthClientCredential.cs index c70754d8d..b64ed5692 100644 --- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthClientCredential.cs +++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthClientCredential.cs @@ -56,7 +56,7 @@ namespace GitHub.Services.OAuth } protected virtual void Dispose(Boolean disposing) - { + { } /// diff --git a/src/Sdk/WebApi/WebApi/RawConnection.cs b/src/Sdk/WebApi/WebApi/RawConnection.cs index a486d5245..c5a7b1a55 100644 --- a/src/Sdk/WebApi/WebApi/RawConnection.cs +++ b/src/Sdk/WebApi/WebApi/RawConnection.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs b/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs index aa602f760..de7c3bcb3 100644 --- a/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs +++ b/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; diff --git a/src/Sdk/WebApi/WebApi/RawHttpClientResult.cs b/src/Sdk/WebApi/WebApi/RawHttpClientResult.cs index 1b00d61c2..1b2dc5f06 100644 --- a/src/Sdk/WebApi/WebApi/RawHttpClientResult.cs +++ b/src/Sdk/WebApi/WebApi/RawHttpClientResult.cs @@ -1,4 +1,4 @@ -using System.Net; +using System.Net; namespace Sdk.WebApi.WebApi { diff --git a/src/Sdk/WebApi/WebApi/ResourceLocationIds.cs b/src/Sdk/WebApi/WebApi/ResourceLocationIds.cs index 1766977ff..741460671 100644 --- a/src/Sdk/WebApi/WebApi/ResourceLocationIds.cs +++ b/src/Sdk/WebApi/WebApi/ResourceLocationIds.cs @@ -40,4 +40,4 @@ namespace GitHub.Services.Location public static readonly Guid SpsServiceDefinition = new Guid("{DF5F298A-4E06-4815-A13E-6CE90A37EFA4}"); } -} \ No newline at end of file +} diff --git a/src/Sdk/WebApi/WebApi/ResultsHttpClient.cs b/src/Sdk/WebApi/WebApi/ResultsHttpClient.cs index eb9afc96b..4fbe99e92 100644 --- a/src/Sdk/WebApi/WebApi/ResultsHttpClient.cs +++ b/src/Sdk/WebApi/WebApi/ResultsHttpClient.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; diff --git a/src/Sdk/WebApi/WebApi/TaskExtensions.cs b/src/Sdk/WebApi/WebApi/TaskExtensions.cs index 01cef55a5..621a653eb 100644 --- a/src/Sdk/WebApi/WebApi/TaskExtensions.cs +++ b/src/Sdk/WebApi/WebApi/TaskExtensions.cs @@ -62,4 +62,4 @@ namespace AsyncFixer public class BlockCaller : System.Attribute { } } - + diff --git a/src/Sdk/WebApi/WebApi/Utilities/BaseSecuredObject.cs b/src/Sdk/WebApi/WebApi/Utilities/BaseSecuredObject.cs index c36135f48..60fe702c7 100644 --- a/src/Sdk/WebApi/WebApi/Utilities/BaseSecuredObject.cs +++ b/src/Sdk/WebApi/WebApi/Utilities/BaseSecuredObject.cs @@ -19,7 +19,7 @@ namespace GitHub.Services.WebApi this.m_token = securedObject.GetToken(); } } - + Guid ISecuredObject.NamespaceId { get diff --git a/src/Sdk/WebApi/WebApi/Utilities/XmlSerializableDataContractExtensions.cs b/src/Sdk/WebApi/WebApi/Utilities/XmlSerializableDataContractExtensions.cs index 74396e152..338a78547 100644 --- a/src/Sdk/WebApi/WebApi/Utilities/XmlSerializableDataContractExtensions.cs +++ b/src/Sdk/WebApi/WebApi/Utilities/XmlSerializableDataContractExtensions.cs @@ -242,7 +242,7 @@ namespace GitHub.Services.WebApi.Xml public override int GetHashCode() { int hashCode = 7443; // "large" prime to start the seed - + // Bitshifting and subtracting once is an efficient way to multiply by our second "large" prime, 0x7ffff = 524287 hashCode = (hashCode << 19) - hashCode + (RootNamespace?.GetHashCode() ?? 0); hashCode = (hashCode << 19) - hashCode + ElementName.GetHashCode(); diff --git a/src/Sdk/WebApi/WebApi/VssClientHttpRequestSettings.cs b/src/Sdk/WebApi/WebApi/VssClientHttpRequestSettings.cs index eab6e16e7..f092217e9 100644 --- a/src/Sdk/WebApi/WebApi/VssClientHttpRequestSettings.cs +++ b/src/Sdk/WebApi/WebApi/VssClientHttpRequestSettings.cs @@ -55,8 +55,8 @@ namespace GitHub.Services.WebApi return settings; } - - private static Lazy s_defaultSettings + + private static Lazy s_defaultSettings = new Lazy(ConstructDefaultSettings); private const String c_settingsKey = "Services\\RequestSettings"; diff --git a/src/Sdk/WebApi/WebApi/VssEventId.cs b/src/Sdk/WebApi/WebApi/VssEventId.cs index 0c5fd4236..2d7047d95 100644 --- a/src/Sdk/WebApi/WebApi/VssEventId.cs +++ b/src/Sdk/WebApi/WebApi/VssEventId.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace GitHub.Services.WebApi { @@ -6,10 +6,10 @@ namespace GitHub.Services.WebApi /// This corresponds with values in Framework\Server\Common\EventLog.cs public static class VssEventId { - public static readonly int DefaultEventId = 0; + public static readonly int DefaultEventId = 0; // Errors - public static readonly int ExceptionBaseEventId = 3000; + public static readonly int ExceptionBaseEventId = 3000; private static readonly int EtmBaseEventId = ExceptionBaseEventId + 1200; // 4200 public static readonly int VssIdentityServiceException = EtmBaseEventId + 7; diff --git a/src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs b/src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs index 0afad2751..1e56f9fc6 100644 --- a/src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs +++ b/src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs @@ -28,7 +28,7 @@ namespace GitHub.Services.WebApi routeReplacementOptions |= requireExplicitRouteParams ? RouteReplacementOptions.RequireExplicitRouteParams : 0; return ReplaceRouteValues( - routeTemplate, + routeTemplate, routeValues, routeReplacementOptions); } diff --git a/src/Sdk/WebApi/WebApi/VssJsonCollectionWrapper.cs b/src/Sdk/WebApi/WebApi/VssJsonCollectionWrapper.cs index e4a2365b6..12553764f 100644 --- a/src/Sdk/WebApi/WebApi/VssJsonCollectionWrapper.cs +++ b/src/Sdk/WebApi/WebApi/VssJsonCollectionWrapper.cs @@ -23,14 +23,14 @@ namespace GitHub.Services.WebApi { this.Count = ((ICollection)source).Count; } - else + else { this.Count = source.Cast().Count(); } this._value = source; } - [DataMember(Order=0)] + [DataMember(Order = 0)] public Int32 Count { get; private set; } //not serialized from here, see sub class... @@ -99,7 +99,7 @@ namespace GitHub.Services.WebApi } public VssJsonCollectionWrapper(IEnumerable source) - :base (source) + : base(source) { } diff --git a/src/Sdk/WebApi/WebApi/VssResponseContext.cs b/src/Sdk/WebApi/WebApi/VssResponseContext.cs index e3060f2f2..8fb664435 100644 --- a/src/Sdk/WebApi/WebApi/VssResponseContext.cs +++ b/src/Sdk/WebApi/WebApi/VssResponseContext.cs @@ -60,7 +60,7 @@ namespace GitHub.Services.WebApi } return false; } - + public HttpStatusCode HttpStatusCode { get; private set; } public Guid ActivityId { get; private set; } diff --git a/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs b/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs index 473229514..e4aa84a73 100644 --- a/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs +++ b/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs @@ -19,7 +19,7 @@ namespace GitHub.Services.WebApi } protected VssServiceResponseException(SerializationInfo info, StreamingContext context) - : base(info, context) + : base(info, context) { HttpStatusCode = (HttpStatusCode)info.GetInt32("HttpStatusCode"); } diff --git a/src/Sdk/WebApi/WebApi/VssSigningCredentials.cs b/src/Sdk/WebApi/WebApi/VssSigningCredentials.cs index e6051019c..6b7e0c348 100644 --- a/src/Sdk/WebApi/WebApi/VssSigningCredentials.cs +++ b/src/Sdk/WebApi/WebApi/VssSigningCredentials.cs @@ -117,7 +117,7 @@ namespace GitHub.Services.WebApi private const Int32 c_minKeySize = 2048; private readonly DateTime m_effectiveDate; -#region Concrete Implementations + #region Concrete Implementations private abstract class AsymmetricKeySigningToken : VssSigningCredentials { diff --git a/src/Test/L0/Container/DockerUtilL0.cs b/src/Test/L0/Container/DockerUtilL0.cs index 1e45d598e..92d353198 100644 --- a/src/Test/L0/Container/DockerUtilL0.cs +++ b/src/Test/L0/Container/DockerUtilL0.cs @@ -177,7 +177,7 @@ namespace GitHub.Runner.Common.Tests.Worker.Container [InlineData("foo", "bar", "foo=bar")] [InlineData("foo\\", "bar", "foo\\=bar")] [InlineData("foo\\", "bar\\", "foo\\=bar\\\\")] - [InlineData("foo \\","bar \\", "foo \\=bar \\\\")] + [InlineData("foo \\", "bar \\", "foo \\=bar \\\\")] public void CreateEscapedOption_keyValue(string keyInput, string valueInput, string escapedString) { var flag = "--example"; diff --git a/src/Test/L0/DistributedTask/WebApi/TimelineRecordL0.cs b/src/Test/L0/DistributedTask/WebApi/TimelineRecordL0.cs index 7df9cf392..8fbdacafd 100644 --- a/src/Test/L0/DistributedTask/WebApi/TimelineRecordL0.cs +++ b/src/Test/L0/DistributedTask/WebApi/TimelineRecordL0.cs @@ -1,4 +1,4 @@ -#nullable enable +#nullable enable using System; using System.IO; diff --git a/src/Test/L0/Listener/CommandSettingsL0.cs b/src/Test/L0/Listener/CommandSettingsL0.cs index c407ce54a..ed7b672b8 100644 --- a/src/Test/L0/Listener/CommandSettingsL0.cs +++ b/src/Test/L0/Listener/CommandSettingsL0.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Listener; +using GitHub.Runner.Listener; using GitHub.Runner.Listener.Configuration; using Moq; using System; @@ -721,11 +721,11 @@ namespace GitHub.Runner.Common.Tests [InlineData("run", "replace")] [InlineData("run", "runasservice")] [InlineData("run", "unattended")] - [InlineData("warmup", "disableupdate")] - [InlineData("warmup", "ephemeral")] - [InlineData("warmup", "once")] - [InlineData("warmup", "replace")] - [InlineData("warmup", "runasservice")] + [InlineData("warmup", "disableupdate")] + [InlineData("warmup", "ephemeral")] + [InlineData("warmup", "once")] + [InlineData("warmup", "replace")] + [InlineData("warmup", "runasservice")] [InlineData("warmup", "unattended")] [Trait("Level", "L0")] [Trait("Category", nameof(CommandSettings))] diff --git a/src/Test/L0/Listener/Configuration/ConfigurationManagerL0.cs b/src/Test/L0/Listener/Configuration/ConfigurationManagerL0.cs index 628e2caba..b4dfb397f 100644 --- a/src/Test/L0/Listener/Configuration/ConfigurationManagerL0.cs +++ b/src/Test/L0/Listener/Configuration/ConfigurationManagerL0.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; using GitHub.Runner.Listener; using GitHub.Runner.Listener.Configuration; using GitHub.Runner.Common.Util; diff --git a/src/Test/L0/Listener/Configuration/PromptManagerTestsL0.cs b/src/Test/L0/Listener/Configuration/PromptManagerTestsL0.cs index 286fc0edb..1f65e7a28 100644 --- a/src/Test/L0/Listener/Configuration/PromptManagerTestsL0.cs +++ b/src/Test/L0/Listener/Configuration/PromptManagerTestsL0.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Listener.Configuration; +using GitHub.Runner.Listener.Configuration; using GitHub.Runner.Common.Util; using Moq; using System; diff --git a/src/Test/L0/Listener/Configuration/RunnerCredentialL0.cs b/src/Test/L0/Listener/Configuration/RunnerCredentialL0.cs index a838aa537..609a71294 100644 --- a/src/Test/L0/Listener/Configuration/RunnerCredentialL0.cs +++ b/src/Test/L0/Listener/Configuration/RunnerCredentialL0.cs @@ -12,7 +12,7 @@ namespace GitHub.Runner.Common.Tests.Listener.Configuration { Tracing trace = context.GetTrace("OuthAccessToken"); trace.Info("GetVssCredentials()"); - + var loginCred = new VssOAuthAccessTokenCredential("sometoken"); VssCredentials creds = new(loginCred); trace.Verbose("cred created"); diff --git a/src/Test/L0/Listener/JobDispatcherL0.cs b/src/Test/L0/Listener/JobDispatcherL0.cs index 7788df3d5..9057e6bbf 100644 --- a/src/Test/L0/Listener/JobDispatcherL0.cs +++ b/src/Test/L0/Listener/JobDispatcherL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Reflection; using System.Threading; diff --git a/src/Test/L0/Listener/RunnerL0.cs b/src/Test/L0/Listener/RunnerL0.cs index f64cd8b9e..47df4de25 100644 --- a/src/Test/L0/Listener/RunnerL0.cs +++ b/src/Test/L0/Listener/RunnerL0.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; using GitHub.Runner.Listener; using GitHub.Runner.Listener.Configuration; using Moq; @@ -155,13 +155,13 @@ namespace GitHub.Runner.Common.Tests.Listener } } - public static TheoryData RunAsServiceTestData = new() - { - // staring with run command, configured as run as service, should start the runner - { new [] { "run" }, true, Times.Once() }, - // starting with no argument, configured not to run as service, should start runner interactively - { new [] { "run" }, false, Times.Once() } - }; + public static TheoryData RunAsServiceTestData = new TheoryData() + { + // staring with run command, configured as run as service, should start the runner + { new [] { "run" }, true, Times.Once() }, + // starting with no argument, configured not to run as service, should start runner interactively + { new [] { "run" }, false, Times.Once() } + }; [Theory] [MemberData(nameof(RunAsServiceTestData))] [Trait("Level", "L0")] diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs index 2bbdf6b4d..e0d76d59b 100644 --- a/src/Test/L0/Listener/SelfUpdaterL0.cs +++ b/src/Test/L0/Listener/SelfUpdaterL0.cs @@ -1,4 +1,4 @@ -#if !(OS_WINDOWS && ARM64) +#if !(OS_WINDOWS && ARM64) using System; using System.Collections.Generic; using System.IO; diff --git a/src/Test/L0/PagingLoggerL0.cs b/src/Test/L0/PagingLoggerL0.cs index 5317b4f99..7f8ba60d2 100644 --- a/src/Test/L0/PagingLoggerL0.cs +++ b/src/Test/L0/PagingLoggerL0.cs @@ -1,4 +1,4 @@ -using Moq; +using Moq; using System; using System.IO; using Xunit; @@ -117,7 +117,7 @@ namespace GitHub.Runner.Common.Tests.Listener pagingLogger.End(); //Assert - _jobServerQueue.Verify(x => x.QueueFileUpload(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), true), Times.Exactly(0)); + _jobServerQueue.Verify(x => x.QueueFileUpload(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), true), Times.Exactly(0)); } } finally diff --git a/src/Test/L0/ProcessInvokerL0.cs b/src/Test/L0/ProcessInvokerL0.cs index 6d99932e3..dc3629e67 100644 --- a/src/Test/L0/ProcessInvokerL0.cs +++ b/src/Test/L0/ProcessInvokerL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -459,7 +459,7 @@ namespace GitHub.Runner.Common.Tests try { var proc = await processInvoker.ExecuteAsync("", "bash", "-c \"cat /proc/$$/oom_score_adj\"", - new Dictionary { {"PIPELINE_JOB_OOMSCOREADJ", "1234"} }, + new Dictionary { { "PIPELINE_JOB_OOMSCOREADJ", "1234" } }, false, null, false, null, false, false, highPriorityProcess: false, cancellationToken: tokenSource.Token); diff --git a/src/Test/L0/RunnerWebProxyL0.cs b/src/Test/L0/RunnerWebProxyL0.cs index dacc63731..68410aef6 100644 --- a/src/Test/L0/RunnerWebProxyL0.cs +++ b/src/Test/L0/RunnerWebProxyL0.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Common.Util; +using GitHub.Runner.Common.Util; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Test/L0/Sdk/RSWebApi/AcquireJobRequestL0.cs b/src/Test/L0/Sdk/RSWebApi/AcquireJobRequestL0.cs index e9889ec09..51b61e644 100644 --- a/src/Test/L0/Sdk/RSWebApi/AcquireJobRequestL0.cs +++ b/src/Test/L0/Sdk/RSWebApi/AcquireJobRequestL0.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Runtime.Serialization.Json; using System.Text; diff --git a/src/Test/L0/Sdk/RSWebApi/AnnotationsL0.cs b/src/Test/L0/Sdk/RSWebApi/AnnotationsL0.cs index 0970e67c2..f5478ee89 100644 --- a/src/Test/L0/Sdk/RSWebApi/AnnotationsL0.cs +++ b/src/Test/L0/Sdk/RSWebApi/AnnotationsL0.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using GitHub.DistributedTask.WebApi; using Sdk.RSWebApi.Contracts; using Xunit; diff --git a/src/Test/L0/ServiceControlManagerL0.cs b/src/Test/L0/ServiceControlManagerL0.cs index 4d5ab5434..a92898c7f 100644 --- a/src/Test/L0/ServiceControlManagerL0.cs +++ b/src/Test/L0/ServiceControlManagerL0.cs @@ -1,4 +1,4 @@ -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; using GitHub.Runner.Listener.Configuration; using Xunit; @@ -84,7 +84,7 @@ namespace GitHub.Runner.Common.Tests } } - #if OS_WINDOWS +#if OS_WINDOWS [Fact] [Trait("Level", "L0")] [Trait("Category", "Service")] @@ -163,46 +163,46 @@ namespace GitHub.Runner.Common.Tests Assert.Equal("name", serviceNameParts[3]); } } - #else - [Fact] - [Trait("Level", "L0")] - [Trait("Category", "Service")] - public void CalculateServiceNameLimitsServiceNameTo150Chars() +#else + [Fact] + [Trait("Level", "L0")] + [Trait("Category", "Service")] + public void CalculateServiceNameLimitsServiceNameTo150Chars() + { + RunnerSettings settings = new(); + + settings.AgentName = "thisisareallyreallylongbutstillvalidagentnameiamusingforthisexampletotestverylongnamelimits"; + settings.ServerUrl = "https://example.githubusercontent.com/12345678901234567890123456789012345678901234567890"; + settings.GitHubUrl = "https://github.com/myreallylongorganizationexampleonlinux/myreallylongrepoexampleonlinux1234"; + + string serviceNamePattern = "actions.runner.{0}.{1}"; + string serviceDisplayNamePattern = "GitHub Actions Runner ({0}.{1})"; + + using (TestHostContext hc = CreateTestContext()) { - RunnerSettings settings = new(); + ServiceControlManager scm = new(); - settings.AgentName = "thisisareallyreallylongbutstillvalidagentnameiamusingforthisexampletotestverylongnamelimits"; - settings.ServerUrl = "https://example.githubusercontent.com/12345678901234567890123456789012345678901234567890"; - settings.GitHubUrl = "https://github.com/myreallylongorganizationexampleonlinux/myreallylongrepoexampleonlinux1234"; + scm.Initialize(hc); + scm.CalculateServiceName( + settings, + serviceNamePattern, + serviceDisplayNamePattern, + out string serviceName, + out string serviceDisplayName); - string serviceNamePattern = "actions.runner.{0}.{1}"; - string serviceDisplayNamePattern = "GitHub Actions Runner ({0}.{1})"; + // Verify name has been shortened to 150 + Assert.Equal(150, serviceName.Length); - using (TestHostContext hc = CreateTestContext()) - { - ServiceControlManager scm = new(); + var serviceNameParts = serviceName.Split('.'); - scm.Initialize(hc); - scm.CalculateServiceName( - settings, - serviceNamePattern, - serviceDisplayNamePattern, - out string serviceName, - out string serviceDisplayName); - - // Verify name has been shortened to 150 - Assert.Equal(150, serviceName.Length); - - var serviceNameParts = serviceName.Split('.'); - - // Verify that each component has been shortened to a sensible length - Assert.Equal("actions", serviceNameParts[0]); // Never shortened - Assert.Equal("runner", serviceNameParts[1]); // Never shortened - Assert.Equal("myreallylongorganizationexampleonlinux-myreallylongrepoexampleonlinux1", serviceNameParts[2]); // First 70 chars, '/' has been replaced with '-' - Assert.Matches(@"^(thisisareallyreallylongbutstillvalidagentnameiamusingforthi-[0-9]{4})$", serviceNameParts[3]); - } + // Verify that each component has been shortened to a sensible length + Assert.Equal("actions", serviceNameParts[0]); // Never shortened + Assert.Equal("runner", serviceNameParts[1]); // Never shortened + Assert.Equal("myreallylongorganizationexampleonlinux-myreallylongrepoexampleonlinux1", serviceNameParts[2]); // First 70 chars, '/' has been replaced with '-' + Assert.Matches(@"^(thisisareallyreallylongbutstillvalidagentnameiamusingforthi-[0-9]{4})$", serviceNameParts[3]); } - #endif + } +#endif private TestHostContext CreateTestContext([CallerMemberName] string testName = "") { @@ -211,4 +211,4 @@ namespace GitHub.Runner.Common.Tests return hc; } } -} \ No newline at end of file +} diff --git a/src/Test/L0/ServiceInterfacesL0.cs b/src/Test/L0/ServiceInterfacesL0.cs index 03affe57e..59b890285 100644 --- a/src/Test/L0/ServiceInterfacesL0.cs +++ b/src/Test/L0/ServiceInterfacesL0.cs @@ -70,7 +70,7 @@ namespace GitHub.Runner.Common.Tests typeof(IStepHost), typeof(IDiagnosticLogManager), typeof(IEnvironmentContextData), - typeof(IHookArgs), + typeof(IHookArgs), }; Validate( assembly: typeof(IStepsRunner).GetTypeInfo().Assembly, diff --git a/src/Test/L0/Util/ArgUtilL0.cs b/src/Test/L0/Util/ArgUtilL0.cs index 5dd29de8e..b0021f995 100644 --- a/src/Test/L0/Util/ArgUtilL0.cs +++ b/src/Test/L0/Util/ArgUtilL0.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Sdk; +using GitHub.Runner.Sdk; using System; using Xunit; diff --git a/src/Test/L0/Util/IOUtilL0.cs b/src/Test/L0/Util/IOUtilL0.cs index a3901c90d..08d3e9773 100644 --- a/src/Test/L0/Util/IOUtilL0.cs +++ b/src/Test/L0/Util/IOUtilL0.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Sdk; +using GitHub.Runner.Sdk; using System; using System.IO; using System.Threading; diff --git a/src/Test/L0/Util/UrlUtilL0.cs b/src/Test/L0/Util/UrlUtilL0.cs index 6100be5dd..a75d0c6dc 100644 --- a/src/Test/L0/Util/UrlUtilL0.cs +++ b/src/Test/L0/Util/UrlUtilL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using GitHub.Runner.Sdk; using Xunit; diff --git a/src/Test/L0/Util/VssUtilL0.cs b/src/Test/L0/Util/VssUtilL0.cs index 2965dcc06..1743b8762 100644 --- a/src/Test/L0/Util/VssUtilL0.cs +++ b/src/Test/L0/Util/VssUtilL0.cs @@ -1,4 +1,4 @@ -using GitHub.Services.Common; +using GitHub.Services.Common; using System; using Xunit; using GitHub.Runner.Sdk; diff --git a/src/Test/L0/Util/WhichUtilL0.cs b/src/Test/L0/Util/WhichUtilL0.cs index 180ff6ab0..9a6443d1f 100644 --- a/src/Test/L0/Util/WhichUtilL0.cs +++ b/src/Test/L0/Util/WhichUtilL0.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Common.Util; +using GitHub.Runner.Common.Util; using GitHub.Runner.Sdk; using System; using System.IO; @@ -203,7 +203,7 @@ namespace GitHub.Runner.Common.Tests.Util File.CreateSymbolicLink(brokenSymlink, target); // Act. - var exception = Assert.Throws(()=>WhichUtil.Which(brokenSymlinkName, require: true, trace: trace)); + var exception = Assert.Throws(() => WhichUtil.Which(brokenSymlinkName, require: true, trace: trace)); // Assert Assert.Equal(brokenSymlinkName, exception.FileName); diff --git a/src/Test/L0/Worker/ActionCommandManagerL0.cs b/src/Test/L0/Worker/ActionCommandManagerL0.cs index 78a5ebd69..693c6f025 100644 --- a/src/Test/L0/Worker/ActionCommandManagerL0.cs +++ b/src/Test/L0/Worker/ActionCommandManagerL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Runtime.CompilerServices; diff --git a/src/Test/L0/Worker/ActionManagerL0.cs b/src/Test/L0/Worker/ActionManagerL0.cs index 6052a848b..cd93cd8c0 100644 --- a/src/Test/L0/Worker/ActionManagerL0.cs +++ b/src/Test/L0/Worker/ActionManagerL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; @@ -1005,7 +1005,7 @@ namespace GitHub.Runner.Common.Tests.Worker }; //Act - var result = await _actionManager.PrepareActionsAsync(_ec.Object, actions); + var result = await _actionManager.PrepareActionsAsync(_ec.Object, actions); //Assert Assert.Equal(2, result.ContainerSetupSteps.Count); diff --git a/src/Test/L0/Worker/ActionManifestManagerL0.cs b/src/Test/L0/Worker/ActionManifestManagerL0.cs index 75010748b..3ad54a543 100644 --- a/src/Test/L0/Worker/ActionManifestManagerL0.cs +++ b/src/Test/L0/Worker/ActionManifestManagerL0.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.Expressions2; +using GitHub.DistributedTask.Expressions2; using GitHub.DistributedTask.ObjectTemplating.Tokens; using GitHub.DistributedTask.Pipelines.ContextData; using GitHub.DistributedTask.WebApi; diff --git a/src/Test/L0/Worker/ActionRunnerL0.cs b/src/Test/L0/Worker/ActionRunnerL0.cs index 4942f568c..30842c99b 100644 --- a/src/Test/L0/Worker/ActionRunnerL0.cs +++ b/src/Test/L0/Worker/ActionRunnerL0.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.Expressions2; +using GitHub.DistributedTask.Expressions2; using GitHub.DistributedTask.ObjectTemplating.Tokens; using GitHub.DistributedTask.Pipelines; using GitHub.DistributedTask.Pipelines.ContextData; diff --git a/src/Test/L0/Worker/ContainerOperationProviderL0.cs b/src/Test/L0/Worker/ContainerOperationProviderL0.cs index 4971baef8..1ca7ebbb0 100644 --- a/src/Test/L0/Worker/ContainerOperationProviderL0.cs +++ b/src/Test/L0/Worker/ContainerOperationProviderL0.cs @@ -1,4 +1,4 @@ -using GitHub.Runner.Worker; +using GitHub.Runner.Worker; using GitHub.Runner.Worker.Container; using Xunit; using Moq; @@ -162,4 +162,4 @@ namespace GitHub.Runner.Common.Tests.Worker containerOperationProvider.Initialize(_hc); } } -} \ No newline at end of file +} diff --git a/src/Test/L0/Worker/CreateStepSummaryCommandL0.cs b/src/Test/L0/Worker/CreateStepSummaryCommandL0.cs index 40b067afa..19f956fa8 100644 --- a/src/Test/L0/Worker/CreateStepSummaryCommandL0.cs +++ b/src/Test/L0/Worker/CreateStepSummaryCommandL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Text; diff --git a/src/Test/L0/Worker/ExecutionContextL0.cs b/src/Test/L0/Worker/ExecutionContextL0.cs index 2bdbd9f44..9d11508e1 100644 --- a/src/Test/L0/Worker/ExecutionContextL0.cs +++ b/src/Test/L0/Worker/ExecutionContextL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; diff --git a/src/Test/L0/Worker/Expressions/ConditionFunctionsL0.cs b/src/Test/L0/Worker/Expressions/ConditionFunctionsL0.cs index e4c809c47..2fdc06cac 100644 --- a/src/Test/L0/Worker/Expressions/ConditionFunctionsL0.cs +++ b/src/Test/L0/Worker/Expressions/ConditionFunctionsL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.CompilerServices; using GitHub.DistributedTask.Expressions2; using GitHub.DistributedTask.ObjectTemplating; diff --git a/src/Test/L0/Worker/HandlerL0.cs b/src/Test/L0/Worker/HandlerL0.cs index e46dfc91c..f9dbd67c7 100644 --- a/src/Test/L0/Worker/HandlerL0.cs +++ b/src/Test/L0/Worker/HandlerL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.CompilerServices; using GitHub.Actions.RunService.WebApi; using GitHub.DistributedTask.Pipelines; diff --git a/src/Test/L0/Worker/IssueMatcherL0.cs b/src/Test/L0/Worker/IssueMatcherL0.cs index aae92f3cc..777772a84 100644 --- a/src/Test/L0/Worker/IssueMatcherL0.cs +++ b/src/Test/L0/Worker/IssueMatcherL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using GitHub.Runner.Worker; using GitHub.Services.WebApi; using Xunit; diff --git a/src/Test/L0/Worker/JobExtensionL0.cs b/src/Test/L0/Worker/JobExtensionL0.cs index ce7dca1a5..5640aeb0e 100644 --- a/src/Test/L0/Worker/JobExtensionL0.cs +++ b/src/Test/L0/Worker/JobExtensionL0.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; using GitHub.Runner.Worker; using Moq; using System; @@ -318,7 +318,7 @@ namespace GitHub.Runner.Common.Tests.Worker _message.ActionsEnvironment = new ActionsEnvironmentReference("production"); - _jobEc = new Runner.Worker.ExecutionContext {Result = TaskResult.Succeeded}; + _jobEc = new Runner.Worker.ExecutionContext { Result = TaskResult.Succeeded }; _jobEc.Initialize(hc); _jobEc.InitializeJob(_message, _tokenSource.Token); @@ -328,7 +328,9 @@ namespace GitHub.Runner.Common.Tests.Worker } } - [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] + [Fact] + [Trait("Level", "L0")] + [Trait("Category", "Worker")] public void EnsureFinalizeJobHandlesNullEnvironmentUrl() { using (TestHostContext hc = CreateTestContext()) @@ -341,7 +343,7 @@ namespace GitHub.Runner.Common.Tests.Worker Url = null }; - _jobEc = new Runner.Worker.ExecutionContext {Result = TaskResult.Succeeded}; + _jobEc = new Runner.Worker.ExecutionContext { Result = TaskResult.Succeeded }; _jobEc.Initialize(hc); _jobEc.InitializeJob(_message, _tokenSource.Token); @@ -351,7 +353,9 @@ namespace GitHub.Runner.Common.Tests.Worker } } - [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] + [Fact] + [Trait("Level", "L0")] + [Trait("Category", "Worker")] public void EnsureFinalizeJobHandlesNullEnvironment() { using (TestHostContext hc = CreateTestContext()) @@ -361,7 +365,7 @@ namespace GitHub.Runner.Common.Tests.Worker _message.ActionsEnvironment = null; - _jobEc = new Runner.Worker.ExecutionContext {Result = TaskResult.Succeeded}; + _jobEc = new Runner.Worker.ExecutionContext { Result = TaskResult.Succeeded }; _jobEc.Initialize(hc); _jobEc.InitializeJob(_message, _tokenSource.Token); @@ -380,7 +384,7 @@ namespace GitHub.Runner.Common.Tests.Worker Environment.SetEnvironmentVariable("ACTIONS_RUNNER_HOOK_JOB_STARTED", "/foo/bar"); Environment.SetEnvironmentVariable("ACTIONS_RUNNER_HOOK_JOB_COMPLETED", "/bar/foo"); using (TestHostContext hc = CreateTestContext()) - { + { var jobExtension = new JobExtension(); jobExtension.Initialize(hc); @@ -396,7 +400,7 @@ namespace GitHub.Runner.Common.Tests.Worker jobExtension.FinalizeJob(_jobEc, _message, DateTime.UtcNow); Assert.Equal(Constants.Hooks.JobStartedStepName, hookStart.DisplayName); - Assert.Equal(Constants.Hooks.JobCompletedStepName, (_jobEc.PostJobSteps.Last() as JobExtensionRunner).DisplayName); + Assert.Equal(Constants.Hooks.JobCompletedStepName, (_jobEc.PostJobSteps.Last() as JobExtensionRunner).DisplayName); } Environment.SetEnvironmentVariable("ACTIONS_RUNNER_HOOK_JOB_STARTED", null); @@ -415,7 +419,7 @@ namespace GitHub.Runner.Common.Tests.Worker _message.ActionsEnvironment = null; - _jobEc = new Runner.Worker.ExecutionContext {Result = TaskResult.Succeeded}; + _jobEc = new Runner.Worker.ExecutionContext { Result = TaskResult.Succeeded }; _jobEc.Initialize(hc); _jobEc.InitializeJob(_message, _tokenSource.Token); diff --git a/src/Test/L0/Worker/JobRunnerL0.cs b/src/Test/L0/Worker/JobRunnerL0.cs index 42616e3d5..ce70b8eb4 100644 --- a/src/Test/L0/Worker/JobRunnerL0.cs +++ b/src/Test/L0/Worker/JobRunnerL0.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; using GitHub.Runner.Worker; using Moq; using System; @@ -89,16 +89,16 @@ namespace GitHub.Runner.Common.Tests.Worker return hc; } - private Pipelines.AgentJobRequestMessage GetMessage(String messageType = JobRequestMessageTypes.PipelineAgentJobRequest, [CallerMemberName] String testName = "") + private Pipelines.AgentJobRequestMessage GetMessage(String messageType = JobRequestMessageTypes.PipelineAgentJobRequest, [CallerMemberName] String testName = "") { TaskOrchestrationPlanReference plan = new(); TimelineReference timeline = new Timeline(Guid.NewGuid()); Guid jobId = Guid.NewGuid(); var message = new Pipelines.AgentJobRequestMessage( - plan, - timeline, - jobId, - testName, + plan, + timeline, + jobId, + testName, testName, null, null, null, new Dictionary(), new List(), new Pipelines.JobResources(), new Pipelines.ContextData.DictionaryContextData(), new Pipelines.WorkspaceOptions(), new List(), null, null, null, null, messageType: messageType); message.Variables[Constants.Variables.System.Culture] = "en-US"; @@ -164,7 +164,7 @@ namespace GitHub.Runner.Common.Tests.Worker [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async Task WorksWithRunnerJobRequestMessageType() + public async Task WorksWithRunnerJobRequestMessageType() { using (TestHostContext hc = CreateTestContext()) { diff --git a/src/Test/L0/Worker/OutputManagerL0.cs b/src/Test/L0/Worker/OutputManagerL0.cs index cf233bb55..9d7f5d3f2 100644 --- a/src/Test/L0/Worker/OutputManagerL0.cs +++ b/src/Test/L0/Worker/OutputManagerL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Test/L0/Worker/PipelineDirectoryManagerL0.cs b/src/Test/L0/Worker/PipelineDirectoryManagerL0.cs index d2ad4a89e..faabf9ef8 100644 --- a/src/Test/L0/Worker/PipelineDirectoryManagerL0.cs +++ b/src/Test/L0/Worker/PipelineDirectoryManagerL0.cs @@ -190,7 +190,7 @@ namespace GitHub.Runner.Common.Tests.Worker _trackingManager.Setup(x => x.LoadIfExists(_ec.Object, _trackingFile)).Returns(_existingConfig); // Act. - Assert.ThrowsAny(()=> _pipelineDirectoryManager.UpdateRepositoryDirectory(_ec.Object, "actions/notrunner", Path.Combine(hc.GetDirectory(WellKnownDirectory.Work), "not_under_pipeline_directory"), false)); + Assert.ThrowsAny(() => _pipelineDirectoryManager.UpdateRepositoryDirectory(_ec.Object, "actions/notrunner", Path.Combine(hc.GetDirectory(WellKnownDirectory.Work), "not_under_pipeline_directory"), false)); } } diff --git a/src/Test/L0/Worker/SaveStateFileCommandL0.cs b/src/Test/L0/Worker/SaveStateFileCommandL0.cs index 2e7767e57..15cba9d82 100644 --- a/src/Test/L0/Worker/SaveStateFileCommandL0.cs +++ b/src/Test/L0/Worker/SaveStateFileCommandL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/src/Test/L0/Worker/SetEnvFileCommandL0.cs b/src/Test/L0/Worker/SetEnvFileCommandL0.cs index 805f9e859..62e8b6b9b 100644 --- a/src/Test/L0/Worker/SetEnvFileCommandL0.cs +++ b/src/Test/L0/Worker/SetEnvFileCommandL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/src/Test/L0/Worker/SetOutputFileCommandL0.cs b/src/Test/L0/Worker/SetOutputFileCommandL0.cs index 9831f45de..67e6c5907 100644 --- a/src/Test/L0/Worker/SetOutputFileCommandL0.cs +++ b/src/Test/L0/Worker/SetOutputFileCommandL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs index 24f2600dc..f39c0e879 100644 --- a/src/Test/L0/Worker/StepHostL0.cs +++ b/src/Test/L0/Worker/StepHostL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Threading.Tasks; diff --git a/src/Test/L0/Worker/StepsRunnerL0.cs b/src/Test/L0/Worker/StepsRunnerL0.cs index d17ea3e2c..a22dc618f 100644 --- a/src/Test/L0/Worker/StepsRunnerL0.cs +++ b/src/Test/L0/Worker/StepsRunnerL0.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/src/Test/L0/Worker/VariablesL0.cs b/src/Test/L0/Worker/VariablesL0.cs index 9c9d24538..b9c9f08d6 100644 --- a/src/Test/L0/Worker/VariablesL0.cs +++ b/src/Test/L0/Worker/VariablesL0.cs @@ -1,4 +1,4 @@ -using GitHub.DistributedTask.WebApi; +using GitHub.DistributedTask.WebApi; using GitHub.Runner.Worker; using System.Collections.Generic; using System.Globalization;