SignalR in Visual Basic - vb.net

I am trying to setup SignalR using Visual Basic. This is very difficult because every example (literally every example) is in C#. I'm doing an okay job getting through conversions, but I am stumped on this:
[HubName("ThisHub")]
What is the VB equivalent for this? This is for creating the proxy name of the hub.

Rippo answered this:
<HubName("ThisHub")>

To get the rewards :)
Its simply:-
<HubName("ThisHub")>

Related

.NET Serial Port Woes. Converting C# Code to VB

I'm having trouble with the SerialPort function intermittently crashing while data logging for several days. It's been a hard problem to debug and I would like to try Zach Saw's fix which he talks about here and provides code for in C#
My question is, to do this, do I need to rewrite the entire use of the Serial Port in my code?
If I use the System.IO.Ports.SerialPort module, is there a way to just do a DLLImport of SetCommState to set fAbortOnError to false, or do I need to abandon the SerialPort module entirely and write everything using the kernel32.dll?
I'm pretty sure in this case you could import his project into your solution, and it should run just fine. Since VB and C# are both CLR languages, they both compile down to the same intermediate language.
Check out this page
http://support.microsoft.com/kb/823179
It's got the proper declarations for SetCommState, with some example code. Zach's fix is to basically open the com port as a file first, call setcommstate, then use the serial io functions in .net. I haven't tried it but his post sounds like you shouldn't have to do much at all to your code.
Having tested about 15 different solutions to the various problems with serial ports in .NET, I settled on using CommStudio. It's been rock solid ever since.
You can get CommStudio Express (their free version) here: http://www.componentsource.com/products/commstudio/downloads.html?rv=42917

How to use RhinoMocks to test async WCF service call

We have a Silverlight 4 app that is making the standard async call to a WCF service to get data from the database. We have an interface for this IDataService so we can mock it out. I've been reading about RhinoMocks and trying to understand how to write a test for this. I think I would need to test that the call was made to get the data (something like GetCustomers) and then that the GetCustomersCompleted method was called with the data. I've seen so many different examples today and the old way to raise an event vs the new way (and I didn't know either). Does anyone have a simple example of using RhinoMocks for this kind of test? It seems like it would be something very common if one is using TDD and RhinoMocks with Silverlight. Any examples or links would be greatly appreciated. After several days of exploring I'd be great full for any help in this area.
thanks in advance!
Bill
I was struggling trying to write some async tests for a WPF app until I found the following blog entry:
http://blog.tatham.oddie.com.au/2009/04/09/testing-the-world-and-writing-better-quality-code-along-the-way/
I believe it should work for the Silverlight version of Rhino Mocks as well.

how to learn web service using vb.net

im want to learn how to build a web service using vb.net.
unfortunately i couldn't find any websites that provides good tutorial..
can any one suggest a web site? thank u in advance ..
I'd look at WCF, this seems like a fairly easy intro to that.

SQL Databases in vb.net

If you are using an sql database with a vb.net application, does the user need to have anything extra other than the .net framework installed for the program to run? Meaning, if I simply compile the application, are there any extra steps I need to take to make this work?
Thanks for the help!
According to your comment response on the question of having a SQL DB server somewhere:
Well duh, my question was referring to
drivers. Do they need any extra .dlls?
Nope, you should be good to go. :)
The only time you have to worry about this is if you use a 3rd party control or tool that isn't installed with the framework.

Has anyone used any .Net code generation frameworks in Mono? (Subsonic, .netTiers, etc..)

Mono appears to have really come a log way since the last time I really used it. I'm interested in doing some ASP.Net development using Mono. I have used .netTiers/CodeSmith at work and really enjoy the speed with which code generation gives you a clean working data access layer. The question is has anybody used any code generation with Mono? I am open to learning something like SubSonic or NHibernate if those work better with Mono.
Thanks in advance for any help.
I have used subsonic with mono. I've used it on mono 2.0, on which SubStage (GUI front end for subsonic ) does not work, but you can generate code using command line option. It works very well with mono. I don't find any problem while using SubSonic generated code in mono.
I have not NHibernate on mono. NHibernate is very complex, I tried to learn it, but give. While SubSonic is very easy, it take me less than 1hr to learn SubSonic.
If you are interested in Linq, I suggest to you give a try to DBLinq , DBLinq team is working with Mono team to implement Linq to Sql in Mono.
This link describes it pretty well. Not entirely sure I understand it, but the end result is good performance.
http://www.mono-project.com/Linear_IL
We do have people using CodeSmith to generate code that runs under Mono. I talked to one guy who was creating a Mono Framework with CodeSmith.
Thanks
-Blake Niemyjski