RootDesignerSerializerAttribute Класс

Определение

Внимание

RootDesignerSerializerAttribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)) instead.

Внимание

This attribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)). https://go.microsoft.com/fwlink/?linkid=14202

Внимание

This attribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)). http://go.microsoft.com/fwlink/?linkid=14202

Внимание

This attribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)). https://go.microsoft.com/fwlink/?linkid=14202

Указывает базовый сериализатор, используемый для корневого объекта конструктора. Этот класс не наследуется.

public ref class RootDesignerSerializerAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)]
[System.Obsolete("RootDesignerSerializerAttribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)) instead.")]
public sealed class RootDesignerSerializerAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)]
[System.Obsolete("This attribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)). https://go.microsoft.com/fwlink/?linkid=14202")]
public sealed class RootDesignerSerializerAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)]
[System.Obsolete("This attribute has been deprecated. Use DesignerSerializerAttribute instead.  For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)).  http://go.microsoft.com/fwlink/?linkid=14202")]
public sealed class RootDesignerSerializerAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)]
[System.Obsolete("This attribute has been deprecated. Use DesignerSerializerAttribute instead.  For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)).  https://go.microsoft.com/fwlink/?linkid=14202")]
public sealed class RootDesignerSerializerAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)]
public sealed class RootDesignerSerializerAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)>]
[<System.Obsolete("RootDesignerSerializerAttribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)) instead.")>]
type RootDesignerSerializerAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)>]
[<System.Obsolete("This attribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)). https://go.microsoft.com/fwlink/?linkid=14202")>]
type RootDesignerSerializerAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)>]
[<System.Obsolete("This attribute has been deprecated. Use DesignerSerializerAttribute instead.  For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)).  http://go.microsoft.com/fwlink/?linkid=14202")>]
type RootDesignerSerializerAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)>]
[<System.Obsolete("This attribute has been deprecated. Use DesignerSerializerAttribute instead.  For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)).  https://go.microsoft.com/fwlink/?linkid=14202")>]
type RootDesignerSerializerAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)>]
type RootDesignerSerializerAttribute = class
    inherit Attribute
Public NotInheritable Class RootDesignerSerializerAttribute
Inherits Attribute
Наследование
RootDesignerSerializerAttribute
Атрибуты

Примеры

В следующем примере кода применяется RootDesignerSerializerAttribute к компоненту.

   [DesignerSerializer(CodeDomSerializerSample::MyCodeDomSerializer::typeid,
      CodeDomSerializer::typeid)]
   public ref class MyComponent: public Component
   {
   private:
      String^ localProperty;

   public:
      MyComponent()
      {
         localProperty = "Component Property Value";
      }

      property String^ LocalProperty 
      {
         String^ get()
         {
            return localProperty;
         }
         void set( String^ value )
         {
            localProperty = value;
         }
      }
   };
}
[DesignerSerializer(typeof(MyCodeDomSerializer), typeof(CodeDomSerializer))]
public class MyComponent : Component {
    private string localProperty = "Component Property Value";
    public string LocalProperty {
        get {
            return localProperty;
        }
        set {
            localProperty = value;
        }
    }
}
<DesignerSerializer(GetType(MyCodeDomSerializer), GetType(CodeDomSerializer))> _
Public Class MyComponent
   Inherits Component
   Private localProperty As String = "Component Property Value"

   Public Property LocalProp() As String
      Get
         Return localProperty
      End Get
      Set(ByVal Value As String)
         localProperty = Value
      End Set
   End Property
End Class

Комментарии

RootDesignerSerializerAttribute указывает сериализатор, используемый при сериализации диспетчера сериализации документа конструктора, и поддерживает ли указанный сериализатор автоматическую перезагрузку документа конструктора без первого полного удаления документа.

Этот атрибут содержит следующие важные элементы:

  • SerializerTypeName указывает, какой объект сериализации используется для сериализации класса во время разработки.

  • SerializerBaseTypeName указывает полное имя базового типа объекта сериализации.

  • Reloadable Указывает, поддерживает ли сериализатор перезагрузить документ конструктора без взаимодействия с пользователем, чтобы открыть новое представление конструктора.

Конструкторы

Имя Описание
RootDesignerSerializerAttribute(String, String, Boolean)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Инициализирует новый экземпляр RootDesignerSerializerAttribute класса с помощью указанных атрибутов.

RootDesignerSerializerAttribute(String, Type, Boolean)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Инициализирует новый экземпляр RootDesignerSerializerAttribute класса с помощью указанных атрибутов.

RootDesignerSerializerAttribute(Type, Type, Boolean)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Инициализирует новый экземпляр RootDesignerSerializerAttribute класса с помощью указанных атрибутов.

Свойства

Имя Описание
Reloadable
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает значение, указывающее, поддерживает ли корневой сериализатор перезагрузку документа конструктора без первого удаления узла конструктора.

SerializerBaseTypeName
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает полное имя типа базового типа сериализатора.

SerializerTypeName
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает полное имя типа сериализатора.

TypeId
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает уникальный идентификатор для этого типа атрибута.

Методы

Имя Описание
Equals(Object)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает значение, указывающее, равен ли этот экземпляр указанному объекту.

(Унаследовано от Attribute)
GetHashCode()
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает хэш-код для этого экземпляра.

(Унаследовано от Attribute)
GetType()
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает Type текущего экземпляра.

(Унаследовано от Object)
IsDefaultAttribute()
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

При переопределении в производном классе указывает, является ли значение этого экземпляра значением по умолчанию для производного класса.

(Унаследовано от Attribute)
Match(Object)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

При переопределении в производном классе возвращает значение, указывающее, равен ли этот экземпляр указанному объекту.

(Унаследовано от Attribute)
MemberwiseClone()
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Создает неглубокую копию текущей Object.

(Унаследовано от Object)
ToString()
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает строку, представляющую текущий объект.

(Унаследовано от Object)

Явные реализации интерфейса

Имя Описание
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Сопоставляет набор имен соответствующему набору идентификаторов диспетчеризации.

(Унаследовано от Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Извлекает сведения о типе объекта, который можно использовать для получения сведений о типе для интерфейса.

(Унаследовано от Attribute)
_Attribute.GetTypeInfoCount(UInt32)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Возвращает количество предоставляемых объектом интерфейсов для доступа к сведениям о типе (0 или 1).

(Унаследовано от Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
Устаревшие..
Устаревшие..
Устаревшие..
Устаревшие..

Предоставляет доступ к свойствам и методам, предоставляемым объектом.

(Унаследовано от Attribute)

Применяется к

См. также раздел