Mercurial > pub > bltoolkit
view Source/TypeBuilder/GlobalInstanceTypeAttribute.cs @ 5:f7d63a092920
Исправлено условие Where в тех случаях, когда репозитарий не является генериком
author | cin |
---|---|
date | Tue, 10 Mar 2015 16:02:11 +0300 |
parents | f990fcb411a9 |
children |
line wrap: on
line source
using System; using System.Diagnostics.CodeAnalysis; namespace BLToolkit.TypeBuilder { [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true)] public class GlobalInstanceTypeAttribute : InstanceTypeAttribute { public GlobalInstanceTypeAttribute(Type propertyType, Type instanceType) : base(instanceType) { _propertyType = propertyType; } public GlobalInstanceTypeAttribute(Type propertyType, Type instanceType, object parameter1) : base(instanceType, parameter1) { _propertyType = propertyType; } public GlobalInstanceTypeAttribute(Type propertyType, Type instanceType, object parameter1, object parameter2) : base(instanceType, parameter1, parameter2) { _propertyType = propertyType; } public GlobalInstanceTypeAttribute(Type propertyType, Type instanceType, object parameter1, object parameter2, object parameter3) : base(instanceType, parameter1, parameter2, parameter3) { _propertyType = propertyType; } public GlobalInstanceTypeAttribute(Type propertyType, Type instanceType, object parameter1, object parameter2, object parameter3, object parameter4) : base(instanceType, parameter1, parameter2, parameter3, parameter4) { _propertyType = propertyType; } public GlobalInstanceTypeAttribute(Type propertyType, Type instanceType, object parameter1, object parameter2, object parameter3, object parameter4, object parameter5) : base(instanceType, parameter1, parameter2, parameter3, parameter4, parameter5) { _propertyType = propertyType; } private readonly Type _propertyType; public Type PropertyType { get { return _propertyType; } } private Builders.IAbstractTypeBuilder _typeBuilder; public override Builders.IAbstractTypeBuilder TypeBuilder { get { if (_typeBuilder == null) _typeBuilder = new Builders.InstanceTypeBuilder(_propertyType, InstanceType, IsObjectHolder); return _typeBuilder; } } } }