C# Class Westwind.WebConnection.ComValue

Mostra file Open project: RickStrahl/wwDotnetBridge

Public Methods

Method Description
GetGuid ( ) : string

Retrieves a GUID value as a string from the Value structure

GetTypeName ( ) : string

Returns the name of the type in the Value structure

GetValue ( ) : object
NewGuid ( ) : void

Create a new Guid on the Value structure

SetByte ( object value ) : void

Returns a byte value which is similar to Int16.

SetChar ( object val ) : void

Sets a character value from a string or integer

SetDbNull ( ) : void

Allows setting of DbNull from FoxPro since DbNull is an inaccessible value type for FoxPro.

SetDecimal ( object val ) : void

Sets a Decimal value. This can actually be done in FoxPro with CAST(val as Currency)

SetEnum ( string enumValue ) : void

Assigns an enum value to the value structure. This allows to pass enum values to methods and constructors to ensure that method signatures match properly

SetEnumFlag ( string enumType, int enumValue ) : void

Assigns an enum value that is based on a numeric (flag) value or a combination of flag values.

SetFloat ( object val ) : void

Set a float value

SetGuid ( object value ) : void

Sets value to a .NET Guid. Creates a GUID from either ComGuid instance a string, or if null creates a new GUID.

SetInt16 ( object val ) : void

Sets a Short value which is not supported in Visual FoxPro

SetInt64 ( object val ) : void

Sets an Int64 value which is not supported in Visual FoxPro

SetLong ( object val ) : void

Sets a Long (64 bit) integer value

SetSingle ( object val ) : void

Sets a Single Value on the

SetUInt32 ( object val ) : void

Sets an UInt64 value which is not supported in Visual FoxPro

SetUInt64 ( object val ) : void

Sets an UInt64 value which is not supported in Visual FoxPro

SetValue ( object value ) : void

Method that sets the Value property by fixing up any values based on GetProperty() rules. This means if you pass an ComArray the raw array will be unpacked and stored for example.

SetValueFromCreateInstance ( string typeName, Westwind.WebConnection.ComArray parms ) : void

Sets the Value property from a CreateInstance call. Useful for value types that can't be passed back to FoxPro.

SetValueFromEnum ( string enumType, string enumName ) : void
SetValueFromInvokeMethod ( object objectRef, string method, Westwind.WebConnection.ComArray parms ) : void

Sets the Value property from a method call that passes it's positional arguments as an array. This version accepts a ComArray directly so it can be called directly from FoxPro with a ComArray instance

SetValueFromInvokeMethod ( object objectRef, string method, object parms ) : void

Sets the Value property from a method call that passes it's positional arguments as an array.

SetValueFromInvokeStaticMethod ( string typeName, string method, Westwind.WebConnection.ComArray parms ) : void

Invokes a static method with the passed parameters and sets the Value property from the result value.

SetValueFromProperty ( object objectRef, string property ) : void

Sets the Value property from a property retrieved from .NET Useful to transfer value in .NET that are marshalled incorrectly in FoxPro such as Enum values (that are marshalled as numbers)

SetValueFromStaticProperty ( string typeName, string property ) : void

Sets the value property from a static property retrieved from .NET. Useful to transfer value in .NET that are marshalled incorrectly in FoxPro such as Enum values (that are marshalled as numbers)

SetValueFromSystemConvert ( string method, object value ) : void

Invokes a method on the System.Convert static class to perform conversions that are supported by that object

ToString ( ) : string

Returns the string value of the embedded Value object

Protected Methods

Method Description
SetValueFromCreateInstance_Internal ( string typeName, object parms ) : void

Sets the Value property from a CreateInstance call. Useful for value types that can't be passed back to FoxPro.

Method Details

GetGuid() public method

Retrieves a GUID value as a string from the Value structure
public GetGuid ( ) : string
return string

GetTypeName() public method

Returns the name of the type in the Value structure
public GetTypeName ( ) : string
return string

GetValue() public method

public GetValue ( ) : object
return object

NewGuid() public method

Create a new Guid on the Value structure
public NewGuid ( ) : void
return void

SetByte() public method

Returns a byte value which is similar to Int16.
public SetByte ( object value ) : void
value object
return void

SetChar() public method

Sets a character value from a string or integer
public SetChar ( object val ) : void
val object
return void

SetDbNull() public method

Allows setting of DbNull from FoxPro since DbNull is an inaccessible value type for FoxPro.
public SetDbNull ( ) : void
return void

SetDecimal() public method

Sets a Decimal value. This can actually be done in FoxPro with CAST(val as Currency)
public SetDecimal ( object val ) : void
val object
return void

