1- using System ;
1+ using Microsoft . AspNetCore . Routing . Template ;
2+ using System ;
23using System . Collections . Generic ;
4+ using System . Linq ;
35using System . Net . Http ;
46
57namespace NetCoreStack . Proxy
@@ -14,15 +16,33 @@ public int ArgsLength
1416 }
1517 }
1618
17- public UriBuilder UriBuilder => UriDefinition ? . UriBuilder ;
19+ public bool HasAnyTemplateParameterKey
20+ {
21+ get
22+ {
23+ return TemplateParameterKeys . Any ( ) ;
24+ }
25+ }
26+
27+ public UriBuilder UriBuilder => UriDefinition . UriBuilder ;
1828 public Uri Uri => UriBuilder . Uri ;
19- public string MethodMarkerTemplate { get ; set ; }
29+ public string MethodMarkerTemplate => MethodDescriptor . MethodMarkerTemplate ;
30+ public List < TemplatePart > ParameterParts => MethodDescriptor . ParameterParts ;
31+ public List < string > TemplateParameterKeys => MethodDescriptor . TemplateParameterKeys ;
32+ public List < ProxyModelMetadata > Parameters => MethodDescriptor . Parameters ;
2033 public bool IsMultiPartFormData { get ; set ; }
34+ public ContentModelBindingResult ContentResult { get ; set ; }
2135 public object [ ] Args { get ; set ; }
2236 public IModelContentResolver ModelContentResolver { get ; set ; }
23- public List < ProxyModelMetadata > Parameters { get ; set ; }
24- public ContentModelBindingResult ContentResult { get ; set ; }
25- public ProxyUriDefinition UriDefinition { get ; set ; }
26- public HttpMethod HttpMethod { get ; set ; }
37+ public HttpMethod HttpMethod { get ; }
38+ public ProxyUriDefinition UriDefinition { get ; }
39+ public ProxyMethodDescriptor MethodDescriptor { get ; }
40+
41+ public ContentModelBindingContext ( HttpMethod httpMethod , ProxyMethodDescriptor methodDescriptor , ProxyUriDefinition proxyUriDefinition )
42+ {
43+ HttpMethod = httpMethod ?? throw new ArgumentNullException ( nameof ( httpMethod ) ) ;
44+ MethodDescriptor = methodDescriptor ?? throw new ArgumentNullException ( nameof ( methodDescriptor ) ) ;
45+ UriDefinition = proxyUriDefinition ?? throw new ArgumentNullException ( nameof ( proxyUriDefinition ) ) ;
46+ }
2747 }
2848}
0 commit comments