C# Класс MixinRefactoring.MixinCommandBase

base class for mixin operations
Наследование: IMixinCommand
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_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