Loupe - Log - Monitor - Resolve
Gibraltar.Serialization Namespace / FieldWriter Class / Write Method

In This Topic
    Write Method (FieldWriter)
    In This Topic
    Write an object to the stream as its serializable type
    Overload List
    OverloadDescription
    Write an object to the stream as its serializable type  
    Write an object to the stream as its serializable type  
    Write a bool to the stream.  
    Write an array of bool to the stream.  
    Write a string to the stream. We optimize strings by maintaining a hash table of each unique string we have seen. Each string is sent with as an integer index into the table. When a new string is encountered, it's index is followed by the string value.  
    Write an array of string to the stream.  
    Stores a 32-bit signed value into the stream using 7-bit encoding. The value is written 7 bits at a time (starting with the least-significant bits) until there are no more bits to write. The eighth bit of each byte stored is used to indicate whether there are more bytes following this one.  
    Write an array of Int32 to the stream.  
    Stores a 64-bit signed value into the stream using 7-bit encoding. The value is written 7 bits at a time (starting with the least-significant bits) until there are no more bits to write. The eighth bit of each byte stored is used to indicate whether there are more bytes following this one.  
    Write an array of Int64 to the stream.  
    Stores a 32-bit unsigned value into the stream using 7-bit encoding. The value is written 7 bits at a time (starting with the least-significant bits) until there are no more bits to write. The eighth bit of each byte stored is used to indicate whether there are more bytes following this one.  
    Write an array of UInt32 to the stream.  
    Stores a 64-bit unsigned value into the stream using 7-bit encoding. The value is written 7 bits at a time (starting with the least-significant bits) until there are no more bits to write. The eighth bit of each byte stored is used to indicate whether there are more bytes following this one. There is a special optimization for UInt64 because after passing 8 7-bit values we know that there can only be 8 bits left (since the original data was 64 bits long). So, for that last byte, we can use all 8 bits. This means that the worst case size for a double is 9 bytes versus 10 which would otherwise sometimes be necessary to pass that very last bit.  
    Write an array of UInt64 to the stream.  
    Stores a 64-bit double value int the stream in the fewest bytes possible. For many common numbers the bit representation of a double includes lots of trailing zeros. This creates an opportunity to optimize these values in a similar way to how we optimize UInt64. The difference is just that in this case we are interested in the high-order bits whereas with UInt64 we are interested in the low order bits.  
    Write an array of double to the stream.  
    Stores a TimeSpan value to the stream  
    Write an array of TimeSpan to the stream.  
    Stores a DateTime value to the stream  
    Stores a DateTime value to the stream  
    Write an array of DateTime to the stream.  
    Write an array of DateTimeOffset to the stream.  
    Stores a 128-bit Guid value to the stream  
    Write an array of Guid to the stream.  
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also