Condividi tramite


EditorFactory Constructor (Package)

Creates an instance of the EditorFactory class.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Dichiarazione
Public Sub New ( _
    package As Package _
)
'Utilizzo
Dim package As Package

Dim instance As New EditorFactory(package)
public EditorFactory(
    Package package
)
public:
EditorFactory(
    Package^ package
)
new : 
        package:Package -> EditorFactory
public function EditorFactory(
    package : Package
)

Parameters

Remarks

Sets the IServiceProvider site through which the package can request services.

Examples

The following example is from the EditorFactory.cs source file.

[C#]

[CLSCompliant(false)]
[System.Runtime.InteropServices.ComVisible(true)]
public class EditorFactory : IVsEditorFactory 
{
Microsoft.VisualStudio.Shell.Package package;
IServiceProvider site;
public EditorFactory(Microsoft.VisualStudio.Shell.Package package) 
{
this.package = package;
this.site = package;
}
...
}

.NET Framework Security

See Also

Reference

EditorFactory Class

EditorFactory Members

EditorFactory Overload

Microsoft.VisualStudio.Package Namespace