ParameterApiDescriptionModel.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. namespace Abp.Web.Api.Modeling
  3. {
  4. [Serializable]
  5. public class ParameterApiDescriptionModel
  6. {
  7. public string NameOnMethod { get; }
  8. public string Name { get; }
  9. public Type Type { get; }
  10. public string TypeAsString { get; }
  11. public bool IsOptional { get; }
  12. public object DefaultValue { get; }
  13. public string[] ConstraintTypes { get; }
  14. public string BindingSourceId { get; }
  15. private ParameterApiDescriptionModel()
  16. {
  17. }
  18. public ParameterApiDescriptionModel(string name, string nameOnMethod, Type type, bool isOptional = false, object defaultValue = null, string[] constraintTypes = null, string bindingSourceId = null)
  19. {
  20. Name = name;
  21. NameOnMethod = nameOnMethod;
  22. Type = type;
  23. TypeAsString = type.FullName;
  24. IsOptional = isOptional;
  25. DefaultValue = defaultValue;
  26. ConstraintTypes = constraintTypes;
  27. BindingSourceId = bindingSourceId;
  28. }
  29. }
  30. }