C# 클래스 Command.Registry

Provides a registry of discovered Commands and Factories, as well as methods for discovering them.
파일 보기 프로젝트 열기: agardiner/hfmcmd 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_alternates List
_log log4net.ILog

공개 메소드들

메소드 설명
Add ( Command cmd ) : void

Registers the specified Command instance.

Add ( Factory factory ) : void

Registers the specified Factory instance as an alternate mechanism for obtaining objects of the Factory return type. An alternate means will be tried when no other non-alternate path to create an object can be found from the current context state.

Commands ( ) : IEnumerable

Returns each Command that is currently registered.

Contains ( Type type ) : bool

Checks to see if a Factory for the specified type is available.

Contains ( string cmdName ) : bool

Checks to see if a command with the given name is available.

GetAlternates ( Type type ) : IEnumerable

Returns an IEnumerable of the alternate Factory objects registered for the specified type.

GetFactory ( Type type ) : Factory

Returns the Factory instance for objects of the specified Type.

GetSettings ( Type type ) : List

Returns a list of the settings an ISettingsCollection instance holds.

RegisterClass ( Type t ) : void

Registers commands and factories from the supplied class. Commands must be tagged with the attribute Command to be locatable.

RegisterNamespace ( Assembly asm, string ns ) : void

Registers commands from the supplied assembly. Commands methods must be tagged with the attribute Command to be locatable.

RegisterNamespace ( string ns ) : void

Registers commands (i.e. methods tagged with the Command attribute) in the current assembly.

Registry ( ) : System
this ( string cmdName ) : Command

메소드 상세

Add() 공개 메소드

Registers the specified Command instance.
public Add ( Command cmd ) : void
cmd Command
리턴 void

Add() 공개 메소드

Registers the specified Factory instance as an alternate mechanism for obtaining objects of the Factory return type. An alternate means will be tried when no other non-alternate path to create an object can be found from the current context state.
public Add ( Factory factory ) : void
factory Factory
리턴 void

Commands() 공개 메소드

Returns each Command that is currently registered.
public Commands ( ) : IEnumerable
리턴 IEnumerable

Contains() 공개 메소드

Checks to see if a Factory for the specified type is available.
public Contains ( Type type ) : bool
type System.Type
리턴 bool

Contains() 공개 메소드

Checks to see if a command with the given name is available.
public Contains ( string cmdName ) : bool
cmdName string
리턴 bool

GetAlternates() 공개 메소드

Returns an IEnumerable of the alternate Factory objects registered for the specified type.
public GetAlternates ( Type type ) : IEnumerable
type System.Type
리턴 IEnumerable

GetFactory() 공개 메소드

Returns the Factory instance for objects of the specified Type.
public GetFactory ( Type type ) : Factory
type System.Type
리턴 Factory

GetSettings() 공개 메소드

Returns a list of the settings an ISettingsCollection instance holds.
public GetSettings ( Type type ) : List
type System.Type
리턴 List

RegisterClass() 공개 메소드

Registers commands and factories from the supplied class. Commands must be tagged with the attribute Command to be locatable.
public RegisterClass ( Type t ) : void
t System.Type
리턴 void

RegisterNamespace() 공개 메소드

Registers commands from the supplied assembly. Commands methods must be tagged with the attribute Command to be locatable.
public RegisterNamespace ( Assembly asm, string ns ) : void
asm System.Reflection.Assembly
ns string
리턴 void

RegisterNamespace() 공개 메소드

Registers commands (i.e. methods tagged with the Command attribute) in the current assembly.
public RegisterNamespace ( string ns ) : void
ns string
리턴 void

Registry() 공개 메소드

public Registry ( ) : System
리턴 System

this() 공개 메소드

public this ( string cmdName ) : Command
cmdName string
리턴 Command

프로퍼티 상세

_alternates 보호되어 있는 프로퍼티

protected List _alternates
리턴 List

_log 보호되어 있는 정적으로 프로퍼티

protected static ILog,log4net _log
리턴 log4net.ILog