コード例 #1
0
ファイル: JDFAuditPool.cs プロジェクト: cip4/JDFLibNet
        ///
        ///	 <summary> * add an audit, called internally by the specialized functions
        ///	 *  </summary>
        ///	 * <param name="typ"> audit type </param>
        ///	 * <param name="by"> the author keyword </param>
        ///	 * <returns> JDFAudit
        ///	 *
        ///	 *         default: AddAudit(typ, JDFConstants.EMPTYSTRING) </returns>
        ///
        public virtual JDFAudit addAudit(JDFAudit.EnumAuditType typ, string by)
        {
            JDFAudit l = (JDFAudit)appendElement(typ.getName(), null);

            if (by != null)
            {
                l.setAuthor(by);
            }

            JDFNode r = getJDFRoot();

            if (r.hasAttribute(AttributeName.SPAWNID))
            {
                l.setSpawnID(r.getSpawnID(false));
            }

            return(l);
        }