public void SetAttribute(object key, object value) { if (Attributes == null) { Attributes = new Dictionary<object, object>(); } Attributes.Add(key, value); }