public bool CreatePublishingPoint(BLLPublishingPoint publishingPoint, string title, string duration, LiveSourceType type) { bool retVal = false; using (var manager = new ServerManager()) { Site site = manager.Sites[publishingPoint.SiteName]; Application application = site.Applications[publishingPoint.Path]; string template = string.Format("TEMPLATE.xml", title, type, duration ?? string.Empty); try { string path = string.Format(@"{0}\{1}", application.VirtualDirectories[0].PhysicalPath, publishingPoint.Name); File.WriteAllText(path, template); retVal = true; } catch (Exception ex) { Debug.Print(ex.Message); } } return retVal; }
public bool CreatePublishingPoint(BLLPublishingPoint publishingPoint, string title, string duration, LiveSourceType type) { bool retVal = false; using (var manager = new ServerManager()) { Site site = manager.Sites[publishingPoint.SiteName]; Application application = site.Applications[publishingPoint.Path]; string template = string.Format("TEMPLATE.xml", title, type, duration ?? string.Empty); try { string path = string.Format(@"{0}\{1}", application.VirtualDirectories[0].PhysicalPath, publishingPoint.Name); File.WriteAllText(path, template); retVal = true; } catch (Exception ex) { Debug.Print(ex.Message); } } return(retVal); }