Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added the silverlight uploader. I need to refresh my memory...

  • Loading branch information...
commit 4a9bd6f22edf8d582875710371343ab3eb0867ff 1 parent 2f62050
@nathanb authored
Showing with 4,816 additions and 0 deletions.
  1. +10 −0 UploaderSL/LICENSE.txt
  2. +8 −0 UploaderSL/src/Uploader.Client/App.xaml
  3. +66 −0 UploaderSL/src/Uploader.Client/App.xaml.cs
  4. +27 −0 UploaderSL/src/Uploader.Client/Items.cs
  5. +11 −0 UploaderSL/src/Uploader.Client/ListItem.xaml
  6. +223 −0 UploaderSL/src/Uploader.Client/ListItem.xaml.cs
  7. +11 −0 UploaderSL/src/Uploader.Client/Page.xaml
  8. +56 −0 UploaderSL/src/Uploader.Client/Page.xaml.cs
  9. +6 −0 UploaderSL/src/Uploader.Client/Properties/AppManifest.xml
  10. +35 −0 UploaderSL/src/Uploader.Client/Properties/AssemblyInfo.cs
  11. +4 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver.disco
  12. +77 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver.wsdl
  13. +46 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver.xsd
  14. +42 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver1.xsd
  15. +98 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver11.xsd
  16. +748 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/Reference.cs
  17. +35 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/Reference.svcmap
  18. +10 −0 .../src/Uploader.Client/Service References/FileReceiver/Uploader.Client.FileReceiver.FinishResponse.datasource
  19. +10 −0 .../src/Uploader.Client/Service References/FileReceiver/Uploader.Client.FileReceiver.UploadResponse.datasource
  20. +10 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/configuration.svcinfo
  21. +195 −0 UploaderSL/src/Uploader.Client/Service References/FileReceiver/configuration91.svcinfo
  22. +21 −0 UploaderSL/src/Uploader.Client/ServiceReferences.ClientConfig
  23. +207 −0 UploaderSL/src/Uploader.Client/Uploader.Client.csproj
  24. +51 −0 UploaderSL/src/Uploader.Client/Utility.cs
  25. +8 −0 UploaderSL/src/Uploader.ClientHTTP/App.xaml
  26. +66 −0 UploaderSL/src/Uploader.ClientHTTP/App.xaml.cs
  27. +16 −0 UploaderSL/src/Uploader.ClientHTTP/ChunkUploadRequest.cs
  28. +14 −0 UploaderSL/src/Uploader.ClientHTTP/Credentials.cs
  29. +18 −0 UploaderSL/src/Uploader.ClientHTTP/Enums.cs
  30. +39 −0 UploaderSL/src/Uploader.ClientHTTP/Events.cs
  31. +279 −0 UploaderSL/src/Uploader.ClientHTTP/FileSender.cs
  32. +16 −0 UploaderSL/src/Uploader.ClientHTTP/FinishRequest.cs
  33. +12 −0 UploaderSL/src/Uploader.ClientHTTP/FinishResponse.cs
  34. +27 −0 UploaderSL/src/Uploader.ClientHTTP/Items.cs
  35. +11 −0 UploaderSL/src/Uploader.ClientHTTP/ListItem.xaml
  36. +64 −0 UploaderSL/src/Uploader.ClientHTTP/ListItem.xaml.cs
  37. +11 −0 UploaderSL/src/Uploader.ClientHTTP/Page.xaml
  38. +56 −0 UploaderSL/src/Uploader.ClientHTTP/Page.xaml.cs
  39. +6 −0 UploaderSL/src/Uploader.ClientHTTP/Properties/AppManifest.xml
  40. +35 −0 UploaderSL/src/Uploader.ClientHTTP/Properties/AssemblyInfo.cs
  41. +15 −0 UploaderSL/src/Uploader.ClientHTTP/ResponseBase.cs
  42. +12 −0 UploaderSL/src/Uploader.ClientHTTP/UploadResponse.cs
  43. +180 −0 UploaderSL/src/Uploader.ClientHTTP/Uploader.ClientHttp.csproj
  44. +159 −0 UploaderSL/src/Uploader.ClientHTTP/Utility.cs
  45. +37 −0 UploaderSL/src/UploaderSL-vs10.sln
  46. +18 −0 UploaderSL/src/UploaderSL.Web/Config.cs
  47. +58 −0 UploaderSL/src/UploaderSL.Web/Default.aspx
  48. +17 −0 UploaderSL/src/UploaderSL.Web/Default.aspx.cs
  49. +25 −0 UploaderSL/src/UploaderSL.Web/Default.aspx.designer.cs
  50. +60 −0 UploaderSL/src/UploaderSL.Web/HTTPUpload.aspx
  51. +17 −0 UploaderSL/src/UploaderSL.Web/HTTPUpload.aspx.cs
  52. +25 −0 UploaderSL/src/UploaderSL.Web/HTTPUpload.aspx.designer.cs
  53. +35 −0 UploaderSL/src/UploaderSL.Web/Properties/AssemblyInfo.cs
  54. +19 −0 UploaderSL/src/UploaderSL.Web/Services/ChunkUploadRequest.cs
  55. +17 −0 UploaderSL/src/UploaderSL.Web/Services/Credentials.cs
  56. +21 −0 UploaderSL/src/UploaderSL.Web/Services/Enums.cs
  57. +1 −0  UploaderSL/src/UploaderSL.Web/Services/FileReceiver.ashx
  58. +116 −0 UploaderSL/src/UploaderSL.Web/Services/FileReceiver.ashx.cs
  59. +1 −0  UploaderSL/src/UploaderSL.Web/Services/FileReceiver.svc
  60. +98 −0 UploaderSL/src/UploaderSL.Web/Services/FileReceiver.svc.cs
  61. +21 −0 UploaderSL/src/UploaderSL.Web/Services/FinishRequest.cs
  62. +15 −0 UploaderSL/src/UploaderSL.Web/Services/FinishResponse.cs
  63. +21 −0 UploaderSL/src/UploaderSL.Web/Services/IFileReceiver.cs
  64. +18 −0 UploaderSL/src/UploaderSL.Web/Services/ResponseBase.cs
  65. +80 −0 UploaderSL/src/UploaderSL.Web/Services/UploadProcessor.cs
  66. +15 −0 UploaderSL/src/UploaderSL.Web/Services/UploadResponse.cs
  67. +486 −0 UploaderSL/src/UploaderSL.Web/Silverlight.js
  68. +151 −0 UploaderSL/src/UploaderSL.Web/UploaderSL.Web.csproj
  69. +228 −0 UploaderSL/src/UploaderSL.Web/Utility.cs
  70. +128 −0 UploaderSL/src/UploaderSL.Web/Web.config
  71. +37 −0 UploaderSL/src/UploaderSL.sln
