# HG changeset patch # User adminsh@apollo # Date 1337442814 -3600 # Node ID e51a6af1c98df18aa738f3ff5c79e298e10e4316 # Parent 954f66bb8dbf0e8681029ae2ae564dbb3aec0a16 working version diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTO/ReportsResponse.cs --- a/SSRS/SSRS.Services.DTO/ReportsResponse.cs Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Services.DTO/ReportsResponse.cs Sat May 19 16:53:34 2012 +0100 @@ -4,6 +4,6 @@ { public class ReportsResponse { - public List Result { get; set; } + public IList Result { get; set; } } } diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTOs/Parameter.cs --- a/SSRS/SSRS.Services.DTOs/Parameter.cs Sat May 19 16:21:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -namespace SSRS.Services.DTOs -{ - public class Parameter - { - public string[] DefaultValues { get; set; } - public string Name { get; set; } - public bool Nullable { get; set; } - public string ParameterType { get; set; } - public string Value { get; set; } - } -} diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTOs/Properties/AssemblyInfo.cs --- a/SSRS/SSRS.Services.DTOs/Properties/AssemblyInfo.cs Sat May 19 16:21:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -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("SSRS.Services.DTOs")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SSRS.Services.DTOs")] -[assembly: AssemblyCopyright("Copyright © 2012")] -[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("9d61199d-c0d5-464d-ab16-106d47415df7")] - -// 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 Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTOs/ReportExecutionRequest.cs --- a/SSRS/SSRS.Services.DTOs/ReportExecutionRequest.cs Sat May 19 16:21:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -namespace SSRS.Services.DTOs -{ - public class ReportExecutionRequest - { - public string Name { get; set; } - public string Format { get; set; } - public Parameter[] Parameters { get; set; } - } -} diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTOs/ReportExecutionResponse.cs --- a/SSRS/SSRS.Services.DTOs/ReportExecutionResponse.cs Sat May 19 16:21:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -namespace SSRS.Services.DTOs -{ - public class ReportExecutionResponse - { - public byte[] Result { get; set; } - } -} \ No newline at end of file diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTOs/ReportInfo.cs --- a/SSRS/SSRS.Services.DTOs/ReportInfo.cs Sat May 19 16:21:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -using System.Collections.Generic; - -namespace SSRS.Services.DTOs -{ - public class ReportInfo - { - public string Name { get; set; } - public IList Parameters { get; set; } - public string Path { get; set; } - - public ReportInfo() { } - - public static ReportInfo Create(string name, IList parameters, string path) - { - return new ReportInfo() - { - Name = name, - Parameters = parameters, - Path = path - }; - } - } -} diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTOs/ReportsRequest.cs --- a/SSRS/SSRS.Services.DTOs/ReportsRequest.cs Sat May 19 16:21:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -namespace SSRS.Services.DTOs -{ - public class ReportsRequest - { - public bool IncludeParameters { get; set; } - } -} diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTOs/ReportsResponse.cs --- a/SSRS/SSRS.Services.DTOs/ReportsResponse.cs Sat May 19 16:21:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SSRS.Services.DTOs -{ - [DataContract] - public class ReportsResponse - { - [DataMember] - public List Result { get; set; } - } -} diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.DTOs/SSRS.Services.DTOs.csproj --- a/SSRS/SSRS.Services.DTOs/SSRS.Services.DTOs.csproj Sat May 19 16:21:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {31ADF48B-7540-4869-BF0F-D088DD67707E} - Library - Properties - SSRS.Services.DTOs - SSRS.Services.DTOs - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.UnitTests/SSRS.Services.UnitTests.csproj --- a/SSRS/SSRS.Services.UnitTests/SSRS.Services.UnitTests.csproj Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Services.UnitTests/SSRS.Services.UnitTests.csproj Sat May 19 16:53:34 2012 +0100 @@ -55,6 +55,10 @@ + + {29663C66-DB7C-4704-8BF8-52B3BCFABC19} + SSRS.Services.DTO + {647369D2-B163-45B7-8E40-BBADEC2F30F7} SSRS.Services diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.WebTests/ReportsServiceFixture.cs --- a/SSRS/SSRS.Services.WebTests/ReportsServiceFixture.cs Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Services.WebTests/ReportsServiceFixture.cs Sat May 19 16:53:34 2012 +0100 @@ -1,4 +1,6 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Net; using NUnit.Framework; using SSRS.Services.DTO; using ServiceStack.Service; @@ -10,11 +12,50 @@ public class ReportsServiceFixture { [Test] - public void ReportsService_REST_GET_returns_reportList_greater_than_zero() + public void ReportsService_REST_PUT_returns_reportList_greater_than_zero() { - var restClient = new JsonServiceClient("http://localhost:2505/services") as IRestClient; - var allReports = restClient.Get>("/reports"); - Assert.That(allReports.Count, Is.GreaterThan(0)); + //var webRequest = (HttpWebRequest)WebRequestCreator.ClientHttp.Create(new Uri(_baseUri + uri)); + //webRequest.Method = method; + + //// if cookies are enabled, pass them in from the browser + //if (this.EnableCookies) + //{ + // webRequest.CookieContainer = new CookieContainer(); + // webRequest.CookieContainer.SetCookies(new Uri(_baseUri), HtmlPage.Document.Cookies); + //} + + //// set the accept header so our response is in json + //webRequest.Accept = "application/json"; + //var client = new ServiceClient(); + //client.Completed += (sender, args) => + // { + // // check for web exceptions + // var webEx = args.Error as WebException; + // if (webEx != null) + // { + // var webResponse = (HttpWebResponse) webEx.Response; + + // ErrorText = string.Format("WebException: {0} {1} {2}", + // webResponse.ResponseUri, + // webResponse.Method, webResponse.StatusDescription); + + // return; + // } + + // // re-throw any other exceptions + // if (args.Error != null) + // throw args.Error; + + // var result = args.Response.Result; + // if (result == null) return; + // }; + + //client.Post("/reports", new ReportsRequest() {IncludeParameters = true}); + + //var restClient = new JsonServiceClient("http://localhost:2505/services") as IRestClient; + //var request = new ReportsRequest() { IncludeParameters = true }; + //var response = restClient.Put("/reports", request); + //Assert.That(response.Result, Is.GreaterThan(0)); } } } diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services.WebTests/SSRS.Services.WebTests.csproj --- a/SSRS/SSRS.Services.WebTests/SSRS.Services.WebTests.csproj Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Services.WebTests/SSRS.Services.WebTests.csproj Sat May 19 16:53:34 2012 +0100 @@ -61,6 +61,10 @@ + + {29663C66-DB7C-4704-8BF8-52B3BCFABC19} + SSRS.Services.DTO + {647369D2-B163-45B7-8E40-BBADEC2F30F7} SSRS.Services diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services/Converter.cs --- a/SSRS/SSRS.Services/Converter.cs Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Services/Converter.cs Sat May 19 16:53:34 2012 +0100 @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Linq; -using SSRS.Services.DTOs; +using SSRS.Services.DTO; namespace SSRS.Services { diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services/ReportExecution.cs --- a/SSRS/SSRS.Services/ReportExecution.cs Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Services/ReportExecution.cs Sat May 19 16:53:34 2012 +0100 @@ -1,6 +1,6 @@ using System; using System.Security.Principal; -using SSRS.Services.DTOs; +using SSRS.Services.DTO; using SSRS.Services.ReportExecutionServiceReference; using ServiceStack.ServiceHost; diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services/ReportsService.cs --- a/SSRS/SSRS.Services/ReportsService.cs Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Services/ReportsService.cs Sat May 19 16:53:34 2012 +0100 @@ -2,7 +2,7 @@ using System.Linq; using System.Security.Principal; using System.Threading.Tasks; -using SSRS.Services.DTOs; +using SSRS.Services.DTO; using SSRS.Services.ReportServiceReference; using ServiceStack.ServiceInterface; diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Services/SSRS.Services.csproj --- a/SSRS/SSRS.Services/SSRS.Services.csproj Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Services/SSRS.Services.csproj Sat May 19 16:53:34 2012 +0100 @@ -215,9 +215,9 @@ - - {31ADF48B-7540-4869-BF0F-D088DD67707E} - SSRS.Services.DTOs + + {29663C66-DB7C-4704-8BF8-52B3BCFABC19} + SSRS.Services.DTO diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Web/Global.asax.cs --- a/SSRS/SSRS.Web/Global.asax.cs Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Web/Global.asax.cs Sat May 19 16:53:34 2012 +0100 @@ -2,7 +2,7 @@ using System.Web; using Funq; using SSRS.Services; -using SSRS.Services.DTOs; +using SSRS.Services.DTO; using ServiceStack.WebHost.Endpoints; namespace SSRS.Web diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.Web/SSRS.Web.csproj --- a/SSRS/SSRS.Web/SSRS.Web.csproj Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.Web/SSRS.Web.csproj Sat May 19 16:53:34 2012 +0100 @@ -105,9 +105,9 @@ - - {31ADF48B-7540-4869-BF0F-D088DD67707E} - SSRS.Services.DTOs + + {29663C66-DB7C-4704-8BF8-52B3BCFABC19} + SSRS.Services.DTO {647369D2-B163-45B7-8E40-BBADEC2F30F7} diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS.sln --- a/SSRS/SSRS.sln Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS.sln Sat May 19 16:53:34 2012 +0100 @@ -18,7 +18,7 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SSRS.Services.WebTests", "SSRS.Services.WebTests\SSRS.Services.WebTests.csproj", "{40836A5F-C6F7-4CEF-9638-5C36F8D04789}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SSRS.Services.DTOs", "SSRS.Services.DTOs\SSRS.Services.DTOs.csproj", "{31ADF48B-7540-4869-BF0F-D088DD67707E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SSRS.Services.DTO", "SSRS.Services.DTO\SSRS.Services.DTO.csproj", "{29663C66-DB7C-4704-8BF8-52B3BCFABC19}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,15 +39,17 @@ {647369D2-B163-45B7-8E40-BBADEC2F30F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {647369D2-B163-45B7-8E40-BBADEC2F30F7}.Release|Any CPU.Build.0 = Release|Any CPU {06D1C29B-9BAC-4784-92F6-0DF91F192B6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06D1C29B-9BAC-4784-92F6-0DF91F192B6B}.Debug|Any CPU.Build.0 = Debug|Any CPU {06D1C29B-9BAC-4784-92F6-0DF91F192B6B}.Release|Any CPU.ActiveCfg = Release|Any CPU {06D1C29B-9BAC-4784-92F6-0DF91F192B6B}.Release|Any CPU.Build.0 = Release|Any CPU {40836A5F-C6F7-4CEF-9638-5C36F8D04789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40836A5F-C6F7-4CEF-9638-5C36F8D04789}.Debug|Any CPU.Build.0 = Debug|Any CPU {40836A5F-C6F7-4CEF-9638-5C36F8D04789}.Release|Any CPU.ActiveCfg = Release|Any CPU {40836A5F-C6F7-4CEF-9638-5C36F8D04789}.Release|Any CPU.Build.0 = Release|Any CPU - {31ADF48B-7540-4869-BF0F-D088DD67707E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {31ADF48B-7540-4869-BF0F-D088DD67707E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {31ADF48B-7540-4869-BF0F-D088DD67707E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {31ADF48B-7540-4869-BF0F-D088DD67707E}.Release|Any CPU.Build.0 = Release|Any CPU + {29663C66-DB7C-4704-8BF8-52B3BCFABC19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29663C66-DB7C-4704-8BF8-52B3BCFABC19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29663C66-DB7C-4704-8BF8-52B3BCFABC19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29663C66-DB7C-4704-8BF8-52B3BCFABC19}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff -r 954f66bb8dbf -r e51a6af1c98d SSRS/SSRS/SSRS.csproj --- a/SSRS/SSRS/SSRS.csproj Sat May 19 16:21:07 2012 +0100 +++ b/SSRS/SSRS/SSRS.csproj Sat May 19 16:53:34 2012 +0100 @@ -105,24 +105,6 @@ - - Data\Parameter.cs - - - Data\ReportExecutionRequest.cs - - - Data\ReportExecutionResponse.cs - - - Data\ReportInfo.cs - - - Data\ReportsRequest.cs - - - Data\ReportsResponse.cs - App.xaml @@ -219,6 +201,12 @@ True + + + {29663C66-DB7C-4704-8BF8-52B3BCFABC19} + SSRS.Services.DTO + +