Sofu Documentation
List Class
NamespacesSofu.SofuList
Represents a Sofu List
Declaration Syntax
C#
Members
All MembersConstructorsMethods



IconMemberDescription
List()()()
Creates an empty List.

List(IEnumerable<(Of <(SofuObject>)>))
Creates a new List and copies its contents from a something Enumerable
Examples
CopyC#
LinkedList<SofuObject> mylink = new LinkedList<SofuObject>();
mylink.AddFirst(new Sofu.Sofu.Value("1"));
mylink.AddFirst(new Sofu.Sofu.Value("2"));
mylink.AddFirst(new Sofu.Sofu.Value("3"));
mylink.AddFirst(new Sofu.Sofu.Value("4"));
mylink.AddFirst(new Sofu.Sofu.Value("5"));
Sofu.Sofu.List mylist = new Sofu.Sofu.List(mylink);
mylist.Write("reverse.sofu");

List(List)
Creates a new List, copies its elements from another Sofu.List;

AppendComment(String)
Appends to the comment of this SofuObject
(Inherited from SofuObject.)
AppendElement(SofuObject)
Appends one element to the end of the List

AsList()()()
Tests if this List is really a List
(Overrides SofuObject.AsList()()().)
AsMap()()()
Tries to convert itself to a Sofu.Map.
(Inherited from SofuObject.)
AsReference()()()
Seldom used, this allows to access the reference itself, while AsMap, AsList and AsValue access the referenced Object.
(Inherited from SofuObject.)
AsValue()()()
Tries to convert itself to a Sofu.Value
(Inherited from SofuObject.)
Binarify(String, Stream)
Writes this List into a Stream, does no Cross Reference checking.
(Overrides SofuObject.Binarify(String, Stream).)
Binary(String, Stream)
Writes this Object into a Stream, does Cross Reference checking.
(Inherited from SofuObject.)
BinaryPack(Stream)
Starts the binary packing, boxes every other SofuObject into a Map
(Inherited from SofuObject.)
Dup()()()
Creates a shallow copy of this List.

Equals(Object) (Inherited from Object.)
Finalize()()() (Inherited from Object.)
GetComment()()()
Accesses the comment of this SofuObject.
(Inherited from SofuObject.)
GetEnumerator()()()
Emumerator for foreach

GetHashCode()()() (Inherited from Object.)
GetType()()() (Inherited from Object.)
HasComment()()()
Tests if this SofuObject has a comment.
(Inherited from SofuObject.)
HasElement(Int32)
Deprecated - Use HasObject instead - Tests if the List has an object at "index".

HasList(Int32)
Tests if the List has a Sofu.List at "index".

HasMap(Int32)
Tests if the List has a Sofu.Map at "index".

HasObject(Int32)
Tests if the List has an object at "index".

HasValue(Int32)
Tests if the List has a Sofu.Value at "index".

IsDefined()()()
Tests if this SofuObject is anything else than a Sofu.Sofu.Undefined
(Inherited from SofuObject.)
IsList()()()
Tests if this List is really a List
(Overrides SofuObject.IsList()()().)
IsMap()()()
Tests if this SofuObject is a Sofu.Map
(Inherited from SofuObject.)
IsReference()()()
Tests if this SofuObject is a Sofu.Reference
(Inherited from SofuObject.)
IsValue()()()
Tests if this SofuObject is a Sofu.Value
(Inherited from SofuObject.)
Length()()()
Fetches the amount of elements in this List

list(Int32)
Retrives a specifc Sofu.List from the List given by index.

map(Int32)
Retrives a specifc Sofu.Map from the List given by index.

MemberwiseClone()()() (Inherited from Object.)
Object(Int32)
Retrives a specifc SofuObject from the List given by index

Pack()()()
Packs this SofuObject and all those it contains into a string.
(Inherited from SofuObject.)
PackComment(Stream)
Writes the comments of this Object into a Stream
(Inherited from SofuObject.)
PackHeader(Stream)
Creates the Header of a binary sofu file into a stream
(Inherited from SofuObject.)
PackLong(UInt32, Stream)
Packs one unsigned Integer into the output stream
(Inherited from SofuObject.)
PackLong(Int32, Stream)
Packs one unsigned Integer into the output stream
(Inherited from SofuObject.)
PackText(String, Stream)
Writes a text into an output stream
(Inherited from SofuObject.)
SetComment(String)
Sets a comment for this SofuObject.
(Inherited from SofuObject.)
String(String, StringBuilder)
Identifies cross references and calls Stringify with its parameters
(Inherited from SofuObject.)
String(String, TextWriter, Int32)
Identifies cross references and calls Stringify with its parameters
(Inherited from SofuObject.)
Stringify(String, StringBuilder)
Converts this List and all its attributes to a string representing this List
(Overrides SofuObject.Stringify(String, StringBuilder).)
Stringify(String, TextWriter, Int32)
Converts this List and all its attributes to a string representing this List
(Overrides SofuObject.Stringify(String, TextWriter, Int32).)
StringML(XmlWriter)
Writes this Object into Xml, does Cross Reference checking.
(Inherited from SofuObject.)
ToString()()() (Inherited from Object.)
TypeString()()()
Used to identify this as a List
(Overrides SofuObject.TypeString()()().)
value(Int32)
Retrives a specifc Sofu.Value from the List given by index.

Write(TextWriter)
Writes the contents of this SofuObject into a TextWriter
(Inherited from SofuObject.)
Write(String)
Write this SofuObject into a file. Uses the default encoding of UTF-16.
(Inherited from SofuObject.)
Write(String, Encoding)
Write this SofuObject into a file.
(Inherited from SofuObject.)
WriteBinary(Stream, Int32, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream, Encoding, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream, Encoding)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream, Int32)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Int32, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Encoding, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Encoding)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Int32)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteML(String)
Writes this Object into a SofuML file
(Inherited from SofuObject.)
WriteML(XmlWriter)
Writes this Object into a SofuML tree.
(Inherited from SofuObject.)
XMLcomment(XmlWriter)
Writes this Objects comments to XML
(Inherited from SofuObject.)
Xmlify(XmlWriter)
Writes this List into an XMLWriter
(Overrides SofuObject.Xmlify(XmlWriter).)
Examples
CopyC#
Sofu.Sofu.Map config = SofuReader.LoadFile("Config.Sofu");
foreach (SofuObject element in config.List("BuildTarget")) 
{
    Console.Write("Target: ");
    Console.WriteLine(element.asValue().ToString());
}
Inheritance Hierarchy

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