C# 클래스 Applitools.Utils.CommonUtils

Common utilities
파일 보기 프로젝트 열기: applitools/Eyes.Sdk.DotNet

공개 메소드들

메소드 설명
BytesToHexString ( Array array ) : string
ConvertDictionaryKeys ( Dictionary obj ) : TVal>.Dictionary
CopyUpTo ( Stream source, Stream destination, long maxBytes, int bufferSize = 1024 ) : void

Copies up to the specified maximal number of bytes to the destination stream.

DisposeIfNotNull ( IDisposable disposable ) : void

Disposes of the input object unless it is null.

DontThrow ( Action action ) : Exception

Executes the input action and returns an exception if one was thrown.

GetAssemblyTargetFramework_ ( Assembly eyesSeleniumAsm ) : string
GetAttribute ( Enum value ) : TAttribute
GetAttribute ( object value ) : TAttribute
GetDotNetVersion ( ) : string
GetEnvVar ( string envVarName ) : string
GetInnerException ( Exception ex ) : T
GetSha256Hash ( Array bytes ) : string
ReadResourceBytes ( string filename ) : byte[]
ReadResourceFile ( string filename ) : string
ReadResourceFileAsLines ( string filename ) : IList
ReadResourceStream ( string filename ) : Stream
ReadStreamAsLines ( Stream stream ) : IList
ReadToEnd ( Stream stream, int bufferSize = 1024, int length, long maxLength, Logger logger = null ) : byte[]

Returns all the bytes of the input stream.

Retry ( TimeSpan timeout, TimeSpan interval, Func action ) : bool

Runs the input action upon each expiry of interval until action returns true or timeout expires.

SanitizeUrl ( string url ) : string
ToBytesBE ( int value, Stream stream ) : void

Writes the big-endian byte representation of the input value to the target stream.

ToBytesBE ( short value, Stream stream ) : void

Writes the big-endian byte representation of the input value to the target stream.

비공개 메소드들

메소드 설명
Equals ( ) : System

메소드 상세

BytesToHexString() 공개 정적인 메소드

public static BytesToHexString ( Array array ) : string
array Array
리턴 string

ConvertDictionaryKeys() 공개 정적인 메소드

public static ConvertDictionaryKeys ( Dictionary obj ) : TVal>.Dictionary
obj Dictionary
리턴 TVal>.Dictionary

CopyUpTo() 공개 정적인 메소드

Copies up to the specified maximal number of bytes to the destination stream.
Thrown if the source stream contains more than /// maxBytes bytes
public static CopyUpTo ( Stream source, Stream destination, long maxBytes, int bufferSize = 1024 ) : void
source Stream Source stream
destination Stream Destination stream
maxBytes long Maximal number of bytes to copy or -1 to allow /// any number of bytes to be copied
bufferSize int Size of chunks read and written
리턴 void

DisposeIfNotNull() 공개 정적인 메소드

Disposes of the input object unless it is null.
public static DisposeIfNotNull ( IDisposable disposable ) : void
disposable IDisposable
리턴 void

DontThrow() 공개 정적인 메소드

Executes the input action and returns an exception if one was thrown.
public static DontThrow ( Action action ) : Exception
action Action
리턴 Exception

GetAssemblyTargetFramework_() 공개 정적인 메소드

public static GetAssemblyTargetFramework_ ( Assembly eyesSeleniumAsm ) : string
eyesSeleniumAsm Assembly
리턴 string

GetAttribute() 공개 정적인 메소드

public static GetAttribute ( Enum value ) : TAttribute
value Enum
리턴 TAttribute

GetAttribute() 공개 정적인 메소드

public static GetAttribute ( object value ) : TAttribute
value object
리턴 TAttribute

GetDotNetVersion() 공개 정적인 메소드

public static GetDotNetVersion ( ) : string
리턴 string

GetEnvVar() 공개 정적인 메소드

public static GetEnvVar ( string envVarName ) : string
envVarName string
리턴 string

GetInnerException() 공개 정적인 메소드

public static GetInnerException ( Exception ex ) : T
ex Exception
리턴 T

GetSha256Hash() 공개 정적인 메소드

public static GetSha256Hash ( Array bytes ) : string
bytes Array
리턴 string

ReadResourceBytes() 공개 정적인 메소드

public static ReadResourceBytes ( string filename ) : byte[]
filename string
리턴 byte[]

ReadResourceFile() 공개 정적인 메소드

public static ReadResourceFile ( string filename ) : string
filename string
리턴 string

ReadResourceFileAsLines() 공개 정적인 메소드

public static ReadResourceFileAsLines ( string filename ) : IList
filename string
리턴 IList

ReadResourceStream() 공개 정적인 메소드

public static ReadResourceStream ( string filename ) : Stream
filename string
리턴 Stream

ReadStreamAsLines() 공개 정적인 메소드

public static ReadStreamAsLines ( Stream stream ) : IList
stream Stream
리턴 IList

ReadToEnd() 공개 정적인 메소드

Returns all the bytes of the input stream.
public static ReadToEnd ( Stream stream, int bufferSize = 1024, int length, long maxLength, Logger logger = null ) : byte[]
stream Stream
bufferSize int
length int
maxLength long
logger Logger
리턴 byte[]

Retry() 공개 정적인 메소드

Runs the input action upon each expiry of interval until action returns true or timeout expires.
public static Retry ( TimeSpan timeout, TimeSpan interval, Func action ) : bool
timeout TimeSpan
interval TimeSpan
action Func
리턴 bool

SanitizeUrl() 공개 정적인 메소드

public static SanitizeUrl ( string url ) : string
url string
리턴 string

ToBytesBE() 공개 정적인 메소드

Writes the big-endian byte representation of the input value to the target stream.
public static ToBytesBE ( int value, Stream stream ) : void
value int
stream Stream
리턴 void

ToBytesBE() 공개 정적인 메소드

Writes the big-endian byte representation of the input value to the target stream.
public static ToBytesBE ( short value, Stream stream ) : void
value short
stream Stream
리턴 void