CommonExtensionMethods Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Not supported for external use
Extension method helpers
[System.Obsolete("Not supported for external use", true)]
public static class CommonExtensionMethods
[<System.Obsolete("Not supported for external use", true)>]
type CommonExtensionMethods = class
Public Module CommonExtensionMethods
- Inheritance
-
CommonExtensionMethods
- Attributes
Methods
AppendKeyValuePairIfNotEmpty(StringBuilder, String, Object) |
Append a key value pair to a non-null StringBuilder. |
EnsureEndsWith(String, Char) |
Appends the specified character, if not already there |
EnsureStartsWith(String, Char) |
Prepends the specified character, if not already there |
GetIotHubName(HttpRequestMessage) |
Get the hub name from a request message |
GetIotHubNameFromHostName(HttpRequestMessage) |
Gets the IoT hub name from the host name |
GetValueOrDefault(IDictionary<String,String>, String) |
Gets the value of the specified key, if present |
IsNullOrWhiteSpace(String) |
Check if the value is null or empty. |
RemoveWhitespace(String) |
Removes white spaces from a string. |
ToDictionary(String, Char, Char) |
Takes a string representation of key/value pairs and produces a dictionary |
TryGetIotHubName(HttpRequestMessage, String) |
Gets the IoT hub name from the message header |
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for