| | | 1 | | // Copyright (c) Microsoft and contributors. All rights reserved. |
| | | 2 | | // |
| | | 3 | | // Licensed under the Apache License, Version 2.0 (the "License"); |
| | | 4 | | // you may not use this file except in compliance with the License. |
| | | 5 | | // You may obtain a copy of the License at |
| | | 6 | | // http://www.apache.org/licenses/LICENSE-2.0 |
| | | 7 | | // |
| | | 8 | | // Unless required by applicable law or agreed to in writing, software |
| | | 9 | | // distributed under the License is distributed on an "AS IS" BASIS, |
| | | 10 | | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | 11 | | // |
| | | 12 | | // See the License for the specific language governing permissions and |
| | | 13 | | // limitations under the License. |
| | | 14 | | |
| | | 15 | | using System; |
| | | 16 | | using System.Collections.Generic; |
| | | 17 | | using System.Linq; |
| | | 18 | | using System.Text; |
| | | 19 | | using System.Threading.Tasks; |
| | | 20 | | |
| | | 21 | | namespace Microsoft.Azure.Batch.Conventions.Files.Utilities |
| | | 22 | | { |
| | | 23 | | internal static class Validate |
| | | 24 | | { |
| | | 25 | | internal static void IsNotNullOrEmpty(string value, string paramName) |
| | | 26 | | { |
| | 131 | 27 | | if (value == null) |
| | | 28 | | { |
| | 15 | 29 | | throw new ArgumentNullException(paramName); |
| | | 30 | | } |
| | 116 | 31 | | if (value.Length == 0) |
| | | 32 | | { |
| | 15 | 33 | | throw new ArgumentException($"{paramName} must not be empty", paramName); |
| | | 34 | | } |
| | 101 | 35 | | } |
| | | 36 | | } |
| | | 37 | | } |