C# 클래스 Microsoft.VisualStudio.Project.SingleFileGenerator

Provides support for single file generator.
상속: ISingleFileGenerator, IVsGeneratorProgress
파일 보기 프로젝트 열기: tunnelvisionlabs/MPFProj10

공개 메소드들

메소드 설명
GeneratorError ( int warning, uint level, string err, uint line, uint col ) : int
InvokeGenerator ( FileNode fileNode ) : void

Invokes the specified generator

Progress ( uint complete, uint total ) : int
RunGenerator ( string document ) : void

Runs the generator on the current project item.

SingleFileGenerator ( ProjectNode projectMgr ) : System

Overloadde ctor.

보호된 메소드들

메소드 설명
CanEditFile ( string documentMoniker ) : bool

This function asks to the QueryEditQuerySave service if it is possible to edit the file.

ComputeNamespace ( string projectItemPath ) : string

Computes the names space based on the folder for the ProjectItem. It just replaces DirectorySeparatorCharacter with "." for the directory in which the file is located.

GetBufferContents ( string fileName, IVsTextStream &srpStream ) : string

Returns the buffer contents for a moniker.

UpdateGeneratedCodeFile ( FileNode fileNode, byte data, int size, string fileName ) : string

This is called after the single file generator has been invoked to create or update the code file.

VerifyFileDirtyInRdt ( string document, IVsHierarchy &pHier, IVsPersistDocData &ppDocData, uint &cookie ) : bool

Returns TRUE if open and dirty. Note that documents can be open without a window frame so be careful. Returns the DocData and doc cookie if requested

메소드 상세

CanEditFile() 보호된 메소드

This function asks to the QueryEditQuerySave service if it is possible to edit the file.
protected CanEditFile ( string documentMoniker ) : bool
documentMoniker string
리턴 bool

ComputeNamespace() 보호된 메소드

Computes the names space based on the folder for the ProjectItem. It just replaces DirectorySeparatorCharacter with "." for the directory in which the file is located.
protected ComputeNamespace ( string projectItemPath ) : string
projectItemPath string
리턴 string

GeneratorError() 공개 메소드

public GeneratorError ( int warning, uint level, string err, uint line, uint col ) : int
warning int
level uint
err string
line uint
col uint
리턴 int

GetBufferContents() 보호된 메소드

Returns the buffer contents for a moniker.
protected GetBufferContents ( string fileName, IVsTextStream &srpStream ) : string
fileName string
srpStream IVsTextStream
리턴 string

InvokeGenerator() 공개 메소드

Invokes the specified generator
public InvokeGenerator ( FileNode fileNode ) : void
fileNode FileNode The node on which to invoke the generator.
리턴 void

Progress() 공개 메소드

public Progress ( uint complete, uint total ) : int
complete uint
total uint
리턴 int

RunGenerator() 공개 메소드

Runs the generator on the current project item.
public RunGenerator ( string document ) : void
document string
리턴 void

SingleFileGenerator() 공개 메소드

Overloadde ctor.
public SingleFileGenerator ( ProjectNode projectMgr ) : System
projectMgr ProjectNode The associated project
리턴 System

UpdateGeneratedCodeFile() 보호된 메소드

This is called after the single file generator has been invoked to create or update the code file.
protected UpdateGeneratedCodeFile ( FileNode fileNode, byte data, int size, string fileName ) : string
fileNode FileNode The node associated to the generator
data byte data to update the file with
size int size of the data
fileName string Name of the file to update or create
리턴 string

VerifyFileDirtyInRdt() 보호된 메소드

Returns TRUE if open and dirty. Note that documents can be open without a window frame so be careful. Returns the DocData and doc cookie if requested
protected VerifyFileDirtyInRdt ( string document, IVsHierarchy &pHier, IVsPersistDocData &ppDocData, uint &cookie ) : bool
document string document path
pHier IVsHierarchy hierarchy
ppDocData IVsPersistDocData doc data associated with document
cookie uint item cookie
리턴 bool