/// <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 }); } }
/// <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); }
/// <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>()); }
/// <summary> /// A method for removing the model association. /// </summary> /// <param name="model">The model.</param> internal abstract void RemoveModelAssociation(InternalDataModel model);