C# 클래스 YAML.Preprocessor

Implements a class that pre-processes a YAML file and handles pre-processor directives to include other files, set variables, and handle variable substitution. The pre-processor also strips comments from the contents fed back to the parser.
상속: IDisposable
파일 보기 프로젝트 열기: agardiner/hfmcmd 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_files Stack
_lines Stack
_log ILog
_process Stack
_streams Stack
_variables object>.Dictionary

공개 메소드들

메소드 설명
Dispose ( ) : void

Disposes of each open file.

Preprocessor ( string file, object>.Dictionary variables ) : System

Constructs a YAML Preprocessor instance.

ReadLine ( ) : string

Reads the next line of input from the YAML source.

보호된 메소드들

메소드 설명
HandleDirective ( string line ) : void

Handles a pre-processor directive (i.e. a line starting with %).

IncludeFile ( string file ) : void

Includes the specified file, pushing the new file onto the stack, so that lines come from the new file until it is completed.

SubstituteVariables ( string line, object>.Dictionary variables ) : string

Substitutes a value for any variables used in the supplied string. The variable values to be substituted are in the supplied dictionary.

메소드 상세

Dispose() 공개 메소드

Disposes of each open file.
public Dispose ( ) : void
리턴 void

HandleDirective() 보호된 메소드

Handles a pre-processor directive (i.e. a line starting with %).
protected HandleDirective ( string line ) : void
line string
리턴 void

IncludeFile() 보호된 메소드

Includes the specified file, pushing the new file onto the stack, so that lines come from the new file until it is completed.
protected IncludeFile ( string file ) : void
file string
리턴 void

Preprocessor() 공개 메소드

Constructs a YAML Preprocessor instance.
public Preprocessor ( string file, object>.Dictionary variables ) : System
file string The source file that will drive the YAML parsing /// process. Note that this file may include other files, but all this /// is transparent to the YAMLParser.
variables object>.Dictionary A Variables collection of variable names /// and values. The Variables collection may be modified by the /// Preprocessor in response to preprocessor directives to set/unset /// variables etc.
리턴 System

ReadLine() 공개 메소드

Reads the next line of input from the YAML source.
public ReadLine ( ) : string
리턴 string

SubstituteVariables() 보호된 메소드

Substitutes a value for any variables used in the supplied string. The variable values to be substituted are in the supplied dictionary.
protected SubstituteVariables ( string line, object>.Dictionary variables ) : string
line string
variables object>.Dictionary
리턴 string

프로퍼티 상세

_files 보호되어 있는 프로퍼티

protected Stack _files
리턴 Stack

_lines 보호되어 있는 프로퍼티

protected Stack _lines
리턴 Stack

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

protected static ILog _log
리턴 ILog

_process 보호되어 있는 프로퍼티

protected Stack _process
리턴 Stack

_streams 보호되어 있는 프로퍼티

protected Stack _streams
리턴 Stack

_variables 보호되어 있는 프로퍼티

protected Dictionary _variables
리턴 object>.Dictionary