Пример #1
0
        public static void GetPropertyType(CalculatedObjectReferenceProperty obj, MethodReturnEventArgs <Type> e)
        {
            var def = obj.ReferencedClass;

            e.Result = Type.GetType(def.Module.Namespace + "." + def.Name, true);
            PropertyActions.DecorateParameterType(obj, e, false, false, false);
        }
Пример #2
0
        public static void Call(Arebis.CodeGeneration.IGenerationHost host,
            IZetboxContext ctx,
            Serialization.SerializationMembersList serList,
            CalculatedObjectReferenceProperty prop)
        {
            if (prop == null) { throw new ArgumentNullException("prop"); }

            // IZetboxContext ctx, Serialization.SerializationMembersList serializationList, string modulenamespace, string className, string referencedType, string propertyName, string getterEventName, bool isCompound, string backingName)
            Call(host, ctx, serList,
                prop.Module.Namespace,
                prop.ObjectClass.GetDataTypeString(),
                prop.GetElementTypeString(),
                prop.Name, "On" + prop.Name + "_Getter",
                prop.ObjectClass is CompoundObject,
                prop.DisableExport == true);
        }
 public static void GetElementTypeString(CalculatedObjectReferenceProperty obj, MethodReturnEventArgs<string> e)
 {
     var def = obj.ReferencedClass;
     if (def == null)
     {
         e.Result = "<no class>";
     }
     else if (def.Module == null)
     {
         e.Result = "<no namespace>." + def.Name;
     }
     else
     {
         e.Result = def.Module.Namespace + "." + def.Name;
     }
     PropertyActions.DecorateElementType(obj, e, false);
 }
Пример #4
0
        public static void GetElementTypeString(CalculatedObjectReferenceProperty obj, MethodReturnEventArgs <string> e)
        {
            var def = obj.ReferencedClass;

            if (def == null)
            {
                e.Result = "<no class>";
            }
            else if (def.Module == null)
            {
                e.Result = "<no namespace>." + def.Name;
            }
            else
            {
                e.Result = def.Module.Namespace + "." + def.Name;
            }
            PropertyActions.DecorateElementType(obj, e, false);
        }
Пример #5
0
        public static void Call(Arebis.CodeGeneration.IGenerationHost host,
                                IZetboxContext ctx,
                                Serialization.SerializationMembersList serList,
                                CalculatedObjectReferenceProperty prop)
        {
            if (prop == null)
            {
                throw new ArgumentNullException("prop");
            }

            // IZetboxContext ctx, Serialization.SerializationMembersList serializationList, string modulenamespace, string className, string referencedType, string propertyName, string getterEventName, bool isCompound, string backingName)
            Call(host, ctx, serList,
                 prop.Module.Namespace,
                 prop.ObjectClass.GetDataTypeString(),
                 prop.GetElementTypeString(),
                 prop.Name, "On" + prop.Name + "_Getter",
                 prop.ObjectClass is CompoundObject,
                 prop.DisableExport == true);
        }
Пример #6
0
 public CalculatedObjectReferencePropertyValueModel(INotifyingObject obj, CalculatedObjectReferenceProperty prop)
     : base(obj, prop)
 {
     this.objRefProp = prop;
 }
 public static void GetPropertyTypeString(CalculatedObjectReferenceProperty obj, MethodReturnEventArgs<string> e)
 {
     GetElementTypeString(obj, e);
     PropertyActions.DecorateParameterType(obj, e, false, false, false);
 }
 public static void GetPropertyType(CalculatedObjectReferenceProperty obj, MethodReturnEventArgs<Type> e)
 {
     var def = obj.ReferencedClass;
     e.Result = Type.GetType(def.Module.Namespace + "." + def.Name, true);
     PropertyActions.DecorateParameterType(obj, e, false, false, false);
 }
Пример #9
0
 // override ApplyCalculatedProperty instead
 protected void ApplyCalculatedPropertyTemplate(CalculatedObjectReferenceProperty prop)
 {
     this.WriteLine("        // calculated  property");
     ApplyCalculatedProperty(prop, this.MembersToSerialize);
 }
Пример #10
0
 protected virtual void ApplyCalculatedProperty(CalculatedObjectReferenceProperty prop, Serialization.SerializationMembersList serList)
 {
     Properties.CalculatedProperty.Call(Host, ctx,
         serList, prop);
 }
Пример #11
0
 public static void GetPropertyTypeString(CalculatedObjectReferenceProperty obj, MethodReturnEventArgs <string> e)
 {
     GetElementTypeString(obj, e);
     PropertyActions.DecorateParameterType(obj, e, false, false, false);
 }
Пример #12
0
 protected virtual void ApplyCalculatedProperty(CalculatedObjectReferenceProperty prop, Serialization.SerializationMembersList serList)
 {
     Properties.CalculatedProperty.Call(Host, ctx,
                                        serList, prop);
 }
Пример #13
0
 // override ApplyCalculatedProperty instead
 protected void ApplyCalculatedPropertyTemplate(CalculatedObjectReferenceProperty prop)
 {
     this.WriteLine("        // calculated  property");
     ApplyCalculatedProperty(prop, this.MembersToSerialize);
 }