namespace StockSharp.Community
{
using System;
using Ecng.Common;
///
/// The client for access to the service of work with files and documents.
///
public class FileClient : BaseCommunityClient
{
///
/// Initializes a new instance of the .
///
public FileClient()
: this("http://stocksharp.com/services/fileservice.svc".To())
{
}
///
/// Initializes a new instance of the .
///
/// Service address.
public FileClient(Uri address)
: base(address, "file")
{
}
///
/// To upload the file to the site .
///
/// File name.
/// File body.
/// Uploaded file link.
public string Upload(string fileName, byte[] body)
{
return Invoke(f => f.Upload(SessionId, fileName, body));
}
}
}