PrivateType Class
Represents the type of a private class that gives access to private static implementations.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.TestTools.UnitTesting.PrivateType
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Syntax
'Declaration
Public Class PrivateType
public class PrivateType
public ref class PrivateType
type PrivateType = class end
public class PrivateType
The PrivateType type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PrivateType(Type) | Initializes a new instance of the PrivateType class with the type information. | |
PrivateType(String, String) | Initializes a new instance of the PrivateType class. |
Top
Properties
Name | Description | |
---|---|---|
ReferencedType | Gets the Type representing the PrivateType. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetStaticArrayElement(String, array<Int32[]) | Gets a static array element contained in the wrapped type. | |
GetStaticArrayElement(String, BindingFlags, array<Int32[]) | Gets a static array element contained in the wrapped type. | |
GetStaticField(String) | Gets a static field contained in the wrapped type. | |
GetStaticField(String, BindingFlags) | Gets a static field contained in the wrapped type. | |
GetStaticFieldOrProperty(String) | Gets a value of a static field or property in a wrapped type based on the name. | |
GetStaticFieldOrProperty(String, BindingFlags) | Gets a value of a static field or property in a wrapped type based on the name. | |
GetStaticProperty(String, array<Object[]) | Gets a static property contained in the wrapped type. | |
GetStaticProperty(String, BindingFlags, array<Object[]) | Gets a static property contained in the wrapped type. | |
GetStaticProperty(String, BindingFlags, array<Type[], array<Object[]) | Gets a static indexed property contained in the wrapped type. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InvokeStatic(String, array<Object[]) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, array<Object[], CultureInfo) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, BindingFlags, array<Object[]) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, array<Type[], array<Object[]) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, BindingFlags, array<Object[], CultureInfo) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, BindingFlags, array<Type[], array<Object[]) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, array<Type[], array<Object[], CultureInfo) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, array<Type[], array<Object[], array<Type[]) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, BindingFlags, array<Type[], array<Object[], CultureInfo) | Invokes static methods on the PrivateType. | |
InvokeStatic(String, BindingFlags, array<Type[], array<Object[], CultureInfo, array<Type[]) | Invokes static methods on the PrivateType. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetStaticArrayElement(String, Object, array<Int32[]) | Sets a static array element contained in the wrapped type. | |
SetStaticArrayElement(String, BindingFlags, Object, array<Int32[]) | Sets a static array element contained in the wrapped type. | |
SetStaticField(String, Object) | Sets a static field contained in the wrapped type. | |
SetStaticField(String, BindingFlags, Object) | Sets a static field contained in the wrapped type. | |
SetStaticFieldOrProperty(String, Object) | Sets a static field or property contained in the wrapped type. | |
SetStaticFieldOrProperty(String, BindingFlags, Object) | Sets a static field or property contained in the wrapped type. | |
SetStaticProperty(String, Object, array<Object[]) | Sets a static property contained in the wrapped type. | |
SetStaticProperty(String, Object, array<Type[], array<Object[]) | Sets a static property contained in the wrapped type. | |
SetStaticProperty(String, BindingFlags, Object, array<Object[]) | Sets a static property contained in the wrapped type. | |
SetStaticProperty(String, BindingFlags, Object, array<Type[], array<Object[]) | Sets a static property contained in the wrapped type. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
The test generator automatically creates the private type.
.NET Framework Security
-
The user must have the TypeInformation and MemberAccess flags set to use this type.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.VisualStudio.TestTools.UnitTesting Namespace