예제 #1
0
        /// <summary>
        /// Modified to support multiple calendars on iOS, each url is a single calendar, so each
        /// url has a principal the very same requested url.
        /// </summary>
        /// <returns></returns>
        protected virtual string GetCurrentUserUrl()
        {
            var segmentRequest = Request.Url.Segments.Where(s => s != "/" && s != "\\").Last();
            //var userUrl = "/" + USER_ROUTE.Replace("{id}", Thread.CurrentPrincipal.Identity.Name);

            var userUrl = "/" + USER_ROUTE.Replace("{id}", segmentRequest);

            return(userUrl);
            //return Request.Path;
        }
예제 #2
0
 protected virtual string GetUserUrl(string id = null)
 {
     if (string.IsNullOrEmpty(id))
     {
         return(GetCalendarUrl(null));
     }
     //id = User.Identity.Name;
     if (string.IsNullOrEmpty(id))
     {
         id = "ANONYMOUS";
     }
     return("/" + USER_ROUTE.Replace("{id}", Uri.EscapeDataString(id)).Replace("{*path}", string.Empty));
 }