diff --git a/iothub/service/src/Common/Extensions/CommonExtensions.cs b/iothub/service/src/Common/Extensions/CommonExtensions.cs index 037b2958a2..45cd46132d 100644 --- a/iothub/service/src/Common/Extensions/CommonExtensions.cs +++ b/iothub/service/src/Common/Extensions/CommonExtensions.cs @@ -244,6 +244,16 @@ public static void AppendKeyValuePairIfNotEmpty(this StringBuilder builder, stri } } + /// + /// Check if the value is null or empty. + /// + /// The value to check. + /// Returns true if the value is null or empty, otherwise returns false. + public static bool IsNullOrWhiteSpace(this string value) + { + return string.IsNullOrWhiteSpace(value); + } + /// /// Removes white spaces from a string. ///