Skip to content

Latest commit

 

History

History
871 lines (554 loc) · 44.8 KB

Microsoft.VisualStudio.Extensibility.Contracts.md

File metadata and controls

871 lines (554 loc) · 44.8 KB

Microsoft.VisualStudio.Extensibility.Contracts

Contents

ActivationContextAttribute type

Namespace

Microsoft.VisualStudio.Extensibility

Summary

An attribute base class that describes metadata based on activation context.

#ctor(expression,termNames,termValues) constructor

Summary

Initializes a new instance of the ActivationContextAttribute class.

Parameters
Name Type Description
expression System.String Boolean expression string.
termNames System.String[] Array of terms used in the expression.
termValues System.String[] Values of each term in the same order as term names array.

Expression property

Summary

Gets the activation expression.

TermNames property

Summary

Gets the names of the terms used in the expression.

TermValues property

Summary

Gets the term values in the same order as term names.

AllowNullAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that null is allowed as an input even if the corresponding type disallows it.

#ctor() constructor

Summary

Initializes a new instance of the AllowNullAttribute class.

Parameters

This constructor has no parameters.

DisallowNullAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that null is disallowed as an input even if the corresponding type allows it.

#ctor() constructor

Summary

Initializes a new instance of the DisallowNullAttribute class.

Parameters

This constructor has no parameters.

Dock type

Namespace

Microsoft.VisualStudio.Extensibility.ToolWindows

Summary

Dock direction that can be used to control how a tool window is docked when it's first shown.

Bottom constants

Summary

Docks the tool window below its placement target.

Left constants

Summary

Docks the tool window to the left of its placement target.

None constants

Summary

Docks the tool window alongside its placement target.

Right constants

Summary

Docks the tool window to the right of its placement target.

Top constants

Summary

Docks the tool window above its placement target.

DoesNotReturnAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that a method that will never return under any circumstance.

#ctor() constructor

Summary

Initializes a new instance of the DoesNotReturnAttribute class.

Parameters

This constructor has no parameters.

DoesNotReturnIfAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that the method will not return if the associated Boolean parameter is passed the specified value.

#ctor(parameterValue) constructor

Summary

Initializes a new instance of the DoesNotReturnIfAttribute class with the specified parameter value.

Parameters
Name Type Description
parameterValue System.Boolean The condition parameter value.
Code after the method is considered unreachable by diagnostics if the argument
to the associated parameter matches this value. |

ParameterValue property

Summary

Gets the condition parameter value. Code after the method is considered unreachable by diagnostics if the argument to the associated parameter matches this value.

ExtensionContractAttribute type

Namespace

Microsoft.VisualStudio.Extensibility

Summary

Contains additional information about an extension part contract, specifically around wrapping type.

#ctor(rpcContractType,wrapperObjectType) constructor

Summary

Initializes a new instance of the ExtensionContractAttribute class.

Parameters
Name Type Description
rpcContractType System.Type Type of the rpc contract interface.
wrapperObjectType System.Type Type of the wrapper object.

RpcContractType property

Summary

Gets the RPC contract type this interface is intended for.

WrapperObjectType property

Summary

Gets the wrapper object type.

ExtensionPartAttribute type

Namespace

Microsoft.VisualStudio.Extensibility

Summary

An attribute base class that indicates the type of contract provided by the ExtensionPart object.

#ctor(interfaceType) constructor

Summary

Initializes a new instance of the ExtensionPartAttribute class.

Parameters
Name Type Description
interfaceType System.Type Type of the interface exposed by this extension part..

InterfaceType property

Summary

Gets the contract interface type.

HostingOptionsAttribute type

Namespace

Microsoft.VisualStudio.Extensibility

Summary

An attribute base class that indicates the type of contract provided by the ExtensionPart object.

#ctor(requiresInProcessHosting) constructor

Summary

Initializes a new instance of the HostingOptionsAttribute class.

