コード例 #1
0
 public ContentResult Subscribe(string eventId)
 {
     var eventPart = _eventService.GetEventPart(eventId, VersionOptions.Latest);
     var ics = _eventService.GetEventIcs(eventPart);
     var downloadFileName = ics.Title.Replace(' ', '_') + ".ics";
     const string contentType = "text/iCal";
     var response = new iCalFormatResult(contentType, ics);
     //response.FileDownloadName = downloadFileName;
     return response;
 }
コード例 #2
0
 public ContentResult SubscribeIcs(string calendarId, string fileName)
 {
     var ics = _calendarService.CreateCalendarViewModel(calendarId);
     //var downloadFileName = ics.Title.Replace(' ', '_') + ".ics";
     const string contentType = "text/calendar";
     var response = new iCalFormatResult(contentType, ics);
     var stringContent = response.getResponseAsString();
     return Content(stringContent, contentType, System.Text.Encoding.UTF8);
     //response.FileDownloadName = downloadFileName;
     //return response;
 }
コード例 #3
0
 public ContentResult Subscribe(string calendarId)
 {
     var ics = _calendarService.CreateCalendarViewModel(calendarId);
     //var downloadFileName = ics.Title.Replace(' ', '_') + ".ics";
     const string contentType = "text/calendar";
     var response = new iCalFormatResult(contentType, ics);
     //response.FileDownloadName = downloadFileName;
     return response;
 }