private void CalculateValueType() { if (this.isValueTypeInitialized) { return; } this.valueType = ContactValueType.Unknown; if (this.valueTypeParameter != null) { this.valueType = ContactCommon.GetValueTypeEnum(this.valueTypeParameter); } else { PropertyId propertyEnum = ContactCommon.GetPropertyEnum(this.propertyName); if (propertyEnum != PropertyId.Unknown) { this.valueType = ContactCommon.GetDefaultValueType(propertyEnum); } } if (this.valueType == ContactValueType.Unknown) { this.valueType = ContactValueType.Text; } this.isValueTypeInitialized = true; }
private void StartProperty(string name, PropertyId p) { this.EndProperty(); this.AssertValidState(WriteState.Component); this.propertyName = name.ToUpper(); this.valueType = ContactCommon.GetDefaultValueType(p); this.writer.StartProperty(this.propertyName); this.firstPropertyValue = true; this.state = WriteState.Property; }