本文整理汇总了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");
}
示例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");
}
示例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");
}