pascalabcnet/VisualPascalABCNETLinux/SSYY/SampleDesignerNameAttribute.cs
Mikhalkovich Stanislav 3072383106 Для Linux-версии исправлен DockContent, редактор (показ всплывающего окна)
Сделан новый проект VisualPABCLinux
И пришлось склонировать PluginsSupport, поскольку он вносит зависимость по редактору
Компоненты WeifenLuo для Linux надо после перекомпиляции скопировать в Libraries - подшить их к основному проекту просто не получилось
2022-06-30 09:47:11 +03:00

50 lines
1.8 KiB
C#

//------------------------------------------------------------------------------
/// <copyright from='1997' to='2002' company='Microsoft Corporation'>
/// Copyright (c) Microsoft Corporation. All Rights Reserved.
///
/// This source code is intended only as a supplement to Microsoft
/// Development Tools and/or on-line documentation. See these other
/// materials for detailed information regarding Microsoft code samples.
///
/// </copyright>
//------------------------------------------------------------------------------
namespace SampleDesignerHost
{
using System;
/// This attribute is used to mark "Name" properties that have been provided
/// by our IExtenderProvider in order to differentiate them from other Name properties
/// which we are not interested in. It's just a bool set to true if it's what we want.
/// The attribute target is a Method, since the IExtenderProvider uses methods to specify
/// the get/set for our "Name" property.
[AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
internal sealed class SampleDesignerNameAttribute : Attribute {
private bool designerName;
public static SampleDesignerNameAttribute Default = new SampleDesignerNameAttribute(false);
public SampleDesignerNameAttribute() : this(false){
}
public SampleDesignerNameAttribute(bool designerName) {
this.designerName = designerName;
}
public override bool Equals(object obj) {
SampleDesignerNameAttribute da = obj as SampleDesignerNameAttribute;
if (da == null) {
return false;
}
return da.designerName == this.designerName;
}
public override int GetHashCode() {
return base.GetHashCode();
}
}
}