Пример #1
0
 /// <summary>
 /// Internally fills a data model with its associated data.
 /// </summary>
 /// <param name="internalModel">The internal model.</param>
 /// <param name="reader">The reader.</param>
 /// <param name="fillMethod">The fill method.</param>
 private static void InternalReadFill(InternalDataModel internalModel, DataReader reader, MethodInfo fillMethod)
 {
     if (fillMethod != null)
     {
         fillMethod.Invoke(null, new object[] { internalModel, reader });
     }
 }
Пример #2
0
 /// <summary>
 /// Removes a model association.
 /// </summary>
 /// <param name="model">The model.</param>
 internal override void RemoveModelAssociation(InternalDataModel model)
 {
     if (SyncStoreAssociation)
     {
         model.StoreAssociation = null;
     }
     _data.Remove((TModel)model);
 }
Пример #3
0
        /// <summary>
        /// Internally fills a dictionary with the data to write from the model.
        /// </summary>
        /// <param name="internalModel">The internal model.</param>
        /// <param name="fillMethod">The fill method.</param>
        /// <returns>A dictionary with the members to write.</returns>
        private static Dictionary <string, object> InternalWriteFill(InternalDataModel internalModel, MethodInfo fillMethod, Func <KeyValuePair <string, object>, bool> predicate)
        {
            if (fillMethod != null)
            {
                return((Dictionary <string, object>)fillMethod.Invoke(null, new object[] { internalModel, predicate }));
            }

            return(new Dictionary <string, object>());
        }
Пример #4
0
 /// <summary>
 /// A method for removing the model association.
 /// </summary>
 /// <param name="model">The model.</param>
 internal abstract void RemoveModelAssociation(InternalDataModel model);