File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed
src/ResourceManager/Batch/Commands.Batch/Models Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public IEnumerable<PSCloudJob> ListJobs(ListJobOptions options)
35
35
throw new ArgumentNullException ( "options" ) ;
36
36
}
37
37
38
- if ( string . IsNullOrEmpty ( options . WorkItemName ) && options . WorkItem == null )
38
+ if ( string . IsNullOrWhiteSpace ( options . WorkItemName ) && options . WorkItem == null )
39
39
{
40
40
throw new ArgumentNullException ( Resources . GBJ_NoWorkItem ) ;
41
41
}
@@ -89,7 +89,7 @@ public void DeleteJob(RemoveJobParameters parameters)
89
89
{
90
90
throw new ArgumentNullException ( "parameters" ) ;
91
91
}
92
- if ( ( string . IsNullOrEmpty ( parameters . WorkItemName ) || string . IsNullOrEmpty ( parameters . JobName ) ) && parameters . Job == null )
92
+ if ( ( string . IsNullOrWhiteSpace ( parameters . WorkItemName ) || string . IsNullOrWhiteSpace ( parameters . JobName ) ) && parameters . Job == null )
93
93
{
94
94
throw new ArgumentException ( Resources . RBJ_NoJobSpecified ) ;
95
95
}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public IEnumerable<PSCloudPool> ListPools(ListPoolOptions options)
37
37
}
38
38
39
39
// Get the single Pool matching the specified name
40
- if ( ! string . IsNullOrEmpty ( options . PoolName ) )
40
+ if ( ! string . IsNullOrWhiteSpace ( options . PoolName ) )
41
41
{
42
42
WriteVerbose ( string . Format ( Resources . GBP_GetByName , options . PoolName ) ) ;
43
43
using ( IPoolManager poolManager = options . Context . BatchOMClient . OpenPoolManager ( ) )
@@ -83,7 +83,7 @@ public void CreatePool(NewPoolParameters parameters)
83
83
{
84
84
throw new ArgumentNullException ( "parameters" ) ;
85
85
}
86
- if ( string . IsNullOrEmpty ( parameters . PoolName ) )
86
+ if ( string . IsNullOrWhiteSpace ( parameters . PoolName ) )
87
87
{
88
88
throw new ArgumentNullException ( "PoolName" ) ;
89
89
}
@@ -156,7 +156,7 @@ public void CreatePool(NewPoolParameters parameters)
156
156
/// <param name="additionBehaviors">Additional client behaviors to perform</param>
157
157
public void DeletePool ( BatchAccountContext context , string poolName , IEnumerable < BatchClientBehavior > additionBehaviors = null )
158
158
{
159
- if ( string . IsNullOrEmpty ( poolName ) )
159
+ if ( string . IsNullOrWhiteSpace ( poolName ) )
160
160
{
161
161
throw new ArgumentNullException ( "poolName" ) ;
162
162
}
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public IEnumerable<PSCloudTask> ListTasks(ListTaskOptions options)
36
36
throw new ArgumentNullException ( "options" ) ;
37
37
}
38
38
39
- if ( ( string . IsNullOrEmpty ( options . WorkItemName ) || string . IsNullOrEmpty ( options . JobName ) ) && options . Job == null )
39
+ if ( ( string . IsNullOrWhiteSpace ( options . WorkItemName ) || string . IsNullOrWhiteSpace ( options . JobName ) ) && options . Job == null )
40
40
{
41
41
throw new ArgumentNullException ( Resources . GBT_NoJob ) ;
42
42
}
@@ -98,11 +98,11 @@ public void CreateTask(NewTaskParameters parameters)
98
98
{
99
99
throw new ArgumentNullException ( "parameters" ) ;
100
100
}
101
- if ( ( string . IsNullOrEmpty ( parameters . WorkItemName ) || string . IsNullOrEmpty ( parameters . JobName ) ) && parameters . Job == null )
101
+ if ( ( string . IsNullOrWhiteSpace ( parameters . WorkItemName ) || string . IsNullOrWhiteSpace ( parameters . JobName ) ) && parameters . Job == null )
102
102
{
103
103
throw new ArgumentException ( Resources . NBT_NoJobSpecified ) ;
104
104
}
105
- if ( string . IsNullOrEmpty ( parameters . TaskName ) )
105
+ if ( string . IsNullOrWhiteSpace ( parameters . TaskName ) )
106
106
{
107
107
throw new ArgumentNullException ( "TaskName" ) ;
108
108
}
@@ -164,7 +164,7 @@ public void DeleteTask(RemoveTaskParameters parameters)
164
164
{
165
165
throw new ArgumentNullException ( "parameters" ) ;
166
166
}
167
- if ( ( string . IsNullOrEmpty ( parameters . WorkItemName ) || string . IsNullOrEmpty ( parameters . JobName ) || string . IsNullOrEmpty ( parameters . TaskName ) ) && parameters . Task == null )
167
+ if ( ( string . IsNullOrWhiteSpace ( parameters . WorkItemName ) || string . IsNullOrWhiteSpace ( parameters . JobName ) || string . IsNullOrWhiteSpace ( parameters . TaskName ) ) && parameters . Task == null )
168
168
{
169
169
throw new ArgumentException ( Resources . RBT_NoTaskSpecified ) ;
170
170
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public IEnumerable<PSCloudWorkItem> ListWorkItems(ListWorkItemOptions options)
38
38
}
39
39
40
40
// Get the single WorkItem matching the specified name
41
- if ( ! string . IsNullOrEmpty ( options . WorkItemName ) )
41
+ if ( ! string . IsNullOrWhiteSpace ( options . WorkItemName ) )
42
42
{
43
43
WriteVerbose ( string . Format ( Resources . GBWI_GetByName , options . WorkItemName ) ) ;
44
44
using ( IWorkItemManager wiManager = options . Context . BatchOMClient . OpenWorkItemManager ( ) )
@@ -84,7 +84,7 @@ public void CreateWorkItem(NewWorkItemParameters parameters)
84
84
{
85
85
throw new ArgumentNullException ( "parameters" ) ;
86
86
}
87
- if ( string . IsNullOrEmpty ( parameters . WorkItemName ) )
87
+ if ( string . IsNullOrWhiteSpace ( parameters . WorkItemName ) )
88
88
{
89
89
throw new ArgumentNullException ( "WorkItemName" ) ;
90
90
}
@@ -132,7 +132,7 @@ public void CreateWorkItem(NewWorkItemParameters parameters)
132
132
/// <param name="additionBehaviors">Additional client behaviors to perform</param>
133
133
public void DeleteWorkItem ( BatchAccountContext context , string workItemName , IEnumerable < BatchClientBehavior > additionBehaviors = null )
134
134
{
135
- if ( string . IsNullOrEmpty ( workItemName ) )
135
+ if ( string . IsNullOrWhiteSpace ( workItemName ) )
136
136
{
137
137
throw new ArgumentNullException ( "workItemName" ) ;
138
138
}
You can’t perform that action at this time.
0 commit comments