public DynamicUnitAssociationType(DynamicObjectType objectType, DynamicUnitRoleType roleType)
 {
     this.ObjectType          = objectType;
     roleType.AssociationType = this;
     this.RoleType            = roleType;
     this.SingularName        = roleType.SingularNameForAssociation(objectType);
     this.PluralName          = roleType.PluralNameForAssociation(objectType);
 }
Example #2
0
        public DynamicUnitRoleType AddUnit(DynamicObjectType roleObjectType, string roleName)
        {
            var roleType = new DynamicUnitRoleType(roleObjectType, roleName);

            this.AddRoleType(roleType);

            var associationType = new DynamicUnitAssociationType(this, roleType);

            roleObjectType.AddAssociationType(associationType);

            this.Meta.ResetDerivations();

            return(roleType);
        }