cleaning code. · a9a1ca156a - SVN.BY: Go Git Service
Browse Source

cleaning code.

Related Work Items: #19
Tiernan OToole 8 years ago
parent
commit
a9a1ca156a

+ 53 - 0
B2Classes/B2Classes.csproj

1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
+  <PropertyGroup>
5
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
+    <ProjectGuid>{603F71B3-F819-4E4E-8A0E-738CAC305E8F}</ProjectGuid>
8
+    <OutputType>Library</OutputType>
9
+    <AppDesignerFolder>Properties</AppDesignerFolder>
10
+    <RootNamespace>B2Classes</RootNamespace>
11
+    <AssemblyName>B2Classes</AssemblyName>
12
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13
+    <FileAlignment>512</FileAlignment>
14
+  </PropertyGroup>
15
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16
+    <DebugSymbols>true</DebugSymbols>
17
+    <DebugType>full</DebugType>
18
+    <Optimize>false</Optimize>
19
+    <OutputPath>bin\Debug\</OutputPath>
20
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
21
+    <ErrorReport>prompt</ErrorReport>
22
+    <WarningLevel>4</WarningLevel>
23
+  </PropertyGroup>
24
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25
+    <DebugType>pdbonly</DebugType>
26
+    <Optimize>true</Optimize>
27
+    <OutputPath>bin\Release\</OutputPath>
28
+    <DefineConstants>TRACE</DefineConstants>
29
+    <ErrorReport>prompt</ErrorReport>
30
+    <WarningLevel>4</WarningLevel>
31
+  </PropertyGroup>
32
+  <ItemGroup>
33
+    <Reference Include="System" />
34
+    <Reference Include="System.Core" />
35
+    <Reference Include="System.Xml.Linq" />
36
+    <Reference Include="System.Data.DataSetExtensions" />
37
+    <Reference Include="Microsoft.CSharp" />
38
+    <Reference Include="System.Data" />
39
+    <Reference Include="System.Xml" />
40
+  </ItemGroup>
41
+  <ItemGroup>
42
+    <Compile Include="Classes.cs" />
43
+    <Compile Include="Properties\AssemblyInfo.cs" />
44
+  </ItemGroup>
45
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
46
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
47
+       Other similar extension points exist, see Microsoft.Common.targets.
48
+  <Target Name="BeforeBuild">
49
+  </Target>
50
+  <Target Name="AfterBuild">
51
+  </Target>
52
+  -->
53
+</Project>

+ 78 - 0
B2Classes/Classes.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace B2Classes
8
+{
9
+    public class AuthorizeResponse
10
+    {
11
+        public string accountId { get; set; }
12
+        public string apiUrl { get; set; }
13
+        public string authorizationToken { get; set; }
14
+        public string downloadUrl { get; set; }
15
+    }
16
+
17
+    public class CreateBucketResponse
18
+    {
19
+        public string bucketId { get; set; }
20
+        public string accountId { get; set; }
21
+        public string bucketName { get; set; }
22
+        public string bucketType { get; set; }
23
+    }
24
+
25
+    public class CreateBucketRequest
26
+    {
27
+        public string accountId { get; set; }
28
+        public string bucketName { get; set; }
29
+        public string bucketType { get; set; }
30
+    }
31
+
32
+    public class GetUploadURLRequest
33
+    {
34
+        public string bucketId { get; set; }
35
+    }
36
+
37
+    public class GetUploadURLResponse
38
+    {
39
+        public string bucketId { get; set; }
40
+        public string uploadUrl { get; set; }
41
+        public string authorizationToken { get; set; }
42
+    }
43
+
44
+    public class ListBucketsRequest
45
+    {
46
+        public string accountId { get; set; }
47
+    }
48
+
49
+    public class ListBucketsResponse
50
+    {
51
+        public List<Bucket> buckets { get; set; }
52
+    }
53
+
54
+    public class Bucket
55
+    {
56
+        public string bucketId { get; set; }
57
+        public string accountId { get; set; }
58
+        public string bucketName { get; set; }
59
+        public string bucketType { get; set; }
60
+    }
61
+
62
+    public class FileInfo
63
+    {
64
+        public string author { get; set; }
65
+    }
66
+
67
+    public class UploadFileResponse
68
+    {
69
+        public string fileId { get; set; }
70
+        public string fileName { get; set; }
71
+        public string accountId { get; set; }
72
+        public string bucketId { get; set; }
73
+        public int contentLength { get; set; }
74
+        public string contentSha1 { get; set; }
75
+        public string contentType { get; set; }
76
+        public FileInfo fileInfo { get; set; }
77
+    }
78
+}