Parameters
Name Type Description
requiresInProcessHosting System.Boolean If true, extension is required to be hosted in process.

RequiresInProcessHosting property

Summary

Gets a value indicating whether the extension requires to be hosted in process.

MaybeNullAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that an output may be null even if the corresponding type disallows it.

#ctor() constructor

Summary

Initializes a new instance of the MaybeNullAttribute class.

Parameters

This constructor has no parameters.

MaybeNullWhenAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that when a method returns ReturnValue, the parameter may be null even if the corresponding type disallows it.

#ctor(returnValue) constructor

Summary

Initializes the attribute with the specified return value condition.

Parameters
Name Type Description
returnValue System.Boolean The return value condition.
If the method returns this value, the associated parameter may be `null`. |

ReturnValue property

Summary

Gets the return value condition. If the method returns this value, the associated parameter may be null.

MemberNotNullAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that the method or property will ensure that the listed field and property members have not-null values.

#ctor(member) constructor

Summary

Initializes the attribute with a field or property member.

Parameters
Name Type Description
member System.String The field or property member that is promised to be not-null.

#ctor(members) constructor

Summary

Initializes the attribute with the list of field and property members.

Parameters
Name Type Description
members System.String[] The list of field and property members that are promised to be not-null.

Members property

Summary

Gets field or property member names.

MemberNotNullWhenAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that the method or property will ensure that the listed field and property members have non-null values when returning with the specified return value condition.

#ctor(returnValue,member) constructor

Summary

Initializes the attribute with the specified return value condition and a field or property member.

Parameters
Name Type Description
returnValue System.Boolean The return value condition. If the method returns this value,
the associated parameter will not be `null`. |

| member | System.String | The field or property member that is promised to be not-null. |

#ctor(returnValue,members) constructor

Summary

Initializes the attribute with the specified return value condition and list of field and property members.

Parameters
Name Type Description
returnValue System.Boolean The return value condition. If the method returns this value,
the associated parameter will not be `null`. |

| members | System.String[] | The list of field and property members that are promised to be not-null. |

Members property

Summary

Gets field or property member names.

ReturnValue property

Summary

Gets the return value condition.

NotNullAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that an output is not null even if the corresponding type allows it.

#ctor() constructor

Summary

Initializes a new instance of the NotNullAttribute class.

Parameters

This constructor has no parameters.

NotNullIfNotNullAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that the output will be non-null if the named parameter is non-null.

#ctor(parameterName) constructor

Summary

Initializes the attribute with the associated parameter name.

Parameters
Name Type Description
parameterName System.String The associated parameter name.
The output will be non-`null` if the argument to the
parameter specified is non-`null`. |

ParameterName property

Summary

Gets the associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.

NotNullWhenAttribute type

Namespace

System.Diagnostics.CodeAnalysis

Summary

Specifies that when a method returns ReturnValue, the parameter will not be null even if the corresponding type allows it.

#ctor(returnValue) constructor

Summary

Initializes the attribute with the specified return value condition.

Parameters
Name Type Description
returnValue System.Boolean The return value condition.
If the method returns this value, the associated parameter will not be `null`. |

ReturnValue property

Summary

Gets the return value condition. If the method returns this value, the associated parameter will not be null.

Resources type

Namespace

Microsoft.VisualStudio.Extensibility.Contracts

Summary

A strongly-typed resource class, for looking up localized strings, etc.

CommandIdAlreadyRegistered property

Summary

Looks up a localized string similar to Command ID is already registered..

Culture property

Summary

Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class.

InvalidVersionString property

Summary

Looks up a localized string similar to Invalid version identifier..

ResourceManager property

Summary

Returns the cached ResourceManager instance used by this class.

UnsupportedDocumentMoniker property

Summary

Looks up a localized string similar to Unsupported document moniker..

ServiceFactoryRegistrationAttribute type

Namespace

Microsoft.VisualStudio.Extensibility

Summary

Describes a mapping from service moniker to internal service factory type and extension part instance type.

