public CR1NPRef(CEntityObject aParentEntityObject, CR1NPRefMetaInfo aRefMetaInfo, CSkalarRefMetaInfo aFkRefMetaInfo) : base(aParentEntityObject, aRefMetaInfo) { this.FkRefMetaInfo = aFkRefMetaInfo; this.FkRef = aFkRefMetaInfo.GetRef(aParentEntityObject); this.FkRef.ValueChanged += this.OnFkRefValueChanged; }
public CR11PRef(CEntityObject aParentEntityObject, CR11PRefMetaInfo aRefMetaInfo, CSkalarRefMetaInfo aFkRefMetaInfo) : base(aParentEntityObject, aRefMetaInfo) { this.FkRefMetaInfo = aFkRefMetaInfo; this.FkRef = (CSkalarRef <TChild, Guid>)aFkRefMetaInfo.GetRef(aParentEntityObject); this.FkRef.ValueChanged += this.OnFkRefValueChanged; this.Load(this.FkRef.Value); }
internal void VisitLoad(CEntityObject aEntityObject) { var aTyp = aEntityObject.Typ; var aSchema = this.Schema; var aHirarchy = aSchema.GetHirarchy(aTyp); foreach (var aAspect in aHirarchy) { this.Load(aEntityObject, aAspect); } }
protected override void Save(CEntityObject aEntityObject, CTyp aAspect) { var aFileInfo = this.GetObjectFileInfo(aAspect, aEntityObject.Guid.Value); if (aEntityObject.IsLocallyDeleted) { aFileInfo.Delete(); } else { var aPersistentProperties = this.Schema.GetPersistentProperties(aAspect); var aXmlDocument = aEntityObject.NewXmlDocument(aPersistentProperties); aXmlDocument.Save(aFileInfo.FullName); } }
protected override void Load(CEntityObject aEntityObject, CTyp aAspect) { var aStorage = this; var aObjectId = aEntityObject.Guid.Value; var aFileInfo = this.GetObjectFileInfo(aAspect, aObjectId); var aXmlDocument = new XmlDocument(); var aSchema = aStorage.Schema; var aProperties = aSchema.GetPersistentProperties(aAspect); aXmlDocument.Load(aFileInfo.FullName); var aXmlElement = aXmlDocument.SelectNodes(CRefMetaInfo.ObjectElementName).OfType <XmlElement>().Single(); foreach (var aProperty in aProperties) { aProperty.LoadXml(aEntityObject, aXmlElement); } }
public CRx1PRef(CEntityObject aParentEntityObject, CRefMetaInfo aRefMetaInfo) : base(aParentEntityObject, aRefMetaInfo, new CAccessKey()) { }
public CR11WRef(CEntityObject aParentEntityObject, CR11WRefMetaInfo aRefMetaInfo, CAccessKey aWriteKeyNullable = null) : base(aParentEntityObject, aRefMetaInfo, aWriteKeyNullable) { }
public CR11CRef(CEntityObject aParentEntityObject, CR11CRefMetaInfo aSkalarRefMetaInfoNullable, CR11PRefMetaInfo aReverseNaviRefNullable = null) : base(aParentEntityObject, aSkalarRefMetaInfoNullable) { this.ReverseNaviRefMetaInfoNullable = aReverseNaviRefNullable; }
public CRx1Ref(CEntityObject aParentEntityObject, CRefMetaInfo aRefMetaInfo, CAccessKey aWriteKeyNullable = null) : base(aParentEntityObject, aRefMetaInfo, aWriteKeyNullable) { this.ObjectProxy = new CObjectProxy <TTarget>(aParentEntityObject.Storage, default(Guid)); }
public CR1NWRef(CEntityObject aParentEntityObject, CR1NWRefMetaInfo aSkalarRefMetaInfo) : base(aParentEntityObject, aSkalarRefMetaInfo) { }
public CSkalarRef(CEntityObject aParentEntityObject, CSkalarRefMetaInfo aSkalarRefMetaInfo, CAccessKey aWriteKeyNullable = null) : base(aParentEntityObject, aSkalarRefMetaInfo, aWriteKeyNullable) { }
protected CNRef(CEntityObject aParentEntityObject, CRefMetaInfo aRefMetaInfo) : base(aParentEntityObject, aRefMetaInfo, new CAccessKey()) { this.Collection = aRefMetaInfo.NewCollection <TRef>(aParentEntityObject.Storage); this.ChangeValue(this.Collection, this.WriteKeyNullable, false); }
protected CRef(CEntityObject aParentEntityObject, CRefMetaInfo aRefMetaInfo, CAccessKey aWriteKeyNullable) { this.ParentEntityObject = aParentEntityObject; this.RefMetaInfo = aRefMetaInfo; this.WriteKeyNullable = aWriteKeyNullable; }
protected abstract void Load(CEntityObject aEntityObject, CTyp aAspect);
protected override void Save(CEntityObject aEntityObject, CTyp aAspect) => throw new InvalidOperationException();
protected abstract void Save(CEntityObject aEntityObject, CTyp aAspect);