added some development tools
[windows-sources.git] / developer / VSSDK / VisualStudioIntegration / Common / Source / CSharp / Shell / ProvideToolboxFormatAttribute.cs
blob34cc149911524f6d1c321fd062c3ad61a1642ad2
1 //------------------------------------------------------------------------------
2 // <copyright file="ProvideToolboxFormatAttribute.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
7 namespace Microsoft.VisualStudio.Shell {
9 using System;
11 /// <include file='doc\ProvideToolboxFormatAttribute.uex' path='docs/doc[@for="ProvideToolboxFormatAttribute"]' />
12 /// <devdoc>
13 /// This attribute declares a single toolbox clipboard format that
14 /// the package supports. Multiple attributes can be added to
15 /// a package to allow more than one clipboard format. By
16 /// providing this attribute on your package, you enable
17 /// users to drag data objects containing this format onto the
18 /// toolbox. You must still handle the drop notifications
19 /// yourself.
20 /// </devdoc>
21 [AttributeUsage(AttributeTargets.Class, Inherited=true, AllowMultiple=true)]
22 public sealed class ProvideToolboxFormatAttribute : Attribute {
24 private string _format;
26 /// <include file='doc\ProvideToolboxFormatAttribute.uex' path='docs/doc[@for="ProvideToolboxFormatAttribute.ProvideToolboxFormatAttribute"]' />
27 /// <devdoc>
28 /// Creates a new ProvideToolboxFormatAttribute.
29 /// </devdoc>
30 public ProvideToolboxFormatAttribute(string format) {
32 if (format == null) {
33 throw new ArgumentNullException("format");
36 _format = format;
39 /// <include file='doc\ProvideToolboxFormatAttribute.uex' path='docs/doc[@for="ProvideToolboxFormatAttribute.Format"]' />
40 /// <devdoc>
41 /// Returns the clipboard format to enable for this package.
42 /// </devdoc>
43 public string Format {
44 get {
45 return _format;