Represents generating serializer code information.
        /// <summary>
        ///		Assigns the appropriate <see cref="TextWriter"/> to the specified <see cref="SerializerCodeInformation"/>
        ///		based on the argument and the method of this object.
        /// </summary>
        /// <param name="codeInformation">
        ///		The <see cref="SerializerCodeInformation"/> object which holds informations to determine output and output themselves.
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="codeInformation"/> is <c>null</c>.</exception>
        public void AssignTextWriter(SerializerCodeInformation codeInformation)
        {
            if (codeInformation == null)
            {
                throw new ArgumentNullException("codeInformation");
            }

            this.AssignTextWriterCore(codeInformation);
        }
		/// <summary>
		///		Assigns the appropriate <see cref="TextWriter"/> to the specified <see cref="SerializerCodeInformation"/>
		///		based on the argument and the method of this object.
		/// </summary>
		/// <param name="codeInformation">
		///		The <see cref="SerializerCodeInformation"/> object which holds informations to determine output and output themselves.
		/// </param>
		/// <exception cref="ArgumentNullException"><paramref name="codeInformation"/> is <c>null</c>.</exception>
		public void AssignTextWriter( SerializerCodeInformation codeInformation )
		{
			if ( codeInformation == null )
			{
				throw new ArgumentNullException( "codeInformation" );
			}

			this.AssignTextWriterCore( codeInformation );
		}
		protected override void AssignTextWriterCore( SerializerCodeInformation codeInformation )
		{
			codeInformation.SetNonFileWriter( this._writer );
		}
		protected override void AssignTextWriterCore( SerializerCodeInformation codeInformation )
		{
			Directory.CreateDirectory( codeInformation.Directory );
			codeInformation.SetFileWriter( Path.Combine( codeInformation.Directory, codeInformation.TypeFullName + codeInformation.FileExtension ) );
		}
 protected override void AssignTextWriterCore(SerializerCodeInformation codeInformation)
 {
     Directory.CreateDirectory(codeInformation.Directory);
     codeInformation.SetFileWriter(Path.Combine(codeInformation.Directory, codeInformation.TypeFullName + codeInformation.FileExtension));
 }
 /// <summary>
 ///		Assigns the appropriate <see cref="TextWriter"/> to the specified <see cref="SerializerCodeInformation"/>
 ///		based on the argument and the method of this object.
 /// </summary>
 /// <param name="codeInformation">
 ///		The <see cref="SerializerCodeInformation"/> object which holds informations to determine output and output themselves.
 ///		The override implementation must set its <see cref="SerializerCodeInformation.TextWriter"/> property via <c>Set*</c> method.
 ///		This value will not be <c>null</c>.
 /// </param>
 protected abstract void AssignTextWriterCore(SerializerCodeInformation codeInformation);
Beispiel #7
0
 protected override void AssignTextWriterCore(SerializerCodeInformation codeInformation)
 {
     codeInformation.SetNonFileWriter(this._writer);
 }
		/// <summary>
		///		Assigns the appropriate <see cref="TextWriter"/> to the specified <see cref="SerializerCodeInformation"/>
		///		based on the argument and the method of this object.
		/// </summary>
		/// <param name="codeInformation">
		///		The <see cref="SerializerCodeInformation"/> object which holds informations to determine output and output themselves.
		///		The override implementation must set its <see cref="SerializerCodeInformation.TextWriter"/> property via <c>Set*</c> method.
		///		This value will not be <c>null</c>.
		/// </param>
		protected abstract void AssignTextWriterCore( SerializerCodeInformation codeInformation );