Represents generating serializer code information.
Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
		/// <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));
 }
Esempio n. 6
0
 /// <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);
Esempio n. 7
0
 protected override void AssignTextWriterCore(SerializerCodeInformation codeInformation)
 {
     codeInformation.SetNonFileWriter(this._writer);
 }
Esempio n. 8
0
		/// <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 );