C# Class MixinRefactoring.CreateMixinFromInterfaceCommand

A composite command that includes a mixin to a child class by generating the mixin from an interface of the child class. A reference field to the mixin instance will also be created in the child class.
Inheritance: CompositeCommand
显示文件 Open project: pgenfer/mixinSharp Class Usage Examples

Public Methods

Method Description
CanExecute ( ClassWithSourceCode childClass, Settings settings = null ) : bool
CreateMixinFromInterfaceCommand ( MixinReference mixin ) : Microsoft.CodeAnalysis

constructor that takes a mixin directly. Can be used for testing.

CreateMixinFromInterfaceCommand ( SimpleBaseTypeSyntax baseType, Microsoft.CodeAnalysis.SemanticModel semantic ) : Microsoft.CodeAnalysis

Protected Methods

Method Description
CreateCommands ( MixinReference mixin ) : IMixinCommand[]

Method Details

CanExecute() public method

public CanExecute ( ClassWithSourceCode childClass, Settings settings = null ) : bool
childClass ClassWithSourceCode
settings Settings
return bool

CreateCommands() protected method

protected CreateCommands ( MixinReference mixin ) : IMixinCommand[]
mixin MixinReference
return IMixinCommand[]

CreateMixinFromInterfaceCommand() public method

constructor that takes a mixin directly. Can be used for testing.
public CreateMixinFromInterfaceCommand ( MixinReference mixin ) : Microsoft.CodeAnalysis
mixin MixinReference reference to the mixin
return Microsoft.CodeAnalysis

CreateMixinFromInterfaceCommand() public method

public CreateMixinFromInterfaceCommand ( SimpleBaseTypeSyntax baseType, Microsoft.CodeAnalysis.SemanticModel semantic ) : Microsoft.CodeAnalysis
baseType SimpleBaseTypeSyntax
semantic Microsoft.CodeAnalysis.SemanticModel
return Microsoft.CodeAnalysis