ArtifactReferenceExtensions.CreateArtifactReferenceAsync Method (ILayer, ProjectItem, EventHandler<CreateArtifactReferenceCompletedEventArgs>, Object)
Link this layer to a Visual Studio project item such as a file. This is an asynchronous operation. The completed event will be called when the operation has terminated.
This API is not CLS-compliant.
Namespace: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer
Assembly: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer.dll)
Syntax
'Declaration
<ExtensionAttribute> _
<CLSCompliantAttribute(False)> _
Public Shared Sub CreateArtifactReferenceAsync ( _
parentLayer As ILayer, _
projectItem As ProjectItem, _
completed As EventHandler(Of CreateArtifactReferenceCompletedEventArgs), _
userState As Object _
)
[CLSCompliantAttribute(false)]
public static void CreateArtifactReferenceAsync(
this ILayer parentLayer,
ProjectItem projectItem,
EventHandler<CreateArtifactReferenceCompletedEventArgs> completed,
Object userState
)
[ExtensionAttribute]
[CLSCompliantAttribute(false)]
public:
static void CreateArtifactReferenceAsync(
ILayer^ parentLayer,
ProjectItem^ projectItem,
EventHandler<CreateArtifactReferenceCompletedEventArgs^>^ completed,
Object^ userState
)
[<CLSCompliantAttribute(false)>]
static member CreateArtifactReferenceAsync :
parentLayer:ILayer *
projectItem:ProjectItem *
completed:EventHandler<CreateArtifactReferenceCompletedEventArgs> *
userState:Object -> unit
public static function CreateArtifactReferenceAsync(
parentLayer : ILayer,
projectItem : ProjectItem,
completed : EventHandler<CreateArtifactReferenceCompletedEventArgs>,
userState : Object
)
Parameters
- parentLayer
Type: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer.ILayer
The parent layer.
- projectItem
Type: EnvDTE.ProjectItem
The project item to reference.
- completed
Type: System.EventHandler<CreateArtifactReferenceCompletedEventArgs>
Callback when artifact references have been created.
- userState
Type: System.Object
Object passed to the callback.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ILayer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.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.
See Also
Reference
ArtifactReferenceExtensions Class
CreateArtifactReferenceAsync Overload
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer Namespace