PageRenderTime 5ms queryFilters 0ms Sphinxql 766ms GetByIds 681ms meta 0ms repositoryFilters 0ms languageFilters 0ms sourceFilters 1ms

889,502 results for 'using System.Linq;' (5 ms)

Source

Language

Repository

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("");
ReplaceWithOfTypeIssueTests.cs https://github.com/pombredanne/SharpDevelop.git | C# | 222 lines
29using ICSharpCode.NRefactory.CSharp.CodeActions;
30using System.Linq;
31
174	}
175}", @"using System.Linq;
176class Test
182}");
183			Test<ReplaceWithOfTypeIssue>(@"using System.Linq;
184class Test
189	}
190}", @"using System.Linq;
191class Test
204		{
205			TestWrongContext<ReplaceWithOfTypeIssue>(@"using System.Linq;
206class Test
LoopCanBeConvertedToQueryIssueTests.cs https://github.com/pombredanne/SharpDevelop.git | C# | 563 lines
200using System;
201using System.Linq;
202
451using System.Collections.Generic;
452using System.Linq;
453
467using System.Collections.Generic;
468using System.Linq;
469
498using System;
499using System.Linq;
500
528using System;
529using System.Linq;
530
DontUseLinqWhenItsVerboseAndInefficientTests.cs https://github.com/pombredanne/SharpDevelop.git | C# | 309 lines
39			Test<DontUseLinqWhenItsVerboseAndInefficientIssue>(@"
40using System.Linq;
41class TestClass
48}", @"
49using System.Linq;
50class TestClass
180			TestWrongContext<DontUseLinqWhenItsVerboseAndInefficientIssue>(@"
181using System.Linq;
182using System.Collections.Generic;
259}", @"
260using System.Linq;
261using System.Collections.Generic;
276			TestWrongContext<DontUseLinqWhenItsVerboseAndInefficientIssue>(@"
277using System.Linq;
278using System.Collections;
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;
AutoLinqSumTests.cs https://github.com/ajadex/SharpDevelop.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 https://github.com/ajadex/SharpDevelop.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
LinqQueryToFluentTests.cs https://github.com/ajadex/SharpDevelop.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
PossibleMultipleEnumerationIssueTests.cs https://github.com/ajadex/SharpDevelop.git | C# | 733 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
AutoLinqSumTests.cs https://github.com/alexandrebaker/SharpDevelop.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 https://github.com/alexandrebaker/SharpDevelop.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
LinqQueryToFluentTests.cs https://github.com/alexandrebaker/SharpDevelop.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
PossibleMultipleEnumerationIssueTests.cs https://github.com/alexandrebaker/SharpDevelop.git | C# | 733 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21