C# Класс YAMP.StringValue

The class for representing a string value.
Наследование: Value, IFunction
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Add ( Value left, Value right ) : StringValue

Performs the addition str + x or x + str.

Copy ( ) : Value

Returns a copy of this string value instance.

Deserialize ( Byte content ) : Value

Creates a new string value from the binary content.

Equals ( object obj ) : bool

Is the given object equal to this.

GetHashCode ( ) : int

Computes the hashcode of the value inside.

Perform ( ParseContext context, Value argument ) : Value

If invoked like a function the function reacts like this.

Serialize ( ) : Byte[]

Converts the given value into binary data.

StringValue ( ) : System

Creates a new instance.

StringValue ( Char str ) : System

Creates a new instance.

StringValue ( String value ) : System

Creates a new instance and sets the value.

ToString ( ParseContext context ) : String

Returns the string content of this instance.

this ( Int32 index ) : Char

Gets the 1-based character of the string.

Защищенные методы

Метод Описание
RegisterOperators ( ) : void

Registers the allowed operations.

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

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

Performs the addition str + x or x + str.
public static Add ( Value left, Value right ) : StringValue
left Value An arbitrary value.
right Value Another arbitrary value.
Результат StringValue

Copy() публичный Метод

Returns a copy of this string value instance.
public Copy ( ) : Value
Результат Value

Deserialize() публичный Метод

Creates a new string value from the binary content.
public Deserialize ( Byte content ) : Value
content Byte The data which contains the content.
Результат Value

Equals() публичный Метод

Is the given object equal to this.
public Equals ( object obj ) : bool
obj object The compare object.
Результат bool

GetHashCode() публичный Метод

Computes the hashcode of the value inside.
public GetHashCode ( ) : int
Результат int

Perform() публичный Метод

If invoked like a function the function reacts like this.
public Perform ( ParseContext context, Value argument ) : Value
context ParseContext The context of invocation.
argument Value The argument(s) that have been given.
Результат Value

RegisterOperators() защищенный Метод

Registers the allowed operations.
protected RegisterOperators ( ) : void
Результат void

Serialize() публичный Метод

Converts the given value into binary data.
public Serialize ( ) : Byte[]
Результат Byte[]

StringValue() публичный Метод

Creates a new instance.
public StringValue ( ) : System
Результат System

StringValue() публичный Метод

Creates a new instance.
public StringValue ( Char str ) : System
str Char The given character array.
Результат System

StringValue() публичный Метод

Creates a new instance and sets the value.
public StringValue ( String value ) : System
value String The string where this value is based on.
Результат System

ToString() публичный Метод

Returns the string content of this instance.
public ToString ( ParseContext context ) : String
context ParseContext The context of the invocation.
Результат String

this() публичный Метод

Gets the 1-based character of the string.
public this ( Int32 index ) : Char
index System.Int32 The 1-based character (1 == first character) index.
Результат Char