Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
'Declaration
Public Sub New ( _
package As Package _
)
public EditorFactory(
Package package
)
public:
EditorFactory(
Package^ package
)
new :
package:Package -> EditorFactory
public function EditorFactory(
package : Package
)
Parameters
- package
Type: Microsoft.VisualStudio.Shell.Package
The package object.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.