+ 36 - 0
B2Classes/Properties/AssemblyInfo.cs

1
+using System.Reflection;
2
+using System.Runtime.CompilerServices;
3
+using System.Runtime.InteropServices;
4
+
5
+// General Information about an assembly is controlled through the following 
6
+// set of attributes. Change these attribute values to modify the information
7
+// associated with an assembly.
8
+[assembly: AssemblyTitle("B2Classes")]
9
+[assembly: AssemblyDescription("")]
10
+[assembly: AssemblyConfiguration("")]
11
+[assembly: AssemblyCompany("")]
12
+[assembly: AssemblyProduct("B2Classes")]
13
+[assembly: AssemblyCopyright("Copyright ©  2015")]
14
+[assembly: AssemblyTrademark("")]
15
+[assembly: AssemblyCulture("")]
16
+
17
+// Setting ComVisible to false makes the types in this assembly not visible 
18
+// to COM components.  If you need to access a type in this assembly from 
19
+// COM, set the ComVisible attribute to true on that type.
20
+[assembly: ComVisible(false)]
21
+
22
+// The following GUID is for the ID of the typelib if this project is exposed to COM
23
+[assembly: Guid("fe353639-3b33-44de-9147-45b63818d8a7")]
24
+
25
+// Version information for an assembly consists of the following four values:
26
+//
27
+//      Major Version
28
+//      Minor Version 
29
+//      Build Number
30
+//      Revision
31
+//
32
+// You can specify all the values or you can default the Build and Revision Numbers 
33
+// by using the '*' as shown below:
34
+// [assembly: AssemblyVersion("1.0.*")]
35
+[assembly: AssemblyVersion("1.0.0.0")]
36
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 8 - 2
B2Uploader.sln

1
 
1
 
2
 Microsoft Visual Studio Solution File, Format Version 12.00
2
 Microsoft Visual Studio Solution File, Format Version 12.00
3
-# Visual Studio 14
4
-VisualStudioVersion = 14.0.23107.0
3
+# Visual Studio 2013
4
+VisualStudioVersion = 12.0.31101.0
5
 MinimumVisualStudioVersion = 10.0.40219.1
5
 MinimumVisualStudioVersion = 10.0.40219.1
6
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B2Uploader", "B2Uploader\B2Uploader.csproj", "{A5D41169-C2EE-4B5E-A2D8-B63E485597A6}"
6
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B2Uploader", "B2Uploader\B2Uploader.csproj", "{A5D41169-C2EE-4B5E-A2D8-B63E485597A6}"
7
 EndProject
7
 EndProject
8
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B2Classes", "B2Classes\B2Classes.csproj", "{603F71B3-F819-4E4E-8A0E-738CAC305E8F}"
9
+EndProject
8
 Global
10
 Global
9
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
11
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
10
 		Debug|Any CPU = Debug|Any CPU
12
 		Debug|Any CPU = Debug|Any CPU
