示例#1
0
        /// <summary>
        /// Creates a new instance of <see cref="SpecificFailureMechanism"/>.
        /// </summary>
        public SpecificFailureMechanism()
        {
            Name = Resources.SpecificFailureMechanism_DefaultName;
            Code = Resources.SpecificFailureMechanism_DefaultCode;

            sectionCollection        = new FailureMechanismSectionCollection();
            InAssembly               = true;
            GeneralInput             = new GeneralInput();
            InAssemblyInputComments  = new Comment();
            InAssemblyOutputComments = new Comment();
            NotInAssemblyComments    = new Comment();

            AssemblyResult = new FailureMechanismAssemblyResult();
            sectionResults = new ObservableList <NonAdoptableWithProfileProbabilityFailureMechanismSectionResult>();
        }
示例#2
0
        /// <summary>
        /// Creates a new instance of the <see cref="FailureMechanismBase{T}"/> class.
        /// </summary>
        /// <param name="name">The name of the failure mechanism.</param>
        /// <param name="failureMechanismCode">The code of the failure mechanism.</param>
        /// <exception cref="ArgumentException">Thrown when either:
        /// <list type="bullet">
        /// <item><paramref name="name"/> is <c>null</c> or empty.</item>
        /// <item><paramref name="failureMechanismCode"/> is <c>null</c> or empty.</item>
        /// </list>
        /// </exception>
        protected FailureMechanismBase(string name, string failureMechanismCode)
        {
            ValidateParameters(name, failureMechanismCode);

            Name = name;
            Code = failureMechanismCode;
            sectionCollection        = new FailureMechanismSectionCollection();
            InAssembly               = true;
            InAssemblyInputComments  = new Comment();
            InAssemblyOutputComments = new Comment();
            NotInAssemblyComments    = new Comment();

            AssemblyResult = new FailureMechanismAssemblyResult();
            sectionResults = new ObservableList <T>();
        }