Skip to content

Commit e4b4aa2

Browse files
committedMay 30, 2014
Merge pull request #51 from qiniu/develop
Release 6.1.2
2 parents bc8d9eb + 2effc6e commit e4b4aa2

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed
 

‎CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## CHANGE LOG
22

3+
### v6.1.2
4+
2014-05-30 [#51](https://github.com/qiniu/csharp-sdk/pull/51)
5+
- [#46] nuget 安装文档
6+
- [#48] url key escape for make base url
7+
- [#50] limit args for listprefix
8+
39
### v6.1.1
410
2014-04-28 issue [#45](https://github.com/qiniu/csharp-sdk/pull/45)
511
- [#41] [#42] 简化断点续上传,删除bput逻辑, 修复bug:>2.5GB文件上传失败

‎Docs/README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,17 @@ title: C# SDK 使用指南
4141

4242
<a name=install></a>
4343
## 安装
44-
下载:
44+
45+
NuGet安装方式:
46+
47+
如果您的Visual Studio没有安装NuGet,请先[安装](http://docs.nuget.org/docs/start-here/installing-nuget)它,然后在项目中添加引用,使用NuGet管理程序包,在其中搜索qiniu即可。
48+
49+
源码下载:
4550

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

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

5257
项目引用方式:
@@ -55,7 +60,7 @@ DLL引用方式:
5560

5661
其它:
5762

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

6166
<a name=setup></a>

‎Qiniu/RS/GetPolicy.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using Qiniu.Auth.digest;
33
using Qiniu.Conf;
4-
4+
using System.Net;
55
namespace Qiniu.RS
66
{
77
/// <summary>
@@ -28,6 +28,7 @@ public static string MakeRequest (string baseUrl, UInt32 expires = 3600, Mac mac
2828

2929
public static string MakeBaseUrl (string domain, string key)
3030
{
31+
key = Uri.EscapeUriString (key);
3132
return string.Format ("http://{0}/{1}", domain, key);
3233
}
3334
}

‎Qiniu/RSF/RSFClient.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public RSFClient (string bucketName)
9595
/// <param name='limit'>
9696
/// Limit.
9797
/// </param>
98-
public DumpRet ListPrefix (string bucketName, string prefix="", string markerIn="")
98+
public DumpRet ListPrefix(string bucketName, string prefix = "", string markerIn = "", int limit = 0)
9999
{
100100
string url = Config.RSF_HOST + string.Format ("/list?bucket={0}", bucketName);// + bucketName +
101101
if (!string.IsNullOrEmpty (markerIn)) {
@@ -104,7 +104,8 @@ public DumpRet ListPrefix (string bucketName, string prefix="", string markerIn=
104104
if (!string.IsNullOrEmpty (prefix)) {
105105
url += string.Format ("&prefix={0}", prefix);
106106
}
107-
if (this.limit > 0) {
107+
if (limit > 0)
108+
{
108109
url += string.Format ("&limit={0}", limit);
109110
}
110111
for (int i = 0; i < RETRY_TIME; i++) {
@@ -151,7 +152,7 @@ public List<DumpItem> Next ()
151152
return null;
152153
}
153154
try {
154-
DumpRet ret = ListPrefix (this.bucketName, this.prefix, this.marker);
155+
DumpRet ret = ListPrefix(this.bucketName, this.prefix, this.marker, this.limit);
155156
if (ret.Items.Count == 0) {
156157
end = true;
157158
return null;

0 commit comments

Comments
 (0)
Please sign in to comment.