C# Класс SupportClass, csharp-ldap

Contains conversion support elements such as classes, interfaces and static methods.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateNewInstance ( System classType ) : Object

Creates an instance of a received Type.

EqualsSupport ( System source, System target ) : bool

Determines whether two Collections instances are equals.

FormatDateTime ( System format, System date ) : string

Gets the DateTimeFormat instance and date instance to obtain the date with the format passed

GetCharsFromString ( string sourceString, int sourceStart, int sourceEnd, char &destinationArray, int destinationStart ) : void

Copies an array of chars obtained from a String into a specified array of chars

GetFileStream ( string FileName, bool Append ) : FileStream

Creates an output file stream to write to the file with the specified name.

HashtableRemove ( System hashtable, System key ) : Object

Removes the element with the specified key from a Hashtable instance.

Identity ( double literal ) : double

This method returns the literal value received

Identity ( float literal ) : float

This method returns the literal value received

Identity ( long literal ) : long

This method returns the literal value received

PutElement ( System collection, System key, System newValue ) : Object

Adds a new key-and-value pair into the hash table

ReverseStack ( System collection ) : System.Collections.IEnumerator

Reverses the Stack Collection received.

SetSize ( System arrayList, int newSize ) : void

Sets the size of the ArrayList. If the new size is greater than the current capacity, then new null items are added to the end of the ArrayList. If the new size is lower than the current size, then all elements after the new size are discarded

StackPush ( System stack, System element ) : Object

Adds an element to the top end of a Stack instance.

ToByteArray ( object tempObjectArray ) : byte[]

Converts a array of object-type instances to a byte-type array.

ToByteArray ( string sourceString ) : byte[]

Converts a string to an array of bytes

ToCharArray ( byte byteArray ) : char[]

Converts an array of bytes to an array of chars

VectorRemoveElement ( System arrayList, System element ) : System.Boolean

Removes the first occurrence of an specific object from an ArrayList instance.

WriteStackTrace ( System throwable, System stream ) : void

Writes the exception stack trace to the received stream

Приватные методы

Метод Описание
Identity ( ulong literal ) : ulong
ReadInput ( System sourceStream, sbyte &target, int start, int count ) : Int32
ToByteArray ( sbyte sbyteArray ) : byte[]
ToCharArray ( sbyte sByteArray ) : char[]
ToSByteArray ( byte byteArray ) : sbyte[]

Описание методов

CreateNewInstance() публичный статический Метод

Creates an instance of a received Type.
public static CreateNewInstance ( System classType ) : Object
classType System The Type of the new class instance to return.
Результат System.Object

EqualsSupport() публичный статический Метод

Determines whether two Collections instances are equals.
public static EqualsSupport ( System source, System target ) : bool
source System The first Collections to compare.
target System The second Collections to compare.
Результат bool

FormatDateTime() публичный статический Метод

Gets the DateTimeFormat instance and date instance to obtain the date with the format passed
public static FormatDateTime ( System format, System date ) : string
format System The DateTimeFormat to obtain the time and date pattern
date System The date instance used to get the date
Результат string

GetCharsFromString() публичный статический Метод

Copies an array of chars obtained from a String into a specified array of chars
public static GetCharsFromString ( string sourceString, int sourceStart, int sourceEnd, char &destinationArray, int destinationStart ) : void
sourceString string The String to get the chars from
sourceStart int Position of the String to start getting the chars
sourceEnd int Position of the String to end getting the chars
destinationArray char Array to return the chars
destinationStart int Position of the destination array of chars to start storing the chars
Результат void

GetFileStream() публичный статический Метод

Creates an output file stream to write to the file with the specified name.
public static GetFileStream ( string FileName, bool Append ) : FileStream
FileName string Name of the file to write.
Append bool True in order to write to the end of the file, false otherwise.
Результат System.IO.FileStream

HashtableRemove() публичный статический Метод

Removes the element with the specified key from a Hashtable instance.
public static HashtableRemove ( System hashtable, System key ) : Object
hashtable System The Hashtable instance
key System The key of the element to remove
Результат System.Object

Identity() публичный статический Метод

This method returns the literal value received
public static Identity ( double literal ) : double
literal double The literal to return
Результат double

Identity() публичный статический Метод

This method returns the literal value received
public static Identity ( float literal ) : float
literal float The literal to return
Результат float

Identity() публичный статический Метод

This method returns the literal value received
public static Identity ( long literal ) : long
literal long The literal to return
Результат long

PutElement() публичный статический Метод

Adds a new key-and-value pair into the hash table
public static PutElement ( System collection, System key, System newValue ) : Object
collection System The collection to work with
key System Key used to obtain the value
newValue System Value asociated with the key
Результат System.Object

ReverseStack() публичный статический Метод

Reverses the Stack Collection received.
public static ReverseStack ( System collection ) : System.Collections.IEnumerator
collection System The collection to reverse.
Результат System.Collections.IEnumerator

SetSize() публичный статический Метод

Sets the size of the ArrayList. If the new size is greater than the current capacity, then new null items are added to the end of the ArrayList. If the new size is lower than the current size, then all elements after the new size are discarded
public static SetSize ( System arrayList, int newSize ) : void
arrayList System The ArrayList to be changed
newSize int The new ArrayList size
Результат void

StackPush() публичный статический Метод

Adds an element to the top end of a Stack instance.
public static StackPush ( System stack, System element ) : Object
stack System The Stack instance
element System The element to add
Результат System.Object

ToByteArray() публичный статический Метод

Converts a array of object-type instances to a byte-type array.
public static ToByteArray ( object tempObjectArray ) : byte[]
tempObjectArray object Array to convert.
Результат byte[]

ToByteArray() публичный статический Метод

Converts a string to an array of bytes
public static ToByteArray ( string sourceString ) : byte[]
sourceString string The string to be converted
Результат byte[]

ToCharArray() публичный статический Метод

Converts an array of bytes to an array of chars
public static ToCharArray ( byte byteArray ) : char[]
byteArray byte The array of bytes to convert
Результат char[]

VectorRemoveElement() публичный статический Метод

Removes the first occurrence of an specific object from an ArrayList instance.
public static VectorRemoveElement ( System arrayList, System element ) : System.Boolean
arrayList System The ArrayList instance
element System The element to remove
Результат System.Boolean

WriteStackTrace() публичный статический Метод

Writes the exception stack trace to the received stream
public static WriteStackTrace ( System throwable, System stream ) : void
throwable System Exception to obtain information from
stream System Output sream used to write to
Результат void