Composite.Data.DynamicTypes.DataTypeDescriptorFormsHelper.GetFieldBindingType C# (CSharp) Méthode

GetFieldBindingType() private méthode

private GetFieldBindingType ( Composite.Data.DynamicTypes.DataFieldDescriptor fieldDescriptor ) : Type
fieldDescriptor Composite.Data.DynamicTypes.DataFieldDescriptor
Résultat System.Type
        private Type GetFieldBindingType(DataFieldDescriptor fieldDescriptor)
        {
            var bindingType = fieldDescriptor.InstanceType;

            // Nullable<T> handling. Allowed types: Nullable<Guid>, Nullable<int>, Nullable<decimal>
            if (bindingType != typeof(Guid?)
                && bindingType != typeof(int?)
                && bindingType != typeof(decimal?)
                && bindingType.IsGenericType && bindingType.GetGenericTypeDefinition() == typeof(Nullable<>))
            {
                return bindingType.GetGenericArguments()[0];
            }

            return bindingType;
        }