public static TeamMentor_Article createArticle_from_ExternalServiceData(this VirtualArticleAction virtualArticle)
 {
     if (virtualArticle.Service.valid() && virtualArticle.Service_Data.valid())
     {
         return(virtualArticle.Service.createArticle_from_ExternalServiceData(virtualArticle.Service_Data));
     }
     return(null);
 }
 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_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_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;
 }
        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);
        }