Esempio n. 1
0
        private async Task App_OnPostAuthenticateRequestAsync(object source, EventArgs eventArgs)
        {
            HttpContext httpContext = HttpContext.Current;

            if ((httpContext.User == null) || !httpContext.User.Identity.IsAuthenticated)
            {
                return;
            }

            using (DavContext context = new DavContext(httpContext))
            {
                // Create addressboks for the user during first log-in.
                await CreateAddressbookFoldersAsync(context);

                // Closes transaction. Calls DavContextBaseAsync.BeforeResponseAsync only first time this method is invoked.
                // This method must be called manually if DavContextBaseAsync is used outside of DavEngine.
                await context.EnsureBeforeResponseWasCalledAsync();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of this class.
 /// </summary>
 /// <param name="context">Instance of <see cref="DavContext"/></param>
 public DavLocationFolder(DavContext context)
     : base(context, DavLocationFolderPath)
 {
 }
 public DavHierarchyItem(DavContext context) : base(context)
 {
 }
 public Discovery(DavContext context)
 {
     this.Context = context;
 }