Firebase.Database.MutableData

Instances of this class encapsulate the data and priority at a location.

Summary

Instances of this class encapsulate the data and priority at a location. It is used in transactions, and it is intended to be inspected and then updated to the desired data at that location.

Note that changes made to a child MutableData instance will be visible to the parent and vice versa.

Properties

Children
IEnumerable< MutableData >
Used to iterate over the immediate children at this location
ChildrenCount
long
The number of immediate children at this location.
HasChildren
bool
True if the data at this location has children, false otherwise.
Key
string
The key name of this location, or null if it is the top-most location.
Priority
object
Gets the current priority at this location.
Value
object
getValue() returns the data contained in this instance as native types.

Public functions

Child(string path)
Used to obtain a MutableData instance that encapsulates the data and priority at the given relative path.
Equals(object o)
override bool
Two MutableData are considered equal if they contain the same references and priority.
GetHashCode()
override int
Overriden to ensure two objects that are Equal have the same hash.
HasChild(string path)
bool
Determines if data exists at the given path.
ToString()
override string
Representation of the mutable data as a string containing a key, value pair.

Properties

Children

IEnumerable< MutableData > Children

Used to iterate over the immediate children at this location

Used to iterate over the immediate children at this location

Details
Returns
The immediate children at this location

ChildrenCount

long ChildrenCount

The number of immediate children at this location.

HasChildren

bool HasChildren

True if the data at this location has children, false otherwise.

Key

string Key

The key name of this location, or null if it is the top-most location.

Priority

object Priority

Gets the current priority at this location.

Gets the current priority at this location. The possible return types are:

  • Double
  • String
Note that null is allowed

Details
Returns
The priority at this location as a native type

Value

object Value

getValue() returns the data contained in this instance as native types.

getValue() returns the data contained in this instance as native types. The possible types returned are:

  • bool
  • string
  • long
  • double
  • IDictionary{string, object}
  • List{object} This list is recursive; the possible types for object in the above list is given by the same list. These types correspond to the types available in JSON.

Details
Returns
The data contained in this instance as native types

Public functions

Child

MutableData Child(
  string path
)

Used to obtain a MutableData instance that encapsulates the data and priority at the given relative path.

Details
Parameters
path
A relative path
Returns
An instance encapsulating the data and priority at the given path

Equals

override bool Equals(
  object o
)

Two MutableData are considered equal if they contain the same references and priority.

GetHashCode

override int GetHashCode()

Overriden to ensure two objects that are Equal have the same hash.

HasChild

bool HasChild(
  string path
)

Determines if data exists at the given path.

Details
Parameters
path
A relative path
Returns
True if data exists at the given path, otherwise false

ToString

override string ToString()

Representation of the mutable data as a string containing a key, value pair.