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


C# ServiceRequest.CallService方法代码示例

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


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

示例1: Cancel

 /// <summary>
 /// Calling this method will cancel the export with the passed in export id.
 /// </summary>
 /// <param name="exportId"></param>
 /// <returns>True if successfully canceled</returns>
 public bool Cancel(String exportId)
 {
     ServiceRequest sr = new ServiceRequest(this.configuration);
     sr.Parameters.Add("exportid", exportId);
     sr.CallService("rustici.export.cancel");
     return true;
 }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:12,代码来源:ExportService.cs

示例2: SetAppLrsAuthCallbackUrl

        public void SetAppLrsAuthCallbackUrl(String lrsAuthCallbackUrl)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("lrsAuthCallbackUrl", lrsAuthCallbackUrl);

            request.CallService("rustici.lrsaccount.setAppLrsAuthCallbackUrl");
        }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:7,代码来源:LrsAccountService.cs

示例3: Start

 /// <summary>
 /// Calling this method will start a new data export, and return an id 
 /// that can be used to check on the status of the export using a call to Status
 /// </summary>
 /// <returns>The unique id for the started data export</returns>
 public string Start()
 {
     ServiceRequest sr = new ServiceRequest(this.configuration);
     XmlDocument response = sr.CallService("rustici.export.start");
     XmlElement elem = (XmlElement)response.GetElementsByTagName("export_id")[0];
     return elem.InnerText;
 }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:12,代码来源:ExportService.cs

示例4: SetLearnerTags

 /* LEARNER RELATED */
 public string SetLearnerTags(string learnerID, string learnerTags)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("learnerid", learnerID);
     request.Parameters.Add("tags", learnerTags);
     XmlDocument response = request.CallService("rustici.tagging.setLearnerTags");
     return response.InnerXml;
 }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:9,代码来源:TaggingService.cs

示例5: GetReportageAuth

 public String GetReportageAuth(ReportageNavPermission navPermission, bool isAdmin)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("navpermission", navPermission.ToString().ToLower());
     request.Parameters.Add("admin", isAdmin.ToString().ToLower());
     XmlDocument response = request.CallService("rustici.reporting.getReportageAuth");
     XmlNode authNode = response.GetElementsByTagName("auth")[0];
     return authNode.InnerText;
 }
开发者ID:nagyistoce,项目名称:SCORMCloud_NetLibrary,代码行数:9,代码来源:ReportingService.cs

示例6: ChangeStatus

        /// <summary>
        /// Change the accessibility status of the invitation
        /// </summary>
        /// <param name="invitationId">invitationId of the invite in question</param>
        /// <param name="enable">whether to set the invite as launchable</param>
        /// <param name="open">whether new regs can be created against the invite (for public invites only)</param>
        public void ChangeStatus(String invitationId, bool enable, bool open)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("invitationId", invitationId);
            request.Parameters.Add("enable", enable.ToString().ToLower());
            request.Parameters.Add("open", open.ToString().ToLower());

            request.CallService("rustici.invitation.changeStatus");
        }
开发者ID:bvanskiver,项目名称:SCORMCloud_NetLibrary,代码行数:15,代码来源:InvitationService.cs

示例7: CreateUser

 /// <summary>
 /// Creates a new FTP User
 /// </summary>
 /// <param name="userId">User ID</param>
 /// <param name="userPass">User's Password</param>
 /// <param name="permissionDomain">permission domain for the new user</param>
 public void CreateUser(string userId, string userPass, string permissionDomain)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("userid", userId);
     request.Parameters.Add("userpass", userPass);
     if (!String.IsNullOrEmpty(permissionDomain))
         request.Parameters.Add("pd", permissionDomain);
     request.CallService("rustici.ftp.createUser");
 }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:15,代码来源:FtpService.cs

示例8: CreateNewInstance

        /// <summary>
        /// Creates a new instance of an existing registration.  This essentially creates a
        /// fresh take of a course by the user. The latest version of the associated course
        /// will be used.
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <returns>Instance ID of the newly created instance</returns>
        public int CreateNewInstance(string registrationId)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("regid", registrationId);
              XmlDocument response = request.CallService("rustici.registration.createNewInstance");

              XmlNodeList successNodes = response.GetElementsByTagName("success");
              return Convert.ToInt32(successNodes[0].Attributes["instanceid"].Value);
        }
开发者ID:musicm122,项目名称:SCORMCloud_NetLibrary,代码行数:16,代码来源:RegistrationService.cs

示例9: GetDestinationList

 /// <summary>
 /// List of existing dispatch destinations in your account. Callers should assume
 /// another page of data is available by calling again with the page parameter
 /// incremented, until an empty list is returned.
 /// </summary>
 /// <param name="page">Which page of results to return. Page numbers start at 1.</param>
 /// <param name="tags">A comma separated list of tags to filter results by. Results must be tagged with every tag in the list.</param>
 /// <returns>List of Destination Data objects.</returns>
 public List<DestinationData> GetDestinationList(int page, string tags)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("page", page);
     if (!string.IsNullOrEmpty(tags))
         request.Parameters.Add("tags", tags);
     XmlDocument response = request.CallService("rustici.dispatch.getDestinationList");
     return DestinationData.ConvertToDestinationDataList(response);
 }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:17,代码来源:DispatchService.cs

