public static bool remove_Mapping_VirtualId(this TM_Xml_Database tmXmlDatabase, Guid id) { var virtualArticles = tmXmlDatabase.getVirtualArticles(); if (virtualArticles.hasKey(id)) { virtualArticles.Remove(id); tmXmlDatabase.saveVirtualArticles(); return(true); } return(false); }
public static VirtualArticleAction add_Mapping_Redirect(this TM_Xml_Database tmXmlDatabase, Guid id, Uri redirectUri) { var virtualAction = new VirtualArticleAction { Id = id, Action = "Redirect", Redirect_Uri = redirectUri.str() }; tmXmlDatabase.getVirtualArticles().add(id, virtualAction); tmXmlDatabase.saveVirtualArticles(); return(virtualAction); }
public static VirtualArticleAction add_Mapping_VirtualId(this TM_Xml_Database tmXmlDatabase, Guid id, Guid virtualId) { var virtualAction = new VirtualArticleAction { Id = id, Action = "Virtual_Id", Target_Id = virtualId }; tmXmlDatabase.getVirtualArticles().add(id, virtualAction); tmXmlDatabase.saveVirtualArticles(); return(virtualAction); }
public static VirtualArticleAction add_Mapping_ExternalService(this TM_Xml_Database tmXmlDatabase, Guid id, string service, string data) { var virtualAction = new VirtualArticleAction { Id = id, Action = "ExternalService", Service = service, Service_Data = data, }; tmXmlDatabase.getVirtualArticles().add(id, virtualAction); tmXmlDatabase.saveVirtualArticles(); return(virtualAction); }
public static VirtualArticleAction add_Mapping_ExternalArticle(this TM_Xml_Database tmXmlDatabase, Guid id, string tmServer, Guid externalId) { var virtualAction = new VirtualArticleAction { Id = id, Action = "ExternalArticle", TM_Server = tmServer, Target_Id = externalId, }; tmXmlDatabase.getVirtualArticles().add(id, virtualAction); tmXmlDatabase.saveVirtualArticles(); return(virtualAction); }