summaryrefslogtreecommitdiff
path: root/FireBase/FirebaseObject.cs
blob: 2e0fd209f7d4bf74769f3f5f085e688b29d8dd29 (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
26
27
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; }
    }
}