示例#1
0
        /// <summary>
        /// Exports the design space into design interchange format AVM Design Model and indexes the file
        /// in the project manifest.
        /// </summary>
        /// <param name="projectManifest">Given project manifest object.</param>
        /// <returns>True if exporting and indexing are successful, otherwise false.</returns>
        public bool SaveDesignSpace(AVM.DDP.MetaAvmProject projectManifest)
        {
            if (projectManifest == null)
            {
                throw new ArgumentNullException("projectManifest");
            }

            this.ThrowIfNotExpanded();

            if (this.OriginalSystemUnderTest == null)
            {
                return(true);
            }
            else if (this.OriginalSystemUnderTest.AllReferred is CyPhy.DesignContainer)
            {
                bool success = false;
                try
                {
                    success = projectManifest.SaveDesign(this.OriginalSystemUnderTest.Referred.DesignEntity);
                }
                catch (Exception ex)
                {
                    throw new AnalysisModelProcessorException("Saving design space model failed.", ex);
                }

                return(success);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        /// <summary>
        /// Exports the design into design interchange format AVM Design Model and indexes the file
        /// in the project manifest.
        /// </summary>
        /// <param name="projectManifest">Given project manifest object.</param>
        /// <returns>True if exporting and indexing are successful, otherwise false.</returns>
        public virtual bool SaveDesign(AVM.DDP.MetaAvmProject projectManifest)
        {
            if (projectManifest == null)
            {
                throw new ArgumentNullException("projectManifest");
            }

            this.ThrowIfNotExpanded();

            bool success = false;

            try
            {
                success = projectManifest.SaveDesign(this.Configuration);
            }
            catch (Exception ex)
            {
                throw new AnalysisModelProcessorException("Saving design model failed.", ex);
            }

            return(success);
        }