//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
namespace Experimental.System.Messaging
{
///
///
/// DescriptionAttribute marks a property, event, or extender with a
/// description. Visual designers can display this description when referencing
/// the member.
///
[AttributeUsage(AttributeTargets.All)]
[SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")]
public class MessagingDescriptionAttribute : DescriptionAttribute
{
private bool replaced = false;
///
///
/// Constructs a new sys description.
///
public MessagingDescriptionAttribute(string description)
: base(description)
{
}
///
///
/// Retrieves the description text.
///
public override string Description
{
get
{
if (!replaced)
{
replaced = true;
DescriptionValue = Res.GetString(base.Description);
}
return base.Description;
}
}
}
}