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


C# ServiceRequest.ConstructUrl方法代码示例

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


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

示例1: GetReportUrl

     /// <summary>
     /// Calling this method returns a URL which will authenticate and launch a Reportage session, starting
     /// at the specified Reportage URL entry point.
     /// </summary>
     /// <returns>A URL from which the export data can be downloaded</returns>
     public String GetReportUrl(String reportageAuth, String reportUrl)
     {
         ServiceRequest request = new ServiceRequest(configuration);
 	    //Relative path, auto add the right server name
 	    string fullReportUrl = reportUrl;
         if (reportUrl.StartsWith("/Reportage"))
         {
             fullReportUrl = "http://" + request.Server + reportUrl;
         }
         request.Parameters.Add("auth", reportageAuth);
         request.Parameters.Add("reporturl", fullReportUrl);
 	    return request.ConstructUrl("rustici.reporting.launchReport");
     }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:18,代码来源:ReportingService.cs

示例2: GetLaunchUrl

        /// <summary>
        /// Gets the url to directly launch/view the course registration in a browser
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <param name="redirectOnExitUrl">Upon exit, the url that the SCORM player will redirect to</param>
        /// <returns>URL to launch</returns>
        /// <param name="debugLogPointerUrl">Url that the server will postback a "pointer" url regarding
        /// a saved debug log that resides on s3</param>
        public string GetLaunchUrl(string registrationId, string redirectOnExitUrl, string cssUrl, string debugLogPointerUrl)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("regid", registrationId);
              if (!String.IsNullOrEmpty(redirectOnExitUrl))
            request.Parameters.Add("redirecturl", redirectOnExitUrl);
              if (!String.IsNullOrEmpty(cssUrl))
            request.Parameters.Add("cssurl", cssUrl);
              if (!String.IsNullOrEmpty(debugLogPointerUrl))
            request.Parameters.Add("saveDebugLogPointerUrl", debugLogPointerUrl);

              return request.ConstructUrl("rustici.registration.launch");
        }
开发者ID:musicm122,项目名称:SCORMCloud_NetLibrary,代码行数:21,代码来源:RegistrationService.cs

示例3: GetPreviewUrl

 /// <summary>
 /// Get the url that can be opened in a browser and used to preview this course, without
 /// the need for a registration.
 /// </summary>
 /// <param name="courseId">Unique Course Identifier</param>
 /// <param name="versionId">Version Id</param>
 public String GetPreviewUrl(String courseId, String redirectOnExitUrl, String cssUrl)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("courseid", courseId);
     if (!String.IsNullOrEmpty(redirectOnExitUrl))
         request.Parameters.Add("redirecturl", redirectOnExitUrl);
     if (!String.IsNullOrEmpty(cssUrl))
         request.Parameters.Add("cssurl", cssUrl);
     return request.ConstructUrl("rustici.course.preview");
 }
开发者ID:petebojovic,项目名称:SCORMCloud_NetLibrary,代码行数:16,代码来源:CourseService.cs

示例4: GetImportCourseUrl

 /// <summary>
 /// Get a URL to target a file import form for importing a course to the SCORM Cloud.
 /// </summary>
 /// <param name="courseId">the desired id for the course</param>
 /// <param name="redirectUrl">the url for the browser to be redirected to after import</param>
 /// <returns></returns>
 public String GetImportCourseUrl(string courseId, string redirectUrl)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("courseid", courseId);
     if (!String.IsNullOrEmpty(redirectUrl))
         request.Parameters.Add("redirecturl", redirectUrl);
     return request.ConstructUrl("rustici.course.importCourse");
 }
开发者ID:petebojovic,项目名称:SCORMCloud_NetLibrary,代码行数:14,代码来源:CourseService.cs

示例5: GetAssetUrl

        /// <summary>
        /// Get the url that points directly to a course asset
        /// </summary>
        /// <param name="courseId">Unique Course Identifier</param>
        /// <param name="path">Path to asset from root of course</param>
        /// <param name="versionId">Specific Version</param>
        /// <returns>HTTP Url to Asset</returns>
        public String GetAssetUrl(String courseId, String path, int versionId)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("courseid", courseId);
            request.Parameters.Add("path", path);
            if (versionId != Int32.MinValue)
            {
                request.Parameters.Add("versionid", versionId);
            }

            return request.ConstructUrl("rustici.course.getAssets");
        }
开发者ID:petebojovic,项目名称:SCORMCloud_NetLibrary,代码行数:19,代码来源:CourseService.cs

示例6: launch

        public void launch()
        {
            ServiceRequest req = new ServiceRequest(cfg);
            req.Parameters.Add("auth", "no auth");
            req.Parameters.Add("reporturl", "http://scorm.com");
            string url = req.ConstructUrl("rustici.reporting.launchReport");

            WebRequest wr = HttpWebRequest.Create(url);
            ((HttpWebRequest)wr).AllowAutoRedirect = false;
            WebResponse rsp = wr.GetResponse();

            Console.WriteLine(((HttpWebResponse)rsp).StatusCode);
            Console.WriteLine(((HttpWebResponse)rsp).StatusDescription);

            Console.WriteLine("Header: ");
            foreach (string key in ((HttpWebResponse)rsp).Headers.AllKeys)
            {
                Console.WriteLine(string.Format("{0} : {1}", key, rsp.Headers[key]));
            }
            Console.WriteLine("end of header");

            Console.WriteLine(rsp.ResponseUri);


            Console.WriteLine(new StreamReader(rsp.GetResponseStream()).ReadToEnd());
        }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:26,代码来源:clienttests.cs

示例7: GetDownloadUrl

 /// <summary>
 /// Calling this method returns a URL to the actual export data for a given export. Note that the export must 
 /// be complete in order to download it's associated data.
 /// </summary>
 /// <param name="export">An Export object containing information about the export to download</param>
 /// <returns>A URL from which the export data can be downloaded</returns>
 public String GetDownloadUrl(Export export)
 {
     ServiceRequest sr = new ServiceRequest(this.configuration);
     sr.Parameters.Add("exportid", export.Id);
     sr.Server = export.ServerLocation;
     return sr.ConstructUrl("rustici.export.download");
 }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:13,代码来源:ExportService.cs

示例8: GetUploadUrl

        /// <summary>
        /// Return a url that can be embedded in the action attribute of a form element
        /// </summary>
        /// <param name="redirectUrl">The url to redirect to after the upload is complete</param>
        /// <param name="permissionDomain">The permission domain in which the upload should be placed</param>
        public String GetUploadUrl(String redirectUrl, String permissionDomain, UploadToken token)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("token", token.tokenId);

            //Forget about backend server, just upload through main domain,
            //as it should be fine, and required if using SSL
            //request.Server = token.server;

            if (!String.IsNullOrEmpty(permissionDomain)) {
                request.Parameters.Add("pd", permissionDomain);
            }
            if (!String.IsNullOrEmpty(redirectUrl)) {
                request.Parameters.Add("redirecturl", redirectUrl);
            }
            return request.ConstructUrl("rustici.upload.uploadFile");
        }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:22,代码来源:UploadService.cs


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