Пример #1
0
        public XElement Build(bool allprop, List <XElement> props, AbstractFolder currentFolder, XElement elementBase, HashSet <XName> supportedProperties, CalDavRequestData requestData)
        {
            RequestData = requestData;

            if (!FolderSupported(currentFolder))
            {
                return(null);
            }

            IsCalendarRepository(currentFolder);

            var result = Do(allprop, props, currentFolder, elementBase, supportedProperties);

            AddToBase(elementBase, result);

            return(result);
        }
        public static CalDavRequest GetRequest(string method, CALDAVContext mDb, CalDavRequestData requestData, AbstractFolder folder)
        {
            switch (method)
            {
            case CalDavSettings.Methods.OPTIONS: return(new Options(requestData, folder));

            case CalDavSettings.Methods.PROPFIND: return(new Propfind(requestData, folder));

            case CalDavSettings.Methods.PROPPATCH: return(new Propfind(requestData, folder));

            case CalDavSettings.Methods.REPORT: return(new Report(requestData, folder));

            case CalDavSettings.Methods.DELETE: return(new Delete(folder));

            case CalDavSettings.Methods.PUT: return(new Put(requestData, folder));

            case CalDavSettings.Methods.MKCALENDAR: return(new MkCalendar(folder));

            case CalDavSettings.Methods.GET: return(new Get(folder));

            default: return(new NotImplemented());
            }
        }
Пример #3
0
 public GeneralStrategy(CalDavRequestData requestData, AbstractFolder folder)
 {
     RequestData = requestData;
     Folder      = folder;
     LoadProperties();
 }
Пример #4
0
 public CalDavRequest GetRequestType(string method, CALDAVContext mDb, CalDavRequestData requestData, AbstractFolder folder)
 {
     return(CalDavRequestFactory.GetRequest(method, mDb, requestData, folder));
 }