public void WriteExternal(IPofWriter writer) { writer.WriteInt32(0, INTEGER); IPofWriter nested1 = writer.CreateNestedPofWriter(1); IPofWriter nested2 = nested1.CreateNestedPofWriter(0); nested2.WriteString(0, STRING); nested2.WriteObject(1, PERSON); nested2.WriteDoubleArray(2, DOUBLE_ARRAY); IPofWriter nested3 = nested2.CreateNestedPofWriter(3); nested3.WriteArray(0, STRING_ARRAY, typeof(String)); nested2.WriteBoolean(4, false); nested2.WriteRemainder(null); nested1.WriteCollection(1, (ICollection <String>)set); nested1.WriteDouble(2, 2.0); nested1.WriteInt32(3, 5); nested1.WriteCollection(4, set, typeof(String)); nested1.WriteObject(5, PERSON); nested1.WriteDouble(10, 2.222); writer.WriteDouble(2, 4.444); writer.WriteInt32(3, 15); writer.WriteObject(4, PERSON); }