Compartilhar via


LanguageService.Initialize Method

Definition

Called to initialize the language service.

public:
 virtual void Initialize();
public:
 virtual void Initialize();
 virtual void Initialize();
public virtual void Initialize ();
abstract member Initialize : unit -> unit
override this.Initialize : unit -> unit
Public Overridable Sub Initialize ()

Examples

using Microsoft.VisualStudio.Package;  

namespace MyLanguagePackage  
{  
    [Guid("B614A40A-80D9-4fac-A6AD-FC2868FFF7CD")]  
    public class MyLanguageService : LanguageService  
    {  
        public Initialize()  
        {  
            base.Initialize();  
            // Do your language-specified initialization here  
        }  
    }  
}  

Remarks

This method allows you to perform initialization tasks specific to your language service. If you have specific initialization that has to be accomplished, you must derive a class from the LanguageService class and implement this method. If you do not have any special initialization needs, do not implement this method on your derived class.

Note

If you implement this method, you must call the base class version of this method before doing any other initialization.

The base method creates a Windows Forms control to control background tasks such as parsing.

Applies to