public SelfRelationDefinition(EntityDefinition entity, string[] props, SelfRelationTarget direct, SelfRelationTarget reverse, SourceFragmentDefinition table, EntityDefinition underlyingEntity, bool disabled) : base(table, underlyingEntity, direct, reverse, disabled) { _entity = entity; _props = props; }
protected RelationDefinitionBase(SourceFragmentDefinition table, EntityDefinition underlyingEntity, SelfRelationTarget left, SelfRelationTarget right, bool disabled) { _table = table; _underlyingEntity = underlyingEntity; _disabled = disabled; _left = left; _right = right; _constants = new List <RelationConstantDescriptor>(); }
public CustomPropertyDefinition(string propertyName, TypeDefinition type, Body getBody, Body setBody, EntityDefinition entity) { Name = propertyName; PropertyType = type; _getBody = getBody; _setBody = setBody; Entity = entity; }
public bool IsAssignableFrom(EntityDefinition ed) { if (ed == this) { return(true); } if (ed.BaseEntity == null) { return(false); } return(IsAssignableFrom(ed.BaseEntity)); }
internal PropertyDefinition Clone(EntityDefinition entityDescription) { PropertyDefinition p = _Clone(); p.Entity = entityDescription; var s = entityDescription.GetSourceFragments().SingleOrDefault(item => item.Replaces != null && item.Replaces.Identifier == p.SourceFragment.Identifier); if (s != null) { p.SourceFragment = s; } return(p); }
protected PropertyDefinition(string propertyName, string propertyAlias, TypeDefinition type, Field2DbRelations attributes, string description, AccessLevel fieldAccessLevel, AccessLevel propertyAccessLevel, EntityDefinition entity) { _name = propertyName; _type = type; _propertyAlias = string.IsNullOrEmpty(propertyAlias) ? propertyName : propertyAlias; _attributes = attributes; _description = description; _fieldAccessLevel = fieldAccessLevel; _propertyAccessLevel = propertyAccessLevel; Entity = entity; GenerateAttribute = true; Interfaces = new List <PropertyInterface>(); }
protected TypeDefinition(string id, string typeName, EntityDefinition entity, bool treatAsUserType, UserTypeHintFlags?userTypeHint) { _id = id; if (!string.IsNullOrEmpty(typeName)) { if (treatAsUserType) { _userType = typeName; _userTpeHint = userTypeHint; } else { _clrType = GetTypeByName(typeName); } } _entity = entity; }
public EntityDefinition(string id, string name, string @namespace, string description, WXMLModel model, EntityDefinition baseEntity, EntityBehaviuor behaviour) { _id = id; _name = name; _description = description; _sourceFragments = new List <SourceFragmentRefDefinition>(); _properties = new List <PropertyDefinition>(); _suppressedProperties = new List <string>(); _model = model; EntitySpecificNamespace = @namespace; _baseEntity = baseEntity; Behaviour = behaviour; if (model != null && !model.GetEntities().Any(item => item.Identifier == id)) { model.AddEntity(this); } Interfaces = new Dictionary <string, TypeDefinition>(); }
public EntityDefinition(string id, string name, string @namespace, string description, WXMLModel model, EntityDefinition baseEntity) : this(id, name, @namespace, description, model, baseEntity, EntityBehaviuor.ForcePartial) { }
public TypeDefinition(string id, EntityDefinition entity) : this(id, null, entity, false, null) { }
public abstract bool IsEntityTakePart(EntityDefinition entity);
public override bool IsEntityTakePart(EntityDefinition entity) { return(Entity == entity); }
public SelfRelationDefinition(EntityDefinition entity, string[] props, SelfRelationTarget direct, SelfRelationTarget reverse, SourceFragmentDefinition table, EntityDefinition underlyingEntity) : this(entity, props, direct, reverse, table, underlyingEntity, false) { }
public EntityPropertyDefinition(string propertyName, string propertyAlias, Field2DbRelations attributes, string description, AccessLevel fieldAccessLevel, AccessLevel propertyAccessLevel, TypeDefinition type, SourceFragmentDefinition sf, EntityDefinition entity) : base(propertyName, propertyAlias, type, attributes, description, fieldAccessLevel, propertyAccessLevel, entity) { if (!type.IsEntityType) { throw new ArgumentException(string.Format("EntityProperty type must be a entity type. Passed {0}", type.Identifier)); } _sf = sf; }
public ScalarPropertyDefinition(EntityDefinition entity, string propertyName) : this(entity, propertyName, propertyName, Field2DbRelations.None, null, null, null, AccessLevel.Private, AccessLevel.Public) { }
public LinkTarget(EntityDefinition entity, string[] fieldName, string[] props, bool cascadeDelete, string accessorName) : base(fieldName, cascadeDelete, accessorName) { _entity = entity; _props = props; }
protected RelationDefinitionBase(SourceFragmentDefinition table, EntityDefinition underlyingEntity, SelfRelationTarget left, SelfRelationTarget right) : this(table, underlyingEntity, left, right, false) { }