Beispiel #1
0
        internal override void ToStream(ZetboxStreamWriter binStream, StreamSerializationContext ctx)
        {
            binStream.Write((byte)SerializableExpressionType.Constant);
            base.ToStream(binStream, ctx);

            binStream.Write(Value);
        }
Beispiel #2
0
        public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            base.ToStream(binStream, auxObjects, eagerLoadLists);
            // it may be only an empty shell to stand-in for unreadable data
            if (!CurrentAccessRights.HasReadRights())
            {
                return;
            }

            binStream.Write(eagerLoadLists);
            if (eagerLoadLists && auxObjects != null)
            {
                foreach (var obj in Inputs)
                {
                    auxObjects.Add(obj);
                }
                foreach (var relEntry in InputsImpl)
                {
                    auxObjects.Add(relEntry);
                }
            }
            {
                var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Base.ObjectClassEfImpl>("Model.FK_CalculatedReference_references_ReferencedClass", "ReferencedClass").EntityKey;
                binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
            }
            if (auxObjects != null)
            {
                auxObjects.Add(ReferencedClass);
            }
        }
Beispiel #3
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     {
         var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Base.ConstraintInvocationEfImpl>("Model.FK_Constraint_invokes_GetErrorTextInvocation", "GetErrorTextInvocation").EntityKey;
         binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
     }
     if (auxObjects != null)
     {
         auxObjects.Add(GetErrorTextInvocation);
     }
     {
         var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Base.ConstraintInvocationEfImpl>("Model.FK_Constraint_invokes_IsValidInvocation", "IsValidInvocation").EntityKey;
         binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
     }
     if (auxObjects != null)
     {
         auxObjects.Add(IsValidInvocation);
     }
 }
Beispiel #4
0
        /// <summary>
        /// Base method for serializing this Object.
        /// </summary>
        /// <param name="sw">Stream to serialize to</param>
        /// <param name="auxObjects">pass a List here to collect auxiliary, eagerly loaded objects. Ignored if null.</param>
        /// <param name="eagerLoadLists">True if Lists should be eager loaded.</param>
        public virtual void ToStream(ZetboxStreamWriter sw, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            if (sw == null)
            {
                throw new ArgumentNullException("sw");
            }

            sw.Write(ReadOnlyContext.GetInterfaceType(this.GetImplementedInterface()).ToSerializableType());
            sw.Write(this.ID);
        }
Beispiel #5
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(ChangedBy != null ? ChangedBy.ID : (int?)null);
     binStream.Write(this._isChangedOnSet);
     if (this._isChangedOnSet)
     {
         binStream.Write(this._ChangedOn);
     }
     binStream.Write(CreatedBy != null ? CreatedBy.ID : (int?)null);
     binStream.Write(this._isCreatedOnSet);
     if (this._isCreatedOnSet)
     {
         binStream.Write(this._CreatedOn);
     }
     binStream.Write(this._isExportGuidSet);
     if (this._isExportGuidSet)
     {
         binStream.Write(this._ExportGuid);
     }
     binStream.Write(Module != null ? Module.ID : (int?)null);
 }
Beispiel #6
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this.Proxy.ChangedBy != null ? OurContext.GetIdFromProxy(this.Proxy.ChangedBy) : (int?)null);
     binStream.Write(this._isChangedOnSet);
     if (this._isChangedOnSet)
     {
         binStream.Write(this.Proxy.ChangedOn);
     }
     binStream.Write(this.Proxy.CreatedBy != null ? OurContext.GetIdFromProxy(this.Proxy.CreatedBy) : (int?)null);
     binStream.Write(this._isCreatedOnSet);
     if (this._isCreatedOnSet)
     {
         binStream.Write(this.Proxy.CreatedOn);
     }
     binStream.Write(this._isExportGuidSet);
     if (this._isExportGuidSet)
     {
         binStream.Write(this.Proxy.ExportGuid);
     }
     binStream.Write(this.Proxy.Property != null ? OurContext.GetIdFromProxy(this.Proxy.Property) : (int?)null);
 }
Beispiel #7
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this._CurrentNumber);
     binStream.Write(Sequence != null ? Sequence.ID : (int?)null);
 }
