Example #1
0
        private CommandParameterProperty(PropertyInfo member)
        {
            Info = member;

            //Names = CommandHelper.GetParameterNames(member).ToList();
            Type         = member.PropertyType;
            IsCollection = typeof(IList <string>).IsAssignableFrom(member.PropertyType);
            Id           = CommandHelper.GetCommandParameterId(member);
            Description  = member.GetCustomAttribute <DescriptionAttribute>()?.Description;
            Position     = member.GetCustomAttribute <PositionAttribute>()?.Value;
            DefaultValue = Reflection.Utilities.FindCustomAttributes <DefaultValueAttribute>(member)?.SingleOrDefault()?.Value;
            Required     = member.IsDefined(typeof(RequiredAttribute)) || Position.HasValue;
        }
Example #2
0
 private CommandParameter(PropertyInfo property)
 {
     Property = property;
     Id       = CommandHelper.GetCommandParameterId(property);
 }