Skip to content

Commit 98a64c7

Browse files
authored
Merge pull request #136 from fengyhack/master
版本更新v7.2.7:新增UWP支持,新增async支持
2 parents ea54ffb + 08a4b85 commit 98a64c7

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

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

README.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44

55
##关于
66

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

99
##SDK文档
1010

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

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

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

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

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

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

2323
##如何安装
2424

@@ -61,14 +61,16 @@ git clone https://github.com/qiniu/csharp-sdk
6161
| .NET Framework 4.0 | Qiniu.Net40.sln |
6262
| .NET Framework 4.5 | Qiniu.Net45.sln |
6363
| .NET Framework 4.6 | Qiniu.Net46.sln |
64-
| .NET Core(netstandard1.6) | Qiniu.NetStandard16.sln |
64+
| .NET Core | Qiniu.Core.sln |
65+
| Win10 UWP| Qiniu.UWP.sln |
6566
| 以上全部 | Qiniu.ALL_VER.sln |
6667

6768
**注意**
6869

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

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

7375
##API参考手册
7476

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

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

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)