PageRenderTime 15ms queryFilters 0ms Sphinxql 1708ms GetByIds 798ms meta 0ms repositoryFilters 14ms languageFilters 1ms sourceFilters 2ms

838,072 results for 'using System.Linq;' (15 ms)

Source

Language

Repository

JSON.aspx https://github.com/pvencill/amptools.git | ASP.NET | 500 lines
94			 <div class="blog-content">
95				<p>Even though there are quite a few opensource .Net libraries REST API out there, and a really impressive one for Flickr, they tend to never evolve or fork to use the newer framework technologies.&#160; I think its great that they support 1.0, 2.0, and mono, but why not fork and support WCF?&#160; I think part of the problem that .Net 3.5 use is not wide spread as it should be is not only information overload and bad naming for extension libraries, but also lack of opensource support to provide libraries and basis for current technology.&#160; </p>  <p>Flickr tends to be a little more tricky to use when calling it than some other REST APIs. WCF is a cool technology, but needs to be massaged when using it with Flickr due to a couple of gotchas and not so obvious things about WCF. In order to use Flickr, you need to register for an api_key and a shared secret code which is used to create an MD5 hash. You also need to create that MD5 each time you call a method, using the url parameters in a certain way. </p>  <p>There are also a few not so obvious factors about using the JSON part of Flickr. All of the .Net libraries I've seen so far, use XML. While C# is king of parsing&#160; XML, JSON tends to be more compact, which means less expense over the wire, though it might mean more time parsing once on the developers end point. So there are tradeoffs to using it. </p>  <p>When I created the classes needed to use WCF to call Flickr, I have the actual &quot;DataContract&quot; object (DTO, Data Transfer Object), A Hash (Dictionary&lt;string, object&gt;) for adding the parameters to create the MD5 signature, A base class for creating the WCF proxy, a custom &quot;WebContentTypeMapper&quot;, The &quot;ServiceContract&quot; interface, the actual &quot;Client class&quot;, and a mixins class for creating the MD5. </p>  <p>Here are some of the gotchas that I ran into while getting WCF to work with Flickr. </p>  <p></p>  <ol>   <li>Flickr makes you create a md5 hash to send with every call for ALL parameters in alphabetical order using your &quot;Shared Secret&quot; Code as part of the md5.&#160;&#160; </li>    <li>Flickr's Json response &quot;Content-Type&quot; header is sent not as &quot;application/json&quot; but as &quot;text/plain&quot; which equates to &quot;Raw&quot; in WCF lingo.&#160; </li>    <li>The response object is wrapped and not obvious when it comes to json how the DataContract object should be formed.&#160; </li>    <li>Flickr will wrap the json response in a javascript function unless you pass in the parameter &quot;nojsoncallback=1&quot; </li> </ol>  <p>To get around number one, I created an extension method that takes a Hash (Dictionary&lt;string, object&gt;) and adds method that converts the parameters into a MD5 string. </p>  <pre class="code csharp">namespace Amplify.Linq
96{
117	using System.Collections.Generic;
118	using System.Linq;
119	using System.Security.Cryptography;
230	using System.Collections.Generic;
231	using System.Linq;
232	using System.Text;
263	using System.Collections.Generic;
264	using System.Linq;
265	using System.Text;
291	using System.Collections.Generic;
292	using System.Linq;
293	using System.Text;
REST.aspx https://github.com/pvencill/amptools.git | ASP.NET | 500 lines
94			 <div class="blog-content">
95				<p>Even though there are quite a few opensource .Net libraries REST API out there, and a really impressive one for Flickr, they tend to never evolve or fork to use the newer framework technologies.&#160; I think its great that they support 1.0, 2.0, and mono, but why not fork and support WCF?&#160; I think part of the problem that .Net 3.5 use is not wide spread as it should be is not only information overload and bad naming for extension libraries, but also lack of opensource support to provide libraries and basis for current technology.&#160; </p>  <p>Flickr tends to be a little more tricky to use when calling it than some other REST APIs. WCF is a cool technology, but needs to be massaged when using it with Flickr due to a couple of gotchas and not so obvious things about WCF. In order to use Flickr, you need to register for an api_key and a shared secret code which is used to create an MD5 hash. You also need to create that MD5 each time you call a method, using the url parameters in a certain way. </p>  <p>There are also a few not so obvious factors about using the JSON part of Flickr. All of the .Net libraries I've seen so far, use XML. While C# is king of parsing&#160; XML, JSON tends to be more compact, which means less expense over the wire, though it might mean more time parsing once on the developers end point. So there are tradeoffs to using it. </p>  <p>When I created the classes needed to use WCF to call Flickr, I have the actual &quot;DataContract&quot; object (DTO, Data Transfer Object), A Hash (Dictionary&lt;string, object&gt;) for adding the parameters to create the MD5 signature, A base class for creating the WCF proxy, a custom &quot;WebContentTypeMapper&quot;, The &quot;ServiceContract&quot; interface, the actual &quot;Client class&quot;, and a mixins class for creating the MD5. </p>  <p>Here are some of the gotchas that I ran into while getting WCF to work with Flickr. </p>  <p></p>  <ol>   <li>Flickr makes you create a md5 hash to send with every call for ALL parameters in alphabetical order using your &quot;Shared Secret&quot; Code as part of the md5.&#160;&#160; </li>    <li>Flickr's Json response &quot;Content-Type&quot; header is sent not as &quot;application/json&quot; but as &quot;text/plain&quot; which equates to &quot;Raw&quot; in WCF lingo.&#160; </li>    <li>The response object is wrapped and not obvious when it comes to json how the DataContract object should be formed.&#160; </li>    <li>Flickr will wrap the json response in a javascript function unless you pass in the parameter &quot;nojsoncallback=1&quot; </li> </ol>  <p>To get around number one, I created an extension method that takes a Hash (Dictionary&lt;string, object&gt;) and adds method that converts the parameters into a MD5 string. </p>  <pre class="code csharp">namespace Amplify.Linq
96{
117	using System.Collections.Generic;
118	using System.Linq;
119	using System.Security.Cryptography;
230	using System.Collections.Generic;
231	using System.Linq;
232	using System.Text;
263	using System.Collections.Generic;
264	using System.Linq;
265	using System.Text;
291	using System.Collections.Generic;
292	using System.Linq;
293	using System.Text;
2008_07_13_index.aspx https://github.com/pvencill/amptools.git | ASP.NET | 488 lines
51			 <div class="blog-content">
52				<p>Even though there are quite a few opensource .Net libraries REST API out there, and a really impressive one for Flickr, they tend to never evolve or fork to use the newer framework technologies.&#160; I think its great that they support 1.0, 2.0, and mono, but why not fork and support WCF?&#160; I think part of the problem that .Net 3.5 use is not wide spread as it should be is not only information overload and bad naming for extension libraries, but also lack of opensource support to provide libraries and basis for current technology.&#160; </p>  <p>Flickr tends to be a little more tricky to use when calling it than some other REST APIs. WCF is a cool technology, but needs to be massaged when using it with Flickr due to a couple of gotchas and not so obvious things about WCF. In order to use Flickr, you need to register for an api_key and a shared secret code which is used to create an MD5 hash. You also need to create that MD5 each time you call a method, using the url parameters in a certain way. </p>  <p>There are also a few not so obvious factors about using the JSON part of Flickr. All of the .Net libraries I've seen so far, use XML. While C# is king of parsing&#160; XML, JSON tends to be more compact, which means less expense over the wire, though it might mean more time parsing once on the developers end point. So there are tradeoffs to using it. </p>  <p>When I created the classes needed to use WCF to call Flickr, I have the actual &quot;DataContract&quot; object (DTO, Data Transfer Object), A Hash (Dictionary&lt;string, object&gt;) for adding the parameters to create the MD5 signature, A base class for creating the WCF proxy, a custom &quot;WebContentTypeMapper&quot;, The &quot;ServiceContract&quot; interface, the actual &quot;Client class&quot;, and a mixins class for creating the MD5. </p>  <p>Here are some of the gotchas that I ran into while getting WCF to work with Flickr. </p>  <p></p>  <ol>   <li>Flickr makes you create a md5 hash to send with every call for ALL parameters in alphabetical order using your &quot;Shared Secret&quot; Code as part of the md5.&#160;&#160; </li>    <li>Flickr's Json response &quot;Content-Type&quot; header is sent not as &quot;application/json&quot; but as &quot;text/plain&quot; which equates to &quot;Raw&quot; in WCF lingo.&#160; </li>    <li>The response object is wrapped and not obvious when it comes to json how the DataContract object should be formed.&#160; </li>    <li>Flickr will wrap the json response in a javascript function unless you pass in the parameter &quot;nojsoncallback=1&quot; </li> </ol>  <p>To get around number one, I created an extension method that takes a Hash (Dictionary&lt;string, object&gt;) and adds method that converts the parameters into a MD5 string. </p>  <pre class="code csharp">namespace Amplify.Linq
53{
55	using System.Collections.Generic;
56	using System.Linq;
57	using System.Text;
74	using System.Collections.Generic;
75	using System.Linq;
76	using System.Security.Cryptography;
220	using System.Collections.Generic;
221	using System.Linq;
222	using System.Text;
248	using System.Collections.Generic;
249	using System.Linq;
250	using System.Text;
EntityFrameworkDbContextRepositoryOrmFrameworkBase.cs git://github.com/kahanu/CondorXE.git | C# | 720 lines
214            _output.autoTabLn("using System;");
215            _output.autoTabLn("using System.Linq;");
216            _output.autoTabLn("using " + _script.Settings.BusinessObjects.BusinessObjectsNamespace + ";");
338            _output.autoTabLn("using System.Configuration;");
339            _output.autoTabLn("using System.Linq;");
340            _output.autoTabLn("");
389            _output.autoTabLn("using System.Data.Entity;");
390            _output.autoTabLn("using System.Linq;");
391            _output.autoTabLn("using System.Linq.Expressions;");
588            _output.autoTabLn("using System;");
589            _output.autoTabLn("using System.Linq;");
590            _output.autoTabLn("");
663            _output.autoTabLn("using System;");
664            _output.autoTabLn("using System.Linq;");
665            _output.autoTabLn("");
RavenDB-13695.cs git://github.com/ravendb/ravendb.git | C# | 460 lines
1using System.Collections.Generic;
2using System.Linq;
3using FastTests;
55using System.Collections.Generic;
56using System.Linq;
57
291using System.Collections.Generic;
292using System.Linq;
293
357using System.Collections.Generic;
358using System.Linq;
359
423using System.Collections.Generic;
424using System.Linq;
425
big.patch https://github.com/gitextensions/gitextensions.git | Patch | 441 lines
36@@ -10,7 +10,7 @@ using System;
37 using System.Linq;
38 using GitCommands;
101@@ -11,7 +11,7 @@ using System.Collections.Generic;
102 using System.Linq;
103 using GitCommands.Git;
153@@ -14,7 +14,7 @@ using System.Collections.Generic;
154 using System.Linq;
155 using System.Text;
166@@ -12,7 +12,7 @@ using System.Collections.Generic;
167 using System.Linq;
168 using System.Text;
179@@ -11,7 +11,7 @@ using System.Collections.Generic;
180 using System.Linq;
181 using System.Text;
big.patch https://gitlab.com/Rockyspade/gitextensions.git | Patch | 440 lines
36@@ -10,7 +10,7 @@ using System;
37 using System.Linq;
38 using GitCommands;
101@@ -11,7 +11,7 @@ using System.Collections.Generic;
102 using System.Linq;
103 using GitCommands.Git;
153@@ -14,7 +14,7 @@ using System.Collections.Generic;
154 using System.Linq;
155 using System.Text;
166@@ -12,7 +12,7 @@ using System.Collections.Generic;
167 using System.Linq;
168 using System.Text;
179@@ -11,7 +11,7 @@ using System.Collections.Generic;
180 using System.Linq;
181 using System.Text;
big.patch git://github.com/spdr870/gitextensions.git | Patch | 440 lines
36@@ -10,7 +10,7 @@ using System;
37 using System.Linq;
38 using GitCommands;
101@@ -11,7 +11,7 @@ using System.Collections.Generic;
102 using System.Linq;
103 using GitCommands.Git;
153@@ -14,7 +14,7 @@ using System.Collections.Generic;
154 using System.Linq;
155 using System.Text;
166@@ -12,7 +12,7 @@ using System.Collections.Generic;
167 using System.Linq;
168 using System.Text;
179@@ -11,7 +11,7 @@ using System.Collections.Generic;
180 using System.Linq;
181 using System.Text;
ServiceClassesAndCommonBaseClassForDbContextServiceLayerObjects.cs git://github.com/kahanu/CondorXE.git | C# | 357 lines
1using System;
2using System.Linq;
3using Condor.Core;
72            _output.autoTabLn("using System.Collections.Generic;");
73            _output.autoTabLn("using System.Linq;");
74            _output.autoTabLn("using System.Linq.Expressions;");
145            _output.autoTabLn("using System.Collections.Generic;");
146            _output.autoTabLn("using System.Linq;");
147            _output.autoTabLn("using " + _script.Settings.DataOptions.DataObjectsNamespace + ".Generated;");
230            _output.autoTabLn("using System.Collections.Generic;");
231            _output.autoTabLn("using System.Linq;");
232            _output.autoTabLn("using " + _script.Settings.BusinessObjects.BusinessObjectsNamespace + ";");
311            _output.autoTabLn("using System;");
312            _output.autoTabLn("using System.Linq;");
313            _output.autoTabLn("using " + _script.Settings.BusinessObjects.BusinessObjectsNamespace + ";");
big.patch https://github.com/PKRoma/gitextensions.git | Patch | 440 lines
36@@ -10,7 +10,7 @@ using System;
37 using System.Linq;
38 using GitCommands;
101@@ -11,7 +11,7 @@ using System.Collections.Generic;
102 using System.Linq;
103 using GitCommands.Git;
153@@ -14,7 +14,7 @@ using System.Collections.Generic;
154 using System.Linq;
155 using System.Text;
166@@ -12,7 +12,7 @@ using System.Collections.Generic;
167 using System.Linq;
168 using System.Text;
179@@ -11,7 +11,7 @@ using System.Collections.Generic;
180 using System.Linq;
181 using System.Text;
big.patch https://github.com/gitextensions/gitextensions.git | Patch | 440 lines
36@@ -10,7 +10,7 @@ using System;
37 using System.Linq;
38 using GitCommands;
101@@ -11,7 +11,7 @@ using System.Collections.Generic;
102 using System.Linq;
103 using GitCommands.Git;
153@@ -14,7 +14,7 @@ using System.Collections.Generic;
154 using System.Linq;
155 using System.Text;
166@@ -12,7 +12,7 @@ using System.Collections.Generic;
167 using System.Linq;
168 using System.Text;
179@@ -11,7 +11,7 @@ using System.Collections.Generic;
180 using System.Linq;
181 using System.Text;
Index.cs git://github.com/ayende/ravendb.git | C# | 2,107 lines
5//-----------------------------------------------------------------------
6using System;
7using System.Collections;
7using System.Collections;
8using System.Collections.Concurrent;
9using System.Collections.Generic;
9using System.Collections.Generic;
10using System.Collections.Specialized;
11using System.ComponentModel.Composition;
11using System.ComponentModel.Composition;
12using System.Diagnostics;
13using System.IO;
13using System.IO;
14using System.Linq;
15using System.Text;
MapReduceIndex.cs git://github.com/ayende/ravendb.git | C# | 887 lines
5//-----------------------------------------------------------------------
6using System;
7using System.Collections;
7using System.Collections;
8using System.Collections.Concurrent;
9using System.Collections.Generic;
9using System.Collections.Generic;
10using System.ComponentModel;
11using System.Diagnostics;
12using System.Globalization;
13using System.Linq;
14using System.Text;
14using System.Text;
15using System.Threading;
16using Lucene.Net.Analysis;
AspNetMvcUILayerObjectsForDbContextBase.cs git://github.com/kahanu/CondorXE.git | C# | 704 lines
1using System;
2using System.Linq;
3using Condor.Core;
106            _output.autoTabLn("using " + _script.Settings.ServiceLayer.ServiceNamespace + ".Interfaces;");
107            _output.autoTabLn("using System.Linq;");
108            _output.autoTabLn("using System.Web.Mvc;");
223            _output.autoTabLn("using System.Collections.Generic;");
224            _output.autoTabLn("using System.Linq;");
225            _output.autoTabLn("using System.Net;");
456            _output.autoTabLn("using System.Collections.Generic;");
457            _output.autoTabLn("using System.Linq;");
458            _output.autoTabLn("using System.Web;");
672            _output.autoTabLn("using System.Collections.Generic;");
673            _output.autoTabLn("using System.Linq;");
674            _output.autoTabLn("using System.Web;");
LinqQueryToFluentTests.cs https://github.com/pombredanne/SharpDevelop.git | C# | 691 lines
39			string input = @"
40using System.Linq;
41public class TestClass
51			string output = @"
52using System.Linq;
53public class TestClass
145			string output = @"
146using System.Linq;
147public class TestClass
632			string output = @"
633using System.Linq;
634public class TestClass
656			string input = @"
657using System.Linq;
658public class TestClass
LinqFluentToQueryTests.cs https://github.com/pombredanne/SharpDevelop.git | C# | 628 lines
37			Test<LinqFluentToQueryAction>(@"
38using System.Linq;
39
46}", @"
47using System.Linq;
48
62			Test<LinqFluentToQueryAction>(@"
63using System.Linq;
64
138			Test<LinqFluentToQueryAction>(@"
139using System.Linq;
140
602			Test<LinqFluentToQueryAction>(@"
603using System.Linq;
604
PossibleMultipleEnumerationIssueTests.cs https://github.com/pombredanne/SharpDevelop.git | C# | 734 lines
29using System.Collections.Generic;
30using System.Linq;
31
332using System.Collections.Generic;
333using System.Linq;
334class TestClass
648using System.Collections.Generic;
649using System.Linq;
650class TestClass
671using System.Collections.Generic;
672using System.Linq;
673class TestClass
695using System.Collections.Generic;
696using System.Linq;
697class TestClass
LinqQueryToFluentTests.cs git://github.com/icsharpcode/NRefactory.git | C# | 690 lines
39			string input = @"
40using System.Linq;
41public class TestClass
51			string output = @"
52using System.Linq;
53public class TestClass
145			string output = @"
146using System.Linq;
147public class TestClass
632			string output = @"
633using System.Linq;
634public class TestClass
656			string input = @"
657using System.Linq;
658public class TestClass
AutoLinqSumTests.cs git://github.com/icsharpcode/NRefactory.git | C# | 775 lines
37			string source = @"
38using System.Linq;
39
50			string result = @"
51using System.Linq;
52
169			string result = @"
170using System.Linq;
171
703			string source = @"
704using System.Linq;
705
722			string source = @"
723using System.Linq;
724
LinqFluentToQueryTests.cs git://github.com/icsharpcode/NRefactory.git | C# | 627 lines
37			Test<LinqFluentToQueryAction>(@"
38using System.Linq;
39
46}", @"
47using System.Linq;
48
62			Test<LinqFluentToQueryAction>(@"
63using System.Linq;
64
138			Test<LinqFluentToQueryAction>(@"
139using System.Linq;
140
602			Test<LinqFluentToQueryAction>(@"
603using System.Linq;
604
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21