Sofu Documentation
AsReference Method
NamespacesSofu.SofuSofuObjectAsReference()()()
Seldom used, this allows to access the reference itself, while AsMap, AsList and AsValue access the referenced Object.
Declaration Syntax
C#
public virtual Reference AsReference()
Return Value
Returns itself or throws an Exception if it can't
Remarks
Normally there is no need to access References, they just work their Targets are supposed to work.
Examples
CopyC#
Sofu.Sofu.Map stuff = new Sofu.Sofu.Map();
stuff.SetAttribute("vally",new Sofu.Sofu.Reference("valref",new Sofu.Sofu.Value("Hello World")));
Console.Out.WriteLine(stuff.Object("vally").AsReference().ToString()); //Will write "selfref"
Console.Out.WriteLine(stuff.Object("vally").AsValue().ToString()); //Will write "Hello World"
Exceptions
ExceptionCondition
SofuNotReferenceExceptionGets thrown if the Object is not a Reference

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