C# 클래스 NVelocity.App.Tools.VelocityFormatter.VelocityAlternator

Class that returns alternating values in a template. It stores a list of alternate Strings, whenever alternate() is called it switches to the next in the list. The current alternate is retrieved through toString() - i.e. just by referencing the object in a Velocity template. For an example of usage see the makeAlternator() method below.
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

보호된 프로퍼티들

프로퍼티 타입 설명
alternates String[]
current int

공개 메소드들

메소드 설명
Alternate ( ) : String

Alternates to the next in the list.

ToString ( ) : String

Returns the current alternate.

VelocityAlternator ( ) : System

Constructor takes an array of Strings.

메소드 상세

Alternate() 공개 메소드

Alternates to the next in the list.
public Alternate ( ) : String
리턴 String

ToString() 공개 메소드

Returns the current alternate.
public ToString ( ) : String
리턴 String

VelocityAlternator() 공개 메소드

Constructor takes an array of Strings.
public VelocityAlternator ( ) : System
리턴 System

프로퍼티 상세

alternates 보호되어 있는 프로퍼티

protected String[] alternates
리턴 String[]

current 보호되어 있는 프로퍼티

protected int current
리턴 int