Ejemplo n.º 1
0
        /// <summary>
        /// Serializes an iso_10303 object into STEP format, writing the data to the given StepWriter
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="iso10303"></param>
        public void Serialize(IStepWriter writer, iso_10303 iso10303)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (iso10303 == null)
            {
                throw new ArgumentNullException("iso10303");
            }

            this._internalSerializer = new StepParser.Serialization.StepSerializer();
            this._extractor          = new StepObjectExtractor();

            //Convert from iso_10303 to StepDataObjects
            StepFile stepFile = this._extractor.Extract(iso10303);

            //use the InternalStepSerializer to write StepDataObjects to the StepWriter
            this._internalSerializer.Serialize(writer, stepFile);
        }
Ejemplo n.º 2
0
		public void SetUp(){
			BasicConfigurator.Configure();
			
			SUT = new StepSerializer();
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Serializes an iso_10303 object into STEP format, writing the data to the given StepWriter
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="iso10303"></param>
 public void Serialize(IStepWriter writer, iso_10303 iso10303){
     if(writer == null)
         throw new ArgumentNullException("writer");
     if(iso10303 == null)
         throw new ArgumentNullException("iso10303");
     
     this._internalSerializer = new StepParser.Serialization.StepSerializer();
     this._extractor = new StepObjectExtractor();
     
     //Convert from iso_10303 to StepDataObjects
     StepFile stepFile = this._extractor.Extract( iso10303 );
     //use the InternalStepSerializer to write StepDataObjects to the StepWriter
     this._internalSerializer.Serialize(writer, stepFile );
 }