示例#1
0
 public RavenActionAttribute(string path, string method, AuthorizationStatus requireAuth, bool isDebugInformationEndpoint = false,
                             bool isPosixSpecificEndpoint = false, CorsMode corsMode = CorsMode.None)
 {
     Path   = path;
     Method = method;
     IsDebugInformationEndpoint = isDebugInformationEndpoint;
     RequiredAuthorization      = requireAuth;
     IsPosixSpecificEndpoint    = isPosixSpecificEndpoint;
     CorsMode = corsMode;
 }
示例#2
0
 public RouteInformation(string method, string path, AuthorizationStatus authorizationStatus, bool skipUsagesCount, bool skipLastRequestTimeUpdate, CorsMode corsMode,
                         bool isDebugInformationEndpoint    = false,
                         bool disableOnCpuCreditsExhaustion = false)
 {
     DisableOnCpuCreditsExhaustion = disableOnCpuCreditsExhaustion;
     AuthorizationStatus           = authorizationStatus;
     IsDebugInformationEndpoint    = isDebugInformationEndpoint;
     Method                    = method;
     Path                      = path;
     SkipUsagesCount           = skipUsagesCount;
     SkipLastRequestTimeUpdate = skipLastRequestTimeUpdate;
     CorsMode                  = corsMode;
 }
示例#3
0
        public RavenActionAttribute(
            string path,
            string method,
            AuthorizationStatus requireAuth,
            bool isDebugInformationEndpoint = false,
            bool isPosixSpecificEndpoint    = false,
            CorsMode corsMode = CorsMode.None)
        {
            if (requireAuth == AuthorizationStatus.ValidUser)
            {
                throw new InvalidOperationException($"Please use the other constructor with endpoint type parameter. Route: '{method} {path}'");
            }

            Path   = path;
            Method = method;
            IsDebugInformationEndpoint = isDebugInformationEndpoint;
            RequiredAuthorization      = requireAuth;
            IsPosixSpecificEndpoint    = isPosixSpecificEndpoint;
            CorsMode = corsMode;
        }