public virtual void MergeImport(System.Xml.XmlReader xml) { // it may be only an empty shell to stand-in for unreadable data if (!CurrentAccessRights.HasReadRights()) return; switch (xml.NamespaceURI + "|" + xml.LocalName) { case "Zetbox.App.SchemaMigration|ChangedOn": // Import must have default value set this._ChangedOn = XmlStreamer.ReadDateTime(xml); this._isChangedOnSet = true; break; case "Zetbox.App.SchemaMigration|Comment": this._Comment = XmlStreamer.ReadString(xml); break; case "Zetbox.App.SchemaMigration|CompareNulls": // Import must have default value set this._CompareNulls = XmlStreamer.ReadBoolean(xml); this._isCompareNullsSet = true; break; case "Zetbox.App.SchemaMigration|CreatedOn": // Import must have default value set this._CreatedOn = XmlStreamer.ReadDateTime(xml); this._isCreatedOnSet = true; break; case "Zetbox.App.SchemaMigration|DbType": this._DbType = (Zetbox.App.SchemaMigration.ColumnType)XmlStreamer.ReadNullableInt32(xml); break; case "Zetbox.App.SchemaMigration|Description": this._Description = XmlStreamer.ReadString(xml); break; case "Zetbox.App.SchemaMigration|ExportGuid": // Import must have default value set this._ExportGuid = XmlStreamer.ReadGuid(xml); this._isExportGuidSet = true; break; case "Zetbox.App.SchemaMigration|IsNullable": this._IsNullable = XmlStreamer.ReadNullableBoolean(xml); break; case "Zetbox.App.SchemaMigration|Name": this._Name = XmlStreamer.ReadString(xml); break; case "Zetbox.App.SchemaMigration|References": this._fk_guid_References = XmlStreamer.ReadNullableGuid(xml); break; case "Zetbox.App.SchemaMigration|Size": this._Size = XmlStreamer.ReadNullableInt32(xml); break; case "Zetbox.App.SchemaMigration|SourceTable": this._fk_guid_SourceTable = XmlStreamer.ReadNullableGuid(xml); break; case "Zetbox.App.SchemaMigration|Status": this._Status = (Zetbox.App.SchemaMigration.MappingStatus?)XmlStreamer.ReadNullableInt32(xml); break; } }
public override IEnumerable<IPersistenceObject> FromStream(Zetbox.API.ZetboxStreamReader binStream) { var baseResult = base.FromStream(binStream); var result = new List<IPersistenceObject>(); // it may be only an empty shell to stand-in for unreadable data if (CurrentAccessRights != Zetbox.API.AccessRights.None) { this._fk_ChangedBy = binStream.ReadNullableInt32(); this._isChangedOnSet = binStream.ReadBoolean(); if (this._isChangedOnSet) { this._ChangedOn = binStream.ReadDateTime(); } this._Comment = binStream.ReadString(); this._isCompareNullsSet = binStream.ReadBoolean(); if (this._isCompareNullsSet) { this._CompareNulls = binStream.ReadBoolean(); } this._fk_CreatedBy = binStream.ReadNullableInt32(); this._isCreatedOnSet = binStream.ReadBoolean(); if (this._isCreatedOnSet) { this._CreatedOn = binStream.ReadDateTime(); } this._DbType = (Zetbox.App.SchemaMigration.ColumnType)binStream.ReadNullableInt32(); this._Description = binStream.ReadString(); DestinationProperty_was_eagerLoaded = binStream.ReadBoolean(); this._isExportGuidSet = binStream.ReadBoolean(); if (this._isExportGuidSet) { this._ExportGuid = binStream.ReadGuid(); } this._IsNullable = binStream.ReadNullableBoolean(); this._Name = binStream.ReadString(); this._fk_References = binStream.ReadNullableInt32(); this._Size = binStream.ReadNullableInt32(); this._fk_SourceTable = binStream.ReadNullableInt32(); this._Status = (Zetbox.App.SchemaMigration.MappingStatus?)binStream.ReadNullableInt32(); } // if (CurrentAccessRights != Zetbox.API.AccessRights.None) return baseResult == null ? result.Count == 0 ? null : result : baseResult.Concat(result); }