view Source/Mapping/NullableAttribute.cs @ 9:1e85f66cf767 default tip

update bltoolkit
author nickolay
date Thu, 05 Apr 2018 20:53:26 +0300
parents f990fcb411a9
children
line wrap: on
line source

using System;

namespace BLToolkit.Mapping
{
	[AttributeUsage(
		AttributeTargets.Property | AttributeTargets.Field |
		AttributeTargets.Class | AttributeTargets.Interface)]
	public class NullableAttribute : Attribute
	{
		public NullableAttribute()
		{
			IsNullable = true;
		}

		public NullableAttribute(bool isNullable)
		{
			IsNullable = isNullable;
		}

		public NullableAttribute(Type type)
		{
			Type       = type;
			IsNullable = true;
		}

		public NullableAttribute(Type type, bool isNullable)
		{
			Type       = type;
			IsNullable = isNullable;
		}

		public bool IsNullable { get; set; }
		public Type Type       { get; private set; }
	}
}