Regex update CallerArgument pattern

From

```
ErrorUtilities\.VerifyThrowArgumentNull\(([a-zA-Z0-9]+), nameof\(\1\)\);
```

to

```
ErrorUtilities.VerifyThrowArgumentNull($1);
```

(And then revert `src/Deprecated`.)
This commit is contained in:
Rainer Sigwald 2024-06-19 16:47:37 -05:00
Родитель c1a2c6e965
Коммит f53d9c91fb
150 изменённых файлов: 428 добавлений и 428 удалений

Просмотреть файл

@ -287,7 +287,7 @@ namespace Microsoft.Build.Execution
/// </summary>
public BuildManager(string hostName)
{
ErrorUtilities.VerifyThrowArgumentNull(hostName, nameof(hostName));
ErrorUtilities.VerifyThrowArgumentNull(hostName);
_hostName = hostName;
_buildManagerState = BuildManagerState.Idle;
_buildSubmissions = new Dictionary<int, BuildSubmissionBase>();
@ -888,7 +888,7 @@ namespace Microsoft.Build.Execution
{
lock (_syncLock)
{
ErrorUtilities.VerifyThrowArgumentNull(requestData, nameof(requestData));
ErrorUtilities.VerifyThrowArgumentNull(requestData);
ErrorIfState(BuildManagerState.WaitingForBuildToComplete, "WaitingForEndOfBuild");
ErrorIfState(BuildManagerState.Idle, "NoBuildInProgress");
VerifyStateInternal(BuildManagerState.Building);
@ -1230,7 +1230,7 @@ namespace Microsoft.Build.Execution
[SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "Complex class might need refactoring to separate scheduling elements from submission elements.")]
private void ExecuteSubmission(BuildSubmission submission, bool allowMainThreadBuild)
{
ErrorUtilities.VerifyThrowArgumentNull(submission, nameof(submission));
ErrorUtilities.VerifyThrowArgumentNull(submission);
ErrorUtilities.VerifyThrow(!submission.IsCompleted, "Submission already complete.");
BuildRequestConfiguration? resolvedConfiguration = null;

Просмотреть файл

@ -240,7 +240,7 @@ namespace Microsoft.Build.Execution
/// <param name="projectCollection">The ProjectCollection from which the BuildParameters should populate itself.</param>
public BuildParameters(ProjectCollection projectCollection)
{
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
Initialize(new PropertyDictionary<ProjectPropertyInstance>(projectCollection.EnvironmentProperties), projectCollection.ProjectRootElementCache, new ToolsetProvider(projectCollection.Toolsets));

Просмотреть файл

@ -64,7 +64,7 @@ namespace Microsoft.Build.Execution
public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer)
: this(targetsToBuild, hostServices, flags, projectInstance.FullPath)
{
ErrorUtilities.VerifyThrowArgumentNull(projectInstance, nameof(projectInstance));
ErrorUtilities.VerifyThrowArgumentNull(projectInstance);
foreach (string targetName in targetsToBuild)
{
@ -93,7 +93,7 @@ namespace Microsoft.Build.Execution
public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer, RequestedProjectState requestedProjectState)
: this(projectInstance, targetsToBuild, hostServices, flags, propertiesToTransfer)
{
ErrorUtilities.VerifyThrowArgumentNull(requestedProjectState, nameof(requestedProjectState));
ErrorUtilities.VerifyThrowArgumentNull(requestedProjectState);
RequestedProjectState = requestedProjectState;
}
@ -127,7 +127,7 @@ namespace Microsoft.Build.Execution
RequestedProjectState requestedProjectState)
: this(projectFullPath, globalProperties, toolsVersion, targetsToBuild, hostServices, flags)
{
ErrorUtilities.VerifyThrowArgumentNull(requestedProjectState, nameof(requestedProjectState));
ErrorUtilities.VerifyThrowArgumentNull(requestedProjectState);
RequestedProjectState = requestedProjectState;
}
@ -145,7 +145,7 @@ namespace Microsoft.Build.Execution
: this(targetsToBuild, hostServices, flags, FileUtilities.NormalizePath(projectFullPath)!)
{
ErrorUtilities.VerifyThrowArgumentLength(projectFullPath, nameof(projectFullPath));
ErrorUtilities.VerifyThrowArgumentNull(globalProperties, nameof(globalProperties));
ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
GlobalPropertiesDictionary = new PropertyDictionary<ProjectPropertyInstance>(globalProperties.Count);
foreach (KeyValuePair<string, string?> propertyPair in globalProperties)

Просмотреть файл

@ -13,7 +13,7 @@ namespace Microsoft.Build.Execution
BuildRequestDataFlags flags,
HostServices? hostServices)
{
ErrorUtilities.VerifyThrowArgumentNull(targetNames, nameof(targetNames));
ErrorUtilities.VerifyThrowArgumentNull(targetNames);
foreach (string targetName in targetNames)
{
ErrorUtilities.VerifyThrowArgumentNull(targetName, "target");

Просмотреть файл

@ -35,7 +35,7 @@ namespace Microsoft.Build.Execution
protected internal BuildSubmissionBase(BuildManager buildManager, int submissionId, TRequestData requestData)
: base(buildManager, submissionId)
{
ErrorUtilities.VerifyThrowArgumentNull(requestData, nameof(requestData));
ErrorUtilities.VerifyThrowArgumentNull(requestData);
BuildRequestData = requestData;
}
@ -77,7 +77,7 @@ namespace Microsoft.Build.Execution
/// </summary>
internal void CompleteResults(TResultData result)
{
ErrorUtilities.VerifyThrowArgumentNull(result, nameof(result));
ErrorUtilities.VerifyThrowArgumentNull(result);
CheckResultValidForCompletion(result);
BuildResult ??= result;

Просмотреть файл

@ -40,7 +40,7 @@ namespace Microsoft.Build.Execution
/// </summary>
protected internal BuildSubmissionBase(BuildManager buildManager, int submissionId)
{
ErrorUtilities.VerifyThrowArgumentNull(buildManager, nameof(buildManager));
ErrorUtilities.VerifyThrowArgumentNull(buildManager);
BuildManager = buildManager;
SubmissionId = submissionId;

Просмотреть файл

@ -75,7 +75,7 @@ namespace Microsoft.Build.BackEnd.Client
public MSBuildClientPacketPump(Stream stream)
{
ErrorUtilities.VerifyThrowArgumentNull(stream, nameof(stream));
ErrorUtilities.VerifyThrowArgumentNull(stream);
_stream = stream;
_isServerDisconnecting = false;

Просмотреть файл

@ -590,7 +590,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="host">The host.</param>
public void InitializeComponent(IBuildComponentHost host)
{
ErrorUtilities.VerifyThrowArgumentNull(host, nameof(host));
ErrorUtilities.VerifyThrowArgumentNull(host);
ErrorUtilities.VerifyThrow(_componentHost == null, "BuildRequestEngine already initialized!");
_componentHost = host;
_configCache = (IConfigCache)host.GetComponent(BuildComponentType.ConfigCache);
@ -1330,7 +1330,7 @@ namespace Microsoft.Build.BackEnd
private void IssueConfigurationRequest(BuildRequestConfiguration config)
{
ErrorUtilities.VerifyThrow(config.WasGeneratedByNode, "InvalidConfigurationId");
ErrorUtilities.VerifyThrowArgumentNull(config, nameof(config));
ErrorUtilities.VerifyThrowArgumentNull(config);
ErrorUtilities.VerifyThrow(_unresolvedConfigurations.HasConfiguration(config.ConfigurationId), "NoUnresolvedConfiguration");
TraceEngine("Issuing configuration request for node config {0}", config.ConfigurationId);
RaiseNewConfigurationRequest(config);
@ -1342,7 +1342,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="blocker">The information about why the request is blocked.</param>
private void IssueBuildRequest(BuildRequestBlocker blocker)
{
ErrorUtilities.VerifyThrowArgumentNull(blocker, nameof(blocker));
ErrorUtilities.VerifyThrowArgumentNull(blocker);
if (blocker.BuildRequests == null)
{

Просмотреть файл

@ -122,8 +122,8 @@ namespace Microsoft.Build.BackEnd
/// <param name="requestConfiguration">The build request configuration.</param>
internal BuildRequestEntry(BuildRequest request, BuildRequestConfiguration requestConfiguration)
{
ErrorUtilities.VerifyThrowArgumentNull(request, nameof(request));
ErrorUtilities.VerifyThrowArgumentNull(requestConfiguration, nameof(requestConfiguration));
ErrorUtilities.VerifyThrowArgumentNull(request);
ErrorUtilities.VerifyThrowArgumentNull(requestConfiguration);
ErrorUtilities.VerifyThrow(requestConfiguration.ConfigurationId == request.ConfigurationId, "Configuration id mismatch");
GlobalLock = new Object();
@ -303,7 +303,7 @@ namespace Microsoft.Build.BackEnd
{
lock (GlobalLock)
{
ErrorUtilities.VerifyThrowArgumentNull(result, nameof(result));
ErrorUtilities.VerifyThrowArgumentNull(result);
ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Waiting || _outstandingRequests == null, "Entry must be in the Waiting state to report results, or we must have flushed our requests due to an error. Config: {0} State: {1} Requests: {2}", RequestConfiguration.ConfigurationId, State, _outstandingRequests != null);
// If the matching request is in the issue list, remove it so we don't try to ask for it to be built.
@ -471,7 +471,7 @@ namespace Microsoft.Build.BackEnd
{
lock (GlobalLock)
{
ErrorUtilities.VerifyThrowArgumentNull(result, nameof(result));
ErrorUtilities.VerifyThrowArgumentNull(result);
ErrorUtilities.VerifyThrow(Result == null, "Entry already Completed.");
// If this request is determined to be a success, then all outstanding items must have been taken care of

Просмотреть файл

@ -35,8 +35,8 @@ namespace Microsoft.Build.BackEnd
bool skipStaticGraphIsolationConstraints = false,
BuildRequestDataFlags flags = BuildRequestDataFlags.None)
{
ErrorUtilities.VerifyThrowArgumentNull(config, nameof(config));
ErrorUtilities.VerifyThrowArgumentNull(targets, nameof(targets));
ErrorUtilities.VerifyThrowArgumentNull(config);
ErrorUtilities.VerifyThrowArgumentNull(targets);
Config = config;
Targets = targets;

Просмотреть файл

@ -73,7 +73,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="config">The configuration to add.</param>
public void AddConfiguration(BuildRequestConfiguration config)
{
ErrorUtilities.VerifyThrowArgumentNull(config, nameof(config));
ErrorUtilities.VerifyThrowArgumentNull(config);
ErrorUtilities.VerifyThrow(config.ConfigurationId != 0, "Invalid configuration ID");
lock (_lockObject)
@ -107,7 +107,7 @@ namespace Microsoft.Build.BackEnd
/// <returns>A matching configuration if one exists, null otherwise.</returns>
public BuildRequestConfiguration GetMatchingConfiguration(BuildRequestConfiguration config)
{
ErrorUtilities.VerifyThrowArgumentNull(config, nameof(config));
ErrorUtilities.VerifyThrowArgumentNull(config);
return GetMatchingConfiguration(new ConfigurationMetadata(config));
}
@ -118,7 +118,7 @@ namespace Microsoft.Build.BackEnd
/// <returns>A matching configuration if one exists, null otherwise.</returns>
public BuildRequestConfiguration GetMatchingConfiguration(ConfigurationMetadata configMetadata)
{
ErrorUtilities.VerifyThrowArgumentNull(configMetadata, nameof(configMetadata));
ErrorUtilities.VerifyThrowArgumentNull(configMetadata);
lock (_lockObject)
{
if (!_configurationIdsByMetadata.TryGetValue(configMetadata, out int configId))
@ -341,7 +341,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="host">The build component host.</param>
public void InitializeComponent(IBuildComponentHost host)
{
ErrorUtilities.VerifyThrowArgumentNull(host, nameof(host));
ErrorUtilities.VerifyThrowArgumentNull(host);
}
/// <summary>

Просмотреть файл

@ -281,7 +281,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="host">The component host.</param>
public void InitializeComponent(IBuildComponentHost host)
{
ErrorUtilities.VerifyThrowArgumentNull(host, nameof(host));
ErrorUtilities.VerifyThrowArgumentNull(host);
}
/// <summary>
@ -350,7 +350,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="buildResult">The candidate build result.</param>
/// <returns>True if the flags and project state filter of the build request is compatible with the build result.</returns>
private static bool AreBuildResultFlagsCompatible(BuildRequest buildRequest, BuildResult buildResult)
{
{
if (buildResult.BuildRequestDataFlags is null)
{
return true;

Просмотреть файл

@ -101,7 +101,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="host">The component host.</param>
private NodeEndpointInProc(EndpointMode commMode, IBuildComponentHost host)
{
ErrorUtilities.VerifyThrowArgumentNull(host, nameof(host));
ErrorUtilities.VerifyThrowArgumentNull(host);
_status = LinkStatus.Inactive;
_mode = commMode;
@ -331,7 +331,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="packet">The packet to be transmitted.</param>
private void EnqueuePacket(INodePacket packet)
{
ErrorUtilities.VerifyThrowArgumentNull(packet, nameof(packet));
ErrorUtilities.VerifyThrowArgumentNull(packet);
ErrorUtilities.VerifyThrow(_mode == EndpointMode.Asynchronous, "EndPoint mode is synchronous, should be asynchronous");
ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null");
ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null");

Просмотреть файл

@ -157,7 +157,7 @@ namespace Microsoft.Build.BackEnd
public void SendData(int nodeId, INodePacket packet)
{
ErrorUtilities.VerifyThrowArgumentOutOfRange(nodeId == _inProcNodeId, "node");
ErrorUtilities.VerifyThrowArgumentNull(packet, nameof(packet));
ErrorUtilities.VerifyThrowArgumentNull(packet);
if (_inProcNode == null)
{

Просмотреть файл

@ -78,7 +78,7 @@ namespace Microsoft.Build.BackEnd
/// </summary>
public IList<NodeInfo> CreateNodes(int nextNodeId, INodePacketFactory factory, Func<NodeInfo, NodeConfiguration> configurationFactory, int numberOfNodesToCreate)
{
ErrorUtilities.VerifyThrowArgumentNull(factory, nameof(factory));
ErrorUtilities.VerifyThrowArgumentNull(factory);
// This can run concurrently. To be properly detect internal bug when we create more nodes than allowed
// we add into _nodeContexts premise of future node and verify that it will not cross limits.

Просмотреть файл

@ -95,7 +95,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="packet">The packet to send.</param>
protected void SendData(NodeContext context, INodePacket packet)
{
ErrorUtilities.VerifyThrowArgumentNull(packet, nameof(packet));
ErrorUtilities.VerifyThrowArgumentNull(packet);
context.SendData(packet);
}

Просмотреть файл

@ -527,7 +527,7 @@ namespace Microsoft.Build.BackEnd
/// </summary>
internal bool CreateNode(HandshakeOptions hostContext, INodePacketFactory factory, INodePacketHandler handler, TaskHostConfiguration configuration)
{
ErrorUtilities.VerifyThrowArgumentNull(factory, nameof(factory));
ErrorUtilities.VerifyThrowArgumentNull(factory);
ErrorUtilities.VerifyThrow(!_nodeIdToPacketFactory.ContainsKey((int)hostContext), "We should not already have a factory for this context! Did we forget to call DisconnectFromHost somewhere?");
if (AvailableNodes <= 0)

Просмотреть файл

@ -21,7 +21,7 @@ namespace Microsoft.Build.Logging
public ForwardingLoggerRecord(ILogger centralLogger, LoggerDescription forwardingLoggerDescription)
{
// The logging service allows a null central logger, so we don't check for it here.
ErrorUtilities.VerifyThrowArgumentNull(forwardingLoggerDescription, nameof(forwardingLoggerDescription));
ErrorUtilities.VerifyThrowArgumentNull(forwardingLoggerDescription);
this.CentralLogger = centralLogger;
this.ForwardingLoggerDescription = forwardingLoggerDescription;

Просмотреть файл

@ -42,8 +42,8 @@ namespace Microsoft.Build.BackEnd.Logging
/// <param name="eventContext">The event context</param>
public LoggingContext(ILoggingService loggingService, BuildEventContext eventContext)
{
ErrorUtilities.VerifyThrowArgumentNull(loggingService, nameof(loggingService));
ErrorUtilities.VerifyThrowArgumentNull(eventContext, nameof(eventContext));
ErrorUtilities.VerifyThrowArgumentNull(loggingService);
ErrorUtilities.VerifyThrowArgumentNull(eventContext);
_loggingService = loggingService;
_eventContext = eventContext;

Просмотреть файл

@ -196,8 +196,8 @@ namespace Microsoft.Build.BackEnd
/// <param name="entry">The entry to build.</param>
public void BuildRequest(NodeLoggingContext loggingContext, BuildRequestEntry entry)
{
ErrorUtilities.VerifyThrowArgumentNull(loggingContext, nameof(loggingContext));
ErrorUtilities.VerifyThrowArgumentNull(entry, nameof(entry));
ErrorUtilities.VerifyThrowArgumentNull(loggingContext);
ErrorUtilities.VerifyThrowArgumentNull(entry);
ErrorUtilities.VerifyThrow(_componentHost != null, "Host not set.");
ErrorUtilities.VerifyThrow(_targetBuilder == null, "targetBuilder not null");
ErrorUtilities.VerifyThrow(_nodeLoggingContext == null, "nodeLoggingContext not null");
@ -332,10 +332,10 @@ namespace Microsoft.Build.BackEnd
public async Task<BuildResult[]> BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets = false)
{
VerifyIsNotZombie();
ErrorUtilities.VerifyThrowArgumentNull(projectFiles, nameof(projectFiles));
ErrorUtilities.VerifyThrowArgumentNull(properties, nameof(properties));
ErrorUtilities.VerifyThrowArgumentNull(targets, nameof(targets));
ErrorUtilities.VerifyThrowArgumentNull(toolsVersions, nameof(toolsVersions));
ErrorUtilities.VerifyThrowArgumentNull(projectFiles);
ErrorUtilities.VerifyThrowArgumentNull(properties);
ErrorUtilities.VerifyThrowArgumentNull(targets);
ErrorUtilities.VerifyThrowArgumentNull(toolsVersions);
ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
ErrorUtilities.VerifyThrow(projectFiles.Length == properties.Length, "Properties and project counts not the same");
ErrorUtilities.VerifyThrow(projectFiles.Length == toolsVersions.Length, "Tools versions and project counts not the same");
@ -550,7 +550,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="host">The component host.</param>
public void InitializeComponent(IBuildComponentHost host)
{
ErrorUtilities.VerifyThrowArgumentNull(host, nameof(host));
ErrorUtilities.VerifyThrowArgumentNull(host);
ErrorUtilities.VerifyThrow(_componentHost == null, "RequestBuilder already initialized.");
_componentHost = host;
}
@ -1105,7 +1105,7 @@ namespace Microsoft.Build.BackEnd
{
ErrorUtilities.VerifyThrow(_targetBuilder != null, "Target builder is null");
// We consider this the entrypoint for the project build for purposes of BuildCheck processing
// We consider this the entrypoint for the project build for purposes of BuildCheck processing
bool isRestoring = _requestEntry.RequestConfiguration.GlobalProperties[MSBuildConstants.MSBuildIsRestoring] is not null;
var buildCheckManager = isRestoring
@ -1155,7 +1155,7 @@ namespace Microsoft.Build.BackEnd
_requestEntry.Request.BuildEventContext);
}
try
{
HandleProjectStarted(buildCheckManager);

Просмотреть файл

@ -103,10 +103,10 @@ namespace Microsoft.Build.BackEnd
public async Task<BuildResult> BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name, TargetBuiltReason reason)[] targetNames, Lookup baseLookup, CancellationToken cancellationToken)
{
ErrorUtilities.VerifyThrowArgumentNull(loggingContext, "projectLoggingContext");
ErrorUtilities.VerifyThrowArgumentNull(entry, nameof(entry));
ErrorUtilities.VerifyThrowArgumentNull(entry);
ErrorUtilities.VerifyThrowArgumentNull(callback, "requestBuilderCallback");
ErrorUtilities.VerifyThrowArgumentNull(targetNames, nameof(targetNames));
ErrorUtilities.VerifyThrowArgumentNull(baseLookup, nameof(baseLookup));
ErrorUtilities.VerifyThrowArgumentNull(targetNames);
ErrorUtilities.VerifyThrowArgumentNull(baseLookup);
ErrorUtilities.VerifyThrow(targetNames.Length > 0, "List of targets must be non-empty");
ErrorUtilities.VerifyThrow(_componentHost != null, "InitializeComponent must be called before building targets.");
@ -212,7 +212,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="host">The component host.</param>
public void InitializeComponent(IBuildComponentHost host)
{
ErrorUtilities.VerifyThrowArgumentNull(host, nameof(host));
ErrorUtilities.VerifyThrowArgumentNull(host);
_componentHost = host;
}

Просмотреть файл

@ -175,11 +175,11 @@ namespace Microsoft.Build.BackEnd
LoggingContext loggingContext,
bool stopProcessingOnCompletion)
{
ErrorUtilities.VerifyThrowArgumentNull(requestEntry, nameof(requestEntry));
ErrorUtilities.VerifyThrowArgumentNull(targetBuilderCallback, nameof(targetBuilderCallback));
ErrorUtilities.VerifyThrowArgumentNull(requestEntry);
ErrorUtilities.VerifyThrowArgumentNull(targetBuilderCallback);
ErrorUtilities.VerifyThrowArgumentNull(targetSpecification, "targetName");
ErrorUtilities.VerifyThrowArgumentNull(baseLookup, "lookup");
ErrorUtilities.VerifyThrowArgumentNull(host, nameof(host));
ErrorUtilities.VerifyThrowArgumentNull(host);
_requestEntry = requestEntry;
_targetBuilderCallback = targetBuilderCallback;

Просмотреть файл

@ -30,7 +30,7 @@ namespace Microsoft.Build.BackEnd
internal TargetSpecification(string targetName, ElementLocation referenceLocation, TargetBuiltReason targetBuiltReason = TargetBuiltReason.None)
{
ErrorUtilities.VerifyThrowArgumentLength(targetName, nameof(targetName));
ErrorUtilities.VerifyThrowArgumentNull(referenceLocation, nameof(referenceLocation));
ErrorUtilities.VerifyThrowArgumentNull(referenceLocation);
this._targetName = targetName;
this._referenceLocation = referenceLocation;

Просмотреть файл

@ -293,7 +293,7 @@ namespace Microsoft.Build.BackEnd
/// <returns>true, if successful</returns>
private async Task<WorkUnitResult> ExecuteTask(TaskExecutionMode mode, Lookup lookup)
{
ErrorUtilities.VerifyThrowArgumentNull(lookup, nameof(lookup));
ErrorUtilities.VerifyThrowArgumentNull(lookup);
WorkUnitResult taskResult = new WorkUnitResult(WorkUnitResultCode.Failed, WorkUnitActionCode.Stop, null);
TaskHost taskHost = null;

Просмотреть файл

@ -114,8 +114,8 @@ namespace Microsoft.Build.BackEnd
/// <param name="targetBuilderCallback">An <see cref="ITargetBuilderCallback"/> to use to invoke targets and build projects.</param>
public TaskHost(IBuildComponentHost host, BuildRequestEntry requestEntry, ElementLocation taskLocation, ITargetBuilderCallback targetBuilderCallback)
{
ErrorUtilities.VerifyThrowArgumentNull(host, nameof(host));
ErrorUtilities.VerifyThrowArgumentNull(requestEntry, nameof(requestEntry));
ErrorUtilities.VerifyThrowArgumentNull(host);
ErrorUtilities.VerifyThrowArgumentNull(requestEntry);
ErrorUtilities.VerifyThrowInternalNull(taskLocation, nameof(taskLocation));
_host = host;
@ -408,7 +408,7 @@ namespace Microsoft.Build.BackEnd
{
lock (_callbackMonitor)
{
ErrorUtilities.VerifyThrowArgumentNull(e, nameof(e));
ErrorUtilities.VerifyThrowArgumentNull(e);
if (!_activeProxy)
{
@ -478,7 +478,7 @@ namespace Microsoft.Build.BackEnd
{
lock (_callbackMonitor)
{
ErrorUtilities.VerifyThrowArgumentNull(e, nameof(e));
ErrorUtilities.VerifyThrowArgumentNull(e);
if (!_activeProxy)
{
@ -519,7 +519,7 @@ namespace Microsoft.Build.BackEnd
{
lock (_callbackMonitor)
{
ErrorUtilities.VerifyThrowArgumentNull(e, nameof(e));
ErrorUtilities.VerifyThrowArgumentNull(e);
if (!_activeProxy)
{
@ -560,7 +560,7 @@ namespace Microsoft.Build.BackEnd
{
lock (_callbackMonitor)
{
ErrorUtilities.VerifyThrowArgumentNull(e, nameof(e));
ErrorUtilities.VerifyThrowArgumentNull(e);
if (!_activeProxy)
{
@ -651,7 +651,7 @@ namespace Microsoft.Build.BackEnd
{
lock (_callbackMonitor)
{
ErrorUtilities.VerifyThrowArgumentNull(eventName, nameof(eventName));
ErrorUtilities.VerifyThrowArgumentNull(eventName);
if (!_activeProxy)
{
@ -965,8 +965,8 @@ namespace Microsoft.Build.BackEnd
/// </summary>
public async Task<BuildEngineResult> InternalBuildProjects(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IList<String>[] undefineProperties, string[] toolsVersion, bool returnTargetOutputs, bool skipNonexistentTargets = false)
{
ErrorUtilities.VerifyThrowArgumentNull(projectFileNames, nameof(projectFileNames));
ErrorUtilities.VerifyThrowArgumentNull(globalProperties, nameof(globalProperties));
ErrorUtilities.VerifyThrowArgumentNull(projectFileNames);
ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
VerifyActiveProxy();
BuildEngineResult result;
@ -1138,8 +1138,8 @@ namespace Microsoft.Build.BackEnd
/// <returns>A Task returning a structure containing the result of the build, success or failure and the list of target outputs per project</returns>
private async Task<BuildEngineResult> BuildProjectFilesInParallelAsync(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IList<String>[] undefineProperties, string[] toolsVersion, bool returnTargetOutputs, bool skipNonexistentTargets = false)
{
ErrorUtilities.VerifyThrowArgumentNull(projectFileNames, nameof(projectFileNames));
ErrorUtilities.VerifyThrowArgumentNull(globalProperties, nameof(globalProperties));
ErrorUtilities.VerifyThrowArgumentNull(projectFileNames);
ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
VerifyActiveProxy();
List<IDictionary<string, ITaskItem[]>> targetOutputsPerProject = null;

Просмотреть файл

@ -126,8 +126,8 @@ namespace Microsoft.Build.BackEnd
/// </summary>
public SchedulableRequest(SchedulingData collection, BuildRequest request, SchedulableRequest parent)
{
ErrorUtilities.VerifyThrowArgumentNull(collection, nameof(collection));
ErrorUtilities.VerifyThrowArgumentNull(request, nameof(request));
ErrorUtilities.VerifyThrowArgumentNull(collection);
ErrorUtilities.VerifyThrowArgumentNull(request);
ErrorUtilities.VerifyThrow((parent == null) || (parent._schedulingData == collection), "Parent request does not belong to the same collection.");
_schedulingData = collection;
@ -311,7 +311,7 @@ namespace Microsoft.Build.BackEnd
public void Yield(string[] activeTargets)
{
VerifyState(SchedulableRequestState.Executing);
ErrorUtilities.VerifyThrowArgumentNull(activeTargets, nameof(activeTargets));
ErrorUtilities.VerifyThrowArgumentNull(activeTargets);
_activeTargetsWhenBlocked = activeTargets;
ChangeToState(SchedulableRequestState.Yielding);
}
@ -335,8 +335,8 @@ namespace Microsoft.Build.BackEnd
public void BlockByRequest(SchedulableRequest blockingRequest, string[] activeTargets, string blockingTarget = null)
{
VerifyOneOfStates([SchedulableRequestState.Blocked, SchedulableRequestState.Executing]);
ErrorUtilities.VerifyThrowArgumentNull(blockingRequest, nameof(blockingRequest));
ErrorUtilities.VerifyThrowArgumentNull(activeTargets, nameof(activeTargets));
ErrorUtilities.VerifyThrowArgumentNull(blockingRequest);
ErrorUtilities.VerifyThrowArgumentNull(activeTargets);
ErrorUtilities.VerifyThrow(BlockingTarget == null, "Cannot block again if we're already blocked on a target");
// Note that the blocking request will typically be our parent UNLESS it is a request we blocked on because it was executing a target we wanted to execute.
@ -372,7 +372,7 @@ namespace Microsoft.Build.BackEnd
public void UnblockWithPartialResultForBlockingTarget(BuildResult result)
{
VerifyOneOfStates([SchedulableRequestState.Blocked, SchedulableRequestState.Unscheduled]);
ErrorUtilities.VerifyThrowArgumentNull(result, nameof(result));
ErrorUtilities.VerifyThrowArgumentNull(result);
BlockingRequestKey key = new BlockingRequestKey(result);
DisconnectRequestWeAreBlockedBy(key);
@ -385,7 +385,7 @@ namespace Microsoft.Build.BackEnd
public void UnblockWithResult(BuildResult result)
{
VerifyOneOfStates([SchedulableRequestState.Blocked, SchedulableRequestState.Unscheduled]);
ErrorUtilities.VerifyThrowArgumentNull(result, nameof(result));
ErrorUtilities.VerifyThrowArgumentNull(result);
BlockingRequestKey key = new BlockingRequestKey(result);
DisconnectRequestWeAreBlockedBy(key);

Просмотреть файл

@ -1354,8 +1354,8 @@ namespace Microsoft.Build.BackEnd
/// </summary>
private void AssignUnscheduledRequestToNode(SchedulableRequest request, int nodeId, List<ScheduleResponse> responses)
{
ErrorUtilities.VerifyThrowArgumentNull(request, nameof(request));
ErrorUtilities.VerifyThrowArgumentNull(responses, nameof(responses));
ErrorUtilities.VerifyThrowArgumentNull(request);
ErrorUtilities.VerifyThrowArgumentNull(responses);
ErrorUtilities.VerifyThrow(nodeId != InvalidNodeId, "Invalid node id specified.");
request.VerifyState(SchedulableRequestState.Unscheduled);
@ -1619,8 +1619,8 @@ namespace Microsoft.Build.BackEnd
/// </summary>
private void HandleRequestBlockedOnInProgressTarget(SchedulableRequest blockedRequest, BuildRequestBlocker blocker)
{
ErrorUtilities.VerifyThrowArgumentNull(blockedRequest, nameof(blockedRequest));
ErrorUtilities.VerifyThrowArgumentNull(blocker, nameof(blocker));
ErrorUtilities.VerifyThrowArgumentNull(blockedRequest);
ErrorUtilities.VerifyThrowArgumentNull(blocker);
// We are blocked on an in-progress request building a target whose results we need.
SchedulableRequest blockingRequest = _schedulingData.GetScheduledRequest(blocker.BlockingRequestId);
@ -1678,8 +1678,8 @@ namespace Microsoft.Build.BackEnd
/// </summary>
private void HandleRequestBlockedByNewRequests(SchedulableRequest parentRequest, BuildRequestBlocker blocker, List<ScheduleResponse> responses)
{
ErrorUtilities.VerifyThrowArgumentNull(blocker, nameof(blocker));
ErrorUtilities.VerifyThrowArgumentNull(responses, nameof(responses));
ErrorUtilities.VerifyThrowArgumentNull(blocker);
ErrorUtilities.VerifyThrowArgumentNull(responses);
// The request is waiting on new requests.
bool abortRequestBatch = false;

Просмотреть файл

@ -47,7 +47,7 @@ namespace Microsoft.Build.BackEnd.SdkResolution
/// <param name="sendPacket">A <see cref="Action{INodePacket}"/> to use when sending packets to the main node.</param>
public OutOfProcNodeSdkResolverService(Action<INodePacket> sendPacket)
{
ErrorUtilities.VerifyThrowArgumentNull(sendPacket, nameof(sendPacket));
ErrorUtilities.VerifyThrowArgumentNull(sendPacket);
SendPacket = sendPacket;
}

Просмотреть файл

@ -185,7 +185,7 @@ namespace Microsoft.Build.BackEnd
: this(submissionId, nodeRequestId, configurationId, hostServices, buildRequestDataFlags, requestedProjectState, projectContextId)
{
ErrorUtilities.VerifyThrowArgumentNull(escapedTargets, "targets");
ErrorUtilities.VerifyThrowArgumentNull(parentBuildEventContext, nameof(parentBuildEventContext));
ErrorUtilities.VerifyThrowArgumentNull(parentBuildEventContext);
// When targets come into a build request, we unescape them.
_targets = new List<string>(escapedTargets.Count);

Просмотреть файл

@ -167,7 +167,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="defaultToolsVersion">The default ToolsVersion to use as a fallback</param>
internal BuildRequestConfiguration(int configId, BuildRequestData data, string defaultToolsVersion)
{
ErrorUtilities.VerifyThrowArgumentNull(data, nameof(data));
ErrorUtilities.VerifyThrowArgumentNull(data);
ErrorUtilities.VerifyThrowInternalLength(data.ProjectFullPath, "data.ProjectFullPath");
_configId = configId;
@ -209,7 +209,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="instance">The project instance.</param>
internal BuildRequestConfiguration(int configId, ProjectInstance instance)
{
ErrorUtilities.VerifyThrowArgumentNull(instance, nameof(instance));
ErrorUtilities.VerifyThrowArgumentNull(instance);
_configId = configId;
_projectFullPath = instance.FullPath;
@ -230,7 +230,7 @@ namespace Microsoft.Build.BackEnd
private BuildRequestConfiguration(int configId, BuildRequestConfiguration other)
{
ErrorUtilities.VerifyThrow(configId != InvalidConfigurationId, "Configuration ID must not be invalid when using this constructor.");
ErrorUtilities.VerifyThrowArgumentNull(other, nameof(other));
ErrorUtilities.VerifyThrowArgumentNull(other);
ErrorUtilities.VerifyThrow(other._transferredState == null, "Unexpected transferred state still set on other configuration.");
_project = other._project;

Просмотреть файл

@ -52,7 +52,7 @@ namespace Microsoft.Build.BackEnd
/// </summary>
internal BuildRequestUnblocker(BuildResult buildResult)
{
ErrorUtilities.VerifyThrowArgumentNull(buildResult, nameof(buildResult));
ErrorUtilities.VerifyThrowArgumentNull(buildResult);
_buildResult = buildResult;
_blockedGlobalRequestId = buildResult.ParentGlobalRequestId;
}
@ -63,7 +63,7 @@ namespace Microsoft.Build.BackEnd
internal BuildRequestUnblocker(BuildRequest parentRequest, BuildResult buildResult)
: this(buildResult)
{
ErrorUtilities.VerifyThrowArgumentNull(parentRequest, nameof(parentRequest));
ErrorUtilities.VerifyThrowArgumentNull(parentRequest);
_blockedGlobalRequestId = parentRequest.GlobalRequestId;
}

Просмотреть файл

@ -523,8 +523,8 @@ namespace Microsoft.Build.Execution
/// <param name="result">The results for the target.</param>
public void AddResultsForTarget(string target, TargetResult result)
{
ErrorUtilities.VerifyThrowArgumentNull(target, nameof(target));
ErrorUtilities.VerifyThrowArgumentNull(result, nameof(result));
ErrorUtilities.VerifyThrowArgumentNull(target);
ErrorUtilities.VerifyThrowArgumentNull(result);
lock (this)
{
@ -564,7 +564,7 @@ namespace Microsoft.Build.Execution
/// <param name="results">The results to merge in.</param>
public void MergeResults(BuildResult results)
{
ErrorUtilities.VerifyThrowArgumentNull(results, nameof(results));
ErrorUtilities.VerifyThrowArgumentNull(results);
ErrorUtilities.VerifyThrow(results.ConfigurationId == ConfigurationId, "Result configurations don't match");
// If we are merging with ourself or with a shallow clone, do nothing.

Просмотреть файл

@ -24,7 +24,7 @@ namespace Microsoft.Build.BackEnd
/// </summary>
public ConfigurationMetadata(BuildRequestConfiguration configuration)
{
ErrorUtilities.VerifyThrowArgumentNull(configuration, nameof(configuration));
ErrorUtilities.VerifyThrowArgumentNull(configuration);
_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(configuration.GlobalProperties);
_projectFullPath = FileUtilities.NormalizePath(configuration.ProjectFullPath);
_toolsVersion = configuration.ToolsVersion;
@ -35,7 +35,7 @@ namespace Microsoft.Build.BackEnd
/// </summary>
public ConfigurationMetadata(Project project)
{
ErrorUtilities.VerifyThrowArgumentNull(project, nameof(project));
ErrorUtilities.VerifyThrowArgumentNull(project);
_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(project.GlobalPropertiesCount);
foreach (KeyValuePair<string, string> entry in project.GlobalPropertiesEnumerable)
{
@ -52,7 +52,7 @@ namespace Microsoft.Build.BackEnd
public ConfigurationMetadata(string projectFullPath, PropertyDictionary<ProjectPropertyInstance> globalProperties)
{
ErrorUtilities.VerifyThrowArgumentLength(projectFullPath, nameof(projectFullPath));
ErrorUtilities.VerifyThrowArgumentNull(globalProperties, nameof(globalProperties));
ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
_projectFullPath = projectFullPath;
_toolsVersion = MSBuildConstants.CurrentToolsVersion;

Просмотреть файл

@ -65,8 +65,8 @@ namespace Microsoft.Build.Execution
/// </param>
internal TargetResult(TaskItem[] items, WorkUnitResult result, BuildEventContext originalBuildEventContext = null)
{
ErrorUtilities.VerifyThrowArgumentNull(items, nameof(items));
ErrorUtilities.VerifyThrowArgumentNull(result, nameof(result));
ErrorUtilities.VerifyThrowArgumentNull(items);
ErrorUtilities.VerifyThrowArgumentNull(result);
_items = items;
_result = result;
_originalBuildEventContext = originalBuildEventContext;

Просмотреть файл

@ -299,8 +299,8 @@ namespace Microsoft.Build.BackEnd
/// </summary>
public bool InitializeForBatch(TaskLoggingContext loggingContext, ItemBucket batchBucket, IDictionary<string, string> taskIdentityParameters)
{
ErrorUtilities.VerifyThrowArgumentNull(loggingContext, nameof(loggingContext));
ErrorUtilities.VerifyThrowArgumentNull(batchBucket, nameof(batchBucket));
ErrorUtilities.VerifyThrowArgumentNull(loggingContext);
ErrorUtilities.VerifyThrowArgumentNull(batchBucket);
_taskLoggingContext = loggingContext;
_batchBucket = batchBucket;
@ -352,7 +352,7 @@ namespace Microsoft.Build.BackEnd
/// <returns>True if the parameters were set correctly, false otherwise.</returns>
public bool SetTaskParameters(IDictionary<string, (string, ElementLocation)> parameters)
{
ErrorUtilities.VerifyThrowArgumentNull(parameters, nameof(parameters));
ErrorUtilities.VerifyThrowArgumentNull(parameters);
bool taskInitialized = true;

Просмотреть файл

@ -44,8 +44,8 @@ namespace Microsoft.Build.Collections
/// <param name="selector">function to translate items in the backing collection to the resulting type.</param>
public CopyOnReadEnumerable(IEnumerable<TSource> backingEnumerable, object syncRoot, Func<TSource, TResult> selector)
{
ErrorUtilities.VerifyThrowArgumentNull(backingEnumerable, nameof(backingEnumerable));
ErrorUtilities.VerifyThrowArgumentNull(syncRoot, nameof(syncRoot));
ErrorUtilities.VerifyThrowArgumentNull(backingEnumerable);
ErrorUtilities.VerifyThrowArgumentNull(syncRoot);
_backingEnumerable = backingEnumerable;
_syncRoot = syncRoot;

Просмотреть файл

@ -336,7 +336,7 @@ namespace Microsoft.Build.Collections
/// </summary>
public void Set(T projectProperty)
{
ErrorUtilities.VerifyThrowArgumentNull(projectProperty, nameof(projectProperty));
ErrorUtilities.VerifyThrowArgumentNull(projectProperty);
_backing = _backing.SetItem(projectProperty.Key, projectProperty);
}

Просмотреть файл

@ -475,7 +475,7 @@ namespace Microsoft.Build.Collections
/// </summary>
internal void Set(T projectProperty)
{
ErrorUtilities.VerifyThrowArgumentNull(projectProperty, nameof(projectProperty));
ErrorUtilities.VerifyThrowArgumentNull(projectProperty);
lock (_properties)
{

Просмотреть файл

@ -34,8 +34,8 @@ namespace Microsoft.Build.Collections
/// </summary>
internal ReadOnlyConvertingDictionary(IDictionary<K, V> backing, Func<V, N> converter)
{
ErrorUtilities.VerifyThrowArgumentNull(backing, nameof(backing));
ErrorUtilities.VerifyThrowArgumentNull(converter, nameof(converter));
ErrorUtilities.VerifyThrowArgumentNull(backing);
ErrorUtilities.VerifyThrowArgumentNull(converter);
_backing = backing;
_converter = converter;

Просмотреть файл

@ -32,7 +32,7 @@ namespace Microsoft.Build.Construction
internal ProjectChooseElement(XmlElement xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -49,7 +49,7 @@ namespace Microsoft.Build.Construction
/// </summary>
internal ProjectElement(ProjectElementLink link)
{
ErrorUtilities.VerifyThrowArgumentNull(link, nameof(link));
ErrorUtilities.VerifyThrowArgumentNull(link);
_xmlSource = link;
}
@ -60,8 +60,8 @@ namespace Microsoft.Build.Construction
/// </summary>
internal ProjectElement(XmlElement xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(xmlElement, nameof(xmlElement));
ErrorUtilities.VerifyThrowArgumentNull(containingProject, nameof(containingProject));
ErrorUtilities.VerifyThrowArgumentNull(xmlElement);
ErrorUtilities.VerifyThrowArgumentNull(containingProject);
_xmlSource = (XmlElementWithLocation)xmlElement;
_parent = parent;
@ -350,7 +350,7 @@ namespace Microsoft.Build.Construction
/// <param name="element">The element to act as a template to copy from.</param>
public virtual void CopyFrom(ProjectElement element)
{
ErrorUtilities.VerifyThrowArgumentNull(element, nameof(element));
ErrorUtilities.VerifyThrowArgumentNull(element);
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
if (this == element)

Просмотреть файл

@ -142,7 +142,7 @@ namespace Microsoft.Build.Construction
/// </remarks>
public void InsertAfterChild(ProjectElement child, ProjectElement reference)
{
ErrorUtilities.VerifyThrowArgumentNull(child, nameof(child));
ErrorUtilities.VerifyThrowArgumentNull(child);
if (Link != null)
{
ContainerLink.InsertAfterChild(child, reference);
@ -197,7 +197,7 @@ namespace Microsoft.Build.Construction
/// </remarks>
public void InsertBeforeChild(ProjectElement child, ProjectElement reference)
{
ErrorUtilities.VerifyThrowArgumentNull(child, nameof(child));
ErrorUtilities.VerifyThrowArgumentNull(child);
if (Link != null)
{
@ -292,7 +292,7 @@ namespace Microsoft.Build.Construction
/// </remarks>
public void RemoveChild(ProjectElement child)
{
ErrorUtilities.VerifyThrowArgumentNull(child, nameof(child));
ErrorUtilities.VerifyThrowArgumentNull(child);
ErrorUtilities.VerifyThrowArgument(child.Parent == this, "OM_NodeNotAlreadyParentedByThis");
@ -351,7 +351,7 @@ namespace Microsoft.Build.Construction
/// <param name="element">The element to act as a template to copy from.</param>
public virtual void DeepCopyFrom(ProjectElementContainer element)
{
ErrorUtilities.VerifyThrowArgumentNull(element, nameof(element));
ErrorUtilities.VerifyThrowArgumentNull(element);
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
if (this == element)
@ -835,7 +835,7 @@ namespace Microsoft.Build.Construction
public void CopyTo(T[] array, int arrayIndex)
{
ErrorUtilities.VerifyThrowArgumentNull(array, nameof(array));
ErrorUtilities.VerifyThrowArgumentNull(array);
if (_realizedElements != null)
{
@ -864,7 +864,7 @@ namespace Microsoft.Build.Construction
void ICollection.CopyTo(Array array, int index)
{
ErrorUtilities.VerifyThrowArgumentNull(array, nameof(array));
ErrorUtilities.VerifyThrowArgumentNull(array);
int i = index;
foreach (T entry in this)

Просмотреть файл

@ -35,7 +35,7 @@ namespace Microsoft.Build.Construction
internal ProjectExtensionsElement(XmlElement xmlElement, ProjectRootElement parent, ProjectRootElement project)
: base(xmlElement, parent, project)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>
@ -161,7 +161,7 @@ namespace Microsoft.Build.Construction
/// <inheritdoc/>
public override void CopyFrom(ProjectElement element)
{
ErrorUtilities.VerifyThrowArgumentNull(element, nameof(element));
ErrorUtilities.VerifyThrowArgumentNull(element);
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
if (this == element)

Просмотреть файл

@ -35,7 +35,7 @@ namespace Microsoft.Build.Construction
internal ProjectImportElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject, SdkReference sdkReference = null)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
SdkReference = sdkReference;
}

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectImportGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectItemDefinitionElement(XmlElement xmlElement, ProjectItemDefinitionGroupElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>
@ -73,7 +73,7 @@ namespace Microsoft.Build.Construction
public ProjectMetadataElement AddMetadata(string name, string unevaluatedValue, bool expressAsAttribute)
{
ErrorUtilities.VerifyThrowArgumentLength(name, nameof(name));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue, nameof(unevaluatedValue));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
if (expressAsAttribute)
{

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectItemDefinitionGroupElement(XmlElement xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -65,7 +65,7 @@ namespace Microsoft.Build.Construction
internal ProjectItemElement(XmlElementWithLocation xmlElement, ProjectItemGroupElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>
@ -390,7 +390,7 @@ namespace Microsoft.Build.Construction
public ProjectMetadataElement AddMetadata(string name, string unevaluatedValue, bool expressAsAttribute)
{
ErrorUtilities.VerifyThrowArgumentLength(name, nameof(name));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue, nameof(unevaluatedValue));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
if (expressAsAttribute)
{

Просмотреть файл

@ -39,7 +39,7 @@ namespace Microsoft.Build.Construction
internal ProjectItemGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectMetadataElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement project)
: base(xmlElement, parent, project)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>
@ -89,7 +89,7 @@ namespace Microsoft.Build.Construction
return;
}
ErrorUtilities.VerifyThrowArgumentNull(value, nameof(Value));
ErrorUtilities.VerifyThrowArgumentNull(value);
Internal.Utilities.SetXmlNodeInnerContents(XmlElement, value);
Parent?.UpdateElementValue(this);
MarkDirty("Set metadata Value {0}", value);

Просмотреть файл

@ -29,7 +29,7 @@ namespace Microsoft.Build.Construction
internal ProjectOnErrorElement(XmlElementWithLocation xmlElement, ProjectTargetElement parent, ProjectRootElement project)
: base(xmlElement, parent, project)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -30,7 +30,7 @@ namespace Microsoft.Build.Construction
internal ProjectOtherwiseElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement project)
: base(xmlElement, parent, project)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectOutputElement(XmlElement xmlElement, ProjectTaskElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -39,7 +39,7 @@ namespace Microsoft.Build.Construction
internal ProjectPropertyElement(XmlElementWithLocation xmlElement, ProjectPropertyGroupElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>
@ -69,7 +69,7 @@ namespace Microsoft.Build.Construction
set
{
ErrorUtilities.VerifyThrowArgumentNull(value, nameof(Value));
ErrorUtilities.VerifyThrowArgumentNull(value);
if (Link != null)
{
PropertyLink.Value = value;

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectPropertyGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>
@ -59,7 +59,7 @@ namespace Microsoft.Build.Construction
public ProjectPropertyElement AddProperty(string name, string unevaluatedValue)
{
ErrorUtilities.VerifyThrowArgumentLength(name, nameof(name));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue, nameof(unevaluatedValue));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
ProjectPropertyElement newProperty = ContainingProject.CreatePropertyElement(name);
newProperty.Value = unevaluatedValue;
@ -76,7 +76,7 @@ namespace Microsoft.Build.Construction
public ProjectPropertyElement SetProperty(string name, string unevaluatedValue)
{
ErrorUtilities.VerifyThrowArgumentLength(name, nameof(name));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue, nameof(unevaluatedValue));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
foreach (ProjectPropertyElement property in Properties)
{

Просмотреть файл

@ -163,8 +163,8 @@ namespace Microsoft.Build.Construction
internal ProjectRootElement(XmlReader xmlReader, ProjectRootElementCacheBase projectRootElementCache, bool isExplicitlyLoaded,
bool preserveFormatting)
{
ErrorUtilities.VerifyThrowArgumentNull(xmlReader, nameof(xmlReader));
ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache, nameof(projectRootElementCache));
ErrorUtilities.VerifyThrowArgumentNull(xmlReader);
ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache);
IsExplicitlyLoaded = isExplicitlyLoaded;
ProjectRootElementCache = projectRootElementCache;
@ -182,7 +182,7 @@ namespace Microsoft.Build.Construction
/// </summary>
private ProjectRootElement(ProjectRootElementCacheBase projectRootElementCache, NewProjectFileOptions projectFileOptions)
{
ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache, nameof(projectRootElementCache));
ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache);
ProjectRootElementCache = projectRootElementCache;
_directory = NativeMethodsShared.GetCurrentDirectory();
@ -216,7 +216,7 @@ namespace Microsoft.Build.Construction
{
ErrorUtilities.VerifyThrowArgumentLength(path, nameof(path));
ErrorUtilities.VerifyThrowInternalRooted(path);
ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache, nameof(projectRootElementCache));
ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache);
ProjectRootElementCache = projectRootElementCache;
IncrementVersion();
@ -238,8 +238,8 @@ namespace Microsoft.Build.Construction
/// </remarks>
private ProjectRootElement(XmlDocumentWithLocation document, ProjectRootElementCacheBase projectRootElementCache)
{
ErrorUtilities.VerifyThrowArgumentNull(document, nameof(document));
ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache, nameof(projectRootElementCache));
ErrorUtilities.VerifyThrowArgumentNull(document);
ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache);
ProjectRootElementCache = projectRootElementCache;
_directory = NativeMethodsShared.GetCurrentDirectory();
@ -744,7 +744,7 @@ namespace Microsoft.Build.Construction
/// </summary>
public static ProjectRootElement Create(ProjectCollection projectCollection, NewProjectFileOptions projectFileOptions)
{
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
return Create(projectCollection.ProjectRootElementCache, projectFileOptions);
}
@ -783,7 +783,7 @@ namespace Microsoft.Build.Construction
public static ProjectRootElement Create(string path, ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions)
{
ErrorUtilities.VerifyThrowArgumentLength(path, nameof(path));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
var projectRootElement = new ProjectRootElement(
projectCollection.ProjectRootElementCache,
@ -820,7 +820,7 @@ namespace Microsoft.Build.Construction
/// </summary>
public static ProjectRootElement Create(XmlReader xmlReader, ProjectCollection projectCollection, bool preserveFormatting)
{
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
return new ProjectRootElement(xmlReader, projectCollection.ProjectRootElementCache, true /*Explicitly loaded*/,
preserveFormatting);
@ -854,7 +854,7 @@ namespace Microsoft.Build.Construction
public static ProjectRootElement Open(string path, ProjectCollection projectCollection, bool? preserveFormatting)
{
ErrorUtilities.VerifyThrowArgumentLength(path, nameof(path));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
path = FileUtilities.NormalizePath(path);
@ -911,7 +911,7 @@ namespace Microsoft.Build.Construction
public static ProjectRootElement TryOpen(string path, ProjectCollection projectCollection, bool? preserveFormatting)
{
ErrorUtilities.VerifyThrowArgumentLength(path, nameof(path));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
path = FileUtilities.NormalizePath(path);
@ -1847,7 +1847,7 @@ namespace Microsoft.Build.Construction
/// <param name="project">The dirtied project.</param>
internal void MarkProjectDirty(Project project)
{
ErrorUtilities.VerifyThrowArgumentNull(project, nameof(project));
ErrorUtilities.VerifyThrowArgumentNull(project);
ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
// Only bubble this event up if the cache knows about this PRE, which is equivalent to

Просмотреть файл

@ -28,7 +28,7 @@ namespace Microsoft.Build.Construction
ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -41,7 +41,7 @@ namespace Microsoft.Build.Construction
internal ProjectTargetElement(XmlElementWithLocation xmlElement, ProjectRootElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -46,7 +46,7 @@ namespace Microsoft.Build.Construction
internal ProjectTaskElement(XmlElementWithLocation xmlElement, ProjectTargetElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>
@ -323,7 +323,7 @@ namespace Microsoft.Build.Construction
lock (_locker)
{
ErrorUtilities.VerifyThrowArgumentLength(name, nameof(name));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue, nameof(unevaluatedValue));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
ErrorUtilities.VerifyThrowArgument(!XMakeAttributes.IsSpecialTaskAttribute(name), "CannotAccessKnownAttributes", name);
_parameters = null;

Просмотреть файл

@ -33,7 +33,7 @@ namespace Microsoft.Build.Construction
internal ProjectUsingTaskBodyElement(XmlElementWithLocation xmlElement, ProjectUsingTaskElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
VerifyCorrectParent(parent);
}

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectUsingTaskElement(XmlElementWithLocation xmlElement, ProjectRootElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectUsingTaskParameterElement(XmlElementWithLocation xmlElement, UsingTaskParameterGroupElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.Build.Construction
internal ProjectWhenElement(XmlElement xmlElement, ProjectChooseElement parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
}
/// <summary>

Просмотреть файл

@ -32,7 +32,7 @@ namespace Microsoft.Build.Construction
internal UsingTaskParameterGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject)
: base(xmlElement, parent, containingProject)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(parent);
VerifyCorrectParent(parent);
}

Просмотреть файл

@ -108,8 +108,8 @@ namespace Microsoft.Build.Evaluation
internal Project(ProjectCollection projectCollection, ProjectLink link)
{
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(link, nameof(link));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
ErrorUtilities.VerifyThrowArgumentNull(link);
ProjectCollection = projectCollection;
implementationInternal = new ProjectLinkInternalNotImplemented();
implementation = link;
@ -264,9 +264,9 @@ namespace Microsoft.Build.Evaluation
private Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings,
EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory, bool interactive)
{
ErrorUtilities.VerifyThrowArgumentNull(xml, nameof(xml));
ErrorUtilities.VerifyThrowArgumentNull(xml);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
ProjectCollection = projectCollection;
var defaultImplementation = new ProjectImpl(this, xml, globalProperties, toolsVersion, subToolsetVersion, loadSettings);
implementationInternal = (IProjectLinkInternal)defaultImplementation;
@ -358,9 +358,9 @@ namespace Microsoft.Build.Evaluation
private Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings,
EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory, bool interactive)
{
ErrorUtilities.VerifyThrowArgumentNull(xmlReader, nameof(xmlReader));
ErrorUtilities.VerifyThrowArgumentNull(xmlReader);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
ProjectCollection = projectCollection;
var defaultImplementation = new ProjectImpl(this, xmlReader, globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
implementationInternal = (IProjectLinkInternal)defaultImplementation;
@ -454,9 +454,9 @@ namespace Microsoft.Build.Evaluation
private Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings,
EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory, bool interactive)
{
ErrorUtilities.VerifyThrowArgumentNull(projectFile, nameof(projectFile));
ErrorUtilities.VerifyThrowArgumentNull(projectFile);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
ProjectCollection = projectCollection;
var defaultImplementation = new ProjectImpl(this, projectFile, globalProperties, toolsVersion, subToolsetVersion, loadSettings, evaluationContext);
@ -850,7 +850,7 @@ namespace Microsoft.Build.Evaluation
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "IItem is an internal interface; this is less confusing to outside customers. ")]
public static string GetEvaluatedItemIncludeEscaped(ProjectItem item)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
return ((IItem)item).EvaluatedIncludeEscaped;
}
@ -860,7 +860,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
public static string GetEvaluatedItemIncludeEscaped(ProjectItemDefinition item)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
return ((IItem)item).EvaluatedIncludeEscaped;
}
@ -1077,7 +1077,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
public static string GetMetadataValueEscaped(ProjectMetadata metadatum)
{
ErrorUtilities.VerifyThrowArgumentNull(metadatum, nameof(metadatum));
ErrorUtilities.VerifyThrowArgumentNull(metadatum);
return metadatum.EvaluatedValueEscaped;
}
@ -1088,7 +1088,7 @@ namespace Microsoft.Build.Evaluation
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "IItem is an internal interface; this is less confusing to outside customers. ")]
public static string GetMetadataValueEscaped(ProjectItem item, string name)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
return ((IItem)item).GetMetadataValueEscaped(name);
}
@ -1098,7 +1098,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
public static string GetMetadataValueEscaped(ProjectItemDefinition item, string name)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
return ((IItem)item).GetMetadataValueEscaped(name);
}
@ -1109,7 +1109,7 @@ namespace Microsoft.Build.Evaluation
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "IProperty is an internal interface; this is less confusing to outside customers. ")]
public static string GetPropertyValueEscaped(ProjectProperty property)
{
ErrorUtilities.VerifyThrowArgumentNull(property, nameof(property));
ErrorUtilities.VerifyThrowArgumentNull(property);
return ((IProperty)property).EvaluatedValueEscaped;
}
@ -1879,9 +1879,9 @@ namespace Microsoft.Build.Evaluation
/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param>
public ProjectImpl(Project owner, ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings)
{
ErrorUtilities.VerifyThrowArgumentNull(xml, nameof(xml));
ErrorUtilities.VerifyThrowArgumentNull(xml);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(owner, nameof(owner));
ErrorUtilities.VerifyThrowArgumentNull(owner);
Xml = xml;
Owner = owner;
@ -1903,9 +1903,9 @@ namespace Microsoft.Build.Evaluation
/// <param name="evaluationContext">The evaluation context to use in case reevaluation is required.</param>
public ProjectImpl(Project owner, XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
{
ErrorUtilities.VerifyThrowArgumentNull(xmlReader, nameof(xmlReader));
ErrorUtilities.VerifyThrowArgumentNull(xmlReader);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(owner, nameof(owner));
ErrorUtilities.VerifyThrowArgumentNull(owner);
Owner = owner;
@ -1938,9 +1938,9 @@ namespace Microsoft.Build.Evaluation
/// <param name="evaluationContext">The evaluation context to use in case reevaluation is required.</param>
public ProjectImpl(Project owner, string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
{
ErrorUtilities.VerifyThrowArgumentNull(projectFile, nameof(projectFile));
ErrorUtilities.VerifyThrowArgumentNull(projectFile);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(owner, nameof(owner));
ErrorUtilities.VerifyThrowArgumentNull(owner);
Owner = owner;
@ -2925,7 +2925,7 @@ namespace Microsoft.Build.Evaluation
public override ProjectProperty SetProperty(string name, string unevaluatedValue)
{
ErrorUtilities.VerifyThrowArgumentLength(name, nameof(name));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue, nameof(unevaluatedValue));
ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
ProjectProperty property = _data.Properties[name];
@ -3152,7 +3152,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
public override bool RemoveProperty(ProjectProperty property)
{
ErrorUtilities.VerifyThrowArgumentNull(property, nameof(property));
ErrorUtilities.VerifyThrowArgumentNull(property);
ErrorUtilities.VerifyThrowInvalidOperation(!property.IsReservedProperty, "OM_ReservedName", property.Name);
ErrorUtilities.VerifyThrowInvalidOperation(!property.IsGlobalProperty, "OM_GlobalProperty", property.Name);
ErrorUtilities.VerifyThrowArgument(property.Xml.Parent != null, "OM_IncorrectObjectAssociation", "ProjectProperty", "Project");
@ -3214,7 +3214,7 @@ namespace Microsoft.Build.Evaluation
/// </remarks>
public override bool RemoveItem(ProjectItem item)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
ErrorUtilities.VerifyThrowArgument(item.Project == Owner, "OM_IncorrectObjectAssociation", "ProjectItem", "Project");
bool result = RemoveItemHelper(item);
@ -3234,7 +3234,7 @@ namespace Microsoft.Build.Evaluation
/// </remarks>
public override void RemoveItems(IEnumerable<ProjectItem> items)
{
ErrorUtilities.VerifyThrowArgumentNull(items, nameof(items));
ErrorUtilities.VerifyThrowArgumentNull(items);
// Copying to a list makes it possible to remove
// all items of a particular type with
@ -3257,7 +3257,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
public override string ExpandString(string unexpandedValue)
{
ErrorUtilities.VerifyThrowArgumentNull(unexpandedValue, nameof(unexpandedValue));
ErrorUtilities.VerifyThrowArgumentNull(unexpandedValue);
string result = _data.Expander.ExpandIntoStringAndUnescape(unexpandedValue, ExpanderOptions.ExpandPropertiesAndItems, ProjectFileLocation);
@ -3633,7 +3633,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
private bool RemoveItemHelper(ProjectItem item)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
if (item.Project == null || item.Xml.Parent == null)
{

Просмотреть файл

@ -1010,7 +1010,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
public void AddToolset(Toolset toolset)
{
ErrorUtilities.VerifyThrowArgumentNull(toolset, nameof(toolset));
ErrorUtilities.VerifyThrowArgumentNull(toolset);
using (_locker.EnterDisposableWriteLock())
{
_toolsets[toolset.ToolsVersion] = toolset;
@ -1379,7 +1379,7 @@ namespace Microsoft.Build.Evaluation
/// </remarks>
public void UnloadProject(ProjectRootElement projectRootElement)
{
ErrorUtilities.VerifyThrowArgumentNull(projectRootElement, nameof(projectRootElement));
ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
if (projectRootElement.Link != null)
{
return;
@ -1529,7 +1529,7 @@ namespace Microsoft.Build.Evaluation
/// <param name="projectRootElement">The project XML root element to unload.</param>
public bool TryUnloadProject(ProjectRootElement projectRootElement)
{
ErrorUtilities.VerifyThrowArgumentNull(projectRootElement, nameof(projectRootElement));
ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
if (projectRootElement.Link != null)
{
return false;
@ -1668,7 +1668,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
private void RegisterLoggerInternal(ILogger logger)
{
ErrorUtilities.VerifyThrowArgumentNull(logger, nameof(logger));
ErrorUtilities.VerifyThrowArgumentNull(logger);
Debug.Assert(_locker.IsWriteLockHeld);
_loggingService.RegisterLogger(new ReusableLogger(logger));
}
@ -1942,7 +1942,7 @@ namespace Microsoft.Build.Evaluation
/// </summary>
public ReusableLogger(ILogger originalLogger)
{
ErrorUtilities.VerifyThrowArgumentNull(originalLogger, nameof(originalLogger));
ErrorUtilities.VerifyThrowArgumentNull(originalLogger);
_originalLogger = originalLogger;
}

Просмотреть файл

@ -29,8 +29,8 @@ namespace Microsoft.Build.Evaluation
internal ProjectImportPathMatch(string propertyName, List<string> searchPaths)
{
ErrorUtilities.VerifyThrowArgumentNull(propertyName, nameof(propertyName));
ErrorUtilities.VerifyThrowArgumentNull(searchPaths, nameof(searchPaths));
ErrorUtilities.VerifyThrowArgumentNull(propertyName);
ErrorUtilities.VerifyThrowArgumentNull(searchPaths);
_propertyName = propertyName;
_searchPaths = searchPaths;

Просмотреть файл

@ -127,11 +127,11 @@ namespace Microsoft.Build.Evaluation
List<ProjectItemDefinition> inheritedItemDefinitionsCloned)
{
ErrorUtilities.VerifyThrowInternalNull(project, nameof(project));
ErrorUtilities.VerifyThrowArgumentNull(xml, nameof(xml));
ErrorUtilities.VerifyThrowArgumentNull(xml);
// Orcas accidentally allowed empty includes if they resulted from expansion: we preserve that bug
ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeEscaped, nameof(evaluatedIncludeEscaped));
ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeBeforeWildcardExpansionEscaped, nameof(evaluatedIncludeBeforeWildcardExpansionEscaped));
ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeEscaped);
ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeBeforeWildcardExpansionEscaped);
_xml = xml;
_project = project;

Просмотреть файл

@ -57,8 +57,8 @@ namespace Microsoft.Build.Evaluation
/// </summary>
internal ProjectMetadata(object parent, ProjectMetadataElement xml)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(xml, nameof(xml));
ErrorUtilities.VerifyThrowArgumentNull(parent);
ErrorUtilities.VerifyThrowArgumentNull(xml);
_parent = (IProjectMetadataParent)parent;
_xml = xml;
@ -70,9 +70,9 @@ namespace Microsoft.Build.Evaluation
/// </summary>
internal ProjectMetadata(IProjectMetadataParent parent, ProjectMetadataElement xml, string evaluatedValueEscaped, ProjectMetadata predecessor)
{
ErrorUtilities.VerifyThrowArgumentNull(parent, nameof(parent));
ErrorUtilities.VerifyThrowArgumentNull(xml, nameof(xml));
ErrorUtilities.VerifyThrowArgumentNull(evaluatedValueEscaped, nameof(evaluatedValueEscaped));
ErrorUtilities.VerifyThrowArgumentNull(parent);
ErrorUtilities.VerifyThrowArgumentNull(xml);
ErrorUtilities.VerifyThrowArgumentNull(evaluatedValueEscaped);
_parent = parent;
_xml = xml;

Просмотреть файл

@ -40,7 +40,7 @@ namespace Microsoft.Build.Evaluation
internal ProjectProperty(Project project)
{
ErrorUtilities.VerifyThrowArgumentNull(project, nameof(project));
ErrorUtilities.VerifyThrowArgumentNull(project);
_project = project;
}
@ -49,8 +49,8 @@ namespace Microsoft.Build.Evaluation
/// </summary>
internal ProjectProperty(Project project, string evaluatedValueEscaped)
{
ErrorUtilities.VerifyThrowArgumentNull(project, nameof(project));
ErrorUtilities.VerifyThrowArgumentNull(evaluatedValueEscaped, nameof(evaluatedValueEscaped));
ErrorUtilities.VerifyThrowArgumentNull(project);
ErrorUtilities.VerifyThrowArgumentNull(evaluatedValueEscaped);
_project = project;
_evaluatedValueEscaped = evaluatedValueEscaped;
@ -359,7 +359,7 @@ namespace Microsoft.Build.Evaluation
internal ProjectPropertyXmlBacked(Project project, ProjectPropertyElement xml, string evaluatedValueEscaped)
: base(project, evaluatedValueEscaped)
{
ErrorUtilities.VerifyThrowArgumentNull(xml, nameof(xml));
ErrorUtilities.VerifyThrowArgumentNull(xml);
ErrorUtilities.VerifyThrowInvalidOperation(!ProjectHasMatchingGlobalProperty(project, xml.Name), "OM_GlobalProperty", xml.Name);
_xml = xml;
@ -504,7 +504,7 @@ namespace Microsoft.Build.Evaluation
internal ProjectPropertyXmlBackedWithPredecessor(Project project, ProjectPropertyElement xml, string evaluatedValueEscaped, ProjectProperty predecessor)
: base(project, xml, evaluatedValueEscaped)
{
ErrorUtilities.VerifyThrowArgumentNull(predecessor, nameof(predecessor));
ErrorUtilities.VerifyThrowArgumentNull(predecessor);
_predecessor = predecessor;
}

Просмотреть файл

@ -272,8 +272,8 @@ namespace Microsoft.Build.Evaluation
{
ErrorUtilities.VerifyThrowArgumentLength(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentLength(toolsPath, nameof(toolsPath));
ErrorUtilities.VerifyThrowArgumentNull(environmentProperties, nameof(environmentProperties));
ErrorUtilities.VerifyThrowArgumentNull(globalProperties, nameof(globalProperties));
ErrorUtilities.VerifyThrowArgumentNull(environmentProperties);
ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
_toolsVersion = toolsVersion;
this.ToolsPath = toolsPath;

Просмотреть файл

@ -69,7 +69,7 @@ namespace Microsoft.Build.Evaluation
internal ToolsetConfigurationReader(PropertyDictionary<ProjectPropertyInstance> environmentProperties, PropertyDictionary<ProjectPropertyInstance> globalProperties, Func<Configuration> readApplicationConfiguration)
: base(environmentProperties, globalProperties)
{
ErrorUtilities.VerifyThrowArgumentNull(readApplicationConfiguration, nameof(readApplicationConfiguration));
ErrorUtilities.VerifyThrowArgumentNull(readApplicationConfiguration);
_readApplicationConfiguration = readApplicationConfiguration;
_projectImportSearchPathsCache = new Dictionary<string, Dictionary<string, ProjectImportPathMatch>>(StringComparer.OrdinalIgnoreCase);
}

Просмотреть файл

@ -39,10 +39,10 @@ namespace Microsoft.Build.Evaluation
public ToolsetPropertyDefinition(string name, string value, IElementLocation source)
{
ErrorUtilities.VerifyThrowArgumentLength(name, nameof(name));
ErrorUtilities.VerifyThrowArgumentNull(source, nameof(source));
ErrorUtilities.VerifyThrowArgumentNull(source);
// value can be the empty string but not null
ErrorUtilities.VerifyThrowArgumentNull(value, nameof(value));
ErrorUtilities.VerifyThrowArgumentNull(value);
_name = name;
_value = value;

Просмотреть файл

@ -215,7 +215,7 @@ namespace Microsoft.Build.Exceptions
string helpKeyword,
Exception innerException) : base(message, innerException)
{
ErrorUtilities.VerifyThrowArgumentNull(projectFile, nameof(projectFile));
ErrorUtilities.VerifyThrowArgumentNull(projectFile);
ErrorUtilities.VerifyThrowArgumentLength(message, nameof(message));
// Try to helpfully provide a full path if possible, but do so robustly.

Просмотреть файл

@ -61,7 +61,7 @@ namespace Microsoft.Build.Exceptions
protected InvalidToolsetDefinitionException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
ErrorUtilities.VerifyThrowArgumentNull(info, nameof(info));
ErrorUtilities.VerifyThrowArgumentNull(info);
errorCode = info.GetString("errorCode");
}
@ -103,7 +103,7 @@ namespace Microsoft.Build.Exceptions
#endif
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
ErrorUtilities.VerifyThrowArgumentNull(info, nameof(info));
ErrorUtilities.VerifyThrowArgumentNull(info);
base.GetObjectData(info, context);

Просмотреть файл

@ -226,8 +226,8 @@ namespace Microsoft.Build.Evaluation
where P : class, IProperty
where I : class, IItem
{
ErrorUtilities.VerifyThrowArgumentNull(condition, nameof(condition));
ErrorUtilities.VerifyThrowArgumentNull(expander, nameof(expander));
ErrorUtilities.VerifyThrowArgumentNull(condition);
ErrorUtilities.VerifyThrowArgumentNull(expander);
ErrorUtilities.VerifyThrowArgumentLength(evaluationDirectory, nameof(evaluationDirectory));
// An empty condition is equivalent to a "true" condition.
@ -237,7 +237,7 @@ namespace Microsoft.Build.Evaluation
}
// If the condition wasn't empty, there must be a location for it
ErrorUtilities.VerifyThrowArgumentNull(elementLocation, nameof(elementLocation));
ErrorUtilities.VerifyThrowArgumentNull(elementLocation);
// Get the expression tree cache for the current parsing options.
var cachedExpressionTreesForCurrentOptions = s_cachedExpressionTrees.GetOrAdd(
@ -427,10 +427,10 @@ namespace Microsoft.Build.Evaluation
IFileSystem fileSystem,
ProjectRootElementCacheBase? projectRootElementCache = null)
{
ErrorUtilities.VerifyThrowArgumentNull(condition, nameof(condition));
ErrorUtilities.VerifyThrowArgumentNull(expander, nameof(expander));
ErrorUtilities.VerifyThrowArgumentNull(evaluationDirectory, nameof(evaluationDirectory));
ErrorUtilities.VerifyThrowArgumentNull(elementLocation, nameof(elementLocation));
ErrorUtilities.VerifyThrowArgumentNull(condition);
ErrorUtilities.VerifyThrowArgumentNull(expander);
ErrorUtilities.VerifyThrowArgumentNull(evaluationDirectory);
ErrorUtilities.VerifyThrowArgumentNull(elementLocation);
Condition = condition;
_expander = expander;

Просмотреть файл

@ -19,7 +19,7 @@ namespace Microsoft.Build.Evaluation
/// <param name="project">The changed project.</param>
internal ProjectChangedEventArgs(Project project)
{
ErrorUtilities.VerifyThrowArgumentNull(project, nameof(project));
ErrorUtilities.VerifyThrowArgumentNull(project);
Project = project;
}

Просмотреть файл

@ -515,7 +515,7 @@ namespace Microsoft.Build.Evaluation
/// </remarks>
internal override void DiscardAnyWeakReference(ProjectRootElement projectRootElement)
{
ErrorUtilities.VerifyThrowArgumentNull(projectRootElement, nameof(projectRootElement));
ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
// A PRE may be unnamed if it was only used in memory.
if (projectRootElement.FullPath != null)

Просмотреть файл

@ -34,7 +34,7 @@ namespace Microsoft.Build.Evaluation
/// <param name="formattingParameter">The formatting parameter to use with <paramref name="unformattedReason"/>.</param>
internal ProjectXmlChangedEventArgs(ProjectRootElement projectXml, string unformattedReason, string formattingParameter)
{
ErrorUtilities.VerifyThrowArgumentNull(projectXml, nameof(projectXml));
ErrorUtilities.VerifyThrowArgumentNull(projectXml);
this.ProjectXml = projectXml;
_unformattedReason = unformattedReason;

Просмотреть файл

@ -121,7 +121,7 @@ namespace Microsoft.Build.Evaluation
internal override void DiscardAnyWeakReference(ProjectRootElement projectRootElement)
{
ErrorUtilities.VerifyThrowArgumentNull(projectRootElement, nameof(projectRootElement));
ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
// A PRE may be unnamed if it was only used in memory.
if (projectRootElement.FullPath != null)

Просмотреть файл

@ -85,7 +85,7 @@ namespace Microsoft.Build.Globbing
/// <returns>The logical disjunction of the input globs.</returns>
public static IMSBuildGlob Create(IEnumerable<IMSBuildGlob> globs)
{
ErrorUtilities.VerifyThrowArgumentNull(globs, nameof(globs));
ErrorUtilities.VerifyThrowArgumentNull(globs);
if (globs is ImmutableArray<IMSBuildGlob> immutableGlobs)
{

Просмотреть файл

@ -91,7 +91,7 @@ namespace Microsoft.Build.Globbing
/// <inheritdoc />
public bool IsMatch(string stringToMatch)
{
ErrorUtilities.VerifyThrowArgumentNull(stringToMatch, nameof(stringToMatch));
ErrorUtilities.VerifyThrowArgumentNull(stringToMatch);
if (!IsLegal)
{
@ -115,7 +115,7 @@ namespace Microsoft.Build.Globbing
/// <returns></returns>
public MatchInfoResult MatchInfo(string stringToMatch)
{
ErrorUtilities.VerifyThrowArgumentNull(stringToMatch, nameof(stringToMatch));
ErrorUtilities.VerifyThrowArgumentNull(stringToMatch);
if (FileUtilities.PathIsInvalid(stringToMatch) || !IsLegal)
{
@ -168,8 +168,8 @@ namespace Microsoft.Build.Globbing
/// <returns></returns>
public static MSBuildGlob Parse(string globRoot, string fileSpec)
{
ErrorUtilities.VerifyThrowArgumentNull(globRoot, nameof(globRoot));
ErrorUtilities.VerifyThrowArgumentNull(fileSpec, nameof(fileSpec));
ErrorUtilities.VerifyThrowArgumentNull(globRoot);
ErrorUtilities.VerifyThrowArgumentNull(fileSpec);
ErrorUtilities.VerifyThrowArgumentInvalidPath(globRoot, nameof(globRoot));
if (string.IsNullOrEmpty(globRoot))

Просмотреть файл

@ -41,8 +41,8 @@ namespace Microsoft.Build.Globbing
/// <param name="gaps">The gap glob</param>
internal MSBuildGlobWithGaps(IMSBuildGlob mainGlob, IMSBuildGlob gaps)
{
ErrorUtilities.VerifyThrowArgumentNull(mainGlob, nameof(mainGlob));
ErrorUtilities.VerifyThrowArgumentNull(gaps, nameof(gaps));
ErrorUtilities.VerifyThrowArgumentNull(mainGlob);
ErrorUtilities.VerifyThrowArgumentNull(gaps);
MainGlob = mainGlob;
Gaps = gaps;
@ -55,8 +55,8 @@ namespace Microsoft.Build.Globbing
/// <param name="gaps">The gap glob</param>
public MSBuildGlobWithGaps(IMSBuildGlob mainGlob, IEnumerable<IMSBuildGlob> gaps)
{
ErrorUtilities.VerifyThrowArgumentNull(mainGlob, nameof(mainGlob));
ErrorUtilities.VerifyThrowArgumentNull(gaps, nameof(gaps));
ErrorUtilities.VerifyThrowArgumentNull(mainGlob);
ErrorUtilities.VerifyThrowArgumentNull(gaps);
MainGlob = mainGlob;
Gaps = CompositeGlob.Create(gaps);

Просмотреть файл

@ -55,7 +55,7 @@ namespace Microsoft.Build.Graph
public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
: this(targetsToBuild, hostServices, flags)
{
ErrorUtilities.VerifyThrowArgumentNull(projectGraph, nameof(projectGraph));
ErrorUtilities.VerifyThrowArgumentNull(projectGraph);
ProjectGraph = projectGraph;
}
@ -149,7 +149,7 @@ namespace Microsoft.Build.Graph
public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
: this(targetsToBuild, hostServices, flags)
{
ErrorUtilities.VerifyThrowArgumentNull(projectGraphEntryPoints, nameof(projectGraphEntryPoints));
ErrorUtilities.VerifyThrowArgumentNull(projectGraphEntryPoints);
ProjectGraphEntryPoints = projectGraphEntryPoints;
}
@ -157,7 +157,7 @@ namespace Microsoft.Build.Graph
public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, GraphBuildOptions graphBuildOptions)
: this(targetsToBuild, hostServices, flags, graphBuildOptions)
{
ErrorUtilities.VerifyThrowArgumentNull(projectGraphEntryPoints, nameof(projectGraphEntryPoints));
ErrorUtilities.VerifyThrowArgumentNull(projectGraphEntryPoints);
ProjectGraphEntryPoints = projectGraphEntryPoints.ToList();
}

Просмотреть файл

@ -421,7 +421,7 @@ namespace Microsoft.Build.Graph
int degreeOfParallelism,
CancellationToken cancellationToken)
{
ErrorUtilities.VerifyThrowArgumentNull(projectCollection, nameof(projectCollection));
ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
var measurementInfo = BeginMeasurement();
@ -498,7 +498,7 @@ namespace Microsoft.Build.Graph
Func<ProjectGraphNode, string> nodeIdProvider,
IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetsPerNode = null)
{
ErrorUtilities.VerifyThrowArgumentNull(nodeIdProvider, nameof(nodeIdProvider));
ErrorUtilities.VerifyThrowArgumentNull(nodeIdProvider);
var nodeIds = new ConcurrentDictionary<ProjectGraphNode, string>();

Просмотреть файл

@ -383,7 +383,7 @@ namespace Microsoft.Build.Graph
IEnumerable<GlobalPropertiesModifier> globalPropertyModifiers)
{
ErrorUtilities.VerifyThrowInternalNull(projectReference, nameof(projectReference));
ErrorUtilities.VerifyThrowArgumentNull(requesterGlobalProperties, nameof(requesterGlobalProperties));
ErrorUtilities.VerifyThrowArgumentNull(requesterGlobalProperties);
var properties = SplitPropertyNameValuePairs(ItemMetadataNames.PropertiesMetadataName, projectReference.GetMetadataValue(ItemMetadataNames.PropertiesMetadataName));
var additionalProperties = SplitPropertyNameValuePairs(ItemMetadataNames.AdditionalPropertiesMetadataName, projectReference.GetMetadataValue(ItemMetadataNames.AdditionalPropertiesMetadataName));

Просмотреть файл

@ -66,9 +66,9 @@ namespace Microsoft.Build.Execution
/// </summary>
public ITaskHost GetHostObject(string projectFile, string targetName, string taskName)
{
ErrorUtilities.VerifyThrowArgumentNull(projectFile, nameof(projectFile));
ErrorUtilities.VerifyThrowArgumentNull(targetName, nameof(targetName));
ErrorUtilities.VerifyThrowArgumentNull(taskName, nameof(taskName));
ErrorUtilities.VerifyThrowArgumentNull(projectFile);
ErrorUtilities.VerifyThrowArgumentNull(targetName);
ErrorUtilities.VerifyThrowArgumentNull(taskName);
HostObjects hostObjects;
if (_hostObjectMap == null || !_hostObjectMap.TryGetValue(projectFile, out hostObjects))
@ -131,9 +131,9 @@ namespace Microsoft.Build.Execution
ErrorUtilities.VerifyThrowArgumentNull(projectFile, "projectFile));
ErrorUtilities.VerifyThrowArgumentNull(targetName, "targetName));
*/
ErrorUtilities.VerifyThrowArgumentNull(projectFile, nameof(projectFile));
ErrorUtilities.VerifyThrowArgumentNull(targetName, nameof(targetName));
ErrorUtilities.VerifyThrowArgumentNull(taskName, nameof(taskName));
ErrorUtilities.VerifyThrowArgumentNull(projectFile);
ErrorUtilities.VerifyThrowArgumentNull(targetName);
ErrorUtilities.VerifyThrowArgumentNull(taskName);
// We can only set the host object to a non-null value if the affinity for the project is not out of proc, or if it is, it is only implicitly
// out of proc, in which case it will become in-proc after this call completes. See GetNodeAffinity.
@ -164,10 +164,10 @@ namespace Microsoft.Build.Execution
[SupportedOSPlatform("windows")]
public void RegisterHostObject(string projectFile, string targetName, string taskName, string monikerName)
{
ErrorUtilities.VerifyThrowArgumentNull(projectFile, nameof(projectFile));
ErrorUtilities.VerifyThrowArgumentNull(targetName, nameof(targetName));
ErrorUtilities.VerifyThrowArgumentNull(taskName, nameof(taskName));
ErrorUtilities.VerifyThrowArgumentNull(monikerName, nameof(monikerName));
ErrorUtilities.VerifyThrowArgumentNull(projectFile);
ErrorUtilities.VerifyThrowArgumentNull(targetName);
ErrorUtilities.VerifyThrowArgumentNull(taskName);
ErrorUtilities.VerifyThrowArgumentNull(monikerName);
_hostObjectMap ??= new Dictionary<string, HostObjects>(StringComparer.OrdinalIgnoreCase);

Просмотреть файл

@ -25,7 +25,7 @@ namespace Microsoft.Build.Instance
TCached? itemTypeDefinition,
Func<TCached, T> getInstance)
{
ErrorUtilities.VerifyThrowArgumentNull(getInstance, nameof(getInstance));
ErrorUtilities.VerifyThrowArgumentNull(getInstance);
_itemList = itemList;
_itemTypeDefinition = itemTypeDefinition;

Просмотреть файл

@ -614,7 +614,7 @@ namespace Microsoft.Build.Execution
{
ErrorUtilities.VerifyThrowArgumentLength(projectFile, nameof(projectFile));
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(buildParameters, nameof(buildParameters));
ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
ProjectRootElement xml = ProjectRootElement.OpenProjectOrSolution(projectFile, globalProperties, toolsVersion, buildParameters.ProjectRootElementCache, false /*Not explicitly loaded*/);
@ -628,9 +628,9 @@ namespace Microsoft.Build.Execution
/// </summary>
internal ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, int submissionId)
{
ErrorUtilities.VerifyThrowArgumentNull(xml, nameof(xml));
ErrorUtilities.VerifyThrowArgumentNull(xml);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(buildParameters, nameof(buildParameters));
ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
Initialize(xml, globalProperties, toolsVersion, null, 0 /* no solution version specified */, buildParameters, loggingService, buildEventContext, sdkResolverService, submissionId);
}
@ -1609,7 +1609,7 @@ namespace Microsoft.Build.Execution
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "IItem is an internal interface; this is less confusing to outside customers. ")]
public static string GetEvaluatedItemIncludeEscaped(ProjectItemInstance item)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
return ((IItem)item).EvaluatedIncludeEscaped;
}
@ -1619,7 +1619,7 @@ namespace Microsoft.Build.Execution
/// </summary>
public static string GetEvaluatedItemIncludeEscaped(ProjectItemDefinitionInstance item)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
return ((IItem)item).EvaluatedIncludeEscaped;
}
@ -1629,7 +1629,7 @@ namespace Microsoft.Build.Execution
/// </summary>
public static string GetMetadataValueEscaped(ProjectMetadataInstance metadatum)
{
ErrorUtilities.VerifyThrowArgumentNull(metadatum, nameof(metadatum));
ErrorUtilities.VerifyThrowArgumentNull(metadatum);
return metadatum.EvaluatedValueEscaped;
}
@ -1640,7 +1640,7 @@ namespace Microsoft.Build.Execution
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "IItem is an internal interface; this is less confusing to outside customers. ")]
public static string GetMetadataValueEscaped(ProjectItemInstance item, string name)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
return ((IItem)item).GetMetadataValueEscaped(name);
}
@ -1650,7 +1650,7 @@ namespace Microsoft.Build.Execution
/// </summary>
public static string GetMetadataValueEscaped(ProjectItemDefinitionInstance item, string name)
{
ErrorUtilities.VerifyThrowArgumentNull(item, nameof(item));
ErrorUtilities.VerifyThrowArgumentNull(item);
return ((IItem)item).GetMetadataValueEscaped(name);
}
@ -1661,7 +1661,7 @@ namespace Microsoft.Build.Execution
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "IProperty is an internal interface; this is less confusing to outside customers. ")]
public static string GetPropertyValueEscaped(ProjectPropertyInstance property)
{
ErrorUtilities.VerifyThrowArgumentNull(property, nameof(property));
ErrorUtilities.VerifyThrowArgumentNull(property);
return ((IProperty)property).EvaluatedValueEscaped;
}
@ -2538,9 +2538,9 @@ namespace Microsoft.Build.Execution
int submissionId)
{
ErrorUtilities.VerifyThrowArgumentLength(projectFile, nameof(projectFile));
ErrorUtilities.VerifyThrowArgumentNull(globalPropertiesInstances, nameof(globalPropertiesInstances));
ErrorUtilities.VerifyThrowArgumentNull(globalPropertiesInstances);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
ErrorUtilities.VerifyThrowArgumentNull(buildParameters, nameof(buildParameters));
ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
ErrorUtilities.VerifyThrow(FileUtilities.IsSolutionFilename(projectFile), "Project file {0} is not a solution.", projectFile);
ProjectInstance[] projectInstances = null;
@ -3044,9 +3044,9 @@ namespace Microsoft.Build.Execution
EvaluationContext evaluationContext = null,
IDirectoryCacheFactory directoryCacheFactory = null)
{
ErrorUtilities.VerifyThrowArgumentNull(xml, nameof(xml));
ErrorUtilities.VerifyThrowArgumentNull(xml);
ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(explicitToolsVersion, "toolsVersion");
ErrorUtilities.VerifyThrowArgumentNull(buildParameters, nameof(buildParameters));
ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
_directory = xml.DirectoryPath;
_projectFileLocation = xml.ProjectFileLocation ?? ElementLocation.EmptyLocation;

Просмотреть файл

@ -41,7 +41,7 @@ namespace Microsoft.Build.Execution
/// <param name="itemType">The type of item this definition object represents.</param>
internal ProjectItemDefinitionInstance(string itemType)
{
ErrorUtilities.VerifyThrowArgumentNull(itemType, nameof(itemType));
ErrorUtilities.VerifyThrowArgumentNull(itemType);
_itemType = itemType;
}

Просмотреть файл

@ -1406,7 +1406,7 @@ namespace Microsoft.Build.Execution
/// </param>
public void CopyMetadataTo(ITaskItem destinationItem, bool addOriginalItemSpec)
{
ErrorUtilities.VerifyThrowArgumentNull(destinationItem, nameof(destinationItem));
ErrorUtilities.VerifyThrowArgumentNull(destinationItem);
string originalItemSpec = null;
if (addOriginalItemSpec)

Просмотреть файл

@ -74,7 +74,7 @@ namespace Microsoft.Build.Execution
set
{
ProjectInstance.VerifyThrowNotImmutable(IsImmutable);
ErrorUtilities.VerifyThrowArgumentNull(value, nameof(value));
ErrorUtilities.VerifyThrowArgumentNull(value);
_escapedValue = EscapingUtilities.Escape(value);
}
}
@ -322,7 +322,7 @@ namespace Microsoft.Build.Execution
private static ProjectPropertyInstance Create(string name, string escapedValue, bool mayBeReserved, ElementLocation location, bool isImmutable, bool isEnvironmentProperty = false, LoggingContext loggingContext = null)
{
// Does not check immutability as this is only called during build (which is already protected) or evaluation
ErrorUtilities.VerifyThrowArgumentNull(escapedValue, nameof(escapedValue));
ErrorUtilities.VerifyThrowArgumentNull(escapedValue);
if (location == null)
{
ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name), "OM_ReservedName", name);

Просмотреть файл

@ -162,8 +162,8 @@ namespace Microsoft.Build.Execution
ElementLocation msbuildArchitectureLocation)
{
ErrorUtilities.VerifyThrowArgumentLength(name, nameof(name));
ErrorUtilities.VerifyThrowArgumentNull(condition, nameof(condition));
ErrorUtilities.VerifyThrowArgumentNull(continueOnError, nameof(continueOnError));
ErrorUtilities.VerifyThrowArgumentNull(condition);
ErrorUtilities.VerifyThrowArgumentNull(continueOnError);
_name = name;
_condition = condition;

Просмотреть файл

@ -34,7 +34,7 @@ namespace Microsoft.Build.Execution
internal ReflectableTaskPropertyInfo(TaskPropertyInfo taskPropertyInfo, Type taskType)
: base(taskPropertyInfo.Name, taskPropertyInfo.PropertyType, taskPropertyInfo.Output, taskPropertyInfo.Required)
{
ErrorUtilities.VerifyThrowArgumentNull(taskType, nameof(taskType));
ErrorUtilities.VerifyThrowArgumentNull(taskType);
_taskType = taskType;
}

Просмотреть файл

@ -202,7 +202,7 @@ namespace Microsoft.Build.BackEnd
/// </remarks>
public void CleanupTask(ITask task)
{
ErrorUtilities.VerifyThrowArgumentNull(task, nameof(task));
ErrorUtilities.VerifyThrowArgumentNull(task);
#if FEATURE_APPDOMAIN
AppDomain appDomain;
if (_tasksAndAppDomains.TryGetValue(task, out appDomain))
@ -257,7 +257,7 @@ namespace Microsoft.Build.BackEnd
ElementLocation elementLocation,
string taskProjectFile)
{
ErrorUtilities.VerifyThrowArgumentNull(loadInfo, nameof(loadInfo));
ErrorUtilities.VerifyThrowArgumentNull(loadInfo);
VerifyThrowIdentityParametersValid(taskFactoryIdentityParameters, elementLocation, taskName, "Runtime", "Architecture");
if (taskFactoryIdentityParameters != null)

Просмотреть файл

@ -60,7 +60,7 @@ namespace Microsoft.Build.BackEnd
/// </summary>
public TaskFactoryLoggingHost(bool isRunningWithMultipleNodes, ElementLocation elementLocation, BuildLoggingContext loggingContext)
{
ErrorUtilities.VerifyThrowArgumentNull(loggingContext, nameof(loggingContext));
ErrorUtilities.VerifyThrowArgumentNull(loggingContext);
ErrorUtilities.VerifyThrowInternalNull(elementLocation, nameof(elementLocation));
_activeProxy = true;
@ -154,7 +154,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="e">The event args</param>
public void LogErrorEvent(Microsoft.Build.Framework.BuildErrorEventArgs e)
{
ErrorUtilities.VerifyThrowArgumentNull(e, nameof(e));
ErrorUtilities.VerifyThrowArgumentNull(e);
VerifyActiveProxy();
// If we are in building across process we need the events to be serializable. This method will
@ -175,7 +175,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="e">The event args</param>
public void LogWarningEvent(Microsoft.Build.Framework.BuildWarningEventArgs e)
{
ErrorUtilities.VerifyThrowArgumentNull(e, nameof(e));
ErrorUtilities.VerifyThrowArgumentNull(e);
VerifyActiveProxy();
// If we are in building across process we need the events to be serializable. This method will
@ -196,7 +196,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="e">The event args</param>
public void LogMessageEvent(Microsoft.Build.Framework.BuildMessageEventArgs e)
{
ErrorUtilities.VerifyThrowArgumentNull(e, nameof(e));
ErrorUtilities.VerifyThrowArgumentNull(e);
VerifyActiveProxy();
// If we are in building across process we need the events to be serializable. This method will
@ -217,7 +217,7 @@ namespace Microsoft.Build.BackEnd
/// <param name="e">The event args</param>
public void LogCustomEvent(Microsoft.Build.Framework.CustomBuildEventArgs e)
{
ErrorUtilities.VerifyThrowArgumentNull(e, nameof(e));
ErrorUtilities.VerifyThrowArgumentNull(e);
VerifyActiveProxy();
// If we are in building across process we need the events to be serializable. This method will

Просмотреть файл

@ -82,7 +82,7 @@ namespace Microsoft.Build.Execution
/// </summary>
internal TaskFactoryWrapper(ITaskFactory taskFactory, LoadedType taskFactoryLoadInfo, string taskName, IDictionary<string, string> factoryIdentityParameters)
{
ErrorUtilities.VerifyThrowArgumentNull(taskFactory, nameof(taskFactory));
ErrorUtilities.VerifyThrowArgumentNull(taskFactory);
ErrorUtilities.VerifyThrowArgumentLength(taskName, nameof(taskName));
_taskFactory = taskFactory;
_taskName = taskName;
@ -197,8 +197,8 @@ namespace Microsoft.Build.Execution
/// </summary>
internal void SetPropertyValue(ITask task, TaskPropertyInfo property, object value)
{
ErrorUtilities.VerifyThrowArgumentNull(task, nameof(task));
ErrorUtilities.VerifyThrowArgumentNull(property, nameof(property));
ErrorUtilities.VerifyThrowArgumentNull(task);
ErrorUtilities.VerifyThrowArgumentNull(property);
IGeneratedTask? generatedTask = task as IGeneratedTask;
if (generatedTask != null)
@ -217,8 +217,8 @@ namespace Microsoft.Build.Execution
/// </summary>
internal object? GetPropertyValue(ITask task, TaskPropertyInfo property)
{
ErrorUtilities.VerifyThrowArgumentNull(task, nameof(task));
ErrorUtilities.VerifyThrowArgumentNull(property, nameof(property));
ErrorUtilities.VerifyThrowArgumentNull(task);
ErrorUtilities.VerifyThrowArgumentNull(property);
IGeneratedTask? generatedTask = task as IGeneratedTask;
if (generatedTask != null)

Просмотреть файл

@ -1613,8 +1613,8 @@ namespace Microsoft.Build.Execution
where P : class, IProperty
where I : class, IItem
{
ErrorUtilities.VerifyThrowArgumentNull(projectUsingTaskXml, nameof(projectUsingTaskXml));
ErrorUtilities.VerifyThrowArgumentNull(expander, nameof(expander));
ErrorUtilities.VerifyThrowArgumentNull(projectUsingTaskXml);
ErrorUtilities.VerifyThrowArgumentNull(expander);
ProjectUsingTaskBodyElement taskElement = projectUsingTaskXml.TaskBody;
if (taskElement != null)

Просмотреть файл

@ -964,7 +964,7 @@ namespace Microsoft.Build.BackEnd.Logging
/// </summary>
internal virtual bool ApplyParameter(string parameterName, string parameterValue)
{
ErrorUtilities.VerifyThrowArgumentNull(parameterName, nameof(parameterName));
ErrorUtilities.VerifyThrowArgumentNull(parameterName);
switch (parameterName.ToUpperInvariant())
{

Просмотреть файл

@ -105,7 +105,7 @@ namespace Microsoft.Build.Logging
/// </summary>
private void ApplyParameter(IEventSource eventSource, string parameterName)
{
ErrorUtilities.VerifyThrowArgumentNull(parameterName, nameof(parameterName));
ErrorUtilities.VerifyThrowArgumentNull(parameterName);
bool isEventForwardingParameter = true;
@ -202,7 +202,7 @@ namespace Microsoft.Build.Logging
/// </summary>
public virtual void Initialize(IEventSource eventSource)
{
ErrorUtilities.VerifyThrowArgumentNull(eventSource, nameof(eventSource));
ErrorUtilities.VerifyThrowArgumentNull(eventSource);
ParseParameters(eventSource);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше