namespace ImaginationOverflow.UniversalDeepLinking.Editor.External
{
///
/// Represents a plist element.
///
public class PlistElement
{
protected PlistElement()
{
}
///
/// Convenience method to convert to string.
///
///
/// The value of the string element.
///
public string AsString()
{
return ((PlistElementString)this).value;
}
///
/// Convenience method to convert to integer.
///
///
/// The value of the integer element.
///
public int AsInteger()
{
return ((PlistElementInteger)this).value;
}
///
/// Convenience method to convert to bool.
///
///
/// The value of the boolean element.
///
public bool AsBoolean()
{
return ((PlistElementBoolean)this).value;
}
///
/// Convenience method to convert to array element.
///
///
/// The element as PlistElementArray.
///
public PlistElementArray AsArray()
{
return (PlistElementArray)this;
}
///
/// Convenience method to convert to dictionary element.
///
///
/// The element as PlistElementDict.
///
public PlistElementDict AsDict()
{
return (PlistElementDict)this;
}
public PlistElement this[string key]
{
get
{
return this.AsDict()[key];
}
set
{
this.AsDict()[key] = value;
}
}
}
}