SetEnum() public method

Assigns an enum value to the value structure. This allows to pass enum values to methods and constructors to ensure that method signatures match properly
public SetEnum ( string enumValue ) : void
enumValue string full type and value name. Example: System.Windows.Forms.MessageBoxOptions.OK
return void

SetEnumFlag() public method

Assigns an enum value that is based on a numeric (flag) value or a combination of flag values.
public SetEnumFlag ( string enumType, int enumValue ) : void
enumType string Enum type name (System.Windows.Forms.MessageBoxOptions)
enumValue int numeric flag value to set enum to
return void

SetFloat() public method

Set a float value
public SetFloat ( object val ) : void
val object
return void

SetGuid() public method

Sets value to a .NET Guid. Creates a GUID from either ComGuid instance a string, or if null creates a new GUID.
public SetGuid ( object value ) : void
value object
return void

SetInt16() public method

Sets a Short value which is not supported in Visual FoxPro
public SetInt16 ( object val ) : void
val object
return void

SetInt64() public method

Sets an Int64 value which is not supported in Visual FoxPro
public SetInt64 ( object val ) : void
val object
return void

SetLong() public method

Sets a Long (64 bit) integer value
public SetLong ( object val ) : void
val object
return void

SetSingle() public method

Sets a Single Value on the
public SetSingle ( object val ) : void
val object
return void

SetUInt32() public method

Sets an UInt64 value which is not supported in Visual FoxPro
public SetUInt32 ( object val ) : void
val object
return void

SetUInt64() public method

Sets an UInt64 value which is not supported in Visual FoxPro
public SetUInt64 ( object val ) : void
val object
return void

SetValue() public method

Method that sets the Value property by fixing up any values based on GetProperty() rules. This means if you pass an ComArray the raw array will be unpacked and stored for example.
public SetValue ( object value ) : void
value object
return void

SetValueFromCreateInstance() public method

Sets the Value property from a CreateInstance call. Useful for value types that can't be passed back to FoxPro.
public SetValueFromCreateInstance ( string typeName, Westwind.WebConnection.ComArray parms ) : void
typeName string
parms Westwind.WebConnection.ComArray
return void

SetValueFromCreateInstance_Internal() protected method

Sets the Value property from a CreateInstance call. Useful for value types that can't be passed back to FoxPro.
protected SetValueFromCreateInstance_Internal ( string typeName, object parms ) : void
typeName string
parms object
return void

SetValueFromEnum() public method

public SetValueFromEnum ( string enumType, string enumName ) : void
enumType string
enumName string
return void

SetValueFromInvokeMethod() public method

Sets the Value property from a method call that passes it's positional arguments as an array. This version accepts a ComArray directly so it can be called directly from FoxPro with a ComArray instance
public SetValueFromInvokeMethod ( object objectRef, string method, Westwind.WebConnection.ComArray parms ) : void
objectRef object Object instance
method string Method to call
parms Westwind.WebConnection.ComArray An array of the parameters passed (use ComArray and InvokeMethod)
return void

SetValueFromInvokeMethod() public method

Sets the Value property from a method call that passes it's positional arguments as an array.
public SetValueFromInvokeMethod ( object objectRef, string method, object parms ) : void
objectRef object Object instance
method string Method to call
parms object An array of the parameters passed (use ComArray and InvokeMethod)
return void

SetValueFromInvokeStaticMethod() public method

Invokes a static method with the passed parameters and sets the Value property from the result value.
public SetValueFromInvokeStaticMethod ( string typeName, string method, Westwind.WebConnection.ComArray parms ) : void
typeName string
method string
parms Westwind.WebConnection.ComArray
return void

SetValueFromProperty() public method

Sets the Value property from a property retrieved from .NET Useful to transfer value in .NET that are marshalled incorrectly in FoxPro such as Enum values (that are marshalled as numbers)
public SetValueFromProperty ( object objectRef, string property ) : void
objectRef object An object reference to the base object
property string Name of the property
return void

SetValueFromStaticProperty() public method

Sets the value property from a static property retrieved from .NET. Useful to transfer value in .NET that are marshalled incorrectly in FoxPro such as Enum values (that are marshalled as numbers)
public SetValueFromStaticProperty ( string typeName, string property ) : void
typeName string Full type name as a string - can also be an Enum type
property string The static property name
return void

SetValueFromSystemConvert() public method

Invokes a method on the System.Convert static class to perform conversions that are supported by that object
public SetValueFromSystemConvert ( string method, object value ) : void
method string The Convert method name to call as a string
value object The Value to convert
return void

ToString() public method

Returns the string value of the embedded Value object
public ToString ( ) : string
return string