C# Class Microsoft.Azure.Commands.Common.Authentication.Validate

Mostra file Open project: Azure/azure-powershell

Public Methods

Method Description
HasWhiteCharacter ( string text, string exceptionMessage = null ) : void
ValidateDirectoryExists ( string directory, string exceptionMessage = null ) : void
ValidateDirectoryFull ( string directoryNameOnDisk, string directoryName ) : void

Validates against given directory

ValidateDnsDoesNotExist ( string dnsName ) : void
ValidateDnsName ( string dnsName, string parameterName ) : void
ValidateFileExists ( string filePath, string exceptionMessage ) : void
ValidateFileExtention ( string filePath, string desiredExtention ) : void
ValidateFileFull ( string fileNameOnDisk, string fileName ) : void

Validates against given file

ValidateFileName ( string element, string exceptionMessage = null ) : void
ValidateInternetConnection ( ) : void
ValidateNullArgument ( object item, string exceptionMessage ) : void
ValidatePath ( string path, string exceptionMessage ) : void

Make validation for given path.

ValidatePathName ( string element, string exceptionMessage ) : void
ValidateStringIsNullOrEmpty ( string data, string messageData, bool useDefaultMessage = true ) : void

Validates against given string if null or empty.

Private Methods

Method Description
BasicFileAndDirectoryValidation ( string fullPath, string name ) : void
InternetGetConnectedState ( InternetConnectionState &lpdwFlags, int dwReserved ) : bool

Method Details

HasWhiteCharacter() public static method

public static HasWhiteCharacter ( string text, string exceptionMessage = null ) : void
text string
exceptionMessage string
return void

ValidateDirectoryExists() public static method

public static ValidateDirectoryExists ( string directory, string exceptionMessage = null ) : void
directory string
exceptionMessage string
return void

ValidateDirectoryFull() public static method

Validates against given directory
public static ValidateDirectoryFull ( string directoryNameOnDisk, string directoryName ) : void
directoryNameOnDisk string Directory name
directoryName string Name which you use to identify that directory to user (i.e. AzureSdkDirectory)
return void

ValidateDnsDoesNotExist() public static method

public static ValidateDnsDoesNotExist ( string dnsName ) : void
dnsName string
return void

ValidateDnsName() public static method

public static ValidateDnsName ( string dnsName, string parameterName ) : void
dnsName string
parameterName string
return void

ValidateFileExists() public static method

public static ValidateFileExists ( string filePath, string exceptionMessage ) : void
filePath string
exceptionMessage string
return void

ValidateFileExtention() public static method

public static ValidateFileExtention ( string filePath, string desiredExtention ) : void
filePath string
desiredExtention string
return void

ValidateFileFull() public static method

Validates against given file
public static ValidateFileFull ( string fileNameOnDisk, string fileName ) : void
fileNameOnDisk string File name
fileName string Name which you use to identify that directory to user (i.e. Service Settings)
return void

ValidateFileName() public static method

public static ValidateFileName ( string element, string exceptionMessage = null ) : void
element string
exceptionMessage string
return void

ValidateInternetConnection() public static method

public static ValidateInternetConnection ( ) : void
return void

ValidateNullArgument() public static method

public static ValidateNullArgument ( object item, string exceptionMessage ) : void
item object
exceptionMessage string
return void

ValidatePath() public static method

Make validation for given path.
public static ValidatePath ( string path, string exceptionMessage ) : void
path string Path to validate
exceptionMessage string message to display if this validation failed
return void

ValidatePathName() public static method

public static ValidatePathName ( string element, string exceptionMessage ) : void
element string
exceptionMessage string
return void

ValidateStringIsNullOrEmpty() public static method

Validates against given string if null or empty.
public static ValidateStringIsNullOrEmpty ( string data, string messageData, bool useDefaultMessage = true ) : void
data string string variable to validate
messageData string This parameter is used when the validation fails. It can contain actual message to display /// or parameter name to display with default message
useDefaultMessage bool Indicates either to use messageData as actual message or parameter name
return void