GlobalObject Constructor
Initializes a new instance of the GlobalObject class.
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'宣言
Protected Sub New ( _
objectType As Type, _
objectName As String _
)
protected GlobalObject(
Type objectType,
string objectName
)
Parameters
- objectType
Type: System.Type
The Type of the global object.
- objectName
Type: System.String
A String containing the name of the global object.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | objectType is nulla null reference (Nothing in Visual Basic). |
Remarks
The GlobalObject constructor is not publicly accessible because global objects are usually created using the GetGlobalObjects method of the GlobalObjectService class. With this mechanism, you can track global objects for type changes, additions, and removals.
This constructor sets the Name property to the objectName parameter. This is the name of the object as it is displayed to the user of the design-time environment, and should follow the usual rules for identifiers. This name is filtered through the System.ComponentModel.Design.Serialization.INameCreationService by the designer to ensure that it conforms to language restrictions.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.Shell.Design Namespace
System.ComponentModel.Design.Serialization.INameCreationService