Ejemplo n.º 1
0
    private static void setColor(Color color, SCOPE scope = SCOPE.BCKG)
    {
        switch (scope)
        {
        case SCOPE.GLOBAL: GUI.color = color;
            break;

        case SCOPE.CONTENT: GUI.contentColor = color;
            break;

        case SCOPE.BCKG: GUI.backgroundColor = color;
            break;

        default:
            Debug.Log("No Scope for GUI color found for " + scope.ToString());
            break;
        }
    }
Ejemplo n.º 2
0
        public virtual string GetAuthorizationCode(HttpContext context, SCOPE scope = SCOPE.snsapi_userinfo)
        {
            if (!context.Request.Query.Keys.Contains("code"))
            {
                var redirectUrl = context.Request.ToAbsoluteUri();
                var url         = string.Format(CONSTANT.AUTHORIZATIONURL,
                                                _options.Value.AppID,
                                                redirectUrl,
                                                scope.ToString());

                _logger.LogInformation("redirect url is :'{0}'", url);

                context.Response.Redirect(url);
            }
            var code = context.Request.Query["code"].ToString();

            _logger.LogInformation("code for authorization :'{0}'", code);
            return(code);
        }