You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
930 B
31 lines
930 B
#if NET20 || NET30 || NET35 || !NET_4_6 |
|
|
|
// Licensed to the .NET Foundation under one or more agreements. |
|
// The .NET Foundation licenses this file to you under the MIT license. |
|
// See the LICENSE file in the project root for more information. |
|
|
|
namespace System.Diagnostics.Contracts |
|
{ |
|
/// <summary> |
|
/// Allows a field f to be used in the method contracts for a method m when f has less visibility than m. |
|
/// For instance, if the method is public, but the field is private. |
|
/// </summary> |
|
[Conditional("CONTRACTS_FULL")] |
|
[AttributeUsage(AttributeTargets.Field)] |
|
public sealed class ContractPublicPropertyNameAttribute : Attribute |
|
{ |
|
private readonly string _publicName; |
|
|
|
public ContractPublicPropertyNameAttribute(string name) |
|
{ |
|
_publicName = name; |
|
} |
|
|
|
public string Name |
|
{ |
|
get { return _publicName; } |
|
} |
|
} |
|
} |
|
|
|
#endif |