Skip to content

Release 6.1.2 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## CHANGE LOG

### v6.1.2
2014-05-30 [#51](https://github.com/qiniu/csharp-sdk/pull/51)
- [#46] nuget 安装文档
- [#48] url key escape for make base url
- [#50] limit args for listprefix

### v6.1.1
2014-04-28 issue [#45](https://github.com/qiniu/csharp-sdk/pull/45)
- [#41] [#42] 简化断点续上传,删除bput逻辑, 修复bug:>2.5GB文件上传失败
Expand Down
11 changes: 8 additions & 3 deletions Docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,17 @@ title: C# SDK 使用指南

<a name=install></a>
## 安装
下载:

NuGet安装方式:

如果您的Visual Studio没有安装NuGet,请先[安装](http://docs.nuget.org/docs/start-here/installing-nuget)它,然后在项目中添加引用,使用NuGet管理程序包,在其中搜索qiniu即可。

源码下载:

git clone http://github.com/qiniu/csharp-sdk

DLL引用方式:

下载DLL文件,右键<项目>-<引用>文件夹,在弹出的菜单中点击"添加引用"选项后弹出"添加引用"对话框,选择”浏览"Qiniu.DLL文件,点击确定

项目引用方式:
Expand All @@ -55,7 +60,7 @@ DLL引用方式:

其它:

C# SDK引用了第三方的开源项目 Json.NET,因此,您需要在项目中引用它
C# SDK引用了第三方的开源项目 Json.NET,因此,您需要在项目中引用它(如果使用NuGet管理dll,刚不需要手工加载Json.NET)
项目地址:[http://json.codeplex.com](http://json.codeplex.com)。

<a name=setup></a>
Expand Down
3 changes: 2 additions & 1 deletion Qiniu/RS/GetPolicy.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Qiniu.Auth.digest;
using Qiniu.Conf;

using System.Net;
namespace Qiniu.RS
{
/// <summary>
Expand All @@ -28,6 +28,7 @@ public static string MakeRequest (string baseUrl, UInt32 expires = 3600, Mac mac

public static string MakeBaseUrl (string domain, string key)
{
key = Uri.EscapeUriString (key);
return string.Format ("http://{0}/{1}", domain, key);
}
}
Expand Down
7 changes: 4 additions & 3 deletions Qiniu/RSF/RSFClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public RSFClient (string bucketName)
/// <param name='limit'>
/// Limit.
/// </param>
public DumpRet ListPrefix (string bucketName, string prefix="", string markerIn="")
public DumpRet ListPrefix(string bucketName, string prefix = "", string markerIn = "", int limit = 0)
{
string url = Config.RSF_HOST + string.Format ("/list?bucket={0}", bucketName);// + bucketName +
if (!string.IsNullOrEmpty (markerIn)) {
Expand All @@ -104,7 +104,8 @@ public DumpRet ListPrefix (string bucketName, string prefix="", string markerIn=
if (!string.IsNullOrEmpty (prefix)) {
url += string.Format ("&prefix={0}", prefix);
}
if (this.limit > 0) {
if (limit > 0)
{
url += string.Format ("&limit={0}", limit);
}
for (int i = 0; i < RETRY_TIME; i++) {
Expand Down Expand Up @@ -151,7 +152,7 @@ public List<DumpItem> Next ()
return null;
}
try {
DumpRet ret = ListPrefix (this.bucketName, this.prefix, this.marker);
DumpRet ret = ListPrefix(this.bucketName, this.prefix, this.marker, this.limit);
if (ret.Items.Count == 0) {
end = true;
return null;
Expand Down