OSSClient是与OSS服务交互的客户端,SDK的OSS操作都是通过OSSClient完成的。
下面代码新建了一个OSSClient:
using Aliyun.OpenServices.OpenStorageService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AliyunTest
{
class Program
{
static readonly string accessKeyId = "AccessKeyId";
static readonly string accessKeySecret = "AccessKeySecret";
//关于这个endPoint,可以参考:http://bbs.aliyun.com/read/149100.html?spm=5176.7189909.0.0.YiwiFw
static readonly string endPoint = "http://oss-cn-beijing.aliyuncs.com";
static void Main(string[] args)
{
//初始化 OSSClient
OssClient ossClient = new OssClient(endPoint, accessKeyId, access