<commit_before>﻿using Implem.Libraries.Utilities;
using System.Web;
using System.Web.Routing;
namespace Implem.Pleasanter.Libraries.Requests
{
    public static class Routes
    {
        public static string Controller()
        {
            return RouteTable.Routes.Count != 0
                ? Url.RouteData("controller").ToString().ToLower()
                : StackTraces.Class();
        }

        public static string Action()
        {
            return RouteTable.Routes.Count != 0
                ? Url.RouteData("action").ToString().ToLower()
                : StackTraces.Method();
        }

        public static string Method()
        {
            return HttpContext.Current.Request.HttpMethod.ToLower();
        }<commit_msg>Bug fixed: アプリケーション起動処理中にnull参照エラーが発生する問題を解消。<commit_after>﻿using Implem.Libraries.Utilities;
using System.Web;
using System.Web.Routing;
namespace Implem.Pleasanter.Libraries.Requests
{
    public static class Routes
    {
        public static string Controller()
        {
            return RouteTable.Routes.Count != 0 && HttpContext.Current != null
                ? Url.RouteData("controller").ToString().ToLower()
                : StackTraces.Class();
        }

        public static string Action()
        {
            return RouteTable.Routes.Count != 0 && HttpContext.Current != null
                ? Url.RouteData("action").ToString().ToLower()
                : StackTraces.Method();
        }

        public static string Method()
        {
            return HttpContext.Current.Request.HttpMethod.ToLower();
        }
{'fraction_non_alphanumeric': 0.10606060606060606, 'fraction_numerical': 0.0025252525252525255, 'mean_word_length': 2.0305927342256216, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4429980', 'n_tokens_mistral': 444, 'n_tokens_neox': 435, 'n_words': 78}