public ApiParameterAttribute(string name, string type, string desc, ApiParameterLocation location, bool required, ApiParameterNeed needType)
 {
     this.Name     = name;
     this.Type     = type;
     this.Desc     = desc;
     this.Location = location;
     this.Required = required;
     this.NeedType = needType;
 }
        private ParameterLocation GetLocation(ApiParameterLocation apiParameterLocation)
        {
            ParameterLocation location = ParameterLocation.Query;

            switch (apiParameterLocation)
            {
            case ApiParameterLocation.Cookie: location = ParameterLocation.Cookie; break;

            case ApiParameterLocation.Path: location = ParameterLocation.Path; break;

            case ApiParameterLocation.Header: location = ParameterLocation.Header; break;

            case ApiParameterLocation.Query: location = ParameterLocation.Query; break;

            default: break;
            }

            return(location);
        }
Esempio n. 3
0
 public ApiParameter(string name, Type type, ApiParameterLocation location)
 {
     Name     = name;
     Type     = type;
     Location = location;
 }