C# Class YAMP.StringValue

The class for representing a string value.
Inheritance: Value, IFunction
Exibir arquivo Open project: FlorianRappl/YAMP Class Usage Examples

Public Methods

Method Description
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.

Protected Methods

Method Description
RegisterOperators ( ) : void

Registers the allowed operations.

Method Details

Add() public static method

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.
return StringValue

Copy() public method

Returns a copy of this string value instance.
public Copy ( ) : Value
return Value

Deserialize() public method

Creates a new string value from the binary content.
public Deserialize ( Byte content ) : Value
content Byte The data which contains the content.
return Value

Equals() public method

Is the given object equal to this.
public Equals ( object obj ) : bool
obj object The compare object.
return bool

GetHashCode() public method

Computes the hashcode of the value inside.
public GetHashCode ( ) : int
return int

Perform() public method

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.
return Value

RegisterOperators() protected method

Registers the allowed operations.
protected RegisterOperators ( ) : void
return void

Serialize() public method

Converts the given value into binary data.
public Serialize ( ) : Byte[]
return Byte[]

StringValue() public method

Creates a new instance.
public StringValue ( ) : System
return System

StringValue() public method

Creates a new instance.
public StringValue ( Char str ) : System
str Char The given character array.
return System

StringValue() public method

Creates a new instance and sets the value.
public StringValue ( String value ) : System
value String The string where this value is based on.
return System

ToString() public method

Returns the string content of this instance.
public ToString ( ParseContext context ) : String
context ParseContext The context of the invocation.
return String

this() public method

Gets the 1-based character of the string.
public this ( Int32 index ) : Char
index System.Int32 The 1-based character (1 == first character) index.
return Char