Skip to content

Commit f5a4214

Browse files
committed
版本更新v7.2.7:新增UWP支持,新增async支持
1 parent 6dbf533 commit f5a4214

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+24276
-1104
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
**2017-02-06**
2+
3+
最新版本v7.2.7,适用于.NET Framework 2.0+ , .NET Core 和 UWP
4+
5+
新增:对于UWP(Windows10)的支持
6+
7+
新增:对于.NET Framework 4.5及以上, .NET Core和UWP的“异步(async)”支持
8+
9+
更新:部分类、属性、方法名称等细节修改,请参见SDK文档或者使用指南
10+
11+
* * *
12+
113
**2017-01-20**
214

315
最新版本v7.2.6,适用于.NET Framework 2.0+ 和.NET Core

Qiniu.Net40.Travis.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
44
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net40", "src\Qiniu\Qiniu.Net40.Travis.csproj", "{2F5B0328-DE8B-4B53-A500-3077E340A51B}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net40.Travis", "src\Qiniu\Qiniu.Net40.Travis.csproj", "{2F5B0328-DE8B-4B53-A500-3077E340A51B}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution

README.en-US.md

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
#Qiniu (Cloud) C# SDK
2+
3+
##About
4+
5+
This C# SDK is built based on Qiniu Cloud API (see below), and it can be used on .NET Framework 2.0+, .NET Core and UWP (Windows 10 Universal Platforms). It will help you to build an application easily and quickly.
6+
7+
##Documentation
8+
9+
You can have a better view of this SDK by checking the documnets given below:
10+
11+
* [SDK-reference HTML Online](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.7/index.html)
12+
13+
* [SDK-reference CHM Offline](http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.7.chm)
14+
15+
Want to know more about how to using this SDK? Are you trying to find some code examples based on this SDK? These documents or links below will be helpful:
16+
17+
* [github/csharp-sdk-shared-examples](https://github.com/fengyhack/csharp-sdk-shared-examples)
18+
19+
* [SDK manual | examples](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.7/index.html)
20+
21+
##How-to-install
22+
23+
Releases can be found [here](https://github.com/fengyhack/csharp-sdk-shared/releases), choose the one you need and unzipped it, then add reference to the *.dll file in your project.
24+
25+
The latest update will always be available in the `master` branch.
26+
27+
Or you can install using NuGet, take Visual Studio 2013/2015 as an example, navigate to the NuGet package manager, and search `Qiniu.Shared`, or just type the scriptin the package manager console as follow:
28+
29+
```
30+
Install-Package Qiniu.Shared
31+
```
32+
33+
And of course, you can build totally from source.
34+
35+
##How-to-build
36+
37+
Suppose you are using Visual Studio(VS2013 and higher versions are strongly recommended) to build this SDK.
38+
39+
| Target | Solution file |
40+
|--------|--------|
41+
| .NET Framework 2.0 | Qiniu.Net20.sln |
42+
| .NET Framework 3.5 | Qiniu.Net35.sln |
43+
| .NET Framework 4.0 | Qiniu.Net40.sln |
44+
| .NET Framework 4.5 | Qiniu.Net45.sln |
45+
| .NET Framework 4.6 | Qiniu.Net46.sln |
46+
| .NET Core | Qiniu.NetCore.sln |
47+
| Windows10 UWP | Qiniu.UWP.sln |
48+
| All the above | Qiniu.ALL_VER.sln |
49+
50+
**Some details about building NetCore/UWP projects**
51+
52+
If you want to build `Qiniu.NetCore` or `Qiniu.UWP`, please copy `project.json` and `project.lock.json` (from `Qiniu.Core` or `Qiniu.UWP` folder) into `Qiniu` folder firstly, or you can just copy `project.json` and then execute `dotnet restore` command (a better way)。
53+
54+
For the other platforms, please delete `project.json` and `project.lock.json` in `Qiniu` folder.
55+
56+
##Notes on .NET Framework
57+
58+
**Higher version targets support async but lower ones doesn't**.
59+
60+
For lower version targets (.NET framework 2.0/3.0/3.5/4.0), HTTP operations is performed with `HttpWebRequest`/`HttpWebResponse` and does not support `async` operations. It should be clear that file/stream read/write functions in these targets do not support async as well.
61+
62+
For higher version targets (.NET Framework 4.5+, .NET Core, and UWP), HTTP operations is performed with `HttpClient` which supports `async` originally. In this case, file/stream read/write operations are implemented with async support.
63+
64+
##API reference
65+
66+
* [Storage API documentation](http://developer.qiniu.com/article/index.html#kodo-api-handbook)
67+
68+
* [Processing API documentation](http://developer.qiniu.com/article/index.html#dora-api-handbook)
69+
70+
* [Fusion CDN API documentation](http://developer.qiniu.com/article/index.html#fusion-api-handbook)
71+
72+
##Related resources
73+
74+
Good ideas and suggestions about our documentation or products are well appreciated. Welcome to visit the websites below and you may leave your words if you like.
75+
76+
* [Forum](http://segmentfault.com/qiniu) - You can share your ideas with each other here, talking abouthow to use Qiniu product or other related topics.
77+
78+
* [Request](http://support.qiniu.com/hc/request/guest/) - If the problems you post on the forum are still unsolved, you can submit it here, tech-support will give you a response as soon as posible.
79+
80+
* [Blog](http://blog.qiniu.com/) - Latest articles about activities and technical sharing can be found here.
81+
82+
* [Weibo](http://weibo.com/qiniutek)
83+
84+
* [FAQs](http://developer.qiniu.com/article/faqs/)
85+
86+
##Contribution
87+
88+
1. Fork
89+
90+
2. Create your own branch `git checkout -b my-new-feature`
91+
92+
3. Commit you changes `git commit -am 'Added some feature'`
93+
94+
4. Push your commit to the remote repo `git push origin my-new-feature`
95+
96+
5. Visit your github page and make a new `pull request` in your branmch `my-new-feature`
97+
98+
99+
##License
100+
101+
Copyright (c) 2017 [qiniu.com](www.qiniu.com)
102+
103+
Published using on MIT license:
104+
105+
www.opensource.org/licenses/MIT
106+
107+
##Appendix
108+
109+
###Quick start on .NET Coree
110+
111+
### How-to-use
112+
113+
Here is a step-by-step guide.
114+
115+
To get ready, if you need `dotnet` tool, see https://github.com/dotnet/cli/
116+
117+
####1. Create
118+
119+
Firstly, change to the working folder, and then create a project:
120+
121+
dotnet new
122+
dotnet restore
123+
124+
**NOTE** that before `dotnet restore` you may modify the generated `project.json` file as follow:
125+
126+
```json
127+
{
128+
"version": "1.0.0-*",
129+
"buildOptions": {
130+
"emitEntryPoint": true
131+
},
132+
133+
"dependencies": {
134+
"Microsoft.NETCore.App": {
135+
"version": "1.0.1"
136+
},
137+
"Qiniu": "7.1.0.0",
138+
"Newtonsoft.Json": "9.0.1"
139+
},
140+
141+
"frameworks": {
142+
"netcoreapp1.0": {
143+
"imports": "dnxcore50"
144+
}
145+
},
146+
147+
"runtimes": {
148+
"win7-x64": {},
149+
"win7-x86": {},
150+
"osx.10.10-x64": {},
151+
"osx.10.11-x64": {},
152+
"ubuntu.14.04-x64": {},
153+
"ubuntu.16.04-x64": {}
154+
}
155+
}
156+
```
157+
158+
Then write your codes.
159+
160+
#### 2. Publish
161+
162+
You may publish to the target os using command like one of them:
163+
164+
```script
165+
dotnet publish -r win7-x64
166+
dotnet publish -r ubuntu.16.04-x64
167+
dotnet publish -r osx.10.11-x64
168+
```
169+
170+
Or if you have .NET Core runtime installed, just build:
171+
172+
```script
173+
dotnet build
174+
```
175+
176+
#### 3. Run
177+
178+
**NOTE that on OSX 10.11(EI Capitan)**, openssl must be installed before running your app:
179+
180+
```script
181+
brew update
182+
brew install openssl
183+
brew link --force openssl
184+
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
185+
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
186+
```
187+
188+
Say, if you would like to run the *built app* `Example.dll`, just type:
189+
190+
```script
191+
dotnet Example.dll
192+
```
193+
194+
Or if you publish on Windows and exe file if generated, just run the exe file.
195+
196+
In this case, you should have `dotnet` tool installed at the very begin.
197+
198+
Or if you want to run the *published app* `Example`, just double-click it.
199+
200+
######Quick start on .NET Coree
201+
202+
**What is UWP**
203+
204+
UWP means (Windows 10) Universal Windows Platform.
205+
206+
UWP project also contains a file called `project.json`, here is an example:
207+
208+
```json
209+
{
210+
"dependencies": {
211+
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0"
212+
},
213+
"frameworks": {
214+
"uap10.0": {}
215+
},
216+
"runtimes": {
217+
"win10-arm": {},
218+
"win10-arm-aot": {},
219+
"win10-x86": {},
220+
"win10-x86-aot": {},
221+
"win10-x64": {},
222+
"win10-x64-aot": {}
223+
}
224+
}
225+
```

README.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
#Qiniu (Cloud) C# SDK
22

3-
[![Build Status](https://api.travis-ci.org/qiniu/csharp-sdk.png?branch=master)](https://travis-ci.org/qiniu/csharp-sdk)
4-
53
##关于
64

7-
此 C# SDK 适用于.NET Framework 2.0+ .NET Core,基于七牛云API参考手册构建。使用此 SDK 构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云存储上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到终端(手持设备应用)的架构的服务或应用,通过七牛云存储及其 SDK,都能让您应用程序的终端用户高速上传和下载,同时也让您的服务端更加轻盈。
5+
此 C# SDK 适用于.NET Framework 2.0+ , .NET Core 以及UWP(Windows 10 通用应用),基于七牛云API参考手册构建。使用此 SDK 构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云存储上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到终端(手持设备应用)的架构的服务或应用,通过七牛云存储及其 SDK,都能让您应用程序的终端用户高速上传和下载,同时也让您的服务端更加轻盈。
86

97
##SDK文档
108

119
以下文档用于检索SDK接口、属性说明,它将有助于您理解SDK的结构。
1210

13-
* [HTML在线浏览](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.6/index.html)
11+
* [HTML在线浏览](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.7/index.html)
1412

15-
* [CHM文件下载](http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.6.chm)
13+
* [CHM文件下载](http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.7.chm)
1614

1715
以下文档/链接提供一些基本示例,参考这些示例可以帮助您更快熟悉如何使用这套SDK。
1816

1917
* [github | csharp-sdk-examples](https://github.com/fengyhack/csharp-sdk-examples)
2018

21-
* [C# SDK使用指南 | 代码示例](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.6/index.html)
19+
* [C# SDK使用指南 | 代码示例](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.7/index.html)
2220

2321
##如何安装
2422

@@ -61,14 +59,16 @@ git clone https://github.com/qiniu/csharp-sdk
6159
| .NET Framework 4.0 | Qiniu.Net40.sln |
6260
| .NET Framework 4.5 | Qiniu.Net45.sln |
6361
| .NET Framework 4.6 | Qiniu.Net46.sln |
64-
| .NET Core(netstandard1.6) | Qiniu.NetStandard16.sln |
62+
| .NET Core | Qiniu.Core.sln |
63+
| Win10 UWP| Qiniu.UWP.sln |
6564
| 以上全部 | Qiniu.ALL_VER.sln |
6665

6766
**注意**
6867

69-
如需编译`Qiniu.NetStandard16`或者`Qiniu.ALL_VER`(它包含前者),请先将`project.json``project.lock.json`拷贝至`Qiniu`文件夹下,或者拷贝`project.json`文件然后执行`dotnet restore`命令(推荐)。
68+
如需编译`Qiniu.Core.sln`(或`Qiniu.UWP.sln`),请先将`Qiniu.NetCore`(或`Qiniu.UWP`)文件夹下的
69+
`project.json``project.lock.json`拷贝至`Qiniu`文件夹下,或者只拷贝`project.json`文件然后执行`dotnet restore`命令(推荐)。
7070

71-
如需编译其他非NetCore版本,请删除`Qiniu`文件夹下的`project.json``project.lock.json`(如果有)
71+
编译其他版本时,如果`Qiniu`文件夹下有`project.json``project.lock.json`,请先删除
7272

7373
##API参考手册
7474

@@ -209,3 +209,28 @@ dotnet Example.dll
209209
当然,执行这个命令之前,`dotnet`工具是必须安装的。
210210

211211
如果您发布到Windows并且生成了exe文件,直接双击就可以运行。
212+
213+
###速览Win10 UWP
214+
215+
Win10 UWP是指“Windows 10 通用应用”,它和之前的.NET应用开发有一些区别,比如文件存储使用的是StorageFolder和StorageFile等。具体请参阅Windows官方文档。
216+
217+
同样的,UWP解决方案中也包含一个project.json文件,以下是一个简单的示例:
218+
219+
```json
220+
{
221+
"dependencies": {
222+
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0"
223+
},
224+
"frameworks": {
225+
"uap10.0": {}
226+
},
227+
"runtimes": {
228+
"win10-arm": {},
229+
"win10-arm-aot": {},
230+
"win10-x86": {},
231+
"win10-x86-aot": {},
232+
"win10-x64": {},
233+
"win10-x64-aot": {}
234+
}
235+
}
236+
```

bin/qiniu-csharp-sdk-v7.2.6.zip

-168 KB
Binary file not shown.

bin/qiniu-csharp-sdk-v7.2.7.zip

288 KB
Binary file not shown.

0 commit comments

Comments
 (0)