Geeks With Blogs
Joe Mayo C#
Scenarios for Throwing Exceptions
I recently came across a situation where someone had an opinion that differed from mine of when an exception should be thrown. This particular case was an issue opened on LINQ to Twitter for an Exception on EndSession. The premise of the issue was that the poster didn’t feel an exception should be raised, regardless of authentication status. As first, this sounded like a valid point. However, I went back to review my code and decided not to make any changes. Here's my rationale: 1. The exception ......

Posted On Tuesday, June 5, 2012 9:52 PM

Pre-Processing Directives for Multi-Platform Support
Over the last several months, I’ve been modifying LINQ to Twitter to support multiple platforms. Originally, I had targeted full profile .NET, ASP.NET Web Forms, and ASP.NET MVC apps. An easy stop along the way was Mono compatibility, but that was simple because Mono is good about running any CLR app. The code-base was good until I started porting to Silverlight. Porting to Silverlight Silverlight requires a different type of class library, so right-away I couldn’t use the same libraries as the full ......

Posted On Friday, May 11, 2012 8:33 AM

DataSprings Blog Post

Here's a blog post by DataSprings on how to use LINQ to Twitter: http://bit.ly/jjmLZY.  It demonstrates how to authenticate with OAuth and how to use several of the APIs.

Joe

Posted On Monday, June 6, 2011 6:32 PM

Displaying Search Results With LINQ to Twitter and ASP.NET MVC
Sometimes, the way that LINQ to Twitter materializes queries into entities isn’t immediately clear. It’s easy to get confused until you see the patterns or make a correlation between the Twitter API results and their representations as LINQ to Twitter entities. In this post, I’ll explain some of the logic behind the design of LINQ to Twitter entities and demonstrate an example of one of the more oddly designed entity types, Search. Note: They'll be talking about MVC3 during multiple sessions at Tech-Ed. ......

Posted On Thursday, April 28, 2011 8:27 AM

TechEd 2011
Now that Mix11 is over, Microsoft’s next big conference is Tech-Ed 2011, which happens May 16th through May 19th in Atlanta, GA. Each of Microsoft’s conferences have a theme; Mix is about the Web, PDC is about new and upcoming technologies, and there are many more. The focus of Tech-Ed is on current Microsoft technologies. In other words, you would go there to learn about the software that you can use today to get your work done. If you haven’t been there yet, Atlanta is a nice city and the surrounding ......

Posted On Saturday, April 16, 2011 2:31 PM

JustCode Provides Reflector Alternative
If you've been a loyal Reflector user, you've probably been exposed to the debacle surrounding RedGate's decision to no longer offer a free version. Since then, the race has begun for a replacement with a provider that would stand by their promises to the community. Mono has an ongoing free alternative, which has been available for a long time. However, other vendors are stepping up to the plate, with their own offerings. If Not Reflector, Then What? One of these vendors is Telerik. In their recent ......

Posted On Saturday, March 19, 2011 11:04 PM

Released LINQ to Twitter Beta v2.0.20

I released LINQ to Twitter Beta v2.0.20: http://goo.gl/1i97X.  Most of the items were bug fixes.  A couple items were new: Geo Search and I finished adding Asynch support for non-Silverlight APIs.

Joe

Posted On Sunday, March 6, 2011 8:24 PM

Debugging Windows Service Timeout Error 1053
If you ever receive an Error 1053 for a timeout when starting a Windows Service you've written, the underlying problem might not have anything to do with a timeout. Here's the error so you can compare it to what you're seeing: --------------------------- Services --------------------------- Windows could not start the Service1 service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion. --------------------------- OK --------------------------- ......

Posted On Thursday, March 3, 2011 12:20 PM

LINQ to Twitter Queries with LINQPad
LINQPad is a popular utility for .NET developers who use LINQ a lot. In addition to standard SQL queries, LINQPad also supports other types of LINQ providers, including LINQ to Twitter. The following sections explain how to set up LINQPad for making queries with LINQ to Twitter. LINQPad comes in a couple versions and this example uses LINQPad4, which runs on the .NET Framework 4.0. 1. The first thing you'll need to do is set up a reference to the LinqToTwitter.dll. From the Query menu, select query ......

Posted On Thursday, February 24, 2011 11:31 AM