15
 		{A5D41169-C2EE-4B5E-A2D8-B63E485597A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
17
 		{A5D41169-C2EE-4B5E-A2D8-B63E485597A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
16
 		{A5D41169-C2EE-4B5E-A2D8-B63E485597A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
18
 		{A5D41169-C2EE-4B5E-A2D8-B63E485597A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
17
 		{A5D41169-C2EE-4B5E-A2D8-B63E485597A6}.Release|Any CPU.Build.0 = Release|Any CPU
19
 		{A5D41169-C2EE-4B5E-A2D8-B63E485597A6}.Release|Any CPU.Build.0 = Release|Any CPU
20
+		{603F71B3-F819-4E4E-8A0E-738CAC305E8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21
+		{603F71B3-F819-4E4E-8A0E-738CAC305E8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
22
+		{603F71B3-F819-4E4E-8A0E-738CAC305E8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
23
+		{603F71B3-F819-4E4E-8A0E-738CAC305E8F}.Release|Any CPU.Build.0 = Release|Any CPU
18
 	EndGlobalSection
24
 	EndGlobalSection
19
 	GlobalSection(SolutionProperties) = preSolution
25
 	GlobalSection(SolutionProperties) = preSolution
20
 		HideSolutionNode = FALSE
26
 		HideSolutionNode = FALSE

+ 3 - 3
B2Uploader/App.config

1
-<?xml version="1.0" encoding="utf-8" ?>
1
+<?xml version="1.0" encoding="utf-8"?>
2
 <configuration>
2
 <configuration>
3
     <startup> 
3
     <startup> 
4
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
4
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
5
     </startup>
5
     </startup>
6
-</configuration>
6
+</configuration>

+ 8 - 1
B2Uploader/B2Uploader.csproj

9
     <AppDesignerFolder>Properties</AppDesignerFolder>
9
     <AppDesignerFolder>Properties</AppDesignerFolder>
10
     <RootNamespace>B2Uploader</RootNamespace>
10
     <RootNamespace>B2Uploader</RootNamespace>
11
     <AssemblyName>B2Uploader</AssemblyName>
11
     <AssemblyName>B2Uploader</AssemblyName>
12
-    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
12
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13
     <FileAlignment>512</FileAlignment>
13
     <FileAlignment>512</FileAlignment>
14
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15
+    <TargetFrameworkProfile />
15
   </PropertyGroup>
16
   </PropertyGroup>
16
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17
     <PlatformTarget>AnyCPU</PlatformTarget>
18
     <PlatformTarget>AnyCPU</PlatformTarget>
54
     <None Include="App.config" />
55
     <None Include="App.config" />
55
     <None Include="packages.config" />
56
     <None Include="packages.config" />
56
   </ItemGroup>
57
   </ItemGroup>
58
+  <ItemGroup>
59
+    <ProjectReference Include="..\B2Classes\B2Classes.csproj">
60
+      <Project>{603f71b3-f819-4e4e-8a0e-738cac305e8f}</Project>
61
+      <Name>B2Classes</Name>
62
+    </ProjectReference>
63
+  </ItemGroup>
57
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
64
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
58
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
65
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
59
        Other similar extension points exist, see Microsoft.Common.targets.
66
        Other similar extension points exist, see Microsoft.Common.targets.

+ 3 - 70
B2Uploader/Program.cs

1
-using Newtonsoft.Json;
1
+using B2Classes;
2
+using Newtonsoft.Json;
2
 using System;
3
 using System;
3
 using System.Collections.Generic;
4
 using System.Collections.Generic;
4
 using System.IO;
5
 using System.IO;
146
         }
147
         }
147
     }
148
     }
148
 
149
 
149
-    public class AuthorizeResponse
150
-    {        
151
-        public string accountId { get; set; }
152
-        public string apiUrl { get; set; }
153
-        public string authorizationToken { get; set; }
154
-        public string downloadUrl { get; set; }   
155
-    }
156
-
157
-    public class CreateBucketResponse
158
-    {
159
-        public string bucketId { get; set; }
160
-        public string accountId { get; set; }
161
-        public string bucketName { get; set; }
162
-        public string bucketType { get; set; }
163
-    }
164
-
165
-    public class CreateBucketRequest
166
-    {
167
-        public string accountId { get; set; }
168
-        public string bucketName { get; set; }
169
-        public string bucketType { get; set; }
170
-    }
171
-
172
-    public class GetUploadURLRequest
173
-    {
174
-        public string bucketId { get; set; }
175
-    }
176
-
177
-    public class GetUploadURLResponse
178
-    {
179
-        public string bucketId { get; set; }
180
-        public string uploadUrl { get; set; }
181
-        public string authorizationToken { get; set; }
182
-    }
183
-
184
-    public class ListBucketsRequest
185
-    {
186
-        public string accountId { get; set; }
187
-    }
188
-
189
-    public class ListBucketsResponse
190
-    {
191
-        public List<Bucket> buckets { get; set; }
192
-    }
193
-
194
-    public class Bucket
195
-    {
196
-        public string bucketId { get; set; }
197
-        public string accountId { get; set; }
198
-        public string bucketName { get; set; }
199
-        public string bucketType { get; set; }
200
-    }
201
-
202
-    public class FileInfo
203
-    {
204
-        public string author { get; set; }
205
-    }
206
-
207
-    public class UploadFileResponse
208
-    {
209
-        public string fileId { get; set; }
210
-        public string fileName { get; set; }
211
-        public string accountId { get; set; }
212
-        public string bucketId { get; set; }
213
-        public int contentLength { get; set; }
214
-        public string contentSha1 { get; set; }
215
-        public string contentType { get; set; }
216
-        public FileInfo fileInfo { get; set; }
217
-    }
150
+    
218
 }
151
 }