private void ShowIdentity(MobileConnectStatus status)
        {
            loggedPanel.Visibility   = Visibility.Collapsed;
            identityPanel.Visibility = Visibility.Visible;

            var json = new Newtonsoft.Json.Linq.JRaw(status.IdentityResponse.ResponseJson);

            identity.Text = json.ToString(Newtonsoft.Json.Formatting.Indented);
        }
        public void Render()
        {
            var ast = MarkdigExt.Renderer.Parse(Raw);

            Text = MarkdigExt.Renderer.ToPlainText(ast);
            Raw  = MarkdigExt.Renderer.ToNormalizedMarkdown(ast);
            Html = MarkdigExt.Renderer.ToHtml(ast);
            Ast  = new Newtonsoft.Json.Linq.JRaw(MarkdigExt.Renderer.ToJson(ast));
        }
Ejemplo n.º 3
0
        public ActionResult Index()
        {
            Assembly     assembly = Assembly.GetExecutingAssembly();
            AssemblyName an       = assembly.GetName();

            ViewBag.ConnTimeout  = dm.ConnTimeout;
            ViewBag.ItemsPerPage = itemsPerPage;

            ViewData["minRequiredPasswordLength"] = Membership.MinRequiredPasswordLength;
            ViewData["minRequiredUsernameLength"] = (Membership.Provider as asv.Security.AccessMembershipProvider).MinRequiredUsernameLength;
            ViewData["version"] = an.Version;

            IDictionary <string, object> obj = new Dictionary <string, object>();

            obj["singleton"] = true;
            obj["isInRole"]  = new Newtonsoft.Json.Linq.JRaw("function(role) { return this.roles && this.roles.indexOf(role) != -1; }");

            if (Request.IsAuthenticated)
            {
                obj["id"]    = User.Id;
                obj["roles"] = User.GetRoles();

                if (!string.IsNullOrEmpty(User.Schema))
                {
                    obj["schema"] = User.Schema;
                }
            }

            ViewBag.Auser = new MvcHtmlString(JsonConvert.SerializeObject(
                                                  obj,
                                                  new JsonSerializerSettings
            {
                ContractResolver     = new asv.Helpers.LowercaseContractResolver(),
                DefaultValueHandling = DefaultValueHandling.Ignore,
                NullValueHandling    = NullValueHandling.Ignore
            }
                                                  )
                                              );

            return(View());
        }
Ejemplo n.º 4
0
 public BatchParseHelper()
 {
     code = 0;
     json = null;
 }
Ejemplo n.º 5
0
 public BatchParseHelper()
 {
     Code = 0;
     Json = null;
 }