コード例 #1
0
 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);
             }
         }
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 internal virtual void LoadValue(object value) => this.SetValue(DataProperty.EscapeFromDBNull(value));
コード例 #4
0
 internal virtual void LoadValueFromDb(object value, object exValue, LoadContext loadContext) => this.SetValue(DataProperty.EscapeFromDBNull(value));
コード例 #5
0
 private static bool IsAcceptable(DataProperty prop, PropertyStateFilter filter) => prop != null && !prop.Metadata.IsId && !prop.Metadata.IsSelector && (filter == PropertyStateFilter.Assigned ? prop.IsAssigned : prop.IsModified);
コード例 #6
0
        public DataObject GetLink(string propertyPath)
        {
            DataProperty dataProperty = this.SelectSingleProperty(propertyPath);

            return(dataProperty != null ? ((LinkProperty)dataProperty).Value : this.Session.UntypedNullObject);
        }
コード例 #7
0
        private object GetUntypedValue(string propertyPath)
        {
            DataProperty dataProperty = this.SelectSingleProperty(propertyPath);

            return(dataProperty == null || dataProperty.IsNull ? (object)null : dataProperty.UntypedValue);
        }