A Basic Thread
Most of the programs written are single-threaded, meaning that they run on the main execution thread. For various reasons such as performance, scalability, and/or responsiveness additional threads can be useful. .NET has extensive threading support, from the basic threads introduced in v1.0 to the Task Parallel Library (TPL) introduced in v4.0. To get started with threads, it's helpful to begin with the basics; starting a Thread. Why Do I Care? The scenario I'll use for needing to use a thread is ......

Posted On Monday, February 21, 2011 10:30 PM

An MVC 3 Contact Form
Many sites have a contact form, instead of posting email addresses. Admittedly, email addresses are convenient for customers because they can use a mailto link that brings up their email client and allow them to start typing, archive the communication, and manage the thread. When I first started C# Station, that’s what I did; posted my email address for everyone. Holy cow, what a mistake. I received so much spam that my inbox was unusable. Fortunately, spam is more manageable these days, but it’s ......

Posted On Saturday, October 30, 2010 6:27 PM

Named Arguments Can Improve Readability
Using named arguments everywhere is tedious and unnecessary, but can be applied as needed to improve the readability of your code. Here’s an example, using Directory.Delete() that helps document the meaning of a bool argument: Directory.Delete(pathToDelete, recursive: true); If Directory.Delete was your own code, you could re-write the parameter to use an Enum and get away from the bool code smell. However, Directory is a class in the .NET Framework’s System.Diagnostics namespace, which demonstrates ......

Posted On Monday, October 11, 2010 11:04 AM

Extensibility in LINQ to Twitter: Raw Queries
Today, I added a new extensibility feature to LINQ to Twitter, called Raw Queries. The Twitter API has historically changed suddenly and without warning, leaving 3rd party libraries, such as LINQ to Twitter deficient in full support. On occasion, LINQ to Twitter encounters bugs that leave users without a means for accomplishing specific tasks. Therefore, we need work arounds to allow users to quickly adapt to changes and new features. Raw queries include two points of extensibility: the ability to ......

Posted On Saturday, October 2, 2010 8:50 PM

LINQ to Twitter v2.0.8 Released
Today, I released LINQ to Twitter v2.0.8. Besides normal maintenance, this release includes the Twitter Geo API and the Suggested Users API. LINQ to Twitter is hosted on CodePlex.com: http://linqtotwitter.codepl... In addition to new functionality, I've made much progress toward LINQ to Twitter documentation; primarily in the Making API Calls area: http://linqtotwitter.codepl... There's also a discussion forum where you can ......

Posted On Monday, March 22, 2010 1:46 PM

Extracting StatusID from LINQ to Twitter Search Results
The Twitter Search API returns an XML Atom formatted feed. So, in LINQ to Twitter, I've created an Atom object, which I return when someone performs a search. The problem with the results is that the ID of the Status is mangled with other information. To solve this problem, you need to extract the status ID from the number following the last colon of the ID from the search Entry. Here's some code to show how it's done: private static void SearchAndUseStatusTwitterDe... twitterCtx) { ......

Posted On Monday, February 1, 2010 9:46 PM

Using LINQ to Twitter to Get Chirp Conference Password
The first annual Chirp has been scheduled for 14-15 April in San Francisco. Chirp is a conference, sponsored by Twitter, about the Twitter platform. http://chirp.twitter.com To attend the conference, you'll need to obtain the password by executing the users/show command. There are plenty of tools to help you do this if you have some degree of programming skill. Of course, there is a .NET LINQ provider, LINQ to Twitter, that can help perform this task with ease. In LINQ to Twitter terms, you would ......

Posted On Monday, January 25, 2010 10:55 PM

Simplified Many-To-Many Relationships with LINQ to SQL
Common questions when learning LINQ to SQL revolve around many-to-many relationships. This post will describe a scenario that needs queries across many-to-many relationships, show the data and the LINQ to SQL representation of that data, explain the query, and finally output the results. As you know, the design for many-to-many involves a join table. The following figure illustrates a many-to-many relationship between Tags and Tasks with a TasksTags join table: A scenario for working with this data ......

Posted On Saturday, January 9, 2010 5:58 PM

Copyright © Joe Mayo | Powered by: GeeksWithBlogs.net | Join free