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.Base|ChangedOn":
         // Import must have default value set
         this._ChangedOn = XmlStreamer.ReadDateTime(xml);
         this._isChangedOnSet = true;
         break;
     case "Zetbox.App.Base|CreatedOn":
         // Import must have default value set
         this._CreatedOn = XmlStreamer.ReadDateTime(xml);
         this._isCreatedOnSet = true;
         break;
     case "Zetbox.App.Base|DeploymentRestrictions":
         this._DeploymentRestrictions = (Zetbox.App.Base.DeploymentRestriction)XmlStreamer.ReadNullableInt32(xml);
        break;
     case "Zetbox.App.Base|ExportGuid":
         // Import must have default value set
         this._ExportGuid = XmlStreamer.ReadGuid(xml);
         this._isExportGuidSet = true;
         break;
     case "Zetbox.App.Base|Module":
         this._fk_guid_Module = XmlStreamer.ReadNullableGuid(xml);
         break;
     case "Zetbox.App.Base|Name":
         this._Name = XmlStreamer.ReadString(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._fk_CreatedBy = binStream.ReadNullableInt32();
     this._isCreatedOnSet = binStream.ReadBoolean();
     if (this._isCreatedOnSet) {
         this._CreatedOn = binStream.ReadDateTime();
     }
     this._DeploymentRestrictions = (Zetbox.App.Base.DeploymentRestriction)binStream.ReadNullableInt32();
     this._isExportGuidSet = binStream.ReadBoolean();
     if (this._isExportGuidSet) {
         this._ExportGuid = binStream.ReadGuid();
     }
     this._fk_Module = binStream.ReadNullableInt32();
     this._Name = binStream.ReadString();
     } // if (CurrentAccessRights != Zetbox.API.AccessRights.None)
     return baseResult == null
         ? result.Count == 0
             ? null
             : result
         : baseResult.Concat(result);
 }