public static void Call(IGenerationHost host, IZetboxContext ctx, ObjectClass cls) { if (host == null) { throw new ArgumentNullException("host"); } if (ctx == null) { throw new ArgumentNullException("ctx"); } if (cls == null) { throw new ArgumentNullException("cls"); } string assocName = Construct.SecurityRulesFKName(cls); string targetRoleName = Construct.SecurityRulesClassName(cls); string referencedImplementation = Construct.SecurityRulesClassName(cls) + host.Settings["extrasuffix"] + Zetbox.API.Helper.ImplementationSuffix; string efNameRightsPropertyName = "SecurityRightsCollection" + Zetbox.API.Helper.ImplementationSuffix; host.CallTemplate("Properties.SecurityRulesProperties", ctx, cls, assocName, targetRoleName, referencedImplementation, efNameRightsPropertyName); }
public static void Call(IGenerationHost _host, IZetboxContext ctx, IEnumerable<CompoundObjectProperty> properties, bool asCollectionEntry, string implementationSuffix, string implementationPropertySuffix, string lazyCtxProperty) { foreach (var p in properties.Where(p => asCollectionEntry || !p.IsList).OrderBy(p => p.Name)) { Call(_host, ctx, p, asCollectionEntry, implementationSuffix, implementationPropertySuffix, lazyCtxProperty); } }
public static void Call(IGenerationHost host, IZetboxContext ctx, DataType dataType) { if (host == null) { throw new ArgumentNullException("host"); } if (dataType == null) { throw new ArgumentNullException("dataType"); } var props = dataType .Properties .OfType<ObjectReferenceProperty>() .OrderBy(p => p.Name) .Where(p => { Relation rel = RelationExtensions.Lookup(ctx, p); //RelationEnd relEnd = rel.GetEnd(p); return (rel.Storage == StorageType.MergeIntoA && rel.A.Navigator == p) || (rel.Storage == StorageType.MergeIntoB && rel.B.Navigator == p); }) .Select(p => new UpdateParentTemplateParams() { PropertyName = p.Name, IfType = string.Format("{0}.{1}", p.GetReferencedObjectClass().Module.Namespace, p.GetReferencedObjectClass().Name) }) .ToList(); host.CallTemplate("ObjectClasses.UpdateParentTemplate", props); }
public static void Call(IGenerationHost host, IZetboxContext ctx, DataType dataType) { if (host == null) { throw new ArgumentNullException("host"); } if (dataType == null) { throw new ArgumentNullException("dataType"); } var props = dataType .Properties .OfType <ObjectReferenceProperty>() .OrderBy(p => p.Name) .Where(p => { Relation rel = RelationExtensions.Lookup(ctx, p); //RelationEnd relEnd = rel.GetEnd(p); return((rel.Storage == StorageType.MergeIntoA && rel.A.Navigator == p) || (rel.Storage == StorageType.MergeIntoB && rel.B.Navigator == p)); }) .Select(p => new UpdateParentTemplateParams() { PropertyName = p.Name, IfType = string.Format("{0}.{1}", p.GetReferencedObjectClass().Module.Namespace, p.GetReferencedObjectClass().Name) }) .ToList(); host.CallTemplate("ObjectClasses.UpdateParentTemplate", props); }
public static void Call(IGenerationHost _host, IZetboxContext ctx, IEnumerable<CompoundObjectProperty> properties, string implementationSuffix, string implementationPropertySuffix) { foreach (var p in properties.Where(p => !p.IsList).OrderBy(p => p.Name)) { Call(_host, ctx, p, implementationSuffix, implementationPropertySuffix); } }
public static void Call(IGenerationHost host, IZetboxContext ctx, ObjectClass cls) { if (host == null) { throw new ArgumentNullException("host"); } if (ctx == null) { throw new ArgumentNullException("ctx"); } if (cls == null) { throw new ArgumentNullException("cls"); } if (cls.BaseObjectClass == null) { var msg = String.Format("Only subclasses can be joined subclasses, but {0} doesn't have a base class", cls.Name); throw new ArgumentOutOfRangeException("cls", msg); } host.CallTemplate("Mappings.JoinedSubclassHbm", new object[] { ctx } .Concat(ObjectClassHbm.MakeArgs(ctx, cls, host.Settings)) .ToArray()); }
public static void Call(IGenerationHost _host, IZetboxContext ctx, IEnumerable<CompoundObjectProperty> properties, string implementationSuffix, string implementationPropertySuffix) { foreach (var p in properties.Where(p => !p.IsList).OrderBy(p => p.Name)) { Call(_host, ctx, p, implementationSuffix, implementationPropertySuffix); } }
public static void Call(IGenerationHost host, IZetboxContext ctx, DataType dataType, string implName) { if (host == null) { throw new ArgumentNullException("host"); } if (dataType == null) { throw new ArgumentNullException("dataType"); } var clsName = dataType.Name; Call(host, ctx, "IPersistenceObject", dataType, clsName, implName); }
/// <summary> /// Creates a new CodeTemplate instance. /// </summary> public CodeTemplate(IGenerationHost _host) { // Store host this._host = _host; // Initialize: this.Initialize(); }
/// <summary> /// Creates a new CodeTemplate instance. /// </summary> public CodeTemplate(IGenerationHost _host) { // Store host this._host = _host; // Initialize: this.Initialize(); }
public static void Call(IGenerationHost _host, IZetboxContext ctx, CompoundObjectProperty property, string implementationSuffix, string implementationPropertySuffix) { string propertyName = property.Name; string backingStoreName = propertyName + implementationPropertySuffix; string typeName = property.GetElementTypeString(); string implementationTypeName = typeName + implementationSuffix; Call(_host, ctx, implementationTypeName, propertyName, backingStoreName); }
public static void Call(IGenerationHost host, IZetboxContext ctx, Property prop, string propertyName, string parentName) { if (host == null) { throw new ArgumentNullException("host"); } host.CallTemplate("EfModel.ModelMslEntityTypeMappingComplexProperty", ctx, prop, propertyName, parentName); }
public static void Call(IGenerationHost _host, IZetboxContext ctx, CompoundObjectProperty property, string implementationSuffix, string implementationPropertySuffix) { string propertyName = property.Name; string backingStoreName = propertyName + implementationPropertySuffix; string typeName = property.GetElementTypeString(); string implementationTypeName = typeName + implementationSuffix; Call(_host, ctx, implementationTypeName, propertyName, backingStoreName); }
public static void Call(IGenerationHost host, IZetboxContext ctx, string otherInterface, DataType dataType, string implName) { if (host == null) { throw new ArgumentNullException("host"); } if (dataType == null) { throw new ArgumentNullException("dataType"); } var clsName = dataType.Name; Call(host, ctx, otherInterface, dataType, clsName, implName); }
public static void Call(IGenerationHost _host, IZetboxContext ctx, CompoundObjectProperty property, bool asCollectionEntry, string implementationSuffix, string implementationPropertySuffix, string lazyCtxProperty) { string propertyName = asCollectionEntry ? "Value" : property.Name; string backingStoreName = propertyName + implementationPropertySuffix; string typeName = property.GetElementTypeString(); string implementationTypeName = typeName + implementationSuffix; string lazyCtxParam = string.IsNullOrEmpty(lazyCtxProperty) ? "null" : lazyCtxProperty; Call(_host, ctx, implementationTypeName, propertyName, backingStoreName, lazyCtxParam); }
public static void Call(IGenerationHost host, IZetboxContext ctx, ObjectClass cls) { if (host == null) { throw new ArgumentNullException("host"); } if (ctx == null) { throw new ArgumentNullException("ctx"); } if (cls == null) { throw new ArgumentNullException("cls"); } host.CallTemplate("ObjectClasses.SecurityRulesClass", ctx, cls, Construct.SecurityRulesFKName(cls), Construct.SecurityRulesClassName(cls), Construct.SecurityRulesClassName(cls) + host.Settings["extrasuffix"] + Zetbox.API.Helper.ImplementationSuffix); }
public static void Call(IGenerationHost host, IZetboxContext ctx, DataType dataType, string implName) { if (host == null) { throw new ArgumentNullException("host"); } if (dataType == null) { throw new ArgumentNullException("dataType"); } var clsName = dataType.Name; Call(host, ctx, "IPersistenceObject", dataType, clsName, implName); }
public static void Call(IGenerationHost host, IZetboxContext ctx, string otherInterface, DataType dataType, string implName) { if (host == null) { throw new ArgumentNullException("host"); } if (dataType == null) { throw new ArgumentNullException("dataType"); } var clsName = dataType.Name; Call(host, ctx, otherInterface, dataType, clsName, implName); }
public static void Call(IGenerationHost host, IZetboxContext ctx, ObjectClass cls) { if (host == null) { throw new ArgumentNullException("host"); } if (ctx == null) { throw new ArgumentNullException("ctx"); } if (cls == null) { throw new ArgumentNullException("cls"); } string assocName = Construct.SecurityRulesFKName(cls); string targetRoleName = Construct.SecurityRulesClassName(cls); string referencedImplementation = Construct.SecurityRulesClassName(cls) + host.Settings["extrasuffix"] + Zetbox.API.Helper.ImplementationSuffix; string efNameRightsPropertyName = "SecurityRightsCollection" + Zetbox.API.Helper.ImplementationSuffix; host.CallTemplate("Properties.SecurityRulesProperties", ctx, cls, assocName, targetRoleName, referencedImplementation, efNameRightsPropertyName); }
public static void Call(IGenerationHost host, IZetboxContext ctx, ObjectClass cls) { if (host == null) { throw new ArgumentNullException("host"); } if (ctx == null) { throw new ArgumentNullException("ctx"); } if (cls == null) { throw new ArgumentNullException("cls"); } if (cls.BaseObjectClass == null) { var msg = String.Format("Only subclasses can be joined subclasses, but {0} doesn't have a base class", cls.Name); throw new ArgumentOutOfRangeException("cls", msg); } host.CallTemplate("Mappings.SubclassHbm", new object[] { ctx } .Concat(ObjectClassHbm.MakeArgs(ctx, cls, host.Settings)) .ToArray()); }
public static void Call(IGenerationHost host, IZetboxContext ctx, ObjectClass cls) { if (host == null) { throw new ArgumentNullException("host"); } if (ctx == null) { throw new ArgumentNullException("ctx"); } if (cls == null) { throw new ArgumentNullException("cls"); } host.CallTemplate("ObjectClasses.SecurityRulesClass", ctx, cls, Construct.SecurityRulesFKName(cls), Construct.SecurityRulesClassName(cls), Construct.SecurityRulesClassName(cls) + host.Settings["extrasuffix"] + Zetbox.API.Helper.ImplementationSuffix); }
public ResourceTemplate(IGenerationHost host) : base(host) { }
public ReportTemplate(IGenerationHost host) : base(host) { }
public TemplateInfo(string filename, IGenerationHost host) { this.templatefileinfo = new FileInfo(filename); this.host = host; }
public static void Call(IGenerationHost host, IZetboxContext ctx, Property prop, string propertyName, string parentName) { if (host == null) { throw new ArgumentNullException("host"); } host.CallTemplate("EfModel.ModelMslEntityTypeMappingComplexProperty", ctx, prop, propertyName, parentName); }
public ReportTemplate(IGenerationHost host) : base(host) { }
public ResourceTemplate(IGenerationHost host) : base(host) { }
public TemplateInfo(string filename, IGenerationHost host) { this.templatefileinfo = new FileInfo(filename); this.host = host; }