public override IEnumerable <IPersistenceObject> FromStream(System.Xml.XmlReader xml) { var baseResult = base.FromStream(xml); switch (xml.NamespaceURI + "|" + xml.LocalName) { case "Zetbox.App.Test|MyIntProperty": this._MyIntProperty = XmlStreamer.ReadNullableInt32(xml); break; case "http://dasz.at/Zetbox|ObjectProp": this._fk_ObjectProp = XmlStreamer.ReadNullableInt32(xml); break; case "Zetbox.App.Test|StringProp": this._StringProp = XmlStreamer.ReadString(xml); break; case "Zetbox.App.Test|TestEnumProp": this.TestEnumProp = (Zetbox.App.Test.TestEnum)XmlStreamer.ReadInt32(xml); break; } return(baseResult); }
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) { binStream.ReadCollectionEntries(this, this._StringCollectionCollection); this._TestBool = binStream.ReadNullableBoolean(); this._fk_TestCustomObjects_Nav = binStream.ReadNullableInt32(); this._fk_TestCustomObjects_One_Nav = binStream.ReadNullableInt32(); this._TestDateTime = binStream.ReadNullableDateTime(); this._TestEnum = (Zetbox.App.Test.TestEnum)binStream.ReadNullableInt32(); this._TestString = binStream.ReadString(); } // if (CurrentAccessRights != Zetbox.API.AccessRights.None) return baseResult == null ? result.Count == 0 ? null : result : baseResult.Concat(result); }
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._Nullable = (Zetbox.App.Test.TestEnum?)binStream.ReadNullableInt32(); this._isNullableWithDefaultSet = binStream.ReadBoolean(); if (this._isNullableWithDefaultSet) { this._NullableWithDefault = (Zetbox.App.Test.TestEnum?)binStream.ReadNullableInt32(); } this._Standard = (Zetbox.App.Test.TestEnum)binStream.ReadNullableInt32(); this._isStandardWithDefaultSet = binStream.ReadBoolean(); if (this._isStandardWithDefaultSet) { this._StandardWithDefault = (Zetbox.App.Test.TestEnum)binStream.ReadNullableInt32(); } } // if (CurrentAccessRights != Zetbox.API.AccessRights.None) return baseResult == null ? result.Count == 0 ? null : result : baseResult.Concat(result); }
private Zetbox.App.Test.TestEnum FetchStandardWithDefaultOrDefault() { var __result = Proxy.StandardWithDefault; if (!_isStandardWithDefaultSet && ObjectState == DataObjectState.New) { var __p = FrozenContext.FindPersistenceObject<Zetbox.App.Base.Property>(new Guid("b2af71e1-a115-42c9-98ac-6e277afa8c24")); if (__p != null) { _isStandardWithDefaultSet = true; // http://connect.microsoft.com/VisualStudio/feedback/details/593117/cannot-directly-cast-boxed-int-to-nullable-enum object __tmp_value = __p.DefaultValue.GetDefaultValue(); __result = this.Proxy.StandardWithDefault = (Zetbox.App.Test.TestEnum)__tmp_value; } else { Zetbox.API.Utils.Logging.Log.Warn("Unable to get default value for property 'Zetbox.App.Test.PropertyEnumTest.StandardWithDefault'"); } } return __result; }
public override IEnumerable<IPersistenceObject> FromStream(System.Xml.XmlReader xml) { var baseResult = base.FromStream(xml); switch (xml.NamespaceURI + "|" + xml.LocalName) { case "Zetbox.App.Test|MyIntProperty": this._MyIntProperty = XmlStreamer.ReadNullableInt32(xml); break; case "http://dasz.at/Zetbox|ObjectProp": this._fk_ObjectProp = XmlStreamer.ReadNullableInt32(xml); break; case "Zetbox.App.Test|StringProp": this._StringProp = XmlStreamer.ReadString(xml); break; case "Zetbox.App.Test|TestEnumProp": this.TestEnumProp = (Zetbox.App.Test.TestEnum)XmlStreamer.ReadInt32(xml); break; } return baseResult; }