C# 클래스 MixinRefactoring.MixinCommandBase

base class for mixin operations
상속: IMixinCommand
파일 보기 프로젝트 열기: pgenfer/mixinSharp

보호된 프로퍼티들

프로퍼티 타입 설명
_mixin MixinReference

공개 메소드들

메소드 설명
CanExecute ( ClassWithSourceCode childClass, Settings settings = null ) : bool

called to check if the command can be executed.

Execute ( Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax childDeclaration, Microsoft.CodeAnalysis.SemanticModel semantic, Settings settings = null ) : Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax

Template method that checks if command can be executed and if yes, executes the command. Otherwise the original source code of the child is returned.

보호된 메소드들

메소드 설명
InternalExecute ( ClassWithSourceCode childClass, Microsoft.CodeAnalysis.SemanticModel semantic, Settings settings = null ) : Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax

executes the command on the given child class. Logic of command execution must be implemented in derived classes.

MixinCommandBase ( MixinReference mixin ) : Microsoft.CodeAnalysis

initializes the base fields of the command object

메소드 상세

CanExecute() 공개 추상적인 메소드

called to check if the command can be executed.
public abstract CanExecute ( ClassWithSourceCode childClass, Settings settings = null ) : bool
childClass ClassWithSourceCode
settings Settings optional settings
리턴 bool

Execute() 공개 메소드

Template method that checks if command can be executed and if yes, executes the command. Otherwise the original source code of the child is returned.
public Execute ( Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax childDeclaration, Microsoft.CodeAnalysis.SemanticModel semantic, Settings settings = null ) : Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax
childDeclaration Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax
semantic Microsoft.CodeAnalysis.SemanticModel semantic model of the child's and mixin's source code
settings Settings optional settings object
리턴 Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax

InternalExecute() 보호된 추상적인 메소드

executes the command on the given child class. Logic of command execution must be implemented in derived classes.
protected abstract InternalExecute ( ClassWithSourceCode childClass, Microsoft.CodeAnalysis.SemanticModel semantic, Settings settings = null ) : Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax
childClass ClassWithSourceCode
semantic Microsoft.CodeAnalysis.SemanticModel semantic model of the child's and mixin's source code
settings Settings optional settings object
리턴 Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax

MixinCommandBase() 보호된 메소드

initializes the base fields of the command object
protected MixinCommandBase ( MixinReference mixin ) : Microsoft.CodeAnalysis
mixin MixinReference mixin that should be added to the child class
리턴 Microsoft.CodeAnalysis

프로퍼티 상세

_mixin 보호되어 있는 프로퍼티

a reference to the mixin that should be included in the child class
protected MixinReference,MixinRefactoring _mixin
리턴 MixinReference