Show / Hide Table of Contents

Class EventArguments

The arguments of an event.

Inheritance
System.Object
EventArguments
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: DuneNet.Shared.Events
Assembly: DuneNet.Shared.dll
Syntax
public class EventArguments

Constructors

EventArguments()

Constructor.

Declaration
public EventArguments()

EventArguments(Dictionary<String, Byte[]>)

Constructor.

Declaration
public EventArguments(Dictionary<string, byte[]> rawArguments)
Parameters
Type Name Description
System.Collections.Generic.Dictionary<System.String, System.Byte[]> rawArguments

A dictionary containing the raw variables to include in the arguments.

EventArguments(KeyValuePair<String, Object>[])

Constructor.

Declaration
public EventArguments(params KeyValuePair<string, object>[] arguments)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, System.Object>[] arguments

A range of arguments to be added. This is equivalent to constructing the object with the parameterless constructor and then using SetVariable(string varName, object varValue) for each argument.

Methods

GetRawData()

returns the raw variables of the arguments

Declaration
public Dictionary<string, byte[]> GetRawData()
Returns
Type Description
System.Collections.Generic.Dictionary<System.String, System.Byte[]>

A Dictionary containing the raw variables of the arguments.

Remarks

Used for display and debug purposes. For normal operation, use SetVeriable and GetVariable.

GetVariable<T>(String, SerializationBinder)

Returns the specified argument variable's value.

Declaration
public T GetVariable<T>(string varName, SerializationBinder binder = null)
Parameters
Type Name Description
System.String varName

The name of the variable to retrieve.

System.Runtime.Serialization.SerializationBinder binder

An optional serialization binder to handle the variable deserialization.

Returns
Type Description
T

An instance of type T representing the value of the variable. If the variable does not exist, the default value of T is returned instead.

Type Parameters
Name Description
T

The type of the variable to retrieve. It must flagged as Serializable.

SetVariable(String, Object)

Sets specified variable's value.

Declaration
public void SetVariable(string varName, object varValue)
Parameters
Type Name Description
System.String varName

The name of the variable to set.

System.Object varValue

The value to set the variable to.

Back to top Copyright © 2018 Dune Interactive.