Sofu Documentation
list Method (key)
NamespacesSofu.SofuMaplist(String)
Retrives a specifc Sofu.List from this Map indentified by key.
Declaration Syntax
C#
public List list(
	string key
)
Parameters
key (String)
Identifies the List to get
Return Value
The List at key
Examples
CopyC#
Sofu.Sofu.Map file = SofuReader.LoadFile("file.sofu");
try {
    Sofu.Sofu.List parameters = file.list("Parameter");
    foreach (SofuObject para in parameters) {
        Console.Out.Write("Parameter: ");
        try {
            Console.Out.WriteLine(para.AsValue().ToString());
        }
        catch (SofuNotValueException e) {
            Console.Out.WriteLine("Parameter synatx wrong, expected Sofu Value");
        }
    }
}
catch (SofuNoElementException e) {
    Console.WriteLine("No parameters defined");
}
catch (SofuNotListException e) {
    Console.Out.WriteLine("Parameters synatx wrong, expected Sofu List");
}
Exceptions
ExceptionCondition
SofuNoElementExceptionWill throw SofuNoElementException when the Key is not in this Map
SofuNotListExceptionThrows a SofuNotListException if the requested element is not a List

Assembly: Sofu (Module: Sofu) Version: 0.2.1.0 (0.2.1.0)