|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
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.
Field Summary | |
---|---|
string[] | alternates |
int | current |
Constructor Summary | |
---|---|
VelocityFormatter.VelocityAlternator(NVelocity.App.Tools.VelocityFormatter enclosingInstance, string[] alternates) Constructor takes an array of Strings. * |
Property Summary | |
---|---|
NVelocity.App.Tools.VelocityFormatter | Enclosing_Instance |
Method Summary | |
---|---|
string |
alternate() Alternates to the next in the list. * |
string |
ToString() Returns the current alternate. * |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone |
Field Detail |
---|
protected internal string[] alternates
protected internal int current
Constructor Detail |
---|
public VelocityFormatter.VelocityAlternator(NVelocity.App.Tools.VelocityFormatter enclosingInstance, string[] alternates)
Constructor takes an array of Strings. *
Parameters:
alternates
- A String[].
Property Detail |
---|
public NVelocity.App.Tools.VelocityFormatter Enclosing_Instance
Method Detail |
---|
public string alternate()
Alternates to the next in the list. *
Returns:
public string ToString()
Returns the current alternate. *
Returns:
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |