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


C# ServiceRequest.GetFileFromService方法代码示例

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


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

示例1: Download

 /// <summary>
 /// Calling this method returns 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="toFileName">The file path to write the downloaded export to</param>
 /// <param name="export">An Export object containing information about the export to download</param>
 /// <returns>The filepath where the data was written</returns>
 public String Download(String toFileName, Export export)
 {
     ServiceRequest sr = new ServiceRequest(this.configuration);
     sr.Parameters.Add("exportid", export.Id);
     sr.Server = export.ServerLocation;
     return sr.GetFileFromService(toFileName, "rustici.export.download");
 }
开发者ID:darrencauthon,项目名称:SCORMCloud_NetLibrary,代码行数:14,代码来源:ExportService.cs

示例2: GetAssets

        public string GetAssets(String toFileName, String courseId, int versionId, List<String> paths)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("courseid", courseId);
            if(paths != null && paths.Count > 0){
                foreach (String path in paths){
                    request.Parameters.Add("path", path);
                }
            }
            if (versionId != Int32.MinValue)
            {
                request.Parameters.Add("versionid", versionId);
            }

            //Return file path to downloaded file
            return request.GetFileFromService(toFileName, "rustici.course.getAssets");
        }
开发者ID:petebojovic,项目名称:SCORMCloud_NetLibrary,代码行数:17,代码来源:CourseService.cs

示例3: DownloadDispatches

        /// <summary>
        /// Uses the dispatches selected by the given parameters to create and deliver a package
        /// containing the resources used to import and launch those dispatches in client systems.
        /// This will save a zip file, which in turn contains zip files for each of the selected dispatches.
        /// </summary>
        /// <param name="toFileName">File to save download to.</param>
        /// <param name="dispatchId">The id of the dispatch to download.</param>
        /// <param name="destinationId">The id of the destination used to select the dispatch group to download.</param>
        /// <param name="courseId">The id of the course used to select the dispatch group to download.</param>
        /// <param name="tags">A comma separated list of tags used to select the dispatch group to download. Each dispatch selected will have to be tagged with each tag in the list.</param>
        /// <returns>Dispatch Data object.</returns>
        public string DownloadDispatches(string toFileName, string dispatchId, string destinationId, string courseId, string tags)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            if (!string.IsNullOrEmpty(dispatchId))
                request.Parameters.Add("dispatchid", dispatchId);
            if (!string.IsNullOrEmpty(destinationId))
                request.Parameters.Add("destinationid", destinationId);
            if (!string.IsNullOrEmpty(courseId))
                request.Parameters.Add("courseid", courseId);
            if (!string.IsNullOrEmpty(tags))
                request.Parameters.Add("tags", tags);

            //Return file path to downloaded file
            return request.GetFileFromService(toFileName, "rustici.dispatch.downloadDispatches");
        }
开发者ID:musicm122,项目名称:SCORMCloud_NetLibrary,代码行数:26,代码来源:DispatchService.cs


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