internal void RemoveFromChildLists(bool checkWriting) { DataProperty[] fproperties = this.FProperties; if (fproperties == null) { return; } for (int index = 0; index < fproperties.Length; ++index) { DataProperty dataProperty = fproperties[index]; if (dataProperty != null && dataProperty.IsAssigned && dataProperty.Metadata.IsAggregation) { DataObject untypedValue = (DataObject)dataProperty.UntypedValue; if (!untypedValue.IsNull) { untypedValue.RemoveChild(this, checkWriting); } } } }
internal void LoadNotAssignedProperties() { this.CheckNotUntypedNull(); LoadPlan plan = new LoadPlan(this.FStorage.Class); MetadataPropertyList properties = this.Class.Properties; DataProperty[] dataPropertyArray = this.FProperties ?? (this.FProperties = new DataProperty[properties.Count]); for (int index = 0; index < properties.Count; ++index) { MetadataProperty propertyMetadata = properties[index]; if (!propertyMetadata.IsId) { DataProperty dataProperty = dataPropertyArray[index]; if (dataProperty == null || !dataProperty.IsAssigned) { plan.EnsureProperty(propertyMetadata); } } } this.Session.LoadData(plan, (DataObjectList)null, new DataId[1] { this.Id }, (string)null); }
internal virtual void LoadValue(object value) => this.SetValue(DataProperty.EscapeFromDBNull(value));
internal virtual void LoadValueFromDb(object value, object exValue, LoadContext loadContext) => this.SetValue(DataProperty.EscapeFromDBNull(value));
private static bool IsAcceptable(DataProperty prop, PropertyStateFilter filter) => prop != null && !prop.Metadata.IsId && !prop.Metadata.IsSelector && (filter == PropertyStateFilter.Assigned ? prop.IsAssigned : prop.IsModified);
public DataObject GetLink(string propertyPath) { DataProperty dataProperty = this.SelectSingleProperty(propertyPath); return(dataProperty != null ? ((LinkProperty)dataProperty).Value : this.Session.UntypedNullObject); }
private object GetUntypedValue(string propertyPath) { DataProperty dataProperty = this.SelectSingleProperty(propertyPath); return(dataProperty == null || dataProperty.IsNull ? (object)null : dataProperty.UntypedValue); }