public void WriteParameter(ContactParameterReader reader) { this.StartParameter(reader.Name); if (reader.Name != null) { while (reader.ReadNextValue()) { this.WriteParameterValue(reader.ReadValue()); } } else { this.WriteParameterValue(reader.ReadValue()); } this.EndParameter(); }
public void WriteProperty(ContactPropertyReader reader) { this.StartProperty(reader.Name); ContactParameterReader parameterReader = reader.ParameterReader; while (parameterReader.ReadNextParameter()) { this.WriteParameter(parameterReader); } ContactValueSeparators separator = ContactValueSeparators.None; ContactValueSeparators expectedSeparators = ContactValueSeparators.Comma | ContactValueSeparators.Semicolon; ContactValueType contactValueType = reader.ValueType; switch (contactValueType) { case ContactValueType.Binary: expectedSeparators = ContactValueSeparators.None; break; case ContactValueType.Boolean: break; case ContactValueType.Date: case ContactValueType.DateTime: goto IL_55; default: if (contactValueType == ContactValueType.Time) { goto IL_55; } break; } IL_70: while (reader.ReadNextValue()) { this.WritePropertyValue(reader.ReadValue(expectedSeparators), separator); separator = reader.LastValueSeparator; } this.EndProperty(); return; IL_55: expectedSeparators = ContactValueSeparators.Semicolon; goto IL_70; }