DataDefaultObjectAttribute Constructor

Initializes a new instance of the DataDefaultObjectAttribute class, using the specified 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 DataDefaultObjectAttribute(classId)
public DataDefaultObjectAttribute(
    string classId
)
public:
DataDefaultObjectAttribute(
    String^ classId
)
public function DataDefaultObjectAttribute(
    classId : String
)

Parameters

  • classId
    Type: System.String

    A string that contains a GUID in one of the formats 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 the IVsDataConnectionUIConnector support entity that declares a default object attribute.

using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Data.Core;
using Microsoft.VisualStudio.Data.Services;

[DataDefaultObject("C58E1B8D-9723-40c8-8B11-9DDAF0B393BA")]
public interface IVsDataConnectionUIConnector
{
    void Connect(IVsDataConnection connection);
}

Permissions

See Also

Reference

DataDefaultObjectAttribute Class

DataDefaultObjectAttribute Members

Microsoft.VisualStudio.Data.Core Namespace