<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.9.2 (http://www.squarespace.com/) on Wed, 10 Mar 2010 11:43:27 GMT--><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:cc="http://web.resource.org/cc/"><rss:channel rdf:about="http://implicitoperator.com/blog/"><rss:title>David Brown</rss:title><rss:link>http://implicitoperator.com/blog/</rss:link><rss:description></rss:description><dc:language>en-US</dc:language><dc:date>2010-03-10T11:43:27Z</dc:date><admin:generatorAgent rdf:resource="http://www.squarespace.com/">Squarespace Site Server v5.9.2 (http://www.squarespace.com/)</admin:generatorAgent><rss:items><rdf:Seq><rdf:li rdf:resource="http://implicitoperator.com/blog/2010/2/26/how-to-cancel-the-creditinform-service.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2010/1/24/enable-visual-studio-intellisense-for-docbook.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2009/12/27/valve-map-format-utility-library-v10-released.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2009/12/24/rendering-an-in-memory-graphviz-image-with-c.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2009/12/16/managed-novacore-sdk-is-up-on-codeplex.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2009/12/7/retrieving-modem-information-from-the-mifi-with-c.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2009/11/24/opf3-tutorials-on-codeplex.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2009/11/15/mifinet-release-v100-beta.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2009/10/27/mifinet-for-the-novatel-mifi-mobile-broadband-router.html"/><rdf:li rdf:resource="http://implicitoperator.com/blog/2009/10/12/pervasive-sql-and-net-part-3-opf3-orm-framework.html"/></rdf:Seq></rss:items></rss:channel><rss:item rdf:about="http://implicitoperator.com/blog/2010/2/26/how-to-cancel-the-creditinform-service.html"><rss:title>How to cancel the CreditInform service</rss:title><rss:link>http://implicitoperator.com/blog/2010/2/26/how-to-cancel-the-creditinform-service.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2010-02-26T18:50:04Z</dc:date><dc:subject>off topic</dc:subject><content:encoded><![CDATA[<p>I realize this isn't exactly the kind of content that belongs on a blog primarily about programming, but I thought it still might be useful to some people.</p>

<p>If you got a CapitalOne credit card, then you were mostly likely given the opportunity to sign up for the CreditInform service, which charges you $5.99 every month to send you a credit report three times a year. Now, I know what you're saying: "You know you can already get your credit report three times a year for FREE, right?"</p>

<p>Yes, I knew that. However, in my specific situation, I was speaking to a someone whose primary language is not English, so by the time she had finished reading the terms and conditions, I was so lost that I just went ahead and said "Yes, I agree".</p>

<p>So, the damage is done. How do you undo it?</p>

<p>You can call CreditInform, which is what they tell you to do on their website. However, most people get the run-around and sometimes they'll just flat out hang up on you. If you do manage to get a real person, they'll ask you for a ton of information (like your SSN) that they don't actually need. I didn't feel like dealing with this, so I sent them a letter instead. The only information you need to provide is your name, address, member number, and PIN. The last two can be found in your "welcome package" (which you hopefully saved). Here's a template that worked for me:</p>

<blockquote>[Your name]<br />
[Your address]<br />
[Date]<br /><br />

Dear Sir or Madam:<br /><br />

Please let this letter serve as notice that I am terminating my CreditInform account effective immediately. My account information is:<br /><br />

Member Number: [Member #]<br />
PIN: [PIN]<br /><br />

Please send me written confirmation that my account has been closed.<br /><br />

Sincerely,<br /><br /><br />


[Your name]</blockquote>

<p>Fire up your favorite word processor, paste that in, and fill in the fields. When you're done, print it out and send it (preferably via Certified Mail) to:</p>

<p><strong>CreditInform Customer Service<br />
PO Box 222455<br />
Chantilly, VA 20153-2455</strong></p>

<p>After a couple of weeks, you should receive a rather lengthy letter confirming that your account has been cancelled. They'll also beg you to come back and throw some "facts" about identity theft in there to try to scare you.</p>

<p>Now, enjoy your freedom!</p>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2010/1/24/enable-visual-studio-intellisense-for-docbook.html"><rss:title>Enable Visual Studio Intellisense for DocBook</rss:title><rss:link>http://implicitoperator.com/blog/2010/1/24/enable-visual-studio-intellisense-for-docbook.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2010-01-24T17:36:51Z</dc:date><dc:subject>docbook visual studio xml</dc:subject><content:encoded><![CDATA[<p>
You can easily plug in XML Schemas to enable Intellisense for certain XML namespaces and file extensions. DocBook includes all of the necessary schemas, so all that's required is a schema catalog.
</p>
<p>
To make it a little easier, I put together a ZIP file that contains everything you need.
</p>
<ul>
<li><a href="http://implicitoperator.com/storage/projects/docbookvs/docbookvs4.5.zip">Docbook 4.5 Catalog and Schemas</a></li>
<li><a href="http://implicitoperator.com/storage/projects/docbookvs/docbookvs5.zip">Docbook 5.0 Catalog and Schemas</a></li>
</ul>
<p>
Just unzip it to one of the following locations, depending on your version of Visual Studio:
</p>
<ul>
<li><strong>Visual Studio 2005</strong><br />C:\Program Files\Visual Studio 8\Xml\Schemas</li>
<li><strong>Visual Studio 2008</strong><br />C:\Program Files\Visual Studio 9.0\Xml\Schemas</li>
<li><strong>Visual Studio 2010</strong><br />C:\Program Files\Visual Studio 10.0\Xml\Schemas</li>
</ul>
<p>
DocBook Intellisense will be enabled for files with the <strong>docbook</strong> extension. If your solution contains DocBook files, you can simply right-click and choose “Open With…” then select “XML Editor”.
</p>
<p>
Enjoy!
</p>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2009/12/27/valve-map-format-utility-library-v10-released.html"><rss:title>Valve Map Format Utility Library v1.0 Released</rss:title><rss:link>http://implicitoperator.com/blog/2009/12/27/valve-map-format-utility-library-v10-released.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2009-12-27T20:13:31Z</dc:date><dc:subject>.net c# source engine valve vmf</dc:subject><content:encoded><![CDATA[<p>
Valve Software's <a href="http://source.valvesoftware.com/" target="_blank">Source Engine</a> uses a level editor called Hammer. The files produced by Hammer are in the Valve Map Format (VMF), which are simply text files that define the structure of a map. This file gets passed to a BSP (Binary Space Partitioning) compiler that builds the final product.
</p>
<p>
A little side project of mine called for a library that could parse VMF files and read the interactive parts of a Source Engine map. So, I built one. The result is the VMF Utility Library. It includes a complete parser, writer, object graph, and special classes for common VMF data types (such as color and vertex). The library is open source and includes documentation, along with a Getting Started tutorial.
</p>
<p>
I haven't put this one up on CodePlex yet, but you can <a href="http://implicitoperator.com/storage/projects/vmfutil/VmfUtil_1.0.zip">download it directly</a> (ZIP, 200kb).
</p>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2009/12/24/rendering-an-in-memory-graphviz-image-with-c.html"><rss:title>Rendering an in-memory Graphviz image with C#</rss:title><rss:link>http://implicitoperator.com/blog/2009/12/24/rendering-an-in-memory-graphviz-image-with-c.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2009-12-24T13:47:40Z</dc:date><dc:subject>.net c# graphviz</dc:subject><content:encoded><![CDATA[<p>
I've been working on a little side-project that involves a lot of graphing. Graphviz has been the most complete solution, but existing options for using it with .NET were rather scarce. <a href="http://wingraphviz.sourceforge.net/wingraphviz/" target="_blank">WinGraphviz</a> is based on an older version of Graphviz and hasn't been improved since 2004. Plus, it's a COM component, which is yet another thing you have to install on the end-user's machine.
</p>
<p>
It turns out, however, that the Graphviz library is fairly simple to understand. Once I got the correct DLL configuration copied to my application's directory, the rest of the P/Invoke stuff was easy. On top of it all, Graphviz includes the ability to render an image in-memory, so there's no need to write to the disk and read the result back again. Writing to the disk was the biggest performance bottleneck for my application, so the in-memory rendering feature was a huge relief.
</p>
<p>
To get started, we need a class to hold our P/Invoke methods and a few helper constants.
</p>
<pre><code class="csharp">public class Graphviz {
    public const string LIB_GVC = "gvc.dll";
    public const string LIB_GRAPH = "graph.dll";
    public const int SUCCESS = 0;
}</code></pre>
<p>
To use Graphviz as a library, we first have to create a Graphviz context, which the other methods will use. Add these to our <code>Graphviz</code> class.
</p>
<pre><code class="csharp">/// &lt;summary>
/// Creates a new Graphviz context.
/// &lt;/summary>
[DllImport(LIB_GVC)]
public static extern IntPtr gvContext();

/// &lt;summary>
/// Releases a context's resources.
/// &lt;/summary>
[DllImport(LIB_GVC)]
public static extern int gvFreeContext(IntPtr gvc);</code></pre>
<p>
Now we need some methods to load and close a graph. These are found in <code>graph.dll</code>.
</p>
<pre><code class="csharp">/// &lt;summary>
/// Reads a graph from a string.
/// &lt;/summary>
[DllImport(LIB_GRAPH)]
public static extern IntPtr agmemread(string data);

/// &lt;summary>
/// Releases the resources used by a graph.
/// &lt;/summary>
[DllImport(LIB_GRAPH)]
public static extern void agclose(IntPtr g);</code></pre>
<p>
Once we have our graph loaded, we need to apply a layout.
</p>
<pre><code class="csharp">/// &lt;summary>
/// Applies a layout to a graph using the given engine.
/// &lt;/summary>
[DllImport(LIB_GVC)]
public static extern int gvLayout(IntPtr gvc, IntPtr g, string engine);

/// &lt;summary>
/// Releases the resources used by a layout.
/// &lt;/summary>
[DllImport(LIB_GVC)]
public static extern int gvFreeLayout(IntPtr gvc, IntPtr g);</code></pre>
<p>
Once the graph has a layout, we can render it.
</p>
<pre><code class="csharp">/// &lt;summary>
/// Renders a graph to a file.
/// &lt;/summary>
[DllImport(LIB_GVC)]
public static extern int gvRenderFilename(IntPtr gvc, IntPtr g,
    string format, string fileName);

/// &lt;summary>
/// Renders a graph in memory.
/// &lt;/summary>
[DllImport(LIB_GVC)]
public static extern int gvRenderData(IntPtr gvc, IntPtr g,
    string format, out IntPtr result, out int length);</code></pre>
<p>
Now, you may be thinking that you can just copy <code>gvc.dll</code> and <code>graph.dll</code> over and all will be well. But, sadly, that's not the case. Those DLLs have a few dependencies. You'll need all of the following from your Graphviz installation's /bin directory:
</p>
<span class="full-image-block ssNonEditable"><span><img src="http://implicitoperator.com/storage/post-images/graphviz-csharp/graphvizdlls.jpg?__SQUARESPACE_CACHEVERSION=1261664686654" alt=""/></span></span>
<p>
Graphviz loads layout and rendering plugins dynamically using a configuration file, which must also be included alongside your application. If you installed Graphviz using the MSI, there should already be a configuration file in the /bin directory. Mine was called <code>config6</code>, but I'm not sure if the name varies. If you don't have a configuration file, you can generate one with <code>dot -c</code>.
</p>
<p>
Now that we have the necessary DLLs, we can actually do some rendering!
</p>
<pre><code class="csharp">/// &lt;summary>
/// Renders a DOT string to the specified image format.
/// &lt/summary>
public static byte[] RenderDot(string dot, string format) {
    // Create a Graphviz context
    IntPtr gvc = gvContext();

    // Load the DOT data into a graph
    IntPtr g = agmemread(dot);

    // Apply a layout
    gvLayout(gvc, g, "dot");

    IntPtr result;
    int length;

    // Render the graph
    gvRender(gvc, g, format, out result, out length);

    // Create an array to hold the image
    byte[] image = new byte[length];

    // Copy the image from the IntPtr
    Marshal.Copy(result, image, 0, length);

    // Free up the resources
    gvFreeLayout(gvc, g);
    agclose(g);
    gvFreeContext(gvc);

    return image;
}</code></pre>
<p>
Here's the code in action, rendering a graph of the Graphviz DLL dependencies:
</p>
<pre><code class="csharp">string dot = @"digraph Graphviz {
    cdt -> msvcr80, cdt -> kernel32,
    graph -> cdt, graph -> msvcr80, graph -> kernel32,
    gvc -> libexpat, gvc -> ltdl, gvc -> zlib1, gvc -> cdt,
    gvc -> pathplan, gvc -> graph, gvc -> msvcr80, gvc -> kernel32,
    ltdl -> msvcrt, ltdl -> kernel32,
    pathplan -> msvcr80, pathplan -> kernel32,
    zlib1 -> msvcrt, zlib1 -> kernel32,
    libexpat -> kernel32
}";

byte[] image = Graphviz.RenderDot(dot, "png");</code></pre>
<p>
And the result:
</p>
<span class="full-image-block ssNonEditable"><span><img src="http://implicitoperator.com/storage/post-images/graphviz-csharp/graphvizdeps.jpg?__SQUARESPACE_CACHEVERSION=1261666723609" alt=""/></span></span>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2009/12/16/managed-novacore-sdk-is-up-on-codeplex.html"><rss:title>Managed NovaCore SDK is up on CodePlex!</rss:title><rss:link>http://implicitoperator.com/blog/2009/12/16/managed-novacore-sdk-is-up-on-codeplex.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2009-12-16T20:10:51Z</dc:date><dc:subject>.net c# novacore</dc:subject><content:encoded><![CDATA[<span class="full-image-block ssNonEditable"><span><img src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=novacore&DownloadId=96486&Build=15987&__SQUARESPACE_CACHEVERSION=1260994662056" alt=""/></span></span>
<p>
There seems to be a lot of interest in a managed version of <a href="http://www.novatelwireless.com/index.php?option=com_content&view=article&id=219&Itemid=545" target="_blank">Novatel Wireless' NovaCore SDK</a> (on the Developer Forums, at least). I've been working on one off and on for a couple of weeks and decided to upload <a href="http://novacore.codeplex.com" target="_blank">what I have so far</a> to CodePlex.
</p>
<p>
It's not much, really. So far, the Core module is the most complete of the six and even it is far from done. Everything is basically a 1-to-1 port, so you should just be able to follow along in the NovaCore SDK documentation. The only major change is session management. Instead of releasing sessions manually with a module's ReleaseSession function, the library uses SafeHandles that automatically handle session cleanup during garbage collection. There's also a helper class (NovaCoreSdk) that makes error handling easier.
</p>
<p>
As the project page says, I'm looking for contributors. To be honest, P/Invoke is definitely not my strong point. The library wouldn't even exist without the good folks over at <a href="http://stackoverflow.com" target="_blank">StackOverflow</a> (especially the P/Invoke master, <a href="http://blogs.msdn.com/jaredpar/" target="_blank">Jared Par</a>). Preferably, contributors should own a Novatel Wireless device for testing. I have an EVDO device, so it would be great if someone with a HSPA device would come on board to test the HSPA-only features of the SDK.
</p>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2009/12/7/retrieving-modem-information-from-the-mifi-with-c.html"><rss:title>Retrieving modem information from the MiFi with C#</rss:title><rss:link>http://implicitoperator.com/blog/2009/12/7/retrieving-modem-information-from-the-mifi-with-c.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2009-12-07T22:31:01Z</dc:date><dc:subject>.net c# mifi.net</dc:subject><content:encoded><![CDATA[<p>
The Novatel Wireless MiFi Mobile Hotspot offers up a surprising amount of diagnostic and status information. My own <a href="http://mifi.codeplex.com/" target="_blank">MiFi.NET</a> library can retrieve most of this information with the MiFi's API. One thing it doesn't offer through the API is the modem's RSSI value, or Received Signal Strength Indication. This value is a negative number expressed in dBm (or decibels per milliwatt) and represents the amount of power in the radio signal. A low RSSI value represents a strong signal (-100 dBm is stronger than -20 dBm, for example).
</p>
<p>
The API offers signal strength as a value between 1 and 5. If you're looking for the optimal position for your MiFi, however, this just isn't accurate enough. Verizon users can see this value in their web admin portal, but Sprint users don't have this functionality. Fortunately, the page that actually serves up this data is still accessible with a direct URL.
</p>
<p>
I'm going to show you a simple class that retrieves and parses this information for use in your own applications. Along the way, I'll also explain the different values and what they mean. Note that I will not be including this functionality in MiFi.NET, because it is not part of the official API specification.
</p>
<p>
To get started, we need a model to represent the modem status information.
<p>
<pre><code class="csharp">public class MiFiModemStatus {
	public string Mdn { get; set; }
	public string Esn { get; set; }
	public string EsnHex { get; set; }
	public int Channel { get; set; }
	public int PRev { get; set; }
	public int PrlId { get; set; }
	public int BandClass { get; set; }
	public int EriVersion { get; set; }
	public bool Dormant { get; set; }
	public int SignalEvdo { get; set; }
	public int Signal1X { get; set; }
	public int BatteryLevel { get; set; }
	public bool BatteryCharging { get; set; }
}</code></pre>
<p>
But what do these values mean?
</p>
<ul>
<li><strong>MDN</strong> - Mobile Directory Number. This is the phone number assigned to your MiFi device.</li>
<li><strong>ESN</strong> - Electronic Serial Number. This is the unique identifier for your device. All wireless phones are assigned an ESN by the FCC. The MiFi offers this value as both a decimal and in hex format.</li>
<li><strong>Channel</strong> - The frequency on which the device is operating. Note that this is different from the WiFi channel that you can change in the web admin.</li>
<li><strong>P_REV</strong> - Interim Standard 95 (also known as IS-95, cmdaOne, or TIA-EIA-95) protocol revision. P_REV 6 is part of the CDMA2000 (3G) standard.</li>
<li><strong>PRL ID</strong> - Preferred roaming list version. The MiFi maintains an internal list of frequency bands on which it can operate, called the PRL. This number represents the current version of that list.</li>
<li><strong>Band Class</strong> - The frequency band that the device is operating in.</li>
<li><strong>ERI Version</strong> - Enhanced roaming indicator version. This value varies between companies, so I can't really tell you exactly what it means.</li>
<li><strong>Dormant</strong> - If no data is being transferred, the modem will go into a dormant state to save power and this value will be true.</li>
<li><strong>EVDO Signal</strong> - The current EVDO RSSI value.</li>
<li><strong>1X Signal</strong> - The current 1xRTT RSSI value.</li>
<li><strong>Battery Level</strong> - The battery's current charge level. This value is also available with the API.</li>
<li><strong>Battery Charging</strong> - True if the battery is currently charging. This value is also available with the API.</li>
</ul>
<p>
To get this information, we need to download and parse the <strong>modemstatus.html</strong> page. Before doing that, let's write a method to grab the value of each of those fields.
</p>
<pre><code class="csharp">private static string ParseValue(string s, string field) {
	Regex regex = new Regex(string.Format(
		@"&lt;td nowrap>{0}:&lt;/td> &lt;td nowrap>(-?\w+)(?: dBm)?&lt;/td>", field));
	Match match = regex.Match(s);
	return match.Success ? match.Groups[1].Value : string.Empty;
}</code></pre>
<p>
Here, we're using a regular expression to search for the field. We capture the value and also handle the special case for RSSI values (<strong>-?</strong> allows the negative number to be properly captured, and <strong>(?: dBm)?</strong> allows for the dBm suffix).
</p>
<p>
Now we need a method to parse the page as a whole and return a populated model.
</p>
<pre><code class="csharp">private static MiFiModemStatus Parse(string s) {
	return new MiFiModemStatus {
		Mdn = ParseValue(s, "MDN"),
		Esn = ParseValue(s, @"ESN \(decimal\)"),
		EsnHex = ParseValue(s, @"ESN \(hex\)"),
		Channel = int.Parse(ParseValue(s, "Channel")),
		PRev = int.Parse(ParseValue(s, "P_REV Indicator")),
		PrlId = int.Parse(ParseValue(s, "PRL ID")),
		BandClass = int.Parse(ParseValue(s, "Band Class Type")),
		EriVersion = int.Parse(ParseValue(s, "ERI Version")),
		Dormant = ParseValue(s, "Dormancy") == "TRUE",
		SignalEvdo = int.Parse(ParseValue(s, "Signal - EVDO")),
		Signal1X = int.Parse(ParseValue(s, "Signal - 1X")),
		BatteryLevel = int.Parse(ParseValue(s, "Battery Level")),
		BatteryCharging = ParseValue(s, "Battery Charging") == "1"
	};
}</code></pre>
<p>
With this method, we simply use the method we wrote earlier to grab each value. Note that we had to escape the parentheses because the field name gets inserted into the regular expression. Without escaping them, <strong>(decimal)</strong> and <strong>(hex)</strong> would be read as capture groups.
</p>
<p>
Finally, we have to actually download the page itself. We'll do this with a static Read method.
</p>
<pre><code class="csharp">public static MiFiModemStatus Read(IPAddress ipAddress) {
	string uri = string.Format("http://{0}/modemstatus.html", ipAddress);
	string text;

	HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
	HttpWebResponse response = (HttpWebResponse)request.GetResponse();
	using (StreamReader reader = new StreamReader(response.GetResponseStream())) {
		text = reader.ReadToEnd();
	}

	return Parse(text);
}</code></pre>
<p>
If you're ever done any work with HTTP requests, then this will be familiar. The method just builds a URL from the given IP address and downloads the modem status information. Then, it calls out to our Parse method and returns the populated MiFiModemStatus class.
</p>
<img src="http://implicitoperator.com/storage/post-images/MiFiModemStatus.jpg" />
<p>
Easy, huh? Hopefully this will be useful to you, especially in conjunction with <a href="http://mifi.codeplex.com/" target="_blank">MiFi.NET</a>!
</p>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2009/11/24/opf3-tutorials-on-codeplex.html"><rss:title>Opf3 Tutorials on CodePlex</rss:title><rss:link>http://implicitoperator.com/blog/2009/11/24/opf3-tutorials-on-codeplex.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2009-11-24T18:30:34Z</dc:date><dc:subject>.net c# opf3</dc:subject><content:encoded><![CDATA[<span class="full-image-float-right ssNonEditable"><span><img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=opf3&DownloadId=94225&__SQUARESPACE_CACHEVERSION=1259087625441" alt=""/></span></span>
<p>I've moved the Object Persistence Framework 3 documentation from the old website to the <a href="http://opf3.codeplex.com/documentation" target="_blank">CodePlex documentation wiki</a>. Hopefully this will make it easier to find examples all in one place.</p>
<p>Please <a href="http://opf3.codeplex.com/Thread/List.aspx" target="_blank">let us know</a> if you find any problems with the materials!</p>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2009/11/15/mifinet-release-v100-beta.html"><rss:title>MiFi.NET Release: v1.0.0 Beta</rss:title><rss:link>http://implicitoperator.com/blog/2009/11/15/mifinet-release-v100-beta.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2009-11-16T04:49:22Z</dc:date><dc:subject>.net c# mifi.net</dc:subject><content:encoded><![CDATA[<p>
I've released <a href="http://mifi.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35878" target="_blank">MiFi.NET v1.0.0 Beta on CodePlex</a>. It comes as either a binary archive or a source archive. Please report any bugs you happen to find. It works on my local system with a Sprint MiFi 2200, but I haven't been able to test it on the Verizon or HSPA models (as I don't own any).
</p>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2009/10/27/mifinet-for-the-novatel-mifi-mobile-broadband-router.html"><rss:title>MiFi.NET for the Novatel MiFi Mobile Broadband router</rss:title><rss:link>http://implicitoperator.com/blog/2009/10/27/mifinet-for-the-novatel-mifi-mobile-broadband-router.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2009-10-27T19:03:34Z</dc:date><dc:subject>.net c# mifi.net</dc:subject><content:encoded><![CDATA[<p>
I just made my little side project public at <a href="http://mifi.codeplex.com/" target="_blank">CodePlex.com</a>. It's called <strong>MiFi.NET</strong> and provides a simple yet complete interface to the webservices exposed by the <a href="http://www.novatelwireless.com/" target="_blank">Novatel MiFi Mobile Broadband router</a>.
</p>
<p>
It's based on the latest specification available from the Novatel Wireless Developer Lounge and I intend to add new features as Novatel makes them available.
</p>
<p>
Here's a quick shot of the included sample application to give you an idea of the kind of data you can retrieve using MiFi.NET. (Note that the GPS data is missing in this shot because I didn't have it enabled on my device at the time.)
</p>
<img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=mifi&DownloadId=89523" width="580"/>
<p>
Here's an example showing how to get the current signal strength:
</p>
<pre><code class="csharp">MiFiDevice device = new MiFiDevice(IPAddress.Parse("192.168.1.1"));
MiFiStatus status = device.GetStatus();
Console.WriteLine("Signal Strength: " + status.SignalStrength);</code></pre>]]></content:encoded></rss:item><rss:item rdf:about="http://implicitoperator.com/blog/2009/10/12/pervasive-sql-and-net-part-3-opf3-orm-framework.html"><rss:title>Pervasive SQL and .NET Part 3: OPF3 ORM Framework</rss:title><rss:link>http://implicitoperator.com/blog/2009/10/12/pervasive-sql-and-net-part-3-opf3-orm-framework.html</rss:link><dc:creator>David Brown</dc:creator><dc:date>2009-10-12T15:12:05Z</dc:date><dc:subject>.net c# pervasive sql</dc:subject><content:encoded><![CDATA[<p>
At my previous job, I did a lot of Pervasive SQL and .NET integration work. Before that, I had been using ORM frameworks like NHibernate to interact with MSSQL and SQLite, so I naturally wanted to find an ORM framework that worked with Pervasive SQL. NHibernate didn't have PSQL support, so I tried adding it, but that turned out to be a major headache. Instead, I found the <a href="http://opf3.codeplex.com" target="_blank">Object Persistence Framework</a> which included PSQL support out of the box.
</p>
<h3>OPF3 ORM Framework</h3>
<p>
OPF3 uses the Pervasive ADO.NET Provider, so you'll need to follow the installation instructions in <a href="http://implicitoperator.com/blog/2009/10/11/pervasive-sql-and-net-part-2-psql-adonet-provider.html" target="_blank">Part 2</a> before proceeding. Once you have the ADO.NET Provider, you need to download <a href="http://opf3.codeplex.com" target="_blank">OPF3 from CodePlex</a>. I recommend downloading the latest revision from source control, although the release package contains the source code, as well.
</p>
<p>
In the release package, only the core OPF3 library and the LINQ to OPF3 library are included as binaries. This means you will need to compile the Pervasive SQL Storage library.
</p>
<p>
Navigate to the OPF3 source directory and open the <em>Chili.Opf3</em> solution. Visual Studio may prompt you to convert it to a newer format. Find the <em>Chili.Opf3.Storages.PervasiveSql</em> project and expand its references. You'll notice that the <em>Pervasive.Data.SqlClient</em> reference is missing. You will need to re-add it from the PSQL SDK. Now, right-click on the PSQL Storage project and click <em>Build</em>.
</p>
<p>
To use the storage provider in your poject, add a reference to <em>Chili.Opf3</em>, <em>Chili.Opf3.Storages.PervasiveSql</em>, and <em>Pervasive.Data.SqlClient</em>. Now, it's time to set up a persistent object. For this example, I will be using the Person table in the DEMODATA database.
</p>
<pre><code class="csharp">[Persistent]
public class Person {
    [Field(Identifier = true, AutoNumber = true)] public int ID { get; set; }
    [Field("First_Name")] public string FirstName { get; set; }
    [Field("Last_Name")] public string LastName { get; set; }
    [Field("Date_Of_Birth")] public DateTime DateOfBirth { get; set; }
}</code></pre>
<p>
OPF3 uses attributes to map persistent objects, rather than XML configuration files. First, we mark the class as <code>Persistent</code>. In this example, the table name matches the class name, so no further parameters are required. If your table name were different, you would need to supply it to the first argument of the <code>PersistentAttribute</code>. The columns (fields) in the table are mapped to properties of the object. They are marked with the <code>FieldAttribute</code>. The ID column is an identifier and will auto-increment, so we have to let OPF3 know this. Since the name of the property matches the name of the field, no further configuration is needed. The names of the remaining properties differ, however, so we have to supply the actual field name to the <code>FieldAttribute</code>.
</p>
<p>
Next up is the actual connection.
</p>
<pre><code class="csharp">string connString = "ServerDSN=DEMODATA";
PervasiveSqlStorage storage = new PervasiveSqlStorage(connString);
using (ObjectContext context = new ObjectContext(storage)) {
    // query code goes here
}</code></pre>
<p>
The connection string is identical to the string in the previous part. Anything that works for the ADO.NET Provider will work for the OPF3 Storage Provider. We have to create a Pervasive-specific storage object that gets supplied to the <code>ObjectContext</code> so it knows how to interact with the database. Note that the connection string is supplied to the storage provider and not the object context.
</p>
<p>
Retrieving <code>Person</code> objects is simple:
</p>
<pre><code class="csharp">var people = context.GetObjectSet&lt;Person&gt;();
foreach (Person person in people) {
    Console.WriteLine(string.Format(
        "ID: {0}, FirstName: {1}, LastName: {2}, DOB: {3}",
        person.ID, person.FirstName, person.LastName, person.DateOfBirth));
}</code></pre>
<p>
When run, the program should print every row in the Person table using the format above. That's all there is to it!
</p>]]></content:encoded></rss:item></rdf:RDF>