ReplacesAttribute Class
Specifies the name(s) of an asset that will be replaced by this asset.
Inheritance Hierarchy
Object
Attribute
Microsoft.VisualStudio.Utilities.MultipleBaseMetadataAttribute
Microsoft.VisualStudio.Text.Editor.ReplacesAttribute
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Declaration
Public NotInheritable Class ReplacesAttribute _
Inherits MultipleBaseMetadataAttribute
public sealed class ReplacesAttribute : MultipleBaseMetadataAttribute
public ref class ReplacesAttribute sealed : public MultipleBaseMetadataAttribute
[<Sealed>]
type ReplacesAttribute =
class
inherit MultipleBaseMetadataAttribute
end
public final class ReplacesAttribute extends MultipleBaseMetadataAttribute
The ReplacesAttribute type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ReplacesAttribute | Initializes a new instance of the ReplacesAttribute. |
Top
Properties
Name | Description | |
---|---|---|
Replaces | Gets the name of the replaced margin. | |
TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.) |
Top
Methods
Name | Description | |
---|---|---|
Equals | Infrastructure. Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.) | |
GetHashCode | Returns the hash code for this instance. (Inherited from Attribute.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsDefaultAttribute | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.) | |
Match | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
System#Runtime#InteropServices#_Attribute#GetIDsOfNames | Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from Attribute.) | |
System#Runtime#InteropServices#_Attribute#GetTypeInfo | Retrieves the type information for an object, which can be used to get the type information for an interface. (Inherited from Attribute.) | |
System#Runtime#InteropServices#_Attribute#GetTypeInfoCount | Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from Attribute.) | |
System#Runtime#InteropServices#_Attribute#Invoke | Provides access to properties and methods exposed by an object. (Inherited from Attribute.) |
Top
Remarks
You can specify multiple Replaces attributes if you want to replace multiple assets. An asset must have Name attribute that is different from its Replaces attribute (otherwise it would "replace" itself, preventing it from being created. An asset is not created if its Name attribute matches the Replaces attribute of any other asset that would -- excluding this check -- be created. For margin providers, the means that a provider must match the view's ContentType and TextViewRole before it can replace another provider.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.