Share via


CompositionServices Class

Class to standardize usage of MEF within T4.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.TextTemplating.VSHost.CompositionServices

Namespace:  Microsoft.VisualStudio.TextTemplating.VSHost
Assembly:  Microsoft.VisualStudio.TextTemplating.VSHost.11.0 (in Microsoft.VisualStudio.TextTemplating.VSHost.11.0.dll)

Syntax

'Declaration
Public NotInheritable Class CompositionServices
public static class CompositionServices
public ref class CompositionServices abstract sealed
[<AbstractClass>]
[<Sealed>]
type CompositionServices =  class end
public final class CompositionServices

The CompositionServices type exposes the following members.

Properties

  Name Description
Public propertyStatic member ServiceContainer Service container to add local services within the AppDomain
Public propertyStatic member ServiceProvider Service provider to ask for local services within the AppDomain Query for SComponentModel to acquire MEF services.

Top

Methods

  Name Description
Public methodStatic member InitializeServices

Top

Remarks

To make the services available, write this in your text template:

<#@ template hostSpecific="true" #>

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.

See Also

Reference

Microsoft.VisualStudio.TextTemplating.VSHost Namespace