示例10: CreateDestination

 /// <summary>
 /// Create a new Dispatch Destination in your SCORM Cloud account.
 /// </summary>
 /// <param name="name">The name of the new destination.</param>
 /// <param name="tags">A comma separated list of tags to add to this destination.</param>
 /// <param name="email">The email address associated with the user creating this destination.</param>
 /// <returns>The id for the newly created destination.</returns>
 public string CreateDestination(string name, string tags, string email)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("name", name);
     if (!string.IsNullOrEmpty(tags))
         request.Parameters.Add("tags", tags);
     if (!string.IsNullOrEmpty(email))
         request.Parameters.Add("email", email);
     XmlDocument response = request.CallService("rustici.dispatch.createDestination");
     String destinationId = ((XmlElement)response
                             .GetElementsByTagName("destinationId")[0])
                             .FirstChild.InnerText;
     return destinationId;
 }
开发者ID:musicm122,项目名称:SCORMCloud_NetLibrary,代码行数:21,代码来源:DispatchService.cs

示例11: GetLearnerTags

        public string[] GetLearnerTags(string learnerID)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("learnerid", learnerID);            
            XmlDocument tagsXMLDoc = request.CallService("rustici.tagging.getLearnerTags");
            XmlNodeList tagNodes = tagsXMLDoc.GetElementsByTagName("tag");
            string[] tags = new string[tagNodes.Count];

            for (int t = 0; t < tagNodes.Count; t++)
            {
                string nextTag = tagNodes[t].InnerText;
                tags[t] = nextTag;
            }

            return tags;
        }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:16,代码来源:TaggingService.cs

示例12: TestRegistrationPostUrl

        /// <summary>
        /// This method provides a way to test a URL for posting registration results back to, as they would be posted when using the postbackurl in the createRegistration call. When called, an example registration result will be posted to the URL given, or else an error will be reported regarding why the post failed.
        /// </summary>
        /// <param name="postbackUrl">Specifies a URL for which to post activity and status data in real time as the course is completed</param>
        /// <param name="authType">Optional parameter to specify how to authorize against the given postbackurl, can be "form" or "httpbasic". If form authentication, the username and password for authentication are submitted as form fields "username" and "password", and the registration data as the form field "data". If httpbasic authentication is used, the username and password are placed in the standard Authorization HTTP header, and the registration data is the body of the message (sent as text/xml content type). This field is set to "form" by default.</param>
        /// <param name="urlname">You can optionally specify a login name to be used for credentials when posting to the URL specified in postbackurl</param>
        /// <param name="urlpass">If credentials for the postbackurl are provided, this must be included, it is the password to be used in authorizing the postback of data to the URL specified by postbackurl</param>
        /// <param name="resultsFormat">This parameter allows you to specify a level of detail in the information that is posted back while the course is being taken. It may be one of three values: "course" (course summary), "activity" (activity summary, or "full" (full detail), and is set to "course" by default. The information will be posted as xml, and the format of that xml is specified below under the method "getRegistrationResult"</param>
        /// <returns>Rsp containing result and status code</returns>
        public Rsp TestRegistrationPostUrl(string postbackUrl, RegistrationResultsAuthType authType, string urlname, string urlpass, RegistrationResultsFormat resultsFormat)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("postbackurl", postbackUrl);

              //Api call will fail without a placeholder username and password at least:
              if (!String.IsNullOrEmpty(urlname))
              {
            request.Parameters.Add("name", urlname);
              }
              else
              {
            request.Parameters.Add("name", "placeholderLoginName");
              }

              if (!String.IsNullOrEmpty(urlpass))
              {
            request.Parameters.Add("password", urlpass);
              }
              else
              {
            request.Parameters.Add("password", "placeholderLoginPassword");
              }

              request.Parameters.Add("authtype", Enum.GetName(authType.GetType(), authType).ToLower());
              request.Parameters.Add("resultformat", Enum.GetName(resultsFormat.GetType(), resultsFormat).ToLower());

              XmlDocument response = request.CallService("rustici.registration.testRegistrationPostUrl");
              XmlElement rspElement = ((XmlElement)response.GetElementsByTagName("rsp")[0]);
              return new Rsp(rspElement);
        }
开发者ID:musicm122,项目名称:SCORMCloud_NetLibrary,代码行数:40,代码来源:RegistrationService.cs

示例13: ResetRegistration

 /// <summary>
 /// Resets all status data regarding the specified registration -- essentially restarts the course
 /// </summary>
 /// <param name="registrationId">Unique Identifier for the registration</param>
 public void ResetRegistration(string registrationId)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       request.CallService("rustici.registration.resetRegistration");
 }
开发者ID:musicm122,项目名称:SCORMCloud_NetLibrary,代码行数:10,代码来源:RegistrationService.cs

示例14: ResetGlobalObjectives

 /// <summary>
 /// Clears global objective data for the given registration
 /// </summary>
 /// <param name="registrationId">Unique Identifier for the registration</param>
 /// <param name="deleteLatestInstanceOnly">If false, all instances are deleted</param>
 public void ResetGlobalObjectives(string registrationId, bool deleteLatestInstanceOnly)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       if (deleteLatestInstanceOnly)
     request.Parameters.Add("instanceid", "latest");
       request.CallService("rustici.registration.resetGlobalObjectives");
 }
开发者ID:musicm122,项目名称:SCORMCloud_NetLibrary,代码行数:13,代码来源:RegistrationService.cs

示例15: RegistrationExists

        // <summary>
        /// Confirm that a registrationExists
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        public bool RegistrationExists(string registrationId)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("regid", registrationId);
              XmlDocument response = request.CallService("rustici.registration.exists");

              XmlElement attrEl = (XmlElement)response.GetElementsByTagName("result")[0];

              return Convert.ToBoolean(attrEl.InnerXml.ToString());
        }
开发者ID:musicm122,项目名称:SCORMCloud_NetLibrary,代码行数:14,代码来源:RegistrationService.cs


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