sdk/dotnet/src/Microsoft.Datasync.Client/Utils/Arguments.cs
/// <summary>
/// Returns if the parameter can be used as an ID.
/// </summary>
/// <param name="param">The parameter to validate.</param>
/// <param name="paramName">The parameter name.</param>
/// <exception cref="ArgumentNullException">if the parameter is null.</exception>
/// <exception cref="ArgumentException">if the parameter cannot be used as an ID</exception>
Returns if the parameter can be used as an ID.
Returns if the parameter can be used as an ID .
public static void IsValidId(string param, string paramName)
        {
            IsNotNull(param, paramName);
            if (!validIdRegex.IsMatch(param))
            {
                throw new ArgumentException($"'{param}' is an invalid ID", paramName);
            }
        }
public static void IsValidId ( string param , string paramName ) { IsNotNull ( param , paramName ) ; if ( ! validIdRegex . IsMatch ( param ) ) { throw new ArgumentException ( $" ' { param } ' is an invalid ID " , paramName ) ; } }
Returns if the parameter can be used as an ID.
Returns if the parameter can be used as an ID .
if the parameter is null.
if the parameter is null .
if the parameter cannot be used as an ID
if the parameter cannot be used as an ID
param
string
The parameter to validate.
The parameter to validate .
paramName
string
The parameter name.
The parameter name .