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; }
public void StartProperty(string name) { if (name == null) { throw new ArgumentNullException("name"); } if (this.validate && name.Length == 0) { throw new ArgumentException(); } PropertyId propertyEnum = ContactCommon.GetPropertyEnum(name); this.StartProperty(name, propertyEnum); }