Beispiel #8
0
 internal override void ToStream(ZetboxStreamWriter binStream, StreamSerializationContext ctx)
 {
     // do net render SerializableExpressionType for abstract, intermediate class
     base.ToStream(binStream, ctx);
     for (int i = 0; i < Children.Length; i++)
     {
         binStream.Write(true);
         Children[i].ToStream(binStream, ctx);
     }
     binStream.Write(false);
 }
Beispiel #9
0
        public virtual void ToStream(ZetboxStreamWriter binStream)
        {
            if (binStream == null)
            {
                throw new ArgumentNullException("binStream");
            }

            binStream.Write((byte)0);
            binStream.Write(Name);
            binStream.Write(Type);
        }
Beispiel #10
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this.Proxy.GetErrorTextInvocation != null ? OurContext.GetIdFromProxy(this.Proxy.GetErrorTextInvocation) : (int?)null);
     binStream.Write(this.Proxy.IsValidInvocation != null ? OurContext.GetIdFromProxy(this.Proxy.IsValidInvocation) : (int?)null);
 }
Beispiel #11
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this.Proxy.Precision);
     binStream.Write(this.Proxy.Scale);
 }
Beispiel #12
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this._Description);
     binStream.Write(Method != null ? Method.ID : (int?)null);
     binStream.Write(Property != null ? Property.ID : (int?)null);
 }
Beispiel #13
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(CompoundObjectDefinition != null ? CompoundObjectDefinition.ID : (int?)null);
     binStream.Write(this._HasPersistentOrder);
     binStream.Write(this._IsList);
 }
Beispiel #14
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this._EagerLoading);
     binStream.Write(this._IsInlineEditable);
     binStream.Write(RelationEnd != null ? RelationEnd.ID : (int?)null);
 }
Beispiel #15
0
 internal override void ToStream(ZetboxStreamWriter binStream, StreamSerializationContext ctx)
 {
     binStream.Write((byte)SerializableExpressionType.New);
     base.ToStream(binStream, ctx);
     Constructor.ToStream(binStream);
     for (int i = 0; i < Members.Length; i++)
     {
         binStream.Write(true);
         Members[i].ToStream(binStream);
     }
     binStream.Write(false);
 }
Beispiel #16
0
        public override void ToStream(ZetboxStreamWriter binStream)
        {
            if (binStream == null)
            {
                throw new ArgumentNullException("binStream");
            }

            binStream.Write((byte)1);
            binStream.Write(Name);
            binStream.Write(Type);
            SerializableExpression.WriteTypeArray(binStream, ParameterTypes);
        }
Beispiel #17
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this.Proxy.MyIntProperty);
     binStream.Write(this.Proxy.ObjectProp != null ? OurContext.GetIdFromProxy(this.Proxy.ObjectProp) : (int?)null);
     binStream.Write(this.Proxy.StringProp);
     binStream.Write((int?)Proxy.TestEnumProp);
 }
Beispiel #18
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(DisplayedTypeAssembly != null ? DisplayedTypeAssembly.ID : (int?)null);
     binStream.Write(this._DisplayedTypeFullName);
     binStream.Write(this._DisplayName);
     binStream.Write(VisualTree != null ? VisualTree.ID : (int?)null);
 }
Beispiel #19
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this._MyIntProperty);
     binStream.Write(ObjectProp != null ? ObjectProp.ID : (int?)null);
     binStream.Write(this._StringProp);
     binStream.Write((int?)((Zetbox.App.Test.TestObjClass) this).TestEnumProp);
 }
Beispiel #20
0
        // END Zetbox.DalProvider.Ef.Generator.Templates.Properties.IdProperty

        #region Serializer


        public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            base.ToStream(binStream, auxObjects, eagerLoadLists);
            // it may be only an empty shell to stand-in for unreadable data
            if (!CurrentAccessRights.HasReadRights())
            {
                return;
            }
            {
                var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Test.MethodTestEfImpl>("Model.FK_Parent_has_Children", "Parent").EntityKey;
                binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
            }
            binStream.Write(this._StringProp);
        }
Beispiel #21
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this._Frage);
     binStream.Write(Fragebogen != null ? Fragebogen.ID : (int?)null);
     binStream.Write(this._gute_Antworten_pos);
     binStream.Write(this._FragenNummer);
     binStream.Write(this._GegebeneAntwort);
 }
