Welcome to mirror list, hosted at ThFree Co, Russian Federation.

RemovedInterfaceOnTypeInAssemblyAttribute.cs « Assertions « Mono.Linker.Tests.Cases.Expectations « test - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9a7d0a875f5c6be3fe309cebacc72a7cc9b3d8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;

namespace Mono.Linker.Tests.Cases.Expectations.Assertions
{
	[AttributeUsage (AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
	public class RemovedInterfaceOnTypeInAssemblyAttribute : BaseInAssemblyAttribute
	{
		public RemovedInterfaceOnTypeInAssemblyAttribute (string assemblyFileName, Type type, string interfaceAssemblyFileName, Type interfaceType)
		{
			if (type == null)
				throw new ArgumentNullException (nameof (type));
			if (string.IsNullOrEmpty (assemblyFileName))
				throw new ArgumentException ("Value cannot be null or empty.", nameof (assemblyFileName));

			if (string.IsNullOrEmpty (interfaceAssemblyFileName))
				throw new ArgumentException ("Value cannot be null or empty.", nameof (interfaceAssemblyFileName));
			if (interfaceType == null)
				throw new ArgumentException ("Value cannot be null or empty.", nameof (interfaceType));
		}

		public RemovedInterfaceOnTypeInAssemblyAttribute (string assemblyFileName, string typeName, string interfaceAssemblyFileName, string interfaceTypeName)
		{
			if (string.IsNullOrEmpty (assemblyFileName))
				throw new ArgumentException ("Value cannot be null or empty.", nameof (assemblyFileName));
			if (string.IsNullOrEmpty (typeName))
				throw new ArgumentException ("Value cannot be null or empty.", nameof (typeName));

			if (string.IsNullOrEmpty (interfaceAssemblyFileName))
				throw new ArgumentException ("Value cannot be null or empty.", nameof (interfaceAssemblyFileName));
			if (string.IsNullOrEmpty (interfaceTypeName))
				throw new ArgumentException ("Value cannot be null or empty.", nameof (interfaceTypeName));
		}
	}
}