Επεξεργασία

Κοινή χρήση μέσω


CodeDomSerializerBase.GetUniqueName Method

Definition

Returns a unique name for the given object.

protected:
 System::String ^ GetUniqueName(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::Object ^ value);
protected string GetUniqueName (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
member this.GetUniqueName : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj -> string
Protected Function GetUniqueName (manager As IDesignerSerializationManager, value As Object) As String

Parameters

manager
IDesignerSerializationManager

The IDesignerSerializationManager to use for serialization.

value
Object

The object for which the name will be retrieved.

Returns

A unique name for value.

Exceptions

manager or value is null.

Remarks

The GetUniqueName method calls the GetName method. If this method does not return a name, then GetUniqueName uses INameCreationService to fabricate a valid name for the object. If the service is not available, GetUniqueName will fabricate a name based on the short type name combined with an index number to make it unique. The resulting name is associated with the serialization manager by calling the SetName method before the new name is returned.

Applies to

See also