Sofu Documentation
AsMap Method
NamespacesSofu.SofuSofuObjectAsMap()()()
Tries to convert itself to a Sofu.Map.
Declaration Syntax
C#
public virtual Map AsMap()
Return Value
Returns itself. But you can be sure it is a Map
Examples
CopyC#
Sofu.Sofu.Map file = SofuReader.LoadFile("file.sofu");
try {
    foreach (KeyValuePair<string,Sofu.SofuObject> entry in file) {
        Sofu.Sofu.Map mymap = entry.Value.AsMap();
        mymap.Write(entry.Key+".sofu"); //Splits one .sofu into Sub Trees.
    }
}
catch (SofuNotMapException e) {
    Console.Out.WriteLine("text was not a map");
}
Exceptions
ExceptionCondition
SofuNotMapExceptionGets thrown if the Object is not a Map

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