Seldom used, this allows to access the reference itself, while AsMap, AsList and AsValue access the referenced Object.

C# |
public override Reference AsReference()

Returns itself

Normally there is no need to access References, they just work their Targets are supposed to work.


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"

Exception | Condition |
---|---|
SofuNotReferenceException | When this is not a Reference |