GraphPropertyCollection.AddNewProperty Method (String, Type)
Registers a new GraphProperty with the default metadata creator.
Namespace: Microsoft.VisualStudio.GraphModel
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
Syntax
'Declaration
Public Function AddNewProperty ( _
id As String, _
dataType As Type _
) As GraphProperty
public GraphProperty AddNewProperty(
string id,
Type dataType
)
public:
GraphProperty^ AddNewProperty(
String^ id,
Type^ dataType
)
member AddNewProperty :
id:string *
dataType:Type -> GraphProperty
public function AddNewProperty(
id : String,
dataType : Type
) : GraphProperty
Parameters
id
Type: StringUnique Id of the GraphProperty
dataType
Type: TypeThe type for data associated with the GraphProperty
Return Value
Type: Microsoft.VisualStudio.GraphModel.GraphProperty
The newly registered GraphProperty object
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | thrown if id is null -or- thrown if dataType is null |
InvalidOperationException | thrown if id is empty string |
.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.