C# 클래스 Rubberduck.Common.DeclarationExtensions

파일 보기 프로젝트 열기: retailcoder/Rubberduck

공개 프로퍼티들

프로퍼티 타입 설명
ProcedureTypes DeclarationType[]

공개 메소드들

메소드 설명
BitmapImage ( this declaration ) : BitmapImage
CountOfDeclarationsInStatement ( this target ) : int

Returns the number of variable declarations in a single statement.

FindBuiltInEventHandlers ( this declarations ) : IEnumerable
FindEventHandlers ( this declarations, Rubberduck.Parsing.Symbols.Declaration control ) : IEnumerable

Finds all event handler procedures for specified control declaration.

FindEventProcedures ( this declarations, Rubberduck.Parsing.Symbols.Declaration withEventsDeclaration ) : IEnumerable
FindFormEventHandlers ( this declarations ) : IEnumerable
FindFormEventHandlers ( this declarations, Rubberduck.Parsing.Symbols.Declaration userForm ) : IEnumerable
FindHandlersForEvent ( this declarations, Rubberduck.Parsing.Symbols.Declaration eventDeclaration ) : Declaration>>.IEnumerable

Gets a tuple containing the WithEvents declaration and the corresponding handler, for each type implementing this event.

FindInterfaceImplementationMembers ( this declarations ) : IEnumerable

Finds all class members that are interface implementation members.

FindInterfaceImplementationMembers ( this declarations, string interfaceMember ) : IEnumerable
FindInterfaceMember ( this declarations, Rubberduck.Parsing.Symbols.Declaration implementation ) : Rubberduck.Parsing.Symbols.Declaration
FindInterfaceMembers ( this declarations ) : IEnumerable

Finds all interface members.

FindInterfaces ( this declarations ) : IEnumerable
FindSelectedDeclaration ( this declarations, QualifiedSelection selection, DeclarationType type, Selection>.Func selector = null ) : Rubberduck.Parsing.Symbols.Declaration

Gets the Declaration of the specified type, at the specified selection. Returns the declaration if selection is on an identifier reference.

FindSelectedDeclaration ( this declarations, QualifiedSelection selection, IEnumerable types, Selection>.Func selector = null ) : Rubberduck.Parsing.Symbols.Declaration

Gets the Declaration of the specified types, at the specified selection. Returns the declaration if selection is on an identifier reference.

FindTarget ( this declarations, QualifiedSelection selection ) : Rubberduck.Parsing.Symbols.Declaration
FindTarget ( this declarations, QualifiedSelection selection, DeclarationType validDeclarationTypes ) : Rubberduck.Parsing.Symbols.Declaration

Returns the declaration contained in a qualified selection. To get the selection of a variable or field, use FindVariable(QualifiedSelection)

FindVariable ( this declarations, QualifiedSelection selection ) : Rubberduck.Parsing.Symbols.Declaration

Returns the variable which contains the passed-in QualifiedSelection. Returns null if the selection is not on a variable.

GetVariableStmtContext ( this target ) : VBAParser.VariableStmtContext

Returns a VariableStmtContext.

GetVariableStmtContextSelection ( this target ) : Rubberduck.VBEditor.Selection

Returns the Selection of a VariableStmtContext.

HasMultipleDeclarationsInStatement ( this target ) : bool

Returns whether a variable declaration statement contains multiple declarations in a single statement.

