Ejemplo n.º 1
0
        public static void Call(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, ObjectReferenceProperty prop)
        {
            if (_host == null)
            {
                throw new ArgumentNullException("_host");
            }
            if (ctx == null)
            {
                throw new ArgumentNullException("ctx");
            }
            if (prop == null)
            {
                throw new ArgumentNullException("prop");
            }

            Relation    rel      = Zetbox.App.Extensions.RelationExtensions.Lookup(ctx, prop);
            RelationEnd relEnd   = rel.GetEnd(prop);
            RelationEnd otherEnd = rel.GetOtherEnd(relEnd);

            string referencedInterface      = otherEnd.Type.Module.Namespace + "." + otherEnd.Type.Name;
            string referencedImplementation = Mappings.ObjectClassHbm.GetWrapperTypeReference(otherEnd.Type, _host.Settings);
            string name              = prop.Name;
            string implNameUnused    = null;
            string fkBackingName     = "_fk_" + name;
            string fkGuidBackingName = "_fk_guid_" + name;
            bool   isExportable      = relEnd.Type.ImplementsIExportable() && otherEnd.Type.ImplementsIExportable();

            ReloadOneReference.Call(_host, ctx, referencedInterface, referencedImplementation, name, implNameUnused, fkBackingName, fkGuidBackingName, isExportable);
        }
Ejemplo n.º 2
0
 public ModelMslEntityTypeMappingComplexProperty(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, CompoundObjectProperty prop, string propertyName, string parentName)
     : base(_host)
 {
     this.ctx          = ctx;
     this.prop         = prop;
     this.propertyName = propertyName;
     this.parentName   = parentName;
 }
Ejemplo n.º 3
0
 public UpdateParentTemplate(Arebis.CodeGeneration.IGenerationHost _host, List <Templates.ObjectClasses.UpdateParentTemplateParams> props)
     : base(_host, props)
 {
 }