示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SpecRelation"/> class.
        /// </summary>
        /// <param name="reqIfContent">
        /// The container <see cref="reqIfContent"/>
        /// </param>
        /// <param name="loggerFactory">
        /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
        /// </param>
        internal SpecRelation(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
            : base(reqIfContent, loggerFactory)
        {
            this.logger = this.loggerFactory == null ? NullLogger <SpecRelation> .Instance : this.loggerFactory.CreateLogger <SpecRelation>();

            this.ReqIFContent.SpecRelations.Add(this);
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SpecObject"/> class.
        /// </summary>
        /// <param name="reqIfContent">
        /// The container <see cref="reqIfContent"/>
        /// </param>
        /// <param name="loggerFactory">
        /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
        /// </param>
        internal SpecObject(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
            : base(reqIfContent, loggerFactory)
        {
            this.logger = loggerFactory == null ? NullLogger <SpecObject> .Instance : loggerFactory.CreateLogger <SpecObject>();

            this.ReqIFContent.SpecObjects.Add(this);
        }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SpecHierarchy"/> class.
        /// </summary>
        /// <param name="root">
        /// The root.
        /// </param>
        /// <param name="reqIfContent">
        /// The requirement core information content.
        /// </param>
        /// <param name="loggerFactory">
        /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
        /// </param>
        protected internal SpecHierarchy(Specification root, ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
            : base(loggerFactory)
        {
            this.logger = this.loggerFactory == null ? NullLogger <SpecHierarchy> .Instance : this.loggerFactory.CreateLogger <SpecHierarchy>();

            this.Initialize(null, root, reqIfContent);
            this.Root.Children.Add(this);
        }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RelationGroup"/> class.
        /// </summary>
        /// <param name="reqIfContent">
        /// The container <see cref="reqIfContent"/>
        /// </param>
        /// <param name="loggerFactory">
        /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
        /// </param>
        internal RelationGroup(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
            : base(reqIfContent, loggerFactory)
        {
            this.logger = loggerFactory == null ? NullLogger <RelationGroup> .Instance : loggerFactory.CreateLogger <RelationGroup>();

            this.CoreContent = reqIfContent;
            this.CoreContent.SpecRelationGroups.Add(this);
        }
示例#5
0
        /// <summary>
        /// Constructs a new instance <see cref="SpecType"/> based on the XML Name
        /// </summary>
        /// <param name="xmlname">
        /// The XML name of the <see cref="SpecType"/> that is to be constructed
        /// </param>
        /// <param name="reqIfContent">
        /// The owning <see cref="ReqIFContent"/> object.
        /// </param>
        /// <param name="loggerFactory">
        /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
        /// </param>
        /// <returns>
        /// an instance of <see cref="SpecType"/>
        /// </returns>
        /// <exception cref="ArgumentException">
        /// Thrown when an invalid <paramref name="xmlname"/> is provided
        /// </exception>
        internal static SpecType SpecTypeConstruct(string xmlname, ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
        {
            switch (xmlname)
            {
            case "SPEC-OBJECT-TYPE":
                return(new SpecObjectType(reqIfContent, loggerFactory));

            case "SPECIFICATION-TYPE":
                return(new SpecificationType(reqIfContent, loggerFactory));

            case "SPEC-RELATION-TYPE":
                return(new SpecRelationType(reqIfContent, loggerFactory));

            case "RELATION-GROUP-TYPE":
                return(new RelationGroupType(reqIfContent, loggerFactory));

            default:
                throw new ArgumentException($"{xmlname} is not a vaild SpecType name");
            }
        }
示例#6
0
        /// <summary>
        /// Constructs a new instance <see cref="SpecType"/> based on the XML Name
        /// </summary>
        /// <param name="xmlname">
        /// The XML name of the <see cref="SpecType"/> that is to be constructed
        /// </param>
        /// <param name="reqIfContent">
        /// The owning <see cref="ReqIFContent"/> object.
        /// </param>
        /// <returns>
        /// an instance of <see cref="SpecType"/>
        /// </returns>
        /// <exception cref="ArgumentException">
        /// Thrown when an invalid <paramref name="xmlname"/> is provided
        /// </exception>
        internal static SpecType SpecTypeConstrcut(string xmlname, ReqIFContent reqIfContent)
        {
            switch (xmlname)
            {
            case "SPEC-OBJECT-TYPE":
                return(new SpecObjectType(reqIfContent));

            case "SPECIFICATION-TYPE":
                return(new SpecificationType(reqIfContent));

            case "SPEC-RELATION-TYPE":
                return(new SpecRelationType(reqIfContent));

            case "RELATION-GROUP-TYPE":
                return(new RelationGroupType(reqIfContent));

            default:
                throw new ArgumentException(string.Format("{0} is not a vaild SpecType name", xmlname));
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecElementWithAttributes"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="reqIfContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 protected SpecElementWithAttributes(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(loggerFactory)
 {
     this.ReqIFContent = reqIfContent;
 }
示例#8
0
        /// <summary>
        /// Constructs a new instance <see cref="DatatypeDefinition"/> based on the XML Name
        /// </summary>
        /// <param name="xmlname">
        /// The XML name of the <see cref="DatatypeDefinition"/> that is to be constructed
        /// </param>
        /// <param name="reqIfContent">
        /// The owning <see cref="ReqIFContent"/>
        /// </param>
        /// <param name="loggerFactory">
        /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
        /// </param>
        /// <returns>
        /// an instance of <see cref="DatatypeDefinition"/>
        /// </returns>
        /// <exception cref="ArgumentException">
        /// Thrown when an invalid <paramref name="xmlname"/> is provided
        /// </exception>
        internal static DatatypeDefinition DatatypeDefinitionConstruct(string xmlname, ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
        {
            switch (xmlname)
            {
            case "DATATYPE-DEFINITION-BOOLEAN":
                return(new DatatypeDefinitionBoolean(reqIfContent, loggerFactory));

            case "DATATYPE-DEFINITION-DATE":
                return(new DatatypeDefinitionDate(reqIfContent, loggerFactory));

            case "DATATYPE-DEFINITION-ENUMERATION":
                return(new DatatypeDefinitionEnumeration(reqIfContent, loggerFactory));

            case "DATATYPE-DEFINITION-INTEGER":
                return(new DatatypeDefinitionInteger(reqIfContent, loggerFactory));

            case "DATATYPE-DEFINITION-REAL":
                return(new DatatypeDefinitionReal(reqIfContent, loggerFactory));

            case "DATATYPE-DEFINITION-STRING":
                return(new DatatypeDefinitionString(reqIfContent, loggerFactory));

            case "DATATYPE-DEFINITION-XHTML":
                return(new DatatypeDefinitionXHTML(reqIfContent, loggerFactory));

            default:
                throw new ArgumentException($"{xmlname} is not a vaild DatatypeDefinition name");
            }
        }
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelationGroupType"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="ReqIFContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 internal RelationGroupType(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(reqIfContent, loggerFactory)
 {
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecificationType"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="ReqIFContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 internal SpecificationType(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(reqIfContent, loggerFactory)
 {
 }
示例#11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DatatypeDefinitionSimple"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 protected DatatypeDefinitionSimple(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(reqIfContent, loggerFactory)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DatatypeDefinitionString"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 internal DatatypeDefinitionString(ReqIFContent reqIfContent)
     : base(reqIfContent)
 {
     this.ReqIFContent = reqIfContent;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DatatypeDefinitionInteger"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 internal DatatypeDefinitionInteger(ReqIFContent reqIfContent)
     : base(reqIfContent)
 {
     this.ReqIFContent = reqIfContent;
 }
示例#14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DatatypeDefinitionEnumeration"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 internal DatatypeDefinitionEnumeration(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(reqIfContent, loggerFactory)
 {
 }
示例#15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecObjectType"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="ReqIFContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 internal SpecObjectType(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(reqIfContent, loggerFactory)
 {
 }
示例#16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecObject"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="reqIfContent"/>
 /// </param>
 internal SpecObject(ReqIFContent reqIfContent)
     : base(reqIfContent)
 {
     this.ReqIfContent.SpecObjects.Add(this);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecElementWithAttributes"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="reqIfContent"/>
 /// </param>
 internal SpecElementWithAttributes(ReqIFContent reqIfContent)
 {
     this.ReqIfContent = reqIfContent;
 }
示例#18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Specification"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="reqIfContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 internal Specification(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(reqIfContent, loggerFactory)
 {
     this.ReqIFContent.Specifications.Add(this);
 }
示例#19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecType"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 protected SpecType(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(loggerFactory)
 {
     this.ReqIFContent = reqIfContent;
     reqIfContent.SpecTypes.Add(this);
 }
示例#20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DatatypeDefinitionEnumeration"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 internal DatatypeDefinitionEnumeration(ReqIFContent reqIfContent)
     : base(reqIfContent)
 {
     this.ReqIFContent = reqIfContent;
 }
示例#21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecRelation"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="reqIfContent"/>
 /// </param>
 internal SpecRelation(ReqIFContent reqIfContent)
     : base(reqIfContent)
 {
     this.ReqIfContent.SpecRelations.Add(this);
 }
示例#22
0
 /// <summary>
 /// The initialize.
 /// </summary>
 /// <param name="container">
 /// The container.
 /// </param>
 /// <param name="root">
 /// The root.
 /// </param>
 /// <param name="reqIfContent">
 /// The requirement core information content.
 /// </param>
 private void Initialize(SpecHierarchy container, Specification root, ReqIFContent reqIfContent)
 {
     this.Container    = container;
     this.Root         = root;
     this.ReqIfContent = reqIfContent;
 }
示例#23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecType"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 internal SpecType(ReqIFContent reqIfContent)
 {
     this.ReqIFContent = reqIfContent;
     reqIfContent.SpecTypes.Add(this);
 }
示例#24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DatatypeDefinitionString"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 internal DatatypeDefinitionString(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(reqIfContent, loggerFactory)
 {
 }
示例#25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecHierarchy"/> class.
 /// </summary>
 /// <param name="root">
 /// The root.
 /// </param>
 /// <param name="reqIfContent">
 /// The requirement core information content.
 /// </param>
 internal SpecHierarchy(Specification root, ReqIFContent reqIfContent)
 {
     this.Initialize(null, root, reqIfContent);
     this.Root.Children.Add(this);
 }
示例#26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DatatypeDefinition"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The owning <see cref="reqIfContent"/>
 /// </param>
 /// <param name="loggerFactory">
 /// The (injected) <see cref="ILoggerFactory"/> used to setup logging
 /// </param>
 protected DatatypeDefinition(ReqIFContent reqIfContent, ILoggerFactory loggerFactory)
     : base(loggerFactory)
 {
     this.ReqIFContent = reqIfContent;
     reqIfContent.DataTypes.Add(this);
 }
示例#27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelationGroup"/> class.
 /// </summary>
 /// <param name="reqIfContent">
 /// The container <see cref="reqIfContent"/>
 /// </param>
 internal RelationGroup(ReqIFContent reqIfContent) : base(reqIfContent)
 {
     this.CoreContent = reqIfContent;
     this.CoreContent.SpecRelationGroups.Add(this);
 }
示例#28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpecHierarchy"/> class.
 /// </summary>
 /// <param name="container">
 /// The container.
 /// </param>
 /// <param name="root">
 /// The root.
 /// </param>
 /// <param name="reqIfContent">
 /// The requirement core information content.
 /// </param>
 internal SpecHierarchy(SpecHierarchy container, Specification root, ReqIFContent reqIfContent)
 {
     this.Initialize(container, root, reqIfContent);
     this.Container.Children.Add(this);
 }