summaryrefslogtreecommitdiff
path: root/FireBase/FirebaseObject.cs
blob: 653d508b4c512d490ba529e2196362bec9b3e4a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
namespace Firebase.Database
{
    /// <summary>
    /// Holds the object of type <typeparam name="T" /> along with its key. 
    /// </summary>
    /// <typeparam name="T"> Type of the underlying object. </typeparam> 
    public class FirebaseObject<T>
    {
        internal FirebaseObject(string key, T obj)
        {
            Key = key;
            Object = obj;
        }

        /// <summary>
        /// Gets the key of <see cref="Object"/>.
        /// </summary>
        public string Key { get; }

        /// <summary>
        /// Gets the underlying object.
        /// </summary>
        public T Object { get; }
    }
}