/// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <returns>The new instance.</returns>
        internal static RoleType Create(AllorsEmbeddedSession session)
        {
            var role = (RoleType)session.Create(AllorsEmbeddedDomain.RoleType);

            role.Reset();
            return(role);
        }
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <returns>A new instance</returns>
        internal static AssociationType Create(AllorsEmbeddedSession session)
        {
            var association = (AssociationType)session.Create(AllorsEmbeddedDomain.AssociationType);

            association.Reset();
            return(association);
        }
예제 #3
0
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <returns>The new instance.</returns>
        internal static MethodType Create(AllorsEmbeddedSession session)
        {
            var methodType = (MethodType)session.Create(AllorsEmbeddedDomain.MethodType);

            methodType.Reset();
            return(methodType);
        }
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <returns>The new instance.</returns>
        internal static RelationType Create(AllorsEmbeddedSession session)
        {
            var relationType = (RelationType)session.Create(AllorsEmbeddedDomain.RelationType);

            relationType.AssociationType = AssociationType.Create(session);
            relationType.RoleType        = RoleType.Create(session);

            relationType.Reset();
            return(relationType);
        }
예제 #5
0
        public Population()
        {
            this.Domain      = Domain.Create();
            this.Domain.Name = "Domain";

            this.allorsSession = this.Domain.AllorsSession;

            var validationReport = this.Domain.Validate();

            if (validationReport.ContainsErrors)
            {
                throw new Exception("Domain invalid");
            }

            this.GetUnits();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AllorsClassMethodType"/> class.
 /// </summary>
 /// <param name="session">The Allors Session.</param>
 /// <param name="id">The Allors Object Id.</param>
 protected AllorsClassMethodType(AllorsEmbeddedSession session, System.Int32 id) : base(session, id)
 {
 }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AllorsClassPropertyType"/> class.
 /// </summary>
 /// <param name="session">The Allors Session.</param>
 /// <param name="id">The Allors Object Id.</param>
 protected AllorsClassPropertyType(AllorsEmbeddedSession session, System.Int32 id) : base(session, id)
 {
 }
예제 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AllorsClassAssociationType"/> class.
 /// </summary>
 /// <param name="session">The Allors Session.</param>
 /// <param name="id">The Allors Object Id.</param>
 protected AllorsClassAssociationType(AllorsEmbeddedSession session, System.Int32 id) : base(session, id)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AllorsClassInheritance"/> class.
 /// </summary>
 /// <param name="session">The Allors Session.</param>
 /// <param name="id">The Allors Object Id.</param>
 protected AllorsClassInheritance(AllorsEmbeddedSession session, System.Int32 id) : base(session, id)
 {
 }
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <returns>The new inheritance.</returns>
        internal static Inheritance Create(AllorsEmbeddedSession session)
        {
            var inheritance = (Inheritance)session.Create(AllorsEmbeddedDomain.Inheritance);

            return(inheritance);
        }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AllorsClassMetaObject"/> class.
 /// </summary>
 /// <param name="session">The Allors Session.</param>
 /// <param name="id">The Allors Object Id.</param>
 protected AllorsClassMetaObject(AllorsEmbeddedSession session, System.Int32 id)
 {
     this.session = session;
     this.id      = id;
 }