wwUtils class which contains a set of common utility classes for Formatting strings Reflection Helpers Object Serialization.

MemberDescription
Constructor
MemberAccess Binding Flags constant to be reused for all Reflection access methods.
CallMethod Calls a method on an object dynamically.
public static object CallMethod( object Object,
string Method,
Object[] Params );
CallMethodEx Calls a method on an object with extended . syntax (object: this Method: Entity.CalculateOrderTotal)
public static object CallMethodEx( object Parent,
string Method,
Object[] Params );
CreateInstanceFromType Creates an instance from a type by calling the parameterless constructor.
public object CreateInstanceFromType( Type TypeToCreate );
DeSerializeObject Deserializes an object from file and returns a reference.
public static object DeSerializeObject( string Filename,
Type ObjectType,
bool BinarySerialization );

public static object DeSerializeObject( XmlReader reader,
Type ObjectType );

public static object DeSerializeObject( string XML,
Type ObjectType );

public static object DeSerializeObject( Byte[] Buffer,
Type ObjectType );

GetField Retrieve a field dynamically from an object. This is a simple implementation that's straight Reflection and doesn't support indexers.
public static object GetField( object Object,
string Property );
GetFullPath Returns a fully qualified path from a partial or relative path.
public static string GetFullPath( string Path );
GetProperty Retrieve a property value from an object dynamically. This is a simple version that uses Reflection calls directly. It doesn't support indexers.
public static object GetProperty( 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") This method also supports indexers in the Property value such as: Customer.DataSet.Tables["Customers"].Rows[0]
public static object GetPropertyEx( object Parent,
string Property );
GetRelativePath Returns a relative path string from a full path.
public static string GetRelativePath( string FullPath,
string BasePath );
GetSystemPassword Returns the logon password stored in the registry if Auto-Logon is used. This function is used privately for demos when I need to specify a login username and password.
public static string GetSystemPassword( bool GetUserName );
GetUrlEncodedKey Retrieves a value by key from a UrlEncoded string.
public static string GetUrlEncodedKey( string UrlEncodedString,
string Key );
GoUrl Uses the Shell Extensions to launch a program based or URL moniker.
public static int GoUrl( string Url );
HttpGet Single method to retrieve HTTP content from the Web quickly
public static string HttpGet( string Url,
ref string ErrorMessage );
JustPath Returns the full path of a full physical filename
public static string JustPath( string Path );
MimeDateTime Converts the passed date time value to Mime formatted time string
public static string MimeDateTime( DateTime Time );
ObjectToString
public static string ObjectToString( object Obj,
string Separator,
ObjectToStringTypes Type );
SerializeObject Serializes an object instance to a file.
public static bool SerializeObject( object Instance,
string Filename,
bool BinarySerialization );

public static bool SerializeObject( object Instance,
XmlTextWriter writer );

public static bool SerializeObject( object Instance,
ref string XmlResultString );

public static bool SerializeObject( object Instance,
ref Byte[] ResultBuffer );

SetField Sets the field on an object. This is a simple method that uses straight Reflection and doesn't support indexers.
public static void SetField( object Object,
string Property,
object Value );
SetProperty Sets the property on an object. This is a simple method that uses straight Reflection and doesn't support indexers.
public static void SetProperty( object Object,
string Property,
object Value );
SetPropertyEx Sets a value on an object. Supports . syntax for named properties (ie. Customer.Entity.Company) as well as indexers.
public static object SetPropertyEx( object Parent,
string Property,
object Value );
ShowHtml
public static int ShowHtml( string HtmlString );
ShowString Displays an HTML string in a browser window
public static int ShowString( string HtmlString,
string extension );
ShowText Displays a large Text string as a text file.
public static int ShowText( string TextString );
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 );

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 );

UrlDecode UrlDecodes a string without requiring System.Web
public static string UrlDecode( string InputString );
UrlEncode UrlEncodes a string without the requirement for System.Web
public static string UrlEncode( string InputString );

Class Information


Assembly: wwappconfiguration.dll
Namespace: Westwind.Tools

System.Object Westwind.Tools.wwUtils

Last Updated: 1/29/2007 | Send topic feedback