#ctor(serviceName,serviceVersion,factoryType,instanceType,interfaceType) constructor

Summary

Initializes a new instance of the ServiceFactoryRegistrationAttribute class.

Parameters
Name Type Description
serviceName System.String Name of the service.
serviceVersion System.String Version of the service.
factoryType System.Type Factory class type.
instanceType System.Type Optional service object instance class type, if specified the type info will be passed to the factory.
interfaceType System.Type Optional interface type, if specified the type info will be passed to factory to determine the wrapper type.

FactoryType property

Summary

Gets the service factory type.

InstanceType property

Summary

Gets the service object instance type.

InterfaceType property

Summary

Gets the target interface type for this service moniker, should be specified if instance type is implementing multiple interfaces.

Moniker property

Summary

Gets the service moniker.

ToolWindowAttribute type

Namespace

Microsoft.VisualStudio.Extensibility.ToolWindows

Summary

An attribute used on ToolWindow classes to register a tool window and define its default behaviors.

#ctor(placement,dockDirection,allowAutoCreation) constructor

Summary

Initializes a new instance of the ToolWindowAttribute class.

Parameters
Name Type Description
placement Microsoft.VisualStudio.Extensibility.ToolWindows.ToolWindowPlacement The placement location for the tool window. Valid values come from ToolWindowPlacement.
dockDirection Microsoft.VisualStudio.Extensibility.ToolWindows.Dock The direction relative to the placement where the tool window should be docked.
allowAutoCreation System.Boolean Whether or not the tool window can be created automatically.

#ctor(placement,dockDirection,allowAutoCreation) constructor

Summary

Initializes a new instance of the ToolWindowAttribute class.

Parameters
Name Type Description
placement System.String The placement location for the tool window. Valid values come from guids of other tool windows.
dockDirection Microsoft.VisualStudio.Extensibility.ToolWindows.Dock The direction relative to the placement where the tool window should be docked.
allowAutoCreation System.Boolean Whether or not the tool window can be created automatically.

AllowAutoCreation property

Summary

Gets a value indicating whether the tool window can be created automatically.

Remarks

When true, the tool window will be created if it should be visible in the current window layout or when any relevant visibility contexts activate. When false the tool window will not be created as part of loading any window layout or due to visibility contexts, and the only way to trigger the creation is to manually show it.

DockDirection property

Summary

Gets the dock direction where the tool window should be placed relative to the Placement value.

Remarks

If the Placement has the value Floating this value is ignored. If the Placement has the value DocumentWell this value will dock the tool window to the corresponding side of the main window's document well. If the Placement is any other value the tool window will be docked relative to the Placement based on the value of the "Insert new tabs to the right" setting with the exception of Left which will always dock to the left of the Placement.

Placement property

Summary

Gets the default placement location for the tool window. This can be a well-known string from ToolWindowPlacement, or the guid string of another tool window.

Remarks

If the value is Floating the tool window will be created in its own floating window. If the value is DocumentWell the tool window will be docked in relation to the main window's document well. Any other value will attempt to find the referenced location and dock the tool window relative to that location, but if that location cannot be found, the tool window will fallback to opening in a floating window.

ToolWindowPlacement type

Namespace

Microsoft.VisualStudio.Extensibility.ToolWindows

Summary

Known default tool window placements.

DocumentWell constants

Summary

Places the tool window in the active document well by default.

Floating constants

Summary

Places the tool window in a standalone floating window by default.

ToolWindowVisibleWhenAttribute type

Namespace

Microsoft.VisualStudio.Extensibility.ToolWindows

Summary

An attribute used on ToolWindow classes to register a visibility context for showing a tool window.

#ctor(expression,termNames,termValues) constructor

Summary

Initializes a new instance of the ToolWindowVisibleWhenAttribute class.

Parameters
Name Type Description
expression System.String A boolean expression string.
termNames System.String[] The names of the terms used in the expression.
termValues System.String[] The values of each term in the same order as term names array.