Class wwUtils

Summary description for Class1.

System.Object
  Westwind.wwReflection.Tools.wwUtils
public class wwUtils : object

Class Members

MemberDescription

Constructor

MemberAccess

Binding Flags constant to be reused for all Reflection access methods.

At

Receives two strings as parameters and searches for one string within another. If found, returns the beginning numeric position otherwise returns 0

public static int At( string cSearchFor,
    string cSearchIn );

public static int At( string cSearchFor,
    string cSearchIn,
    int nOccurence );

AtC

Receives two strings as parameters and searches for one string within another. This function ignores the case and if found, returns the beginning numeric position otherwise returns 0

public static int AtC( string cSearchFor,
    string cSearchIn );

public static int AtC( string cSearchFor,
    string cSearchIn,
    int nOccurence );

CallMethod

Wrapper method to call a 'dynamic' (non-typelib) method on a COM object

public static object CallMethod( object Object,
    string Method,
    Object[] Params );

CallMethodCom

Wrapper method to call a 'dynamic' (non-typelib) method on a COM object

public static object CallMethodCom( object Object,
    string Method,
    Object[] Params );

CreateInstanceFromType

Creates an instance from a type by calling the parameterless constructor.

public object CreateInstanceFromType( Type TypeToCreate );

GetField

Retrieve a dynamic 'non-typelib' field

public static object GetField( object Object,
    string Property );

GetProperty

Retrieve a dynamic 'non-typelib' property

public static object GetProperty( object Object,
    string Property );

GetPropertyCom

Retrieve a dynamic 'non-typelib' property

public static object GetPropertyCom( object Object,
    string Property );

GetPropertyEx

Returns a property or field value using a base object and sub members including . syntax. For example, you can access: this.oCustomer.oData.Company with (this,"oCustomer.oData.Company")

public static object GetPropertyEx( object Parent,
    string Property );

GetPropertyExCom

Returns a property or field value using a base object and sub members including . syntax. For example, you can access: this.oCustomer.oData.Company with (this,"oCustomer.oData.Company")

public static object GetPropertyExCom( object Parent,
    string Property );

ProperCase

Returns Proper case for a string

public static string ProperCase( string Input );

SetField

Sets the field on an object.

public static void SetField( object Object,
    string Property,
    object Value );

SetProperty

Sets the property on an object.

public static void SetProperty( object Object,
    string Property,
    object Value );

SetPropertyCom

Sets the property on an object.

public static void SetPropertyCom( object Object,
    string Property,
    object Value );

SetPropertyEx

Sets the value of a field or property via Reflection. This method alws for using '.' syntax to specify objects multiple levels down.

public static object SetPropertyEx( object Parent,
    string Property,
    object Value );

SetPropertyExCom

Sets the value of a field or property via Reflection. This method alws for using '.' syntax to specify objects multiple levels down.

public static object SetPropertyExCom( object Parent,
    string Property,
    object Value );

StrExtract

Receives a string along with starting and ending delimiters and returns the part of the string between the delimiters. Receives a beginning occurence to begin the extraction from and also receives a flag (0/1) where 1 indicates that the search should be case insensitive.

public static string StrExtract( string cSearchExpression,
    string cBeginDelim,
    string cEndDelim,
    int nBeginOccurence,
    int nFlags );

public static string StrExtract( string cSearchExpression,
    string cBeginDelim );

public static string StrExtract( string cSearchExpression,
    string cBeginDelim,
    string cEndDelim );

public static string StrExtract( string cSearchExpression,
    string cBeginDelim,
    string cEndDelim,
    int nBeginOccurence );

StringToTypedValue

Turns a string into a typed value. Useful for auto-conversion routines like form variable or XML parsers.

public static object StringToTypedValue( string SourceString,
    Type TargetType,
    CultureInfo Culture );

public static object StringToTypedValue( string SourceString,
    Type TargetType );

StrTran

Searches one string into another string and replaces all occurences with a blank character.

public static string StrTran( string SearchIn,
    string SearchFor );

public static string StrTran( string cSearchIn,
    string cSearchFor,
    string cReplaceWith );

public static string StrTran( string cSearchIn,
    string cSearchFor,
    string cReplaceWith,
    bool ReplaceFirstOnly );

TypedValueToString

Converts a type to string if possible. This method supports an optional culture generically on any value. It calls the ToString() method on common types and uses a type converter on all other objects if available

public static string TypedValueToString( object RawValue,
    CultureInfo Culture );

public static string TypedValueToString( object RawValue );

Requirements

Namespace: Westwind.wwReflection.Tools
Assembly: wwReflection.DLL

© West Wind Techologies, 2018 • Updated: 07/31/07
Comment or report problem with topic