次の方法で共有


RootDesignerSerializerAttribute クラス

メモ : このクラスは、互換性のために残されています。 旧式でない代替が必要な場合は、DesignerSerializerAttribute を使用してください。

ルート デザイナ オブジェクトのために使用する基本シリアライザを示します。このクラスは継承できません。

名前空間: System.ComponentModel.Design.Serialization
アセンブリ: System (system.dll 内)

構文

'宣言
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Interface, AllowMultiple:=True, Inherited:=True)> _
<ObsoleteAttribute("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 NotInheritable Class RootDesignerSerializerAttribute
    Inherits Attribute
'使用
Dim instance As RootDesignerSerializerAttribute
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple=true, Inherited=true)] 
[ObsoleteAttribute("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
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Interface, AllowMultiple=true, Inherited=true)] 
[ObsoleteAttribute(L"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 : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple=true, Inherited=true) */ 
/** @attribute ObsoleteAttribute("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 final class RootDesignerSerializerAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple=true, Inherited=true) 
ObsoleteAttribute("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 final class RootDesignerSerializerAttribute extends Attribute

解説

RootDesignerSerializerAttribute は、シリアル化マネージャがデザイン ドキュメントをシリアル化するときに使用するシリアライザを示します。また、指定したシリアライザが、ドキュメントを完全に削除せずに実行するデザイン ドキュメントの自動再読み込みをサポートするかどうかを示します。

この属性には、次の重要なメンバがあります。

  • SerializerTypeName は、デザイン時にクラスをシリアル化するために使用するシリアル化オブジェクトを示します。

  • SerializerBaseTypeName は、シリアル化オブジェクトの基本型の完全修飾名を示します。

  • Reloadable は、シリアライザがデザイン ドキュメントの再読み込みを新しいデザイナ ビューを開くためのユーザーとの対話を必要とせずにサポートするかどうかを示します。

使用例

RootDesignerSerializerAttribute をコンポーネントに適用するコード例を次に示します。

<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 'MyComponent
[DesignerSerializer(typeof(MyCodeDomSerializer), typeof(CodeDomSerializer))]
public class MyComponent : Component {
    private string localProperty = "Component Property Value";
    public string LocalProperty {
        get {
            return localProperty;
        }
        set {
            localProperty = value;
        }
    }
}
/** @attribute DesignerSerializer(MyCodeDomSerializer.class,
  CodeDomSerializer.class)
 */

public class MyComponent extends Component
{
    private String localProperty = "Component Property Value";
      
    /** @property 
     */
    public String get_LocalProperty()
    {
        return localProperty;
    } //get_LocalProperty

    /** @property 
     */
    public void set_LocalProperty (String value )
    {
        localProperty = value;
    } //set_LocalProperty
} //MyComponent

継承階層

System.Object
   System.Attribute
    System.ComponentModel.Design.Serialization.RootDesignerSerializerAttribute

スレッド セーフ

この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 1.0、1.1
2.0 では、互換性のために残されています (コンパイル時に警告)

参照

関連項目

RootDesignerSerializerAttribute メンバ
System.ComponentModel.Design.Serialization 名前空間
DesignerSerializerAttribute クラス