Ejemplo n.º 1
0
 /// <summary>
 /// A wire template that applies to a request, if the request has the specified path and additional template parts.
 /// </summary>
 public Match(string path, IMapInput template, Func <IDictionary <string, string>, string> responseBody) : this(
         path,
         template,
         new FkWire(responseBody)
         )
 {
 }
Ejemplo n.º 2
0
 /// <summary>
 /// A wire template that applies to a request, if the request has the specified path and additional template parts.
 /// </summary>
 public Match(string path, IMapInput template, Action <IDictionary <string, string> > requestAction) : this(
         path,
         template,
         new FkWire(requestAction)
         )
 {
 }
Ejemplo n.º 3
0
 /// <summary>
 /// A wire template that applies to a request, if the request has the specified path and additional template parts.
 /// </summary>
 public Match(string path, IMapInput template, IWire wire) : this(
         new Parts.Joined(
             new Parts.Uri.Path(path),
             template
             ),
         wire
         )
 {
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Only adds a part if a given condition applies.
 /// </summary>
 public Conditional(Func <bool> condition, IMapInput consequence) : base(dict =>
                                                                         condition() ? consequence.Apply(dict) : dict
                                                                         )
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// A wire template that applies to a request, if the request has the specified parts.
 /// </summary>
 public Match(IMapInput template, IWire wire) : this(new MapOf(template), wire)
 {
 }