View
10 UploaderSL/LICENSE.txt
@@ -0,0 +1,10 @@
+Copyright (c) 2009, Nathan Bridgewater
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the Integrated Web Systems, LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
8 UploaderSL/src/Uploader.Client/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="Uploader.Client.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
View
66 UploaderSL/src/Uploader.Client/App.xaml.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace Uploader.Client
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ this.RootVisual = new Page();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight 2 Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
View
27 UploaderSL/src/Uploader.Client/Items.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace Uploader.Client
+{
+ public class Items :
+ System.Collections.ObjectModel.ObservableCollection<string>
+ {
+ public Items()
+ {
+ Add("Item 1");
+ Add("Item 2");
+ Add("Item 3");
+ Add("Item 4");
+ Add("Item 5");
+ }
+ }
+
+}
View
11 UploaderSL/src/Uploader.Client/ListItem.xaml
@@ -0,0 +1,11 @@
+<UserControl x:Class="Uploader.Client.ListItem"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Width="390" Height="60">
+ <Grid x:Name="LayoutRoot" Background="White">
+ <Border BorderBrush="Black" BorderThickness="0,0,0,0" Margin="5,5,5,24">
+ <TextBlock x:Name="uxText"></TextBlock>
+ </Border>
+ <ProgressBar Margin="5,5,5,5" Height="15" VerticalAlignment="Bottom" x:Name="uxProgress"/>
+ </Grid>
+</UserControl>
View
223 UploaderSL/src/Uploader.Client/ListItem.xaml.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.IO;
+
+namespace Uploader.Client
+{
+ public partial class ListItem : UserControl
+ {
+ public ListItem()
+ {
+ InitializeComponent();
+ FilePosition = 0;
+ }
+
+ FileInfo _File;
+ public FileInfo File
+ {
+ get { return _File; }
+ set
+ {
+ _File = value;
+ this.uxText.Text = _File.Name;
+ }
+ }
+ private long FilePosition;
+ private long FileLength;
+ private int CurrentStep = 0;
+ private int Steps = 0;
+
+ public void Send()
+ {
+ try
+ {
+ //send first chunk, start upload.
+
+ FileReceiver.FileReceiverClient client = new Uploader.Client.FileReceiver.FileReceiverClient();
+ client.Endpoint.Address = new System.ServiceModel.EndpointAddress(Utility.BaseUrl + "Services/FileReceiver.svc");
+ client.BeginUploadCompleted += new EventHandler<Uploader.Client.FileReceiver.BeginUploadCompletedEventArgs>(client_BeginUploadCompleted);
+ FileReceiver.ChunkUploadRequest req = new Uploader.Client.FileReceiver.ChunkUploadRequest();
+ using (FileStream fs = this.File.OpenRead())
+ {
+ //get full hash first.
+ this.FileLength = fs.Length;
+
+ //setup progress bar.
+ this.Steps = (int)(this.FileLength / (long)Utility.chunkSize);
+ this.uxProgress.Minimum = 0;
+ this.uxProgress.Maximum = this.Steps;
+
+ int read = 0;
+ byte[] buffer = null;
+
+ if (fs.Length <= Utility.chunkSize)
+ buffer = new byte[(int)fs.Length];
+ else
+ buffer = new byte[Utility.chunkSize];
+
+ read = fs.Read(buffer, 0, Utility.chunkSize);
+
+ this.FilePosition += read;
+
+ req.Chunk = buffer;
+ req.ChunkSize = buffer.Length;
+ req.Hash = Utility.GetSHA256Hash(buffer);
+
+ client.BeginUploadAsync(req);
+ }
+ }
+ catch (Exception ex)
+ {
+ //show error.
+ this.uxText.Text = ex.Message;
+ }
+ }
+ void SendNextChunk(Guid token)
+ {
+ try
+ {
+ FileReceiver.FileReceiverClient client = new Uploader.Client.FileReceiver.FileReceiverClient();
+ client.Endpoint.Address = new System.ServiceModel.EndpointAddress(Utility.BaseUrl + "Services/FileReceiver.svc");
+ client.ContinueUploadCompleted += new EventHandler<Uploader.Client.FileReceiver.ContinueUploadCompletedEventArgs>(client_ContinueUploadCompleted);
+
+ FileReceiver.ChunkUploadRequest req = new Uploader.Client.FileReceiver.ChunkUploadRequest();
+ using (FileStream fs = this.File.OpenRead())
+ {
+ int read = 0;
+ byte[] buffer = null;
+ int readSize = Utility.chunkSize;
+
+ long diff = this.FileLength - this.FilePosition;
+ if (diff < Utility.chunkSize)
+ readSize = (int)diff;
+
+ buffer = new byte[readSize];
+
+ fs.Seek(this.FilePosition, SeekOrigin.Begin);
+ read = fs.Read(buffer, 0, readSize);
+
+ this.FilePosition += read;
+
+ req.ChunkSize = buffer.Length;
+ req.Hash = Utility.GetSHA256Hash(buffer);
+ req.Chunk = buffer;
+ req.Token = token;
+
+ client.ContinueUploadAsync(req);
+ }
+ }
+ catch (Exception ex)
+ {
+ //show error.
+ this.uxText.Text = ex.Message;
+ }
+ }
+
+ void client_ContinueUploadCompleted(object sender, Uploader.Client.FileReceiver.ContinueUploadCompletedEventArgs e)
+ {
+ if (!e.Cancelled && e.Error == null)
+ {
+ if (e.Result.Status == Uploader.Client.FileReceiver.EnumsResponsStatus.Success)
+ {
+ UpdateProgress();
+
+ if (this.FilePosition < this.FileLength)
+ SendNextChunk(e.Result.Token);
+ else
+ {
+ //done..
+ FinishUpload(e.Result.Token);
+ }
+ }
+ }
+ else if (e.Error != null)
+ {
+ this.uxText.Text = e.Error.Message;
+ }
+ else
+ {
+ this.uxText.Text = "Cancelled";
+ }
+ }
+ void client_BeginUploadCompleted(object sender, Uploader.Client.FileReceiver.BeginUploadCompletedEventArgs e)
+ {
+ if (!e.Cancelled && e.Error == null)
+ {
+ if (e.Result.Status == Uploader.Client.FileReceiver.EnumsResponsStatus.Success)
+ {
+ UpdateProgress();
+
+ if (this.FilePosition < this.FileLength)
+ SendNextChunk(e.Result.Token);
+ else
+ {
+ //finish upload.
+ FinishUpload(e.Result.Token);
+ }
+ }
+ else
+ uxText.Text = e.Result.Message;
+ }
+ else if (e.Error != null)
+ {
+ this.uxText.Text = e.Error.Message;
+ }
+ else
+ {
+ this.uxText.Text = "Cancelled";
+ }
+ }
+
+ void FinishUpload(Guid token)
+ {
+ FileReceiver.FileReceiverClient client = new Uploader.Client.FileReceiver.FileReceiverClient();
+ client.Endpoint.Address = new System.ServiceModel.EndpointAddress(Utility.BaseUrl + "Services/FileReceiver.svc");
+ client.FinishUploadCompleted += new EventHandler<Uploader.Client.FileReceiver.FinishUploadCompletedEventArgs>(client_FinishUploadCompleted);
+
+ FileReceiver.FinishRequest req = new Uploader.Client.FileReceiver.FinishRequest();
+ using (FileStream fs = this.File.OpenRead())
+ {
+ req.Extension = this.File.Extension;
+ req.FullHash = Utility.GetSHA256Hash(fs);
+ }
+ req.Token = token;
+
+ client.FinishUploadAsync(req);
+ }
+
+ void UpdateProgress()
+ {
+ this.CurrentStep++;
+ this.uxProgress.Value = this.CurrentStep;
+ }
+
+ void client_FinishUploadCompleted(object sender, Uploader.Client.FileReceiver.FinishUploadCompletedEventArgs e)
+ {
+ if (!e.Cancelled && e.Error == null)
+ {
+ if (e.Result.Status == Uploader.Client.FileReceiver.EnumsResponsStatus.Success)
+ {
+ uxText.Text = "Transferred successfully.";
+ }
+ else
+ uxText.Text = e.Result.Message;
+ }
+ else
+ {
+ if (e.Error != null)
+ uxText.Text = e.Error.Message;
+ else
+ uxText.Text = "Cancelled";
+ }
+ }
+ }
+}
View
11 UploaderSL/src/Uploader.Client/Page.xaml
@@ -0,0 +1,11 @@
+<UserControl x:Class="Uploader.Client.Page"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:src="clr-namespace:Uploader.Client"
+ Width="400" Height="600" Loaded="Page_Loaded">
+ <Grid x:Name="LayoutRoot" Background="White">
+ <Button Name="uxSend" Content="Send" Width="50" Height="25" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="5,5,5,5" Click="uxSend_Click"/>
+ <Button Name="uxBrowse" Content="Browse..." Width="70" Height="25" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="5,5,70,5" Click="uxBrowse_Click"/>
+ <ListBox Name="uxFiles" Margin="0,35,0,0"/>
+ </Grid>
+</UserControl>
View
56 UploaderSL/src/Uploader.Client/Page.xaml.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.IO;
+
+namespace Uploader.Client
+{
+ public partial class Page : UserControl
+ {
+ public Page()
+ {
+ InitializeComponent();
+
+ this.uxFiles.Items.Clear();
+ }
+
+ private void uxSend_Click(object sender, RoutedEventArgs e)
+ {
+ foreach (object row in uxFiles.Items)
+ {
+ ListItem item = row as ListItem;
+ if (item != null)
+ item.Send();
+ }
+ }
+
+ private void Page_Loaded(object sender, RoutedEventArgs e)
+ {
+
+ }
+
+ private void uxBrowse_Click(object sender, RoutedEventArgs e)
+ {
+ OpenFileDialog of = new OpenFileDialog();
+ of.Filter = "All Files(*.*)|*.*";
+ of.Multiselect = true;
+ if (of.ShowDialog() ?? false)
+ {
+ foreach (FileInfo info in of.Files)
+ {
+ ListItem item = new ListItem();
+ item.File = info;
+ uxFiles.Items.Add(item);
+ }
+ }
+ }
+ }
+}
View
6 UploaderSL/src/Uploader.Client/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
View
35 UploaderSL/src/Uploader.Client/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Uploader.Client")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Uploader.Client")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0aa8beb8-ad93-477b-9de6-360e865f22f4")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
4 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver.disco
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
+ <contractRef ref="http://localhost:4796/Services/FileReceiver.svc?wsdl" docRef="http://localhost:4796/Services/FileReceiver.svc" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
+</discovery>
View
77 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver.wsdl
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:tns="http://tempuri.org/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" name="FileReceiver" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://tempuri.org/Imports">
+ <xsd:import schemaLocation="http://localhost:4796/Services/FileReceiver.svc?xsd=xsd0" namespace="http://tempuri.org/" />
+ <xsd:import schemaLocation="http://localhost:4796/Services/FileReceiver.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
+ <xsd:import schemaLocation="http://localhost:4796/Services/FileReceiver.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" />
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="IFileReceiver_BeginUpload_InputMessage">
+ <wsdl:part name="parameters" element="tns:BeginUpload" />
+ </wsdl:message>
+ <wsdl:message name="IFileReceiver_BeginUpload_OutputMessage">
+ <wsdl:part name="parameters" element="tns:BeginUploadResponse" />
+ </wsdl:message>
+ <wsdl:message name="IFileReceiver_ContinueUpload_InputMessage">
+ <wsdl:part name="parameters" element="tns:ContinueUpload" />
+ </wsdl:message>
+ <wsdl:message name="IFileReceiver_ContinueUpload_OutputMessage">
+ <wsdl:part name="parameters" element="tns:ContinueUploadResponse" />
+ </wsdl:message>
+ <wsdl:message name="IFileReceiver_FinishUpload_InputMessage">
+ <wsdl:part name="parameters" element="tns:FinishUpload" />
+ </wsdl:message>
+ <wsdl:message name="IFileReceiver_FinishUpload_OutputMessage">
+ <wsdl:part name="parameters" element="tns:FinishUploadResponse" />
+ </wsdl:message>
+ <wsdl:portType name="IFileReceiver">
+ <wsdl:operation name="BeginUpload">
+ <wsdl:input wsaw:Action="http://tempuri.org/IFileReceiver/BeginUpload" message="tns:IFileReceiver_BeginUpload_InputMessage" />
+ <wsdl:output wsaw:Action="http://tempuri.org/IFileReceiver/BeginUploadResponse" message="tns:IFileReceiver_BeginUpload_OutputMessage" />
+ </wsdl:operation>
+ <wsdl:operation name="ContinueUpload">
+ <wsdl:input wsaw:Action="http://tempuri.org/IFileReceiver/ContinueUpload" message="tns:IFileReceiver_ContinueUpload_InputMessage" />
+ <wsdl:output wsaw:Action="http://tempuri.org/IFileReceiver/ContinueUploadResponse" message="tns:IFileReceiver_ContinueUpload_OutputMessage" />
+ </wsdl:operation>
+ <wsdl:operation name="FinishUpload">
+ <wsdl:input wsaw:Action="http://tempuri.org/IFileReceiver/FinishUpload" message="tns:IFileReceiver_FinishUpload_InputMessage" />
+ <wsdl:output wsaw:Action="http://tempuri.org/IFileReceiver/FinishUploadResponse" message="tns:IFileReceiver_FinishUpload_OutputMessage" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="BasicHttpBinding_IFileReceiver" type="tns:IFileReceiver">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="BeginUpload">
+ <soap:operation soapAction="http://tempuri.org/IFileReceiver/BeginUpload" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="ContinueUpload">
+ <soap:operation soapAction="http://tempuri.org/IFileReceiver/ContinueUpload" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="FinishUpload">
+ <soap:operation soapAction="http://tempuri.org/IFileReceiver/FinishUpload" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="FileReceiver">
+ <wsdl:port name="BasicHttpBinding_IFileReceiver" binding="tns:BasicHttpBinding_IFileReceiver">
+ <soap:address location="http://localhost:4796/Services/FileReceiver.svc" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
View
46 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver.xsd
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import schemaLocation="http://localhost:4796/Services/FileReceiver.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" />
+ <xs:element name="BeginUpload">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" minOccurs="0" name="request" nillable="true" type="q1:ChunkUploadRequest" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="BeginUploadResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" minOccurs="0" name="BeginUploadResult" nillable="true" type="q2:UploadResponse" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="ContinueUpload">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" minOccurs="0" name="request" nillable="true" type="q3:ChunkUploadRequest" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="ContinueUploadResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element xmlns:q4="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" minOccurs="0" name="ContinueUploadResult" nillable="true" type="q4:UploadResponse" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="FinishUpload">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element xmlns:q5="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" minOccurs="0" name="request" nillable="true" type="q5:FinishRequest" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="FinishUploadResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element xmlns:q6="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" minOccurs="0" name="FinishUploadResult" nillable="true" type="q6:FinishResponse" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
View
42 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver1.xsd
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="anyType" nillable="true" type="xs:anyType" />
+ <xs:element name="anyURI" nillable="true" type="xs:anyURI" />
+ <xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
+ <xs:element name="boolean" nillable="true" type="xs:boolean" />
+ <xs:element name="byte" nillable="true" type="xs:byte" />
+ <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
+ <xs:element name="decimal" nillable="true" type="xs:decimal" />
+ <xs:element name="double" nillable="true" type="xs:double" />
+ <xs:element name="float" nillable="true" type="xs:float" />
+ <xs:element name="int" nillable="true" type="xs:int" />
+ <xs:element name="long" nillable="true" type="xs:long" />
+ <xs:element name="QName" nillable="true" type="xs:QName" />
+ <xs:element name="short" nillable="true" type="xs:short" />
+ <xs:element name="string" nillable="true" type="xs:string" />
+ <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
+ <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
+ <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
+ <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
+ <xs:element name="char" nillable="true" type="tns:char" />
+ <xs:simpleType name="char">
+ <xs:restriction base="xs:int" />
+ </xs:simpleType>
+ <xs:element name="duration" nillable="true" type="tns:duration" />
+ <xs:simpleType name="duration">
+ <xs:restriction base="xs:duration">
+ <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
+ <xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
+ <xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:element name="guid" nillable="true" type="tns:guid" />
+ <xs:simpleType name="guid">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attribute name="FactoryType" type="xs:QName" />
+ <xs:attribute name="Id" type="xs:ID" />
+ <xs:attribute name="Ref" type="xs:IDREF" />
+</xs:schema>
View
98 UploaderSL/src/Uploader.Client/Service References/FileReceiver/FileReceiver11.xsd
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import schemaLocation="http://localhost:4796/Services/FileReceiver.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
+ <xs:complexType name="ChunkUploadRequest">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="Chunk" nillable="true" type="xs:base64Binary" />
+ <xs:element minOccurs="0" name="ChunkSize" type="xs:int" />
+ <xs:element minOccurs="0" name="Hash" nillable="true" type="xs:string" />
+ <xs:element minOccurs="0" name="Token" type="ser:guid" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="ChunkUploadRequest" nillable="true" type="tns:ChunkUploadRequest" />
+ <xs:complexType name="UploadResponse">
+ <xs:complexContent mixed="false">
+ <xs:extension base="tns:ResponseBase">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="Token" type="ser:guid" />
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="UploadResponse" nillable="true" type="tns:UploadResponse" />
+ <xs:complexType name="ResponseBase">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
+ <xs:element minOccurs="0" name="Status" type="tns:Enums.ResponsStatus" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="ResponseBase" nillable="true" type="tns:ResponseBase" />
+ <xs:simpleType name="Enums.ResponsStatus">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="NotSet" />
+ <xs:enumeration value="Success" />
+ <xs:enumeration value="Fail">
+ <xs:annotation>
+ <xs:appinfo>
+ <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">20</EnumerationValue>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:enumeration>
+ <xs:enumeration value="FailFullHashCheck">
+ <xs:annotation>
+ <xs:appinfo>
+ <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">21</EnumerationValue>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:enumeration>
+ <xs:enumeration value="FailChunkHashCheck">
+ <xs:annotation>
+ <xs:appinfo>
+ <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">22</EnumerationValue>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:enumeration>
+ <xs:enumeration value="FailAuthentication">
+ <xs:annotation>
+ <xs:appinfo>
+ <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">23</EnumerationValue>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:enumeration>
+ <xs:enumeration value="FailTracker">
+ <xs:annotation>
+ <xs:appinfo>
+ <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">24</EnumerationValue>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:enumeration>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:element name="Enums.ResponsStatus" nillable="true" type="tns:Enums.ResponsStatus" />
+ <xs:complexType name="FinishRequest">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="Credentials" nillable="true" type="tns:Credentials" />
+ <xs:element minOccurs="0" name="Extension" nillable="true" type="xs:string" />
+ <xs:element minOccurs="0" name="FullHash" nillable="true" type="xs:string" />
+ <xs:element minOccurs="0" name="Token" type="ser:guid" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="FinishRequest" nillable="true" type="tns:FinishRequest" />
+ <xs:complexType name="Credentials">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="Password" nillable="true" type="xs:string" />
+ <xs:element minOccurs="0" name="Username" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="Credentials" nillable="true" type="tns:Credentials" />
+ <xs:complexType name="FinishResponse">
+ <xs:complexContent mixed="false">
+ <xs:extension base="tns:ResponseBase">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="NewFilename" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="FinishResponse" nillable="true" type="tns:FinishResponse" />
+</xs:schema>
View
748 UploaderSL/src/Uploader.Client/Service References/FileReceiver/Reference.cs
@@ -0,0 +1,748 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+//
+// This code was auto-generated by Microsoft.Silverlight.ServiceReference, version 3.0.40818.0
+//
+namespace Uploader.Client.FileReceiver {
+ using System.Runtime.Serialization;
+
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="ChunkUploadRequest", Namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services")]
+ public partial class ChunkUploadRequest : object, System.ComponentModel.INotifyPropertyChanged {
+
+ private byte[] ChunkField;
+
+ private int ChunkSizeField;
+
+ private string HashField;
+
+ private System.Guid TokenField;
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public byte[] Chunk {
+ get {
+ return this.ChunkField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.ChunkField, value) != true)) {
+ this.ChunkField = value;
+ this.RaisePropertyChanged("Chunk");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public int ChunkSize {
+ get {
+ return this.ChunkSizeField;
+ }
+ set {
+ if ((this.ChunkSizeField.Equals(value) != true)) {
+ this.ChunkSizeField = value;
+ this.RaisePropertyChanged("ChunkSize");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string Hash {
+ get {
+ return this.HashField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.HashField, value) != true)) {
+ this.HashField = value;
+ this.RaisePropertyChanged("Hash");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public System.Guid Token {
+ get {
+ return this.TokenField;
+ }
+ set {
+ if ((this.TokenField.Equals(value) != true)) {
+ this.TokenField = value;
+ this.RaisePropertyChanged("Token");
+ }
+ }
+ }
+
+ public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+ protected void RaisePropertyChanged(string propertyName) {
+ System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+ if ((propertyChanged != null)) {
+ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="ResponseBase", Namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services")]
+ [System.Runtime.Serialization.KnownTypeAttribute(typeof(Uploader.Client.FileReceiver.FinishResponse))]
+ [System.Runtime.Serialization.KnownTypeAttribute(typeof(Uploader.Client.FileReceiver.UploadResponse))]
+ public partial class ResponseBase : object, System.ComponentModel.INotifyPropertyChanged {
+
+ private string MessageField;
+
+ private Uploader.Client.FileReceiver.EnumsResponsStatus StatusField;
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string Message {
+ get {
+ return this.MessageField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.MessageField, value) != true)) {
+ this.MessageField = value;
+ this.RaisePropertyChanged("Message");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public Uploader.Client.FileReceiver.EnumsResponsStatus Status {
+ get {
+ return this.StatusField;
+ }
+ set {
+ if ((this.StatusField.Equals(value) != true)) {
+ this.StatusField = value;
+ this.RaisePropertyChanged("Status");
+ }
+ }
+ }
+
+ public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+ protected void RaisePropertyChanged(string propertyName) {
+ System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+ if ((propertyChanged != null)) {
+ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="FinishResponse", Namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services")]
+ public partial class FinishResponse : Uploader.Client.FileReceiver.ResponseBase {
+
+ private string NewFilenameField;
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string NewFilename {
+ get {
+ return this.NewFilenameField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.NewFilenameField, value) != true)) {
+ this.NewFilenameField = value;
+ this.RaisePropertyChanged("NewFilename");
+ }
+ }
+ }
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="UploadResponse", Namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services")]
+ public partial class UploadResponse : Uploader.Client.FileReceiver.ResponseBase {
+
+ private System.Guid TokenField;
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public System.Guid Token {
+ get {
+ return this.TokenField;
+ }
+ set {
+ if ((this.TokenField.Equals(value) != true)) {
+ this.TokenField = value;
+ this.RaisePropertyChanged("Token");
+ }
+ }
+ }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="Enums.ResponsStatus", Namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services")]
+ public enum EnumsResponsStatus : int {
+
+ [System.Runtime.Serialization.EnumMemberAttribute()]
+ NotSet = 0,
+
+ [System.Runtime.Serialization.EnumMemberAttribute()]
+ Success = 1,
+
+ [System.Runtime.Serialization.EnumMemberAttribute()]
+ Fail = 20,
+
+ [System.Runtime.Serialization.EnumMemberAttribute()]
+ FailFullHashCheck = 21,
+
+ [System.Runtime.Serialization.EnumMemberAttribute()]
+ FailChunkHashCheck = 22,
+
+ [System.Runtime.Serialization.EnumMemberAttribute()]
+ FailAuthentication = 23,
+
+ [System.Runtime.Serialization.EnumMemberAttribute()]
+ FailTracker = 24,
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="FinishRequest", Namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services")]
+ public partial class FinishRequest : object, System.ComponentModel.INotifyPropertyChanged {
+
+ private Uploader.Client.FileReceiver.Credentials CredentialsField;
+
+ private string ExtensionField;
+
+ private string FullHashField;
+
+ private System.Guid TokenField;
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public Uploader.Client.FileReceiver.Credentials Credentials {
+ get {
+ return this.CredentialsField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.CredentialsField, value) != true)) {
+ this.CredentialsField = value;
+ this.RaisePropertyChanged("Credentials");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string Extension {
+ get {
+ return this.ExtensionField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.ExtensionField, value) != true)) {
+ this.ExtensionField = value;
+ this.RaisePropertyChanged("Extension");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string FullHash {
+ get {
+ return this.FullHashField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.FullHashField, value) != true)) {
+ this.FullHashField = value;
+ this.RaisePropertyChanged("FullHash");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public System.Guid Token {
+ get {
+ return this.TokenField;
+ }
+ set {
+ if ((this.TokenField.Equals(value) != true)) {
+ this.TokenField = value;
+ this.RaisePropertyChanged("Token");
+ }
+ }
+ }
+
+ public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+ protected void RaisePropertyChanged(string propertyName) {
+ System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+ if ((propertyChanged != null)) {
+ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="Credentials", Namespace="http://schemas.datacontract.org/2004/07/UploaderSL.Web.Services")]
+ public partial class Credentials : object, System.ComponentModel.INotifyPropertyChanged {
+
+ private string PasswordField;
+
+ private string UsernameField;
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string Password {
+ get {
+ return this.PasswordField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.PasswordField, value) != true)) {
+ this.PasswordField = value;
+ this.RaisePropertyChanged("Password");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string Username {
+ get {
+ return this.UsernameField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.UsernameField, value) != true)) {
+ this.UsernameField = value;
+ this.RaisePropertyChanged("Username");
+ }
+ }
+ }
+
+ public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+ protected void RaisePropertyChanged(string propertyName) {
+ System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+ if ((propertyChanged != null)) {
+ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ [System.ServiceModel.ServiceContractAttribute(ConfigurationName="FileReceiver.IFileReceiver")]
+ public interface IFileReceiver {
+
+ [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IFileReceiver/BeginUpload", ReplyAction="http://tempuri.org/IFileReceiver/BeginUploadResponse")]
+ System.IAsyncResult BeginBeginUpload(Uploader.Client.FileReceiver.ChunkUploadRequest request, System.AsyncCallback callback, object asyncState);
+
+ Uploader.Client.FileReceiver.UploadResponse EndBeginUpload(System.IAsyncResult result);
+
+ [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IFileReceiver/ContinueUpload", ReplyAction="http://tempuri.org/IFileReceiver/ContinueUploadResponse")]
+ System.IAsyncResult BeginContinueUpload(Uploader.Client.FileReceiver.ChunkUploadRequest request, System.AsyncCallback callback, object asyncState);
+
+ Uploader.Client.FileReceiver.UploadResponse EndContinueUpload(System.IAsyncResult result);
+
+ [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IFileReceiver/FinishUpload", ReplyAction="http://tempuri.org/IFileReceiver/FinishUploadResponse")]
+ System.IAsyncResult BeginFinishUpload(Uploader.Client.FileReceiver.FinishRequest request, System.AsyncCallback callback, object asyncState);
+
+ Uploader.Client.FileReceiver.FinishResponse EndFinishUpload(System.IAsyncResult result);
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public interface IFileReceiverChannel : Uploader.Client.FileReceiver.IFileReceiver, System.ServiceModel.IClientChannel {
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public partial class BeginUploadCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ public BeginUploadCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ public Uploader.Client.FileReceiver.UploadResponse Result {
+ get {
+ base.RaiseExceptionIfNecessary();
+ return ((Uploader.Client.FileReceiver.UploadResponse)(this.results[0]));
+ }
+ }
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public partial class ContinueUploadCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ public ContinueUploadCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ public Uploader.Client.FileReceiver.UploadResponse Result {
+ get {
+ base.RaiseExceptionIfNecessary();
+ return ((Uploader.Client.FileReceiver.UploadResponse)(this.results[0]));
+ }
+ }
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public partial class FinishUploadCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ public FinishUploadCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ public Uploader.Client.FileReceiver.FinishResponse Result {
+ get {
+ base.RaiseExceptionIfNecessary();
+ return ((Uploader.Client.FileReceiver.FinishResponse)(this.results[0]));
+ }
+ }
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public partial class FileReceiverClient : System.ServiceModel.ClientBase<Uploader.Client.FileReceiver.IFileReceiver>, Uploader.Client.FileReceiver.IFileReceiver {
+
+ private BeginOperationDelegate onBeginBeginUploadDelegate;
+
+ private EndOperationDelegate onEndBeginUploadDelegate;
+
+ private System.Threading.SendOrPostCallback onBeginUploadCompletedDelegate;
+
+ private BeginOperationDelegate onBeginContinueUploadDelegate;
+
+ private EndOperationDelegate onEndContinueUploadDelegate;
+
+ private System.Threading.SendOrPostCallback onContinueUploadCompletedDelegate;
+
+ private BeginOperationDelegate onBeginFinishUploadDelegate;
+
+ private EndOperationDelegate onEndFinishUploadDelegate;
+
+ private System.Threading.SendOrPostCallback onFinishUploadCompletedDelegate;
+
+ private BeginOperationDelegate onBeginOpenDelegate;
+
+ private EndOperationDelegate onEndOpenDelegate;
+
+ private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
+
+ private BeginOperationDelegate onBeginCloseDelegate;
+
+ private EndOperationDelegate onEndCloseDelegate;
+
+ private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
+
+ public FileReceiverClient() {
+ }
+
+ public FileReceiverClient(string endpointConfigurationName) :
+ base(endpointConfigurationName) {
+ }
+
+ public FileReceiverClient(string endpointConfigurationName, string remoteAddress) :
+ base(endpointConfigurationName, remoteAddress) {
+ }
+
+ public FileReceiverClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(endpointConfigurationName, remoteAddress) {
+ }
+
+ public FileReceiverClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(binding, remoteAddress) {
+ }
+
+ public System.Net.CookieContainer CookieContainer {
+ get {
+ System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
+ if ((httpCookieContainerManager != null)) {
+ return httpCookieContainerManager.CookieContainer;
+ }
+ else {
+ return null;
+ }
+ }
+ set {
+ System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
+ if ((httpCookieContainerManager != null)) {
+ httpCookieContainerManager.CookieContainer = value;
+ }
+ else {
+ throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" +
+ "ookieContainerBindingElement.");
+ }
+ }
+ }
+
+ public event System.EventHandler<BeginUploadCompletedEventArgs> BeginUploadCompleted;
+
+ public event System.EventHandler<ContinueUploadCompletedEventArgs> ContinueUploadCompleted;
+
+ public event System.EventHandler<FinishUploadCompletedEventArgs> FinishUploadCompleted;
+
+ public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;
+
+ public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ System.IAsyncResult Uploader.Client.FileReceiver.IFileReceiver.BeginBeginUpload(Uploader.Client.FileReceiver.ChunkUploadRequest request, System.AsyncCallback callback, object asyncState) {
+ return base.Channel.BeginBeginUpload(request, callback, asyncState);
+ }
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ Uploader.Client.FileReceiver.UploadResponse Uploader.Client.FileReceiver.IFileReceiver.EndBeginUpload(System.IAsyncResult result) {
+ return base.Channel.EndBeginUpload(result);
+ }
+
+ private System.IAsyncResult OnBeginBeginUpload(object[] inValues, System.AsyncCallback callback, object asyncState) {
+ Uploader.Client.FileReceiver.ChunkUploadRequest request = ((Uploader.Client.FileReceiver.ChunkUploadRequest)(inValues[0]));
+ return ((Uploader.Client.FileReceiver.IFileReceiver)(this)).BeginBeginUpload(request, callback, asyncState);
+ }
+
+ private object[] OnEndBeginUpload(System.IAsyncResult result) {
+ Uploader.Client.FileReceiver.UploadResponse retVal = ((Uploader.Client.FileReceiver.IFileReceiver)(this)).EndBeginUpload(result);
+ return new object[] {
+ retVal};
+ }
+
+ private void OnBeginUploadCompleted(object state) {
+ if ((this.BeginUploadCompleted != null)) {
+ InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
+ this.BeginUploadCompleted(this, new BeginUploadCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
+ }
+ }
+
+ public void BeginUploadAsync(Uploader.Client.FileReceiver.ChunkUploadRequest request) {
+ this.BeginUploadAsync(request, null);
+ }
+
+ public void BeginUploadAsync(Uploader.Client.FileReceiver.ChunkUploadRequest request, object userState) {
+ if ((this.onBeginBeginUploadDelegate == null)) {
+ this.onBeginBeginUploadDelegate = new BeginOperationDelegate(this.OnBeginBeginUpload);
+ }
+ if ((this.onEndBeginUploadDelegate == null)) {
+ this.onEndBeginUploadDelegate = new EndOperationDelegate(this.OnEndBeginUpload);
+ }
+ if ((this.onBeginUploadCompletedDelegate == null)) {
+ this.onBeginUploadCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnBeginUploadCompleted);
+ }
+ base.InvokeAsync(this.onBeginBeginUploadDelegate, new object[] {
+ request}, this.onEndBeginUploadDelegate, this.onBeginUploadCompletedDelegate, userState);
+ }
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ System.IAsyncResult Uploader.Client.FileReceiver.IFileReceiver.BeginContinueUpload(Uploader.Client.FileReceiver.ChunkUploadRequest request, System.AsyncCallback callback, object asyncState) {
+ return base.Channel.BeginContinueUpload(request, callback, asyncState);
+ }
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ Uploader.Client.FileReceiver.UploadResponse Uploader.Client.FileReceiver.IFileReceiver.EndContinueUpload(System.IAsyncResult result) {
+ return base.Channel.EndContinueUpload(result);
+ }
+
+ private System.IAsyncResult OnBeginContinueUpload(object[] inValues, System.AsyncCallback callback, object asyncState) {
+ Uploader.Client.FileReceiver.ChunkUploadRequest request = ((Uploader.Client.FileReceiver.ChunkUploadRequest)(inValues[0]));
+ return ((Uploader.Client.FileReceiver.IFileReceiver)(this)).BeginContinueUpload(request, callback, asyncState);
+ }
+
+ private object[] OnEndContinueUpload(System.IAsyncResult result) {
+ Uploader.Client.FileReceiver.UploadResponse retVal = ((Uploader.Client.FileReceiver.IFileReceiver)(this)).EndContinueUpload(result);
+ return new object[] {
+ retVal};
+ }
+
+ private void OnContinueUploadCompleted(object state) {
+ if ((this.ContinueUploadCompleted != null)) {
+ InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
+ this.ContinueUploadCompleted(this, new ContinueUploadCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
+ }
+ }
+
+ public void ContinueUploadAsync(Uploader.Client.FileReceiver.ChunkUploadRequest request) {
+ this.ContinueUploadAsync(request, null);
+ }
+
+ public void ContinueUploadAsync(Uploader.Client.FileReceiver.ChunkUploadRequest request, object userState) {
+ if ((this.onBeginContinueUploadDelegate == null)) {
+ this.onBeginContinueUploadDelegate = new BeginOperationDelegate(this.OnBeginContinueUpload);
+ }
+ if ((this.onEndContinueUploadDelegate == null)) {
+ this.onEndContinueUploadDelegate = new EndOperationDelegate(this.OnEndContinueUpload);
+ }
+ if ((this.onContinueUploadCompletedDelegate == null)) {
+ this.onContinueUploadCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnContinueUploadCompleted);
+ }
+ base.InvokeAsync(this.onBeginContinueUploadDelegate, new object[] {
+ request}, this.onEndContinueUploadDelegate, this.onContinueUploadCompletedDelegate, userState);
+ }
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ System.IAsyncResult Uploader.Client.FileReceiver.IFileReceiver.BeginFinishUpload(Uploader.Client.FileReceiver.FinishRequest request, System.AsyncCallback callback, object asyncState) {
+ return base.Channel.BeginFinishUpload(request, callback, asyncState);
+ }
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ Uploader.Client.FileReceiver.FinishResponse Uploader.Client.FileReceiver.IFileReceiver.EndFinishUpload(System.IAsyncResult result) {
+ return base.Channel.EndFinishUpload(result);
+ }
+
+ private System.IAsyncResult OnBeginFinishUpload(object[] inValues, System.AsyncCallback callback, object asyncState) {
+ Uploader.Client.FileReceiver.FinishRequest request = ((Uploader.Client.FileReceiver.FinishRequest)(inValues[0]));
+ return ((Uploader.Client.FileReceiver.IFileReceiver)(this)).BeginFinishUpload(request, callback, asyncState);
+ }
+
+ private object[] OnEndFinishUpload(System.IAsyncResult result) {
+ Uploader.Client.FileReceiver.FinishResponse retVal = ((Uploader.Client.FileReceiver.IFileReceiver)(this)).EndFinishUpload(result);
+ return new object[] {
+ retVal};
+ }
+
+ private void OnFinishUploadCompleted(object state) {
+ if ((this.FinishUploadCompleted != null)) {
+ InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
+ this.FinishUploadCompleted(this, new FinishUploadCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
+ }
+ }
+
+ public void FinishUploadAsync(Uploader.Client.FileReceiver.FinishRequest request) {
+ this.FinishUploadAsync(request, null);
+ }
+
+ public void FinishUploadAsync(Uploader.Client.FileReceiver.FinishRequest request, object userState) {
+ if ((this.onBeginFinishUploadDelegate == null)) {
+ this.onBeginFinishUploadDelegate = new BeginOperationDelegate(this.OnBeginFinishUpload);
+ }
+ if ((this.onEndFinishUploadDelegate == null)) {
+ this.onEndFinishUploadDelegate = new EndOperationDelegate(this.OnEndFinishUpload);
+ }
+ if ((this.onFinishUploadCompletedDelegate == null)) {
+ this.onFinishUploadCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnFinishUploadCompleted);
+ }
+ base.InvokeAsync(this.onBeginFinishUploadDelegate, new object[] {
+ request}, this.onEndFinishUploadDelegate, this.onFinishUploadCompletedDelegate, userState);
+ }
+
+ private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState) {
+ return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
+ }
+
+ private object[] OnEndOpen(System.IAsyncResult result) {
+ ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
+ return null;
+ }
+
+ private void OnOpenCompleted(object state) {
+ if ((this.OpenCompleted != null)) {
+ InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
+ this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
+ }
+ }
+
+ public void OpenAsync() {
+ this.OpenAsync(null);
+ }
+
+ public void OpenAsync(object userState) {
+ if ((this.onBeginOpenDelegate == null)) {
+ this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
+ }
+ if ((this.onEndOpenDelegate == null)) {
+ this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
+ }
+ if ((this.onOpenCompletedDelegate == null)) {
+ this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
+ }
+ base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
+ }
+
+ private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState) {
+ return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
+ }
+
+ private object[] OnEndClose(System.IAsyncResult result) {
+ ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
+ return null;
+ }
+
+ private void OnCloseCompleted(object state) {
+ if ((this.CloseCompleted != null)) {
+ InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
+ this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
+ }
+ }
+
+ public void CloseAsync() {
+ this.CloseAsync(null);
+ }
+
+ public void CloseAsync(object userState) {
+ if ((this.onBeginCloseDelegate == null)) {
+ this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
+ }
+ if ((this.onEndCloseDelegate == null)) {
+ this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
+ }
+ if ((this.onCloseCompletedDelegate == null)) {
+ this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
+ }
+ base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
+ }
+
+ protected override Uploader.Client.FileReceiver.IFileReceiver CreateChannel() {
+ return new FileReceiverClientChannel(this);
+ }
+
+ private class FileReceiverClientChannel : ChannelBase<Uploader.Client.FileReceiver.IFileReceiver>, Uploader.Client.FileReceiver.IFileReceiver {
+
+ public FileReceiverClientChannel(System.ServiceModel.ClientBase<Uploader.Client.FileReceiver.IFileReceiver> client) :
+ base(client) {
+ }
+
+ public System.IAsyncResult BeginBeginUpload(Uploader.Client.FileReceiver.ChunkUploadRequest request, System.AsyncCallback callback, object asyncState) {
+ object[] _args = new object[1];
+ _args[0] = request;
+ System.IAsyncResult _result = base.BeginInvoke("BeginUpload", _args, callback, asyncState);
+ return _result;
+ }
+
+ public Uploader.Client.FileReceiver.UploadResponse EndBeginUpload(System.IAsyncResult result) {
+ object[] _args = new object[0];
+ Uploader.Client.FileReceiver.UploadResponse _result = ((Uploader.Client.FileReceiver.UploadResponse)(base.EndInvoke("BeginUpload", _args, result)));
+ return _result;
+ }
+
+ public System.IAsyncResult BeginContinueUpload(Uploader.Client.FileReceiver.ChunkUploadRequest request, System.AsyncCallback callback, object asyncState) {
+ object[] _args = new object[1];
+ _args[0] = request;
+ System.IAsyncResult _result = base.BeginInvoke("ContinueUpload", _args, callback, asyncState);
+ return _result;
+ }
+
+ public Uploader.Client.FileReceiver.UploadResponse EndContinueUpload(System.IAsyncResult result) {
+ object[] _args = new object[0];
+ Uploader.Client.FileReceiver.UploadResponse _result = ((Uploader.Client.FileReceiver.UploadResponse)(base.EndInvoke("ContinueUpload", _args, result)));
+ return _result;
+ }
+
+ public System.IAsyncResult BeginFinishUpload(Uploader.Client.FileReceiver.FinishRequest request, System.AsyncCallback callback, object asyncState) {
+ object[] _args = new object[1];
+ _args[0] = request;
+ System.IAsyncResult _result = base.BeginInvoke("FinishUpload", _args, callback, asyncState);
+ return _result;
+ }
+
+ public Uploader.Client.FileReceiver.FinishResponse EndFinishUpload(System.IAsyncResult result) {
+ object[] _args = new object[0];
+ Uploader.Client.FileReceiver.FinishResponse _result = ((Uploader.Client.FileReceiver.FinishResponse)(base.EndInvoke("FinishUpload", _args, result)));
+ return _result;
+ }
+ }
+ }
+}
View
35 UploaderSL/src/Uploader.Client/Service References/FileReceiver/Reference.svcmap
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="5d30f464-388b-48a7-9a6a-192e86e3c53f" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
+ <ClientOptions>
+ <GenerateAsynchronousMethods>true</GenerateAsynchronousMethods>
+ <EnableDataBinding>true</EnableDataBinding>
+ <ExcludedTypes />
+ <ImportXmlTypes>false</ImportXmlTypes>
+ <GenerateInternalTypes>false</GenerateInternalTypes>
+ <GenerateMessageContracts>false</GenerateMessageContracts>
+ <NamespaceMappings />
+ <CollectionMappings>
+ <CollectionMapping TypeName="System.Collections.ObjectModel.ObservableCollection`1" Category="List" />
+ </CollectionMappings>
+ <GenerateSerializableTypes>false</GenerateSerializableTypes>
+ <Serializer>Auto</Serializer>
+ <ReferenceAllAssemblies>true</ReferenceAllAssemblies>
+ <ReferencedAssemblies />
+ <ReferencedDataContractTypes />
+ <ServiceContractMappings />
+ </ClientOptions>
+ <MetadataSources>
+ <MetadataSource Address="http://localhost:4796/Services/FileReceiver.svc" Protocol="http" SourceId="1" />
+ </MetadataSources>
+ <Metadata>
+ <MetadataFile FileName="FileReceiver.disco" MetadataType="Disco" ID="48e4b762-4e48-46db-bf37-653c6c53ecdb" SourceId="1" SourceUrl="http://localhost:4796/Services/FileReceiver.svc?disco" />
+ <MetadataFile FileName="FileReceiver1.xsd" MetadataType="Schema" ID="fff2d55b-f5be-4dcc-b3e8-964dc81aac09" SourceId="1" SourceUrl="http://localhost:4796/Services/FileReceiver.svc?xsd=xsd1" />
+ <MetadataFile FileName="FileReceiver.wsdl" MetadataType="Wsdl" ID="b42eb1e4-762d-4bf0-a5e7-005676a8d414" SourceId="1" SourceUrl="http://localhost:4796/Services/FileReceiver.svc?wsdl" />
+ <MetadataFile FileName="FileReceiver11.xsd" MetadataType="Schema" ID="820dc60c-a86b-48fb-adc9-4403cec11c66" SourceId="1" SourceUrl="http://localhost:4796/Services/FileReceiver.svc?xsd=xsd2" />
+ <MetadataFile FileName="FileReceiver.xsd" MetadataType="Schema" ID="10b23b1b-896d-485c-a0ff-0d9526acd323" SourceId="1" SourceUrl="http://localhost:4796/Services/FileReceiver.svc?xsd=xsd0" />
+ </Metadata>
+ <Extensions>
+ <ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
+ <ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
+ </Extensions>
+</ReferenceGroup>
View
10 ...c/Uploader.Client/Service References/FileReceiver/Uploader.Client.FileReceiver.FinishResponse.datasource
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ This file is automatically generated by Visual Studio .Net. It is
+ used to store generic object data source configuration information.
+ Renaming the file extension or editing the content of this file may
+ cause the file to be unrecognizable by the program.
+-->
+<GenericObjectDataSource DisplayName="FinishResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
+ <TypeInfo>Uploader.Client.FileReceiver.FinishResponse, Service References.FileReceiver.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
+</GenericObjectDataSource>
View
10 ...c/Uploader.Client/Service References/FileReceiver/Uploader.Client.FileReceiver.UploadResponse.datasource
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ This file is automatically generated by Visual Studio .Net. It is
+ used to store generic object data source configuration information.
+ Renaming the file extension or editing the content of this file may
+ cause the file to be unrecognizable by the program.
+-->
+<GenericObjectDataSource DisplayName="UploadResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
+ <TypeInfo>Uploader.Client.FileReceiver.UploadResponse, Service References.FileReceiver.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
+</GenericObjectDataSource>
View
10 UploaderSL/src/Uploader.Client/Service References/FileReceiver/configuration.svcinfo
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
+ <behaviors />
+ <bindings>
+ <binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data maxBufferSize=&quot;2147483647&quot; name=&quot;BasicHttpBinding_IFileReceiver&quot;&gt;&lt;security mode=&quot;None&quot; /&gt;&lt;/Data&gt;" bindingType="basicHttpBinding" name="BasicHttpBinding_IFileReceiver" />
+ </bindings>
+ <endpoints>
+ <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:4796/Services/FileReceiver.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IFileReceiver&quot; contract=&quot;FileReceiver.IFileReceiver&quot; name=&quot;BasicHttpBinding_IFileReceiver&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:4796/Services/FileReceiver.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IFileReceiver&quot; contract=&quot;FileReceiver.IFileReceiver&quot; name=&quot;BasicHttpBinding_IFileReceiver&quot; /&gt;" contractName="FileReceiver.IFileReceiver" name="BasicHttpBinding_IFileReceiver" />
+ </endpoints>
+</configurationSnapshot>
View
195 UploaderSL/src/Uploader.Client/Service References/FileReceiver/configuration91.svcinfo
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="utf-8"?>
+<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="MafPM7cQpRrvxctu/ZXw1LTltEQ=">
+ <bindingConfigurations>
+ <bindingConfiguration bindingType="basicHttpBinding" name="BasicHttpBinding_IFileReceiver">
+ <properties>
+ <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>BasicHttpBinding_IFileReceiver</serializedValue>
+ </property>
+ <property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/openTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/receiveTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/sendTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/allowCookies" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/bypassProxyOnLocal" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/hostNameComparisonMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>StrongWildcard</serializedValue>
+ </property>
+ <property path="/maxBufferSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>2147483647</serializedValue>
+ </property>
+ <property path="/maxBufferPoolSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>2147483647</serializedValue>
+ </property>
+ <property path="/messageEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.WSMessageEncoding, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>Text</serializedValue>
+ </property>
+ <property path="/proxyAddress" isComplexType="false" isExplicitlyDefined="false" clrType="System.Uri, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/readerQuotas" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>
+ </property>
+ <property path="/readerQuotas/maxDepth" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>0</serializedValue>
+ </property>
+ <property path="/readerQuotas/maxStringContentLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>0</serializedValue>
+ </property>
+ <property path="/readerQuotas/maxArrayLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>0</serializedValue>
+ </property>
+ <property path="/readerQuotas/maxBytesPerRead" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>0</serializedValue>
+ </property>
+ <property path="/readerQuotas/maxNameTableCharCount" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>0</serializedValue>
+ </property>
+ <property path="/security" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpSecurityElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.BasicHttpSecurityElement</serializedValue>
+ </property>
+ <property path="/security/mode" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.BasicHttpSecurityMode, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>None</serializedValue>
+ </property>
+ <property path="/security/transport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpTransportSecurityElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.HttpTransportSecurityElement</serializedValue>
+ </property>
+ <property path="/security/transport/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpClientCredentialType, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>None</serializedValue>
+ </property>
+ <property path="/security/transport/proxyCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpProxyCredentialType, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>None</serializedValue>
+ </property>
+ <property path="/security/transport/realm" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/security/transport/extendedProtectionPolicy" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>
+ </property>
+ <property path="/security/transport/extendedProtectionPolicy/policyEnforcement" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>Never</serializedValue>
+ </property>
+ <property path="/security/transport/extendedProtectionPolicy/protectionScenario" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>TransportSelected</serializedValue>
+ </property>
+ <property path="/security/transport/extendedProtectionPolicy/customServiceNames" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>(Collection)</serializedValue>
+ </property>
+ <property path="/security/message" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpMessageSecurityElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.BasicHttpMessageSecurityElement</serializedValue>
+ </property>
+ <property path="/security/message/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpMessageCredentialType, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>UserName</serializedValue>
+ </property>
+ <property path="/security/message/algorithmSuite" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.Security.SecurityAlgorithmSuite, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>Basic256</serializedValue>
+ </property>
+ <property path="/textEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.Text.Encoding, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.Text.UTF8Encoding</serializedValue>
+ </property>
+ <property path="/transferMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.TransferMode, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>Buffered</serializedValue>
+ </property>
+ <property path="/useDefaultWebProxy" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ </properties>
+ </bindingConfiguration>
+ </bindingConfigurations>
+ <endpoints>
+ <endpoint name="BasicHttpBinding_IFileReceiver" contract="FileReceiver.IFileReceiver" bindingType="basicHttpBinding" address="http://localhost:4796/Services/FileReceiver.svc" bindingConfiguration="BasicHttpBinding_IFileReceiver">
+ <properties>
+ <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>http://localhost:4796/Services/FileReceiver.svc</serializedValue>
+ </property>
+ <property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/binding" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>basicHttpBinding</serializedValue>
+ </property>
+ <property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>BasicHttpBinding_IFileReceiver</serializedValue>
+ </property>
+ <property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>FileReceiver.IFileReceiver</serializedValue>
+ </property>
+ <property path="/headers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>
+ </property>
+ <property path="/headers/headers" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.Channels.AddressHeaderCollection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>&lt;Header /&gt;</serializedValue>
+ </property>
+ <property path="/identity" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.IdentityElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.IdentityElement</serializedValue>
+ </property>
+ <property path="/identity/userPrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.UserPrincipalNameElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue>
+ </property>
+ <property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.ServicePrincipalNameElement</serializedValue>
+ </property>
+ <property path="/identity/servicePrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/identity/dns" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.DnsElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.DnsElement</serializedValue>
+ </property>
+ <property path="/identity/dns/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/identity/rsa" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.RsaElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.RsaElement</serializedValue>
+ </property>
+ <property path="/identity/rsa/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/identity/certificate" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.CertificateElement</serializedValue>
+ </property>
+ <property path="/identity/certificate/encodedValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/identity/certificateReference" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateReferenceElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>System.ServiceModel.Configuration.CertificateReferenceElement</serializedValue>
+ </property>
+ <property path="/identity/certificateReference/storeName" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreName, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>My</serializedValue>
+ </property>
+ <property path="/identity/certificateReference/storeLocation" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreLocation, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>LocalMachine</serializedValue>
+ </property>
+ <property path="/identity/certificateReference/x509FindType" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.X509FindType, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>FindBySubjectDistinguishedName</serializedValue>
+ </property>
+ <property path="/identity/certificateReference/findValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue />
+ </property>
+ <property path="/identity/certificateReference/isChainIncluded" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>False</serializedValue>
+ </property>
+ <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <serializedValue>BasicHttpBinding_IFileReceiver</serializedValue>
+ </property>
+ </properties>
+ </endpoint>
+ </endpoints>
+</SavedWcfConfigurationInformation>
View
21 UploaderSL/src/Uploader.Client/ServiceReferences.ClientConfig
@@ -0,0 +1,21 @@
+<configuration>
+ <system.serviceModel>
+ <bindings>
+ <basicHttpBinding>
+ <binding name="BasicHttpBinding_IFileReceiver" maxBufferSize="2147483647"
+ maxReceivedMessageSize="2147483647">
+ <security mode="None">
+ <transport>
+ <extendedProtectionPolicy policyEnforcement="Never" />
+ </transport>
+ </security>
+ </binding>
+ </basicHttpBinding>
+ </bindings>
+ <client>
+ <endpoint address="http://localhost:4796/Services/FileReceiver.svc"
+ binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IFileReceiver"
+ contract="FileReceiver.IFileReceiver" name="BasicHttpBinding_IFileReceiver" />
+ </client>
+ </system.serviceModel>
+</configuration>
View
207 UploaderSL/src/Uploader.Client/Uploader.Client.csproj
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{38D2B0EA-69D3-4CFD-A49C-DF8F9FA28465}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Uploader.Client</RootNamespace>
+ <AssemblyName>Uploader.Client</AssemblyName>
+ <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>Uploader.Client.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>Uploader.Client.App</SilverlightAppEntry>
+ <TestPageFileName>TestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <IsWebBootstrapper>true</IsWebBootstrapper>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <PublishUrl>http://localhost/Uploader.Client/</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Web</InstallFrom>
+ <UpdateEnabled>true</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>Bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>Bin\Release</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System.Runtime.Serialization" />
+ <Reference Include="System.ServiceModel" />
+ <Reference Include="System.Windows" />
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="ListItem.xaml.cs">
+ <DependentUpon>ListItem.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Page.xaml.cs">
+ <DependentUpon>Page.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Service References\FileReceiver\Reference.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Reference.svcmap</DependentUpon>
+ </Compile>
+ <Compile Include="Utility.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Page Include="ListItem.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Page.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <Content Include="ServiceReferences.ClientConfig" />
+ </ItemGroup>
+ <ItemGroup>
+ <WCFMetadata Include="Service References\" />
+ </ItemGroup>
+ <ItemGroup>
+ <WCFMetadataStorage Include="Service References\FileReceiver\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\FileReceiver\FileReceiver.disco" />
+ <None Include="Service References\FileReceiver\FileReceiver.wsdl" />
+ <None Include="Service References\FileReceiver\FileReceiver.xsd" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\FileReceiver\configuration91.svcinfo" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\FileReceiver\configuration.svcinfo" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\FileReceiver\FileReceiver1.xsd" />
+ <None Include="Service References\FileReceiver\FileReceiver11.xsd" />
+ <None Include="Service References\FileReceiver\Reference.svcmap">
+ <Generator>WCF Proxy Generator</Generator>
+ <LastGenOutput>Reference.cs</LastGenOutput>
+ </None>
+ <None Include="Service References\FileReceiver\Uploader.Client.FileReceiver.FinishResponse.datasource">
+ <DependentUpon>Reference.svcmap</DependentUpon>
+ </None>
+ <None Include="Service References\FileReceiver\Uploader.Client.FileReceiver.UploadResponse.datasource">
+ <DependentUpon>Reference.svcmap</DependentUpon>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- 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>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+</Project>
View
51 UploaderSL/src/Uploader.Client/Utility.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.IO;
+
+namespace Uploader.Client
+{
+ public class Utility
+ {
+ public const int chunkSize = 10000;
+
+ public static string BaseUrl
+ {
+ get
+ {
+ string full = System.Windows.Application.Current.Host.Source.AbsoluteUri;
+ string newpath = full.Substring(0, full.LastIndexOf('/')) + "/../";
+ return newpath;
+ }
+ }
+ public static string GetSHA256Hash(byte[] data)
+ {
+ if (data != null && data.Length > 0)
+ {
+ System.Security.Cryptography.SHA256Managed sha = new System.Security.Cryptography.SHA256Managed();
+ byte[] hash = sha.ComputeHash(data);
+
+ return Convert.ToBase64String(hash);
+ }
+ return null;
+ }
+ public static string GetSHA256Hash(Stream data)
+ {
+ if (data != null && data.Length > 0)
+ {
+ System.Security.Cryptography.SHA256Managed sha = new System.Security.Cryptography.SHA256Managed();
+ byte[] hash = sha.ComputeHash(data);
+
+ return Convert.ToBase64String(hash);
+ }
+ return null;
+ }
+ }
+}
View
8 UploaderSL/src/Uploader.ClientHTTP/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="Uploader.ClientHttp.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
View
66 UploaderSL/src/Uploader.ClientHTTP/App.xaml.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace Uploader.ClientHttp
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ this.RootVisual = new Page();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+ private void</