コード例 #1
0
 /// <summary>
 /// Get the signature of the endpoint, for equality/grouping purposes
 /// </summary>
 /// <param name="caller"></param>
 /// <returns></returns>
 public string GetSignature(HttpController caller)
 {
     return($"{ToString(caller)}(${string.Join(", ", GetParameters().Select(x => x.ToString()))}");
 }
コード例 #2
0
        /// <summary>
        /// Returns a string that represents the current object under the context of the caller
        /// </summary>
        /// <param name="caller"></param>
        /// <returns></returns>
        public string ToString(HttpController caller)
        {
            string namespaceVersion = $@"{(caller.NamespaceVersion != null ? $"{caller.NamespaceVersion}." : "")}{(caller.NamespaceSuffix != null ? $"{caller.NamespaceSuffix}." : string.Empty)}";

            return($"{namespaceVersion}{caller.Name}.{Name}");
        }
コード例 #3
0
 /// <summary>
 /// Full route template for the endpoint
 /// </summary>
 public string GetFullRoute(HttpController caller)
 {
     return(caller.Route.Merge(Route).Value);
 }
コード例 #4
0
 /// <summary>
 /// Get all route constraints associated with the endpoint, with the caller being accounted for
 /// </summary>
 /// <param name="caller"></param>
 /// <returns></returns>
 public IEnumerable <RouteConstraint> GetRouteConstraints(HttpController caller)
 {
     return(caller.Route.Merge(Route).Constraints);
 }
コード例 #5
0
 /// <summary>
 /// Creates an endpoint assosicated with the controller
 /// </summary>
 /// <param name="parent"></param>
 public HttpEndpoint(HttpController parent)
 {
     Parent = parent;
 }