Beispiel #22
0
        // END Zetbox.DalProvider.Ef.Generator.Templates.Properties.IdProperty

        #region Serializer


        public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            base.ToStream(binStream, auxObjects, eagerLoadLists);
            // it may be only an empty shell to stand-in for unreadable data
            if (!CurrentAccessRights.HasReadRights())
            {
                return;
            }
            binStream.Write(this._Name);
            {
                var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Test.One_to_N_relations_OneEfImpl>("Model.FK_OneSide_connectsTo_NSide", "OneSide").EntityKey;
                binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
            }
        }
Beispiel #23
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     {
         var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Base.CompoundObjectEfImpl>("Model.FK_CompoundObjectProperty_has_CompoundObjectDefinition", "CompoundObjectDefinition").EntityKey;
         binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
     }
     binStream.Write(this._HasPersistentOrder);
     binStream.Write(this._IsList);
 }
Beispiel #24
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this._EagerLoading);
     binStream.Write(this._IsInlineEditable);
     {
         var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Base.RelationEndEfImpl>("Model.FK_RelationEnd_has_Navigator", "RelationEnd").EntityKey;
         binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
     }
 }
Beispiel #25
0
        // END Zetbox.DalProvider.Ef.Generator.Templates.Properties.IdProperty

        #region Serializer


        public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            base.ToStream(binStream, auxObjects, eagerLoadLists);
            // it may be only an empty shell to stand-in for unreadable data
            if (!CurrentAccessRights.HasReadRights())
            {
                return;
            }
            binStream.Write(this._MyIntProperty);
            {
                var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Projekte.KundeEfImpl>("Model.FK_TestObjClass_has_ObjectProp", "ObjectProp").EntityKey;
                binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
            }
            binStream.Write(this._StringProp);
            binStream.Write((int?)((Zetbox.App.Test.TestObjClass) this).TestEnumProp);
        }
Beispiel #26
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this._isExportGuidSet);
     if (this._isExportGuidSet)
     {
         binStream.Write(this._ExportGuid);
     }
     binStream.Write(Implementor != null ? Implementor.ID : (int?)null);
     binStream.Write(this._MemberName);
 }
Beispiel #27
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this.Any);
     binStream.Write(this.Proxy.DisplayName);
     binStream.Write(this._isExportGuidSet);
     if (this._isExportGuidSet)
     {
         binStream.Write(this.Proxy.ExportGuid);
     }
 }
Beispiel #28
0
 internal override void ToStream(ZetboxStreamWriter binStream, StreamSerializationContext ctx)
 {
     binStream.Write((byte)SerializableExpressionType.Conditional);
     base.ToStream(binStream, ctx);
     Test.ToStream(binStream, ctx);
     IfTrue.ToStream(binStream, ctx);
     IfFalse.ToStream(binStream, ctx);
 }
Beispiel #29
0
        // END Zetbox.DalProvider.Ef.Generator.Templates.Properties.IdProperty

        #region Serializer


        public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            base.ToStream(binStream, auxObjects, eagerLoadLists);
            // it may be only an empty shell to stand-in for unreadable data
            if (!CurrentAccessRights.HasReadRights())
            {
                return;
            }
            binStream.Write(this._Frage);
            {
                var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Test.FragebogenEfImpl>("Model.FK_Ein_Fragebogen_enthaelt_gute_Antworten", "Ein_Fragebogen").EntityKey;
                binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
            }
            binStream.Write(this._gute_Antworten_pos);
            binStream.Write(this._FragenNummer);
            binStream.Write(this._GegebeneAntwort);
        }
Beispiel #30
0
        public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            base.ToStream(binStream, auxObjects, eagerLoadLists);
            // it may be only an empty shell to stand-in for unreadable data
            if (!CurrentAccessRights.HasReadRights())
            {
                return;
            }
            binStream.Write(ControlKind != null ? ControlKind.ID : (int?)null);
            binStream.Write(ControlRef != null ? ControlRef.ID : (int?)null);
            binStream.Write(this._isExportGuidSet);
            if (this._isExportGuidSet)
            {
                binStream.Write(this._ExportGuid);
            }
            binStream.Write(Module != null ? Module.ID : (int?)null);

            binStream.Write(eagerLoadLists);
            if (eagerLoadLists && auxObjects != null)
            {
                foreach (var obj in SupportedViewModels)
                {
                    auxObjects.Add(obj);
                }
            }
            binStream.Write((int?)((Zetbox.App.GUI.ViewDescriptor) this).Toolkit);
        }