Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface System.​ComponentModel.​Design.​Serialization.​IDesignerSerializationManager
Assembly: System.ComponentModel.TypeConverter
Implemented Interfaces
Provides an interface that can manage design-time serialization.
Properties
Context
Gets a stack-based, user-defined storage area that is useful for communication between serializers.
Properties
Indicates custom properties that can be serializable with available serializers.
Methods
void
AddSerializationProvider​(IDesignerSerializationProvider provider)
Adds the specified serialization provider to the serialization manager.
provider
The serialization provider to add.
object
CreateInstance​(Type type,
Collections.​ICollection? arguments,
string name,
bool addToContainer)
Creates an instance of the specified type and adds it to a collection of named instances.
Returns The newly created object instance.
type
The data type to create.
arguments
The arguments to pass to the constructor for this type.
name
The name of the object. This name can be used to access the object later through <see cref="M:System.ComponentModel.Design.Serialization.IDesignerSerializationManager.GetInstance(System.String)" /> . If <see langword="null" /> is passed, the object is still created but cannot be accessed by name.
addToContainer
If <see langword="true" /> , this object is added to the design container. The object must implement <see cref="T:System.ComponentModel.IComponent" /> for this to have any effect.
object
GetInstance​(string name)
Gets an instance of a created object of the specified name, or <see langword="null" /> if that object does not exist.
Returns An instance of the object with the given name, or <see langword="null" /> if no object by that name can be found.
name
The name of the object to retrieve.
string
GetName​(object value)
Gets the name of the specified object, or <see langword="null" /> if the object has no name.
Returns The name of the object, or <see langword="null" /> if the object is unnamed.
value
The object to retrieve the name for.
object
GetSerializer​(Type objectType,
Type serializerType)
Gets a serializer of the requested type for the specified object type.
Returns An instance of the requested serializer, or <see langword="null" /> if no appropriate serializer can be located.
objectType
The type of the object to get the serializer for.
serializerType
The type of the serializer to retrieve.
Returns An instance of the type, or <see langword="null" /> if the type cannot be loaded.
typeName
The fully qualified name of the type to load.
void
RemoveSerializationProvider​(IDesignerSerializationProvider provider)
Removes a custom serialization provider from the serialization manager.
provider
The provider to remove. This object must have been added using <see cref="M:System.ComponentModel.Design.Serialization.IDesignerSerializationManager.AddSerializationProvider(System.ComponentModel.Design.Serialization.IDesignerSerializationProvider)" /> .
void
ReportError​(object errorInformation)
Reports an error in serialization.
errorInformation
The error to report. This information object can be of any object type. If it is an exception, the message of the exception is extracted and reported to the user. If it is any other type, <see cref="M:System.Object.ToString" /> is called to display the information to the user.
void
SetName​(object instance,
string name)
Sets the name of the specified existing object.
instance
The object instance to name.
name
The name to give the instance.