private void SetProperty(string data, SDESType type)
{
byte[] bytes = null;
if (data != null)
{
lock (utf8)
{
bytes = utf8.GetBytes(data);
}
// Check to see if it is too long
if (bytes.Length > MAX_PROPERTY_LENGTH)
{
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.SDESItemDataBytesExceeded,
MAX_PROPERTY_LENGTH, bytes.Length, data));
}
}
this.data[(int)type] = bytes;
}