C# Class NArrange.Core.ChainElementArranger

Uses the chain of responsibility pattern to arrange an element using the provided ArrangedCodeBuilder.
Inheritance: IElementArranger
ファイルを表示 Open project: MarcStan/NArrange Class Usage Examples

Public Methods

Method Description
AddArranger ( IElementArranger arranger ) : void

Adds an arranger to the responsibility chain.

ArrangeElement ( ICodeElement parentElement, ICodeElement codeElement ) : void

Arranges an element, delegating the responsibility to the first arranger encountered who can process the request.

CanArrange ( ICodeElement codeElement ) : bool

Determines if the specified code element can be arranged by any arranger in the chain.

CanArrange ( ICodeElement parentElement, ICodeElement codeElement ) : bool

Determines if the specified code element can be arranged by any arranger in the chain.

ChainElementArranger ( ) : System

Creates a new element arranger chain.

Method Details

AddArranger() public method

Adds an arranger to the responsibility chain.
public AddArranger ( IElementArranger arranger ) : void
arranger IElementArranger Child arranger to add.
return void

ArrangeElement() public method

Arranges an element, delegating the responsibility to the first arranger encountered who can process the request.
public ArrangeElement ( ICodeElement parentElement, ICodeElement codeElement ) : void
parentElement ICodeElement Parent code element.
codeElement ICodeElement Code element to arrange.
return void

CanArrange() public method

Determines if the specified code element can be arranged by any arranger in the chain.
public CanArrange ( ICodeElement codeElement ) : bool
codeElement ICodeElement Code element to check.
return bool

CanArrange() public method

Determines if the specified code element can be arranged by any arranger in the chain.
public CanArrange ( ICodeElement parentElement, ICodeElement codeElement ) : bool
parentElement ICodeElement Parent code element.
codeElement ICodeElement Code element to check.
return bool

ChainElementArranger() public method

Creates a new element arranger chain.
public ChainElementArranger ( ) : System
return System