public virtual object GetData(string format, bool autoConvert) { if (format.Equals(DataFormat)) { BinaryFormatter formatter = new BinaryFormatter(); SerializationStream.Seek(0, SeekOrigin.Begin); #pragma warning disable SYSLIB0011 // Type or member is obsolete return(formatter.Deserialize(SerializationStream)); #pragma warning restore SYSLIB0011 // Type or member is obsolete } else if (format.Equals(NestedToolboxItemFormat)) { NestedToolboxItem.SetDisplayName(); return(NestedToolboxItem); } return(null); }