protected virtual void SetupProperties(Hashtable properties)
{
StringBuilder sb = new StringBuilder();
foreach(DictionaryEntry entry in properties)
{
if (sb.Length != 0)
{
sb.Append(",");
}
String key = null;
try
{
key = (String) entry.Key;
}
catch(InvalidCastException)
{
throw new InvalidManagedObjectName("Key is not a String.");
}
String value = null;
try
{
value = (String) entry.Value;
}
catch(InvalidCastException)
{
throw new InvalidManagedObjectName("Value is not a String.");
}
sb.AppendFormat("{0}={1}", key, value);
}
this.literalProperties = sb.ToString();
this.properties = new Hashtable(properties);
}