示例#1
0
        /// <summary>
        /// Makes a relationship to an item, appending it at the end of the sorted relationship.
        /// </summary>
        /// <param name="item">RealmObject being added to the relationship.</param>
        /// <typeparam name="T">Type of the RealmObject which is the target of the relationship.</typeparam>
        public void Add(T item)
        {
            this.ManageObjectIfNeeded(item);
            var rowIndex = ((RealmObject)item).RowHandle.RowIndex;

            _listHandle.Add(rowIndex);
        }
示例#2
0
 /// <summary>
 /// Makes a relationship to an item, appending it at the end of the sorted relationship.
 /// </summary>
 /// <param name="item">RealmObject being added to the relationship.</param>
 public void Add(T item)
 {
     this.AddObjectToRealmIfNeeded(item);
     _listHandle.Add(item.ObjectHandle);
 }