Skip to content
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
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language: csharp
solution: Qiniu.Net40.Travis.sln
22 changes: 22 additions & 0 deletions Qiniu.Net40.Travis.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net40", "src\Qiniu\Qiniu.Net40.Travis.csproj", "{2F5B0328-DE8B-4B53-A500-3077E340A51B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2F5B0328-DE8B-4B53-A500-3077E340A51B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F5B0328-DE8B-4B53-A500-3077E340A51B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F5B0328-DE8B-4B53-A500-3077E340A51B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F5B0328-DE8B-4B53-A500-3077E340A51B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#Qiniu (Cloud) C# SDK

[![Build Status](https://api.travis-ci.org/qiniu/csharp-sdk.png?branch=master)](https://travis-ci.org/qiniu/csharp-sdk)

##关于

此 C# SDK 适用于.NET Framework 2.0+ 和 .NET Core,基于七牛云API参考手册构建。使用此 SDK 构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云存储上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到终端(手持设备应用)的架构的服务或应用,通过七牛云存储及其 SDK,都能让您应用程序的终端用户高速上传和下载,同时也让您的服务端更加轻盈。
Expand Down
147 changes: 147 additions & 0 deletions src/Qiniu/Qiniu.Net40.Travis.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2F5B0328-DE8B-4B53-A500-3077E340A51B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Qiniu</RootNamespace>
<AssemblyName>Qiniu</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<BaseIntermediateOutputPath>..\..\bin\net40\obj</BaseIntermediateOutputPath>
<OutputPath>..\..\bin\net40\</OutputPath>
<DefineConstants>DEBUG;TRACE;Net40</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<DocumentationFile>..\..\bin\net40\Qiniu.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<BaseIntermediateOutputPath>..\..\bin\net40\obj</BaseIntermediateOutputPath>
<OutputPath>..\..\bin\net40\</OutputPath>
<DefineConstants>TRACE;Net40</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<DocumentationFile>..\..\bin\net40\Qiniu.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<!--
<Reference Include="System.Net.Http">
<HintPath>..\packages\System.Net.Http.dll</HintPath>
</Reference>
-->
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IO\SimpleUploader.cs" />
<Compile Include="QiniuCSharpSDK.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Common\Config.cs" />
<Compile Include="Common\Zone.cs" />
<Compile Include="Common\ZoneHelper.cs" />
<Compile Include="Common\ZoneInfo.cs" />
<Compile Include="CDN\Model\RefreshRequest.cs" />
<Compile Include="CDN\Model\RefreshInfo.cs" />
<Compile Include="CDN\Model\RefreshResult.cs" />
<Compile Include="CDN\Model\PrefetchRequest.cs" />
<Compile Include="CDN\Model\PrefetchInfo.cs" />
<Compile Include="CDN\Model\PrefetchResult.cs" />
<Compile Include="CDN\Model\BandwidthRequest.cs" />
<Compile Include="CDN\Model\BandwidthInfo.cs" />
<Compile Include="CDN\Model\BandwidthResult.cs" />
<Compile Include="CDN\Model\FluxRequest.cs" />
<Compile Include="CDN\Model\FluxInfo.cs" />
<Compile Include="CDN\Model\FluxResult.cs" />
<Compile Include="CDN\Model\LogListRequest.cs" />
<Compile Include="CDN\Model\LogListInfo.cs" />
<Compile Include="CDN\Model\LogListResult.cs" />
<Compile Include="CDN\Model\HotLinkRequest.cs" />
<Compile Include="CDN\CdnManager.cs" />
<Compile Include="Util\Auth.cs" />
<Compile Include="Util\Mac.cs" />
<Compile Include="Util\Signature.cs" />
<Compile Include="Util\UrlHelper.cs" />
<Compile Include="Util\Base64.cs" />
<Compile Include="Util\CRC32.cs" />
<Compile Include="Util\ETag.cs" />
<Compile Include="Util\Hashing.cs" />
<Compile Include="Util\StringHelper.cs" />
<Compile Include="Util\UserEnv.cs" />
<Compile Include="Http\HttpCode.cs" />
<Compile Include="Http\ContentType.cs" />
<Compile Include="Http\HttpResult.cs" />
<Compile Include="Http\HttpManager.cs" />
<Compile Include="IO\Model\ChunkUnit.cs" />
<Compile Include="IO\Model\PutPolicy.cs" />
<Compile Include="IO\Model\ResumeContext.cs" />
<Compile Include="IO\Model\ResumeHelper.cs" />
<Compile Include="IO\Model\ResumeInfo.cs" />
<Compile Include="IO\Model\UploadController.cs" />
<Compile Include="IO\Model\UploadProgressHandler.cs" />
<Compile Include="IO\ResumableUploader.cs" />
<Compile Include="IO\FormUploader.cs" />
<Compile Include="IO\UploadManager.cs" />
<Compile Include="IO\DownloadManager.cs" />
<Compile Include="RS\Model\BatchResult.cs" />
<Compile Include="RS\BucketManager.cs" />
<Compile Include="RS\Model\BatchInfo.cs" />
<Compile Include="RS\Model\BucketsResult.cs" />
<Compile Include="RS\Model\DomainsResult.cs" />
<Compile Include="RS\Model\FileDesc.cs" />
<Compile Include="RS\Model\ListInfo.cs" />
<Compile Include="RS\Model\ListResult.cs" />
<Compile Include="RS\Model\StatInfo.cs" />
<Compile Include="RS\Model\StatResult.cs" />
<Compile Include="RS\Model\BucketInfo.cs" />
<Compile Include="RS\Model\BucketResult.cs" />
<Compile Include="RSF\Model\PfopResult.cs" />
<Compile Include="RSF\OperationManager.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\Packages.Net40.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!--
<PropertyGroup>
<PostBuildEvent>
del /q /s Qiniu.pdb
rd /q /s .\obj\
</PostBuildEvent>
</PropertyGroup>
-->
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
2 changes: 0 additions & 2 deletions src/Qiniu/RSF/OperationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ public HttpResult dfopData(string fop, string localFile)
try
{
string dfopUrl = string.Format("{0}/dfop?fop={1}", Config.DFOP_API_HOST, fop);
string key = Path.GetFileName(localFile);
byte[] data = File.ReadAllBytes(localFile);
string token = auth.createManageToken(dfopUrl);
string boundary = HttpManager.createFormDataBoundary();
string sep = "--" + boundary;
Expand Down