当前位置: 首页>>代码示例>>C#>>正文


C# IProject.ExecuteRQL方法代码示例

本文整理汇总了C#中IProject.ExecuteRQL方法的典型用法代码示例。如果您正苦于以下问题:C# IProject.ExecuteRQL方法的具体用法?C# IProject.ExecuteRQL怎么用?C# IProject.ExecuteRQL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IProject的用法示例。


在下文中一共展示了IProject.ExecuteRQL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateContentClass

        private ContentClass CreateContentClass(IProject project, XmlElement template)
        {
            XmlDocument creationResultNode = project.ExecuteRQL(template.NodeToString());
            XmlNode guidTextNode = creationResultNode.FirstChild;
            Guid newCCGuid;
            if (guidTextNode == null || guidTextNode.NodeType != XmlNodeType.Element || guidTextNode.FirstChild == null ||
                !Guid.TryParse(guidTextNode.FirstChild.Value.Trim(), out newCCGuid))
            {
                throw new SmartAPIException(Session.ServerLogin,
                                            string.Format("Could not create content class '{0}'", Name));
            }

            var targetCC = new ContentClass(project, newCCGuid);
            return targetCC;
        }
开发者ID:erminas,项目名称:smartapi,代码行数:15,代码来源:IContentClass.cs

示例2: CreateElement

 /// <summary>
 ///     Create an element out of its XML representation (uses the attribute "elttype") to determine the element type and create the appropriate object.
 /// </summary>
 /// <param name="project"> Project containing the element </param>
 /// <param name="elementGuid"> Guid of the element </param>
 /// <param name="languageVariant">The language variant of the page element</param>
 /// <exception cref="ArgumentException">if the "elttype" attribute of the XML node contains an unknown value</exception>
 public static IPageElement CreateElement(IProject project, Guid elementGuid, ILanguageVariant languageVariant)
 {
     using (new LanguageContext(languageVariant))
     {
         XmlDocument xmlDoc = project.ExecuteRQL(string.Format(RETRIEVE_PAGE_ELEMENT, elementGuid.ToRQLString()));
         var xmlNode = (XmlElement) xmlDoc.GetElementsByTagName("ELT")[0];
         return CreateElement(project, xmlNode);
     }
 }
开发者ID:erminas,项目名称:smartapi,代码行数:16,代码来源:PageElement.cs

示例3: CreateInProject

        public void CreateInProject(IProject project, Guid parentFolderGuid)
        {
            const string CREATE_STRING =
                @"<PROJECT><EXPORTFOLDER action=""assign"" guid=""{0}""><EXPORTFOLDER action=""addnew"" name=""{1}"" type=""{2}"" {3} /></EXPORTFOLDER></PROJECT>";

            XmlDocument reply =
                project.ExecuteRQL(string.Format(CREATE_STRING, parentFolderGuid.ToRQLString(), Name, ((int) _type),
                                                 SaveParameters()));

            reply.GetElementsByTagName("EXPORTFOLDER");
        }
开发者ID:erminas,项目名称:smartapi,代码行数:11,代码来源:IPublicationFolder.cs

示例4: GetRQLRepresentation

 private static XmlElement GetRQLRepresentation(IProject project, Guid ccElementGuid)
 {
     const string LOAD_ELEMENT = @"<TEMPLATE><ELEMENT action=""load"" guid=""{0}""/></TEMPLATE>";
     return project.ExecuteRQL(LOAD_ELEMENT.RQLFormat(ccElementGuid)).GetSingleElement("ELEMENT");
 }
开发者ID:erminas,项目名称:smartapi,代码行数:5,代码来源:IContentClassElement.cs


注:本文中的IProject.ExecuteRQL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。