Changeset 4698
- Timestamp:
- 06/12/08 09:55:53 (6 months ago)
- Files:
-
- trunk/nuxleus/Source/Dependencies/Scope/Scope/Scope.csproj (modified) (2 diffs)
- trunk/nuxleus/Source/Nuxleus.Extension.Aws/SimpleDB/SimpleDBService.cs (modified) (1 diff)
- trunk/nuxleus/Source/Nuxleus.Extension.Linq/Async.cs (modified) (6 diffs)
- trunk/nuxleus/Source/nuXleus.sln (modified) (2 diffs)
- trunk/nuxleus/Source/nux.build (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/nuxleus/Source/Dependencies/Scope/Scope/Scope.csproj
r4696 r4698 4 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 5 5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 6 <ProductVersion>9.0. 21022</ProductVersion>6 <ProductVersion>9.0.30428</ProductVersion> 7 7 <SchemaVersion>2.0</SchemaVersion> 8 8 <ProjectGuid>{4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}</ProjectGuid> … … 50 50 <Compile Include="Scope.cs" /> 51 51 </ItemGroup> 52 <ItemGroup> 53 <ProjectReference Include="..\..\..\Nuxleus.Extension.Linq\Nuxleus.Extension.Linq.csproj"> 54 <Project>{D937BA9E-1E6C-4757-98CC-7D932F4697B0}</Project> 55 <Name>Nuxleus.Extension.Linq</Name> 56 </ProjectReference> 57 </ItemGroup> 52 58 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 53 59 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. trunk/nuxleus/Source/Nuxleus.Extension.Aws/SimpleDB/SimpleDBService.cs
r4695 r4698 172 172 Console.WriteLine("[] got response on thread: {0}", Thread.CurrentThread.ManagedThreadId); 173 173 Stream stream = response.Result.GetResponseStream(); 174 Async<T> responseObject = stream.ReadToEndAsync (typeof(T)).ExecuteAsync<T>();174 Async<T> responseObject = stream.ReadToEndAsync<T>().ExecuteAsync<T>(); 175 175 yield return responseObject; 176 176 responseList.Add(responseObject.Result); trunk/nuxleus/Source/Nuxleus.Extension.Linq/Async.cs
r4695 r4698 57 57 /// </summary> 58 58 public static Async<WebResponse> GetResponseAsync(this WebRequest req) { 59 return new AsyncPrimitive<WebResponse>(req.BeginGetResponse, req.EndGetResponse );59 return new AsyncPrimitive<WebResponse>(req.BeginGetResponse, req.EndGetResponse, HandleWebException); 60 60 } 61 61 … … 80 80 /// <returns>Returns string using the 'Result' class.</returns> 81 81 public static IEnumerable<IAsync> ReadToEndAsync(this Stream stream) { 82 return stream.ReadToEndAsync (typeof(String));82 return stream.ReadToEndAsync<String>(); 83 83 } 84 84 … … 88 88 /// </summary> 89 89 /// <param name="returnType">Specifies the desired return type. The default is System.String.</param> 90 public static IEnumerable<IAsync> ReadToEndAsync (this Stream stream, Type returnType) {90 public static IEnumerable<IAsync> ReadToEndAsync<T>(this Stream stream) { 91 91 MemoryStream ms = new MemoryStream(); 92 92 int read = -1; … … 102 102 103 103 ms.Seek(0, SeekOrigin.Begin); 104 105 switch ( returnType.FullName) {104 105 switch (typeof(T).FullName) { 106 106 case "System.Xml.XmlReader": 107 107 yield return new Result<XmlReader>(XmlReader.Create(ms)); … … 125 125 break; 126 126 } 127 } 128 129 public static WebResponse HandleWebException(Exception ex) { 130 return ((WebException)ex).Response; 127 131 } 128 132 … … 271 275 } 272 276 277 public AsyncPrimitive(Func<AsyncCallback, object, IAsyncResult> begin, Func<IAsyncResult, T> end, Func<Exception, T> we) { 278 this.func = (cont) => 279 begin(delegate(IAsyncResult res) { 280 try { 281 cont(end(res)); 282 } catch (Exception e) { 283 cont(we(e)); 284 } 285 }, null); 286 } 287 273 288 public override void ExecuteStep(Action cont) { 274 289 func((res) => { trunk/nuxleus/Source/nuXleus.sln
r4693 r4698 127 127 EndProject 128 128 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsSdbSOAP_Test", "CodeSamples\AwsSdbSOAP_Test\AwsSdbSOAP_Test.csproj", "{A1DF0E96-5699-4219-80B9-CE6EDE8599EC}" 129 EndProject 130 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scope", "Dependencies\Scope\Scope\Scope.csproj", "{4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}" 131 EndProject 132 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScopeTest", "Dependencies\Scope\ScopeTest\ScopeTest.csproj", "{A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}" 129 133 EndProject 130 134 Global … … 1028 1032 {A1DF0E96-5699-4219-80B9-CE6EDE8599EC}.Release|x64.ActiveCfg = Release|Any CPU 1029 1033 {A1DF0E96-5699-4219-80B9-CE6EDE8599EC}.Release|x86.ActiveCfg = Release|Any CPU 1034 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Debug|.NET.ActiveCfg = Debug|Any CPU 1035 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 1036 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Debug|Any CPU.Build.0 = Debug|Any CPU 1037 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 1038 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 1039 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Debug|x64.ActiveCfg = Debug|Any CPU 1040 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Debug|x86.ActiveCfg = Debug|Any CPU 1041 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Release|.NET.ActiveCfg = Release|Any CPU 1042 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Release|Any CPU.ActiveCfg = Release|Any CPU 1043 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Release|Any CPU.Build.0 = Release|Any CPU 1044 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 1045 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Release|Mixed Platforms.Build.0 = Release|Any CPU 1046 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Release|x64.ActiveCfg = Release|Any CPU 1047 {4A22EAF7-9A35-4F0E-A1CC-3D8A2DDB6830}.Release|x86.ActiveCfg = Release|Any CPU 1048 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Debug|.NET.ActiveCfg = Debug|Any CPU 1049 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 1050 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Debug|Any CPU.Build.0 = Debug|Any CPU 1051 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 1052 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 1053 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Debug|x64.ActiveCfg = Debug|Any CPU 1054 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Debug|x86.ActiveCfg = Debug|Any CPU 1055 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Release|.NET.ActiveCfg = Release|Any CPU 1056 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Release|Any CPU.ActiveCfg = Release|Any CPU 1057 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Release|Any CPU.Build.0 = Release|Any CPU 1058 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 1059 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Release|Mixed Platforms.Build.0 = Release|Any CPU 1060 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Release|x64.ActiveCfg = Release|Any CPU 1061 {A1C69CA6-2CBF-4B80-9FAC-78AFB6523B22}.Release|x86.ActiveCfg = Release|Any CPU 1030 1062 EndGlobalSection 1031 1063 GlobalSection(SolutionProperties) = preSolution trunk/nuxleus/Source/nux.build
r4695 r4698 308 308 </csc> 309 309 </target> 310 <target name="Nuxleus.Extension.Aws" depends="init Nuxleus.Extension Nuxleus.Extension.Linq Nuxleus.MetaData ">310 <target name="Nuxleus.Extension.Aws" depends="init Nuxleus.Extension Nuxleus.Extension.Linq Nuxleus.MetaData Scope"> 311 311 <csc target="library" output="${build.dir}/Nuxleus.Extension.Aws.dll" keyfile="./Dependencies/Extf.Net.snk"> 312 312 <arg if="${platform::is-unix()}" value="-langversion:linq"/> … … 318 318 <include name="${build.dir}/Nuxleus.Extension.Linq.dll"/> 319 319 <include name="${build.dir}/Nuxleus.MetaData.dll"/> 320 <include name="${build.dir}/Scope.dll"/> 320 321 <include name="System.dll"/> 321 322 <include name="System.Collections.dll"/> … … 660 661 </csc> 661 662 </target> 663 <target name="Scope" depends="init"> 664 <csc target="library" output="${build.dir}/Scope.dll" keyfile="./Dependencies/Extf.Net.snk"> 665 <arg if="${platform::is-unix()}" value="-langversion:linq"/> 666 <sources> 667 <include name="./Dependencies/Scope/Scope/**/*.cs"/> 668 </sources> 669 <references> 670 <include name="System.dll"/> 671 <include name="System.Data.dll"/> 672 <include name="System.Xml.dll"/> 673 </references> 674 </csc> 675 </target> 662 676 <target name="sdb-test" depends="init Nuxleus.Extension.Aws.Sdb"> 663 677 <csc target="exe" output="${build.dir}/sdb-test.exe"> … … 887 901 </csc> 888 902 </target> 889 <target name="SdbSOAP_Test" depends="init Nuxleus.Extension.Aws ">903 <target name="SdbSOAP_Test" depends="init Nuxleus.Extension.Aws Scope"> 890 904 <csc target="exe" output="${build.dir}/Sdb_SOAP_Test.exe" keyfile="./Dependencies/Extf.Net.snk"> 891 905 <arg if="${platform::is-unix()}" value="-langversion:linq"/> 892 906 <sources> 893 <include name="${source.dir}/CodeSamples/AwsSdbSOAP_Test/ Program.cs"/>907 <include name="${source.dir}/CodeSamples/AwsSdbSOAP_Test/**/*.cs"/> 894 908 </sources> 895 909 <references> 896 910 <include name="${build.dir}/Nuxleus.Extension.Aws.dll"/> 897 911 <include name="${build.dir}/Nuxleus.Extension.Linq.dll"/> 898 <include name="System.dll"/> 912 <include name="${build.dir}/Scope.dll"/> 913 <include name="System.dll"/> 914 <include name="System.Configuration.dll"/> 899 915 <include name="System.Xml.Linq.dll"/> 900 916 <include name="System.Xml.dll"/> … … 903 919 </references> 904 920 </csc> 921 <copy file="CodeSamples/AwsSdbSOAP_Test/App.config" tofile="${build.dir}/Sdb_SOAP_Test.exe.config"/> 905 922 </target> 906 923 <!--
