Пример #1
0
        internal override void OnAddedToContentWriter(ContentWriter output)
        {
            base.OnAddedToContentWriter(output);

            _elementWriter = output.GetTypeWriter(typeof(T));
        }
Пример #2
0
 /// <summary>
 /// Writes the value to the output.
 /// </summary>
 /// <param name="output">The output writer object.</param>
 /// <param name="value">The value to write to the output.</param>
 protected internal override void Write(ContentWriter output, TOutput value)
 {
     output.Write(value);
 }
Пример #3
0
 internal override void OnAddedToContentWriter(ContentWriter output)
 {
     base.OnAddedToContentWriter(output);
     _underlyingType       = Enum.GetUnderlyingType(typeof(TEnum));
     _underlyingTypeWriter = output.GetTypeWriter(_underlyingType);
 }
Пример #4
0
 protected internal override void Write(ContentWriter output, TEnum value)
 {
     output.WriteRawObject(Convert.ChangeType(value, _underlyingType), _underlyingTypeWriter);
 }
 /// <summary>
 /// Writes the value to the output.
 /// </summary>
 /// <param name="output">The output writer object.</param>
 /// <param name="value">The value to write to the output.</param>
 protected internal override void Write(ContentWriter output, T value)
 {
 }
Пример #6
0
 /// <summary>
 /// Writes the value to the output.
 /// </summary>
 /// <param name="output">The output writer object.</param>
 /// <param name="value">The value to write to the output.</param>
 protected internal override void Write(ContentWriter output, Matrix4x4 value)
 {
     output.Write(value);
 }
Пример #7
0
 /// <summary>
 /// Writes the value to the output.
 /// </summary>
 /// <param name="output">The output writer object.</param>
 /// <param name="value">The value to write to the output.</param>
 protected internal override void Write(ContentWriter output, SongContent value)
 {
     output.Write(value.FileName);
     output.WriteObject(value.Duration);
 }
Пример #8
0
 /// <summary>
 /// Writes the value to the output.
 /// </summary>
 /// <param name="output">The output writer object.</param>
 /// <param name="value">The value to write to the output.</param>
 protected internal override void Write(ContentWriter output, Quaternion value)
 {
     output.Write(value);
 }
Пример #9
0
 /// <summary>
 /// Writes the value to the output.
 /// </summary>
 /// <param name="output">The output writer object.</param>
 /// <param name="value">The value to write to the output.</param>
 protected internal override void Write(ContentWriter output, TOutput value)
 {
     output.Write7BitEncodedInt(value.Value);
 }
Пример #10
0
 protected internal override void Write(ContentWriter output, VertexBufferContent value)
 {
     output.WriteRawObject(value.VertexDeclaration);
     output.Write((uint)(value.VertexData.Length / value.VertexDeclaration.VertexStride));
     output.Write(value.VertexData);
 }
Пример #11
0
 /// <summary>
 /// Writes the value to the output.
 /// </summary>
 /// <param name="output">The output writer object.</param>
 /// <param name="value">The value to write to the output.</param>
 protected internal override void Write(ContentWriter output, Plane value)
 {
     output.Write(value.Normal);
     output.Write(value.D);
 }