Partager via


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

'Declaration
Public Sub New ( _
    classId As String _
)
public DataDefaultObjectAttribute(
    string classId
)
public:
DataDefaultObjectAttribute(
    String^ classId
)
new : 
        classId:string -> DataDefaultObjectAttribute
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);
}

.NET Framework Security

See Also

Reference

DataDefaultObjectAttribute Class

Microsoft.VisualStudio.Data.Core Namespace