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
1.0 KiB
31 lines
1.0 KiB
#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> |
|
/// Types marked with this attribute specify that a separate type contains the contracts for this type. |
|
/// </summary> |
|
[Conditional("CONTRACTS_FULL")] |
|
[Conditional("DEBUG")] |
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] |
|
public sealed class ContractClassAttribute : Attribute |
|
{ |
|
private readonly Type _typeWithContracts; |
|
|
|
public ContractClassAttribute(Type typeContainingContracts) |
|
{ |
|
_typeWithContracts = typeContainingContracts; |
|
} |
|
|
|
public Type TypeContainingContracts |
|
{ |
|
get { return _typeWithContracts; } |
|
} |
|
} |
|
} |
|
|
|
#endif |