IClassificationTypeRegistryService.CreateTransientClassificationType Method (array<IClassificationType )

Creates an IClassificationType that persists only for the duration of this session.

Namespace:  Microsoft.VisualStudio.Text.Classification
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

Syntax

声明
Function CreateTransientClassificationType ( _
    ParamArray baseTypes As IClassificationType() _
) As IClassificationType
IClassificationType CreateTransientClassificationType(
    params IClassificationType[] baseTypes
)
IClassificationType^ CreateTransientClassificationType(
    ... array<IClassificationType^>^ baseTypes
)
abstract CreateTransientClassificationType : 
        baseTypes:IClassificationType[] -> IClassificationType 
function CreateTransientClassificationType(
    ... baseTypes : IClassificationType[]
) : IClassificationType

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.Classification.IClassificationType
A new IClassificationType which inherits from all baseTypes.

Exceptions

Exception Condition
ArgumentNullException

baseTypes is nulla null reference (Nothing in Visual Basic).

InvalidOperationException

baseTypes has zero items.

Remarks

This IClassificationType must inherit from at least one IClassificationType.

This method is intended to aid in the runtime display of overlapping classifications.

The classification names generated by this method are determined at runtime and are subject to change in future revisions. The only guarantee made is that if two transient IClassificationType objects are created with the same base types, they will have the same classification name.

.NET Framework Security

See Also

Reference

IClassificationTypeRegistryService Interface

CreateTransientClassificationType Overload

Microsoft.VisualStudio.Text.Classification Namespace