PrivateObject Methods

Include Protected Members
Include Inherited Members

The PrivateObject type exposes the following members.

Methods

  Name Description
Public method Equals Returns a value that indicates whether two private objects are encapsulating the same target object. (Overrides Object.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetArrayElement(String, array<Int32[]) Gets the array element by using an array of subscripts for each dimension.
Public method GetArrayElement(String, BindingFlags, array<Int32[]) Gets the array element by using an array of subscripts for each dimension.
Public method GetField(String) Gets a value from a named field, based on the name.
Public method GetField(String, BindingFlags) Gets a value from a named field, based on the name and lookup mask.
Public method GetFieldOrProperty(String) Gets a value of a wrapped field or property based on the name.
Public method GetFieldOrProperty(String, BindingFlags) Gets a value of a wrapped field or property based on the name.
Public method GetHashCode Gets the hash code of the wrapped object. (Overrides Object.GetHashCode.)
Public method GetProperty(String, array<Object[]) Gets a property for a wrapped object identified by name.
Public method GetProperty(String, BindingFlags, array<Object[]) Gets a property for a wrapped object identified by name with binding flags.
Public method GetProperty(String, array<Type[], array<Object[]) Gets a property for a wrapped object identified by name.
Public method GetProperty(String, BindingFlags, array<Type[], array<Object[]) Gets an indexed property for a wrapped object identified by name.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Invoke(String, array<Object[]) Used to access the members of the private object.
Public method Invoke(String, array<Object[], CultureInfo) Used to access the members of the private object.
Public method Invoke(String, BindingFlags, array<Object[]) Used to access the members of the private object.
Public method Invoke(String, array<Type[], array<Object[]) Used to access the methods of the private object.
Public method Invoke(String, BindingFlags, array<Object[], CultureInfo) Used to access the members of the private object.
Public method Invoke(String, BindingFlags, array<Type[], array<Object[]) Used to access the members of the private object.
Public method Invoke(String, array<Type[], array<Object[], CultureInfo) Used to access the members of the private object.
Public method Invoke(String, array<Type[], array<Object[], array<Type[]) Used to access generic members of a private object.
Public method Invoke(String, BindingFlags, array<Type[], array<Object[], CultureInfo) Used to access the members of the private object.
Public method Invoke(String, BindingFlags, array<Type[], array<Object[], CultureInfo, array<Type[]) Used to access generic members of a private object.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetArrayElement(String, Object, array<Int32[]) Sets the array element by using an array of subscripts for each dimension.
Public method SetArrayElement(String, BindingFlags, Object, array<Int32[]) Sets the array element by using an array of subscripts for each dimension.
Public method SetField(String, Object) Sets a value for the field of the wrapped object, identified by name.
Public method SetField(String, BindingFlags, Object) Sets a value for the field of the wrapped object, identified by name.
Public method SetFieldOrProperty(String, Object) Sets a value of a wrapped field or property based on the name.
Public method SetFieldOrProperty(String, BindingFlags, Object) Sets a value of a wrapped field or property based on the name.
Public method SetProperty(String, Object, array<Object[]) Sets a property for a wrapped object identified by name.
Public method SetProperty(String, BindingFlags, Object, array<Object[]) Sets a property for a wrapped object identified by name with binding flags.
Public method SetProperty(String, array<Type[], Object, array<Object[]) Sets an indexed property for a wrapped object identified by name.
Public method SetProperty(String, BindingFlags, Object, array<Type[], array<Object[]) Sets an indexed property for a wrapped object identified by name.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

See Also

Reference

PrivateObject Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace