Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Registers a new GraphProperty
Namespace:  Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
Syntax
'Declaration
Public Function AddNewProperty ( _
    id As String, _
    dataType As Type, _
    callback As Func(Of GraphMetadata) _
) As GraphProperty
public GraphProperty AddNewProperty(
    string id,
    Type dataType,
    Func<GraphMetadata> callback
)
public:
GraphProperty^ AddNewProperty(
    String^ id, 
    Type^ dataType, 
    Func<GraphMetadata^>^ callback
)
member AddNewProperty : 
        id:string * 
        dataType:Type * 
        callback:Func<GraphMetadata> -> GraphProperty
public function AddNewProperty(
    id : String, 
    dataType : Type, 
    callback : Func<GraphMetadata>
) : GraphProperty
Parameters
- id 
 Type: System.String- Unique Id of the GraphProperty 
- dataType 
 Type: System.Type- The type for data associated with the GraphProperty 
- callback 
 Type: System.Func<GraphMetadata>- The callback that can lazily create the metadata for this property 
Return Value
Type: Microsoft.VisualStudio.GraphModel.GraphProperty
The newly registered GraphProperty object
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentNullException | thrown if id is null | 
| InvalidOperationException | thrown if id is empty string | 
| ArgumentNullException | thrown if dataType is null | 
.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.