InScope ( this declarations, [ parent ) : IEnumerable

Gets the declaration for all identifiers declared in or below the specified scope.

InScope ( this declarations, string scope ) : IEnumerable

Gets the declaration for all identifiers declared in or below the specified scope.

IndexOfVariableDeclarationInStatement ( this target ) : int

Returns the number of variable declarations in a single statement. Adjusted to be 1-indexed rather than 0-indexed.

Named ( this declarations, string name ) : IEnumerable
OfType ( this declarations ) : IEnumerable

Gets all declarations of any one of the specified DeclarationType values.

OfType ( this declarations, DeclarationType declarationType ) : IEnumerable

Gets all declarations of the specified DeclarationType.

ToLocalizedString ( this type ) : string

비공개 메소드들

메소드 설명
FindInterface ( this declarations, QualifiedSelection selection ) : Rubberduck.Parsing.Symbols.Declaration
GetTypeMembers ( this declarations, Rubberduck.Parsing.Symbols.Declaration type ) : IEnumerable

메소드 상세

BitmapImage() 공개 정적인 메소드

public static BitmapImage ( this declaration ) : BitmapImage
declaration this
리턴 System.Windows.Media.Imaging.BitmapImage

CountOfDeclarationsInStatement() 공개 정적인 메소드

Returns the number of variable declarations in a single statement.
Throws when target's DeclarationType is not Variable.
public static CountOfDeclarationsInStatement ( this target ) : int
target this
리턴 int

FindBuiltInEventHandlers() 공개 정적인 메소드

public static FindBuiltInEventHandlers ( this declarations ) : IEnumerable
declarations this
리턴 IEnumerable

FindEventHandlers() 공개 정적인 메소드

Finds all event handler procedures for specified control declaration.
public static FindEventHandlers ( this declarations, Rubberduck.Parsing.Symbols.Declaration control ) : IEnumerable
declarations this
control Rubberduck.Parsing.Symbols.Declaration
리턴 IEnumerable

FindEventProcedures() 공개 정적인 메소드

public static FindEventProcedures ( this declarations, Rubberduck.Parsing.Symbols.Declaration withEventsDeclaration ) : IEnumerable
declarations this
withEventsDeclaration Rubberduck.Parsing.Symbols.Declaration
리턴 IEnumerable

FindFormEventHandlers() 공개 정적인 메소드

public static FindFormEventHandlers ( this declarations ) : IEnumerable
declarations this
리턴 IEnumerable

FindFormEventHandlers() 공개 정적인 메소드

public static FindFormEventHandlers ( this declarations, Rubberduck.Parsing.Symbols.Declaration userForm ) : IEnumerable
declarations this
userForm Rubberduck.Parsing.Symbols.Declaration
리턴 IEnumerable

FindHandlersForEvent() 공개 정적인 메소드

Gets a tuple containing the WithEvents declaration and the corresponding handler, for each type implementing this event.
public static FindHandlersForEvent ( this declarations, Rubberduck.Parsing.Symbols.Declaration eventDeclaration ) : Declaration>>.IEnumerable
declarations this
eventDeclaration Rubberduck.Parsing.Symbols.Declaration
리턴 Declaration>>.IEnumerable

FindInterfaceImplementationMembers() 공개 정적인 메소드

Finds all class members that are interface implementation members.
public static FindInterfaceImplementationMembers ( this declarations ) : IEnumerable
declarations this
리턴 IEnumerable

FindInterfaceImplementationMembers() 공개 정적인 메소드

public static FindInterfaceImplementationMembers ( this declarations, string interfaceMember ) : IEnumerable
declarations this
interfaceMember string
리턴 IEnumerable

FindInterfaceMember() 공개 정적인 메소드

public static FindInterfaceMember ( this declarations, Rubberduck.Parsing.Symbols.Declaration implementation ) : Rubberduck.Parsing.Symbols.Declaration
declarations this
implementation Rubberduck.Parsing.Symbols.Declaration
리턴 Rubberduck.Parsing.Symbols.Declaration

FindInterfaceMembers() 공개 정적인 메소드

Finds all interface members.
public static FindInterfaceMembers ( this declarations ) : IEnumerable
declarations this
리턴 IEnumerable

FindInterfaces() 공개 정적인 메소드

public static FindInterfaces ( this declarations ) : IEnumerable
declarations this
리턴 IEnumerable

FindSelectedDeclaration() 공개 정적인 메소드

Gets the Declaration of the specified type, at the specified selection. Returns the declaration if selection is on an identifier reference.
public static FindSelectedDeclaration ( this declarations, QualifiedSelection selection, DeclarationType type, Selection>.Func selector = null ) : Rubberduck.Parsing.Symbols.Declaration
declarations this
selection Rubberduck.VBEditor.QualifiedSelection
type DeclarationType
selector Selection>.Func
리턴 Rubberduck.Parsing.Symbols.Declaration

FindSelectedDeclaration() 공개 정적인 메소드

Gets the Declaration of the specified types, at the specified selection. Returns the declaration if selection is on an identifier reference.
public static FindSelectedDeclaration ( this declarations, QualifiedSelection selection, IEnumerable types, Selection>.Func selector = null ) : Rubberduck.Parsing.Symbols.Declaration
declarations this
selection Rubberduck.VBEditor.QualifiedSelection
types IEnumerable
selector Selection>.Func
리턴 Rubberduck.Parsing.Symbols.Declaration

FindTarget() 공개 정적인 메소드

public static FindTarget ( this declarations, QualifiedSelection selection ) : Rubberduck.Parsing.Symbols.Declaration
declarations this
selection Rubberduck.VBEditor.QualifiedSelection
리턴 Rubberduck.Parsing.Symbols.Declaration

FindTarget() 공개 정적인 메소드

Returns the declaration contained in a qualified selection. To get the selection of a variable or field, use FindVariable(QualifiedSelection)
public static FindTarget ( this declarations, QualifiedSelection selection, DeclarationType validDeclarationTypes ) : Rubberduck.Parsing.Symbols.Declaration
declarations this
selection Rubberduck.VBEditor.QualifiedSelection
validDeclarationTypes DeclarationType
리턴 Rubberduck.Parsing.Symbols.Declaration

FindVariable() 공개 정적인 메소드

Returns the variable which contains the passed-in QualifiedSelection. Returns null if the selection is not on a variable.
public static FindVariable ( this declarations, QualifiedSelection selection ) : Rubberduck.Parsing.Symbols.Declaration
declarations this
selection Rubberduck.VBEditor.QualifiedSelection
리턴 Rubberduck.Parsing.Symbols.Declaration

GetVariableStmtContext() 공개 정적인 메소드

Returns a VariableStmtContext.
Throws when target's DeclarationType is not Variable.
public static GetVariableStmtContext ( this target ) : VBAParser.VariableStmtContext
target this
리턴 VBAParser.VariableStmtContext

GetVariableStmtContextSelection() 공개 정적인 메소드

Returns the Selection of a VariableStmtContext.
Throws when target's DeclarationType is not Variable.
public static GetVariableStmtContextSelection ( this target ) : Rubberduck.VBEditor.Selection
target this
리턴 Rubberduck.VBEditor.Selection

HasMultipleDeclarationsInStatement() 공개 정적인 메소드

Returns whether a variable declaration statement contains multiple declarations in a single statement.
Throws when target's DeclarationType is not Variable.
public static HasMultipleDeclarationsInStatement ( this target ) : bool
target this
리턴 bool

InScope() 공개 정적인 메소드

Gets the declaration for all identifiers declared in or below the specified scope.
public static InScope ( this declarations, [ parent ) : IEnumerable
declarations this
parent [
리턴 IEnumerable

InScope() 공개 정적인 메소드

Gets the declaration for all identifiers declared in or below the specified scope.
public static InScope ( this declarations, string scope ) : IEnumerable
declarations this
scope string
리턴 IEnumerable

IndexOfVariableDeclarationInStatement() 공개 정적인 메소드

Returns the number of variable declarations in a single statement. Adjusted to be 1-indexed rather than 0-indexed.
Throws when target's DeclarationType is not Variable.
public static IndexOfVariableDeclarationInStatement ( this target ) : int
target this
리턴 int

Named() 공개 정적인 메소드

public static Named ( this declarations, string name ) : IEnumerable
declarations this
name string
리턴 IEnumerable

OfType() 공개 정적인 메소드

Gets all declarations of any one of the specified DeclarationType values.
public static OfType ( this declarations ) : IEnumerable
declarations this
리턴 IEnumerable

OfType() 공개 정적인 메소드

Gets all declarations of the specified DeclarationType.
public static OfType ( this declarations, DeclarationType declarationType ) : IEnumerable
declarations this
declarationType DeclarationType
리턴 IEnumerable

ToLocalizedString() 공개 정적인 메소드

public static ToLocalizedString ( this type ) : string
type this
리턴 string

프로퍼티 상세

ProcedureTypes 공개적으로 정적으로 프로퍼티

public static DeclarationType[] ProcedureTypes
리턴 DeclarationType[]