DataClientObjectAttribute Constructor

Initializes a new instance of the DataClientObjectAttribute class, specifying the class ID.

Namespace:  Microsoft.VisualStudio.Data.Core
Assembly:  Microsoft.VisualStudio.Data.Core (in Microsoft.VisualStudio.Data.Core.dll)

Syntax

'宣言
Public Sub New ( _
    classId As String _
)
'使用
Dim classId As String

Dim instance As New DataClientObjectAttribute(classId)
public DataClientObjectAttribute(
    string classId
)
public:
DataClientObjectAttribute(
    String^ classId
)
public function DataClientObjectAttribute(
    classId : String
)

Parameters

  • classId
    Type: System.String

    A string that contains a GUID in one of the formats that is recognized by the Guid constructor that takes a string input.

Remarks

The format of the classId parameter is not validated by this constructor. Instead, it is validated when you retrieve the value from an instance of the attribute by using the ClassId property.

Examples

The following code shows the definition of a fictitious support entity that declares a client object attribute.

using System;
using Microsoft.VisualStudio.Data.Core;

[DataClientObject("1520C77F-09AF-40b4-B1FE-53C30A177C59")]
public interface IVsDataSupportEntity
{
    void DoSomething();
}

Permissions

See Also

Reference

DataClientObjectAttribute Class

DataClientObjectAttribute Members

Microsoft.VisualStudio.Data.Core Namespace