<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.pluralsight.com/community/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jon Flanders' </title><link>http://www.pluralsight.com/community/blogs/jfland/default.aspx</link><description>Jon&amp;#39;s PS technical blog</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>If you are in LA for TechEd - also a Star Trek movie review</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/05/11/if-you-are-in-la-for-teched-also-a-star-trek-movie-review.aspx</link><pubDate>Mon, 11 May 2009 17:49:50 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:62364</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=62364</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/05/11/if-you-are-in-la-for-teched-also-a-star-trek-movie-review.aspx#comments</comments><description>&lt;p&gt;Movie was just awesome.&amp;nbsp; Maybe one of the best movies of all time.&amp;nbsp; Really ever.&lt;/p&gt; &lt;p&gt;If you are in LA for TechEd you have a moral obligation to go see Star Trek - at the Arclight Cinerama Dome Hollywood -&lt;a href="http://tinyurl.com/ca3b3o"&gt;http://tinyurl.com/ca3b3o&lt;/a&gt;.&amp;nbsp; The Arclight is really the best theater I&amp;#39;ve ever been too.&amp;nbsp; Leather *assigned* seats, no talkers (well almost never any talkers)&amp;nbsp; great projection and sound in every theater.&amp;nbsp; &lt;/p&gt; &lt;p&gt;If you are into music - go next door to Ameoba - its an old school record store (and there aren&amp;#39;t many of those left).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=62364" width="1" height="1"&gt;</description></item><item><title>VSLive - Las Vegas!</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/04/08/vslive-las-vegas.aspx</link><pubDate>Wed, 08 Apr 2009 22:43:45 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:59629</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=59629</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/04/08/vslive-las-vegas.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;m super excited to be doing two talks at &lt;a href="http://vslive.com/2009/lasvegas/" target="_blank"&gt;VSLive Vegas&lt;/a&gt; on Oslo.&amp;nbsp; If you register with code&amp;nbsp; S9V10&amp;nbsp; you can get and all-access &lt;b&gt;Passport Package for just $1,295&lt;/b&gt;, a savings of $400.00 off the standard price of $1,695.&lt;/p&gt; &lt;p&gt;Register now and I&amp;#39;ll see you in Vegas!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=59629" width="1" height="1"&gt;</description><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/Oslo/default.aspx">Oslo</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/M/default.aspx">M</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/MGrammar/default.aspx">MGrammar</category></item><item><title>WCF "Champ"</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/04/02/wcf-quot-champ-quot.aspx</link><pubDate>Thu, 02 Apr 2009 22:23:16 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:59266</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=59266</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/04/02/wcf-quot-champ-quot.aspx#comments</comments><description>&lt;p&gt;Funny video - &lt;a title="http://www.microsoft.com/net/wcf/champ" href="http://www.microsoft.com/net/wcf/champ"&gt;http://www.microsoft.com/net/wcf/champ&lt;/a&gt;.&amp;nbsp; I wonder if they will have a WCF REST vs SOAP version (you know who I&amp;#39;d be betting on :))&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=59266" width="1" height="1"&gt;</description></item><item><title>Got a very nice book review</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/04/02/got-a-very-nice-book-review.aspx</link><pubDate>Thu, 02 Apr 2009 22:19:25 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:59265</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=59265</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/04/02/got-a-very-nice-book-review.aspx#comments</comments><description>&lt;p&gt;Thanks Nick - &lt;a href="http://techfortesco.blogspot.com/2009/04/tescocom-api-to-become-more-restful.html"&gt;http://techfortesco.blogspot.com/2009/04/tescocom-api-to-become-more-restful.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=59265" width="1" height="1"&gt;</description><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/WCF/default.aspx">WCF</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/REST/default.aspx">REST</category></item><item><title>MUrl – a DSL and runtime for exercising HTTP</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/20/murl-a-dsl-and-runtime-for-exercising-http.aspx</link><pubDate>Fri, 20 Mar 2009 17:39:25 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:57871</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=57871</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/20/murl-a-dsl-and-runtime-for-exercising-http.aspx#comments</comments><description>&lt;p&gt;Get it at the Oslo Dev center &lt;a href="http://msdn.microsoft.com/en-us/oslo/default.aspx"&gt;http://msdn.microsoft.com/en-us/oslo/default.aspx&lt;/a&gt;&amp;#160; (link in the middle box).&amp;#160; I just saw &lt;a href="http://www.sellsbrothers.com" target="_blank"&gt;Chris&lt;/a&gt; and &lt;a href="http://www.douglasp.com/" target="_blank"&gt;Doug&lt;/a&gt; do a talk using this at Mix09.&amp;#160; I think its a very interesting example of how using a DSL can simplify developer tasks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=57871" width="1" height="1"&gt;</description><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/Oslo/default.aspx">Oslo</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/M/default.aspx">M</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/REST/default.aspx">REST</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/MGrammar/default.aspx">MGrammar</category></item><item><title>Problem with the ETag code in my book</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/18/problem-with-the-etag-code-in-my-book.aspx</link><pubDate>Wed, 18 Mar 2009 15:54:09 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:57812</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=57812</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/18/problem-with-the-etag-code-in-my-book.aspx#comments</comments><description>&lt;p&gt;I just discovered that in Chapter 11 - my code for generating ETags has a bug.&amp;nbsp; The code needs to wrap the ETag in a set of quotes:&lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; GenerateETag(User u)
{
    &lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;[] bytes = Encoding.UTF8.GetBytes(u.UserId + u.LastModified.ToString());
    &lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;[] hash = MD5.Create().ComputeHash(bytes);
    &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; etag = Convert.ToBase64String(hash);
    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#006080;"&gt;&amp;quot;\&amp;quot;{0}\&amp;quot;&amp;quot;&lt;/span&gt;, etag);
}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;Sorry - as I always say &amp;quot;Hi - I&amp;#39;m Jon, I&amp;#39;m a developer, and I write code with bugs&amp;quot; ;)&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=57812" width="1" height="1"&gt;</description></item><item><title>New version of the REST starter kit</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/13/new-version-of-the-rest-starter-kit.aspx</link><pubDate>Fri, 13 Mar 2009 14:17:57 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:57660</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=57660</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/13/new-version-of-the-rest-starter-kit.aspx#comments</comments><description>&lt;p&gt;Its available now on &lt;a href="http://www.codeplex.com/aspnet/Wiki/View.aspx?title=WCF%20REST&amp;amp;referringTitle=Home" target="_blank"&gt;Code&lt;/a&gt;plex&amp;nbsp; - I showed off both the client and server pieces of the starter kit at my full-day REST seminar at SDWest this week.&amp;nbsp;&amp;nbsp; There are some very useful features in the kit like:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;WebProtocolException and an IErrorHandler implementation that returns correct error codes &lt;/li&gt; &lt;li&gt;The HttpClient class and the &amp;quot;Paste as Xml Serializable&amp;quot; feature to help minimize the work necessary when building RESTful clients&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Those are just two of my favorites but there are a lot more.&amp;nbsp; I&amp;#39;ll be using the HttpClient to help do Conditional GET when I do my Caching in REST talk next Friday at &lt;a href="https://content.visitmix.com/2009/Sessions/" target="_blank"&gt;Mix&lt;/a&gt;!&amp;nbsp; If you are going to be in Vegas - some by and say hello.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=57660" width="1" height="1"&gt;</description></item><item><title>Programming against M</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/07/programming-against-m.aspx</link><pubDate>Sun, 08 Mar 2009 01:23:42 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:57347</guid><dc:creator>jon-flanders</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=57347</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/07/programming-against-m.aspx#comments</comments><description>&lt;p&gt;Over on the Oslo forums there have been a few questions about how to interact with M (specifically MSchema) programmatically.&amp;nbsp; I&amp;#39;ve been doing this quite a bit creating &lt;a href="http://www.pluralsight.com/main/ilt/Course.aspx?id=AP31" target="_blank"&gt;PluralSight&amp;#39;s Oslo course&lt;/a&gt;, as well as working on various samples.&lt;/p&gt; &lt;p&gt;What I&amp;#39;m going to do is create an in-memory representation of one or more M files by using the M Compiler - which is clearly named as Compiler (it in the Microsoft.M namespace). I need to reference three assemblies to get this to work:&amp;nbsp; System.Xaml.dll, System.DataFlow.dll, and Microsoft.M.Framework.dll.&amp;nbsp; Compiler has a couple of methods, one is aptly named Compile, which I&amp;#39;m not going to use in this sample.&amp;nbsp; Compile creates a&amp;nbsp; CompilationResults object that not only has the in-memory parsed representation of the MSchema, it also has the in-memory representation of the Database that would be created if you used mx.exe to deploy the M to the database.&lt;/p&gt; &lt;p&gt;Instead I&amp;#39;m going to use Compiler.Parse, because I&amp;#39;m only interested in the M in-memory representations at the moment (not the database objects).&amp;nbsp; To get Compiler to be happy, I have to pass it a CompilerOptions object which is essentially the arguments to the compiler.&amp;nbsp;&amp;nbsp; I&amp;#39;m going to actually parse the provided M sources in the SDK for the Repository itself (found in the OSLOInstallDir\Models directory as raw M files with a M project thrown in as well).&amp;nbsp; &lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; dir = &lt;span style="color:#006080;"&gt;@&amp;quot;C:\Program Files (x86)\Microsoft Oslo SDK 1.0\Models&amp;quot;&lt;/span&gt;;
CompilerOptions cops = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; CompilerOptions();
cops.IncludeStandardLibrary = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;
&lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; file &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; Directory.GetFiles(dir, &lt;span style="color:#006080;"&gt;&amp;quot;*.m&amp;quot;&lt;/span&gt;, SearchOption.AllDirectories))
{
    CompilerInput cinput = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; CompilerInput();
    cinput.Name = Path.GetFileNameWithoutExtension(file);
    cinput.Reader = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; StreamReader(file, Encoding.UTF8, &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;);
    cops.Sources.Add(cinput);
}

CompilationResults cresults = Compiler.Parse(cops);&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After I get the CompilationResults back, I can loop and party on the CompilationResults.ParsedSources.Modules collection.&amp;nbsp; This will be the collection of MSchema modules found in the source directory.&lt;/p&gt;
&lt;p&gt;To get at the actual M artifacts,&amp;nbsp; for each Module I need to loop its Members property.&amp;nbsp; Members is of type ICollection&amp;lt;IDeclaration&amp;gt;.&amp;nbsp; IDeclaration is the interface that all Module members implement.&amp;nbsp; If I use Reflector (such a handy tool) I can see all the types that implement this interface:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jfland/idecs_5F00_2.png" target="_blank"&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" alt="idecs" src="https://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jfland/idecs_5F00_thumb.png" width="244" height="205" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I put a red arrow next to the two really interesting implementations - ExtentDeclaration and TypeDeclaration.&amp;nbsp;&amp;nbsp; If I had the following M,&amp;nbsp; I&amp;#39;d get one of each object:&lt;/p&gt;
&lt;div&gt;&lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;module MFun
{
   type foo : {
    id : Integer32 = AutoNumber();
    data : Text;
} &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; identity id;

   foos : foo*;
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In this case foo is a TypeDeclaration, and foos is an ExtentDeclaration.&amp;nbsp; This example is pretty easy, but because MSchema is flexible, things can get ugly very quickly. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Where things get ugly is when you want to follow the trail further than just the top level object.&amp;nbsp; What if for example I wanted to find out the definition for each ExtentDeclaration. Let me take another example:&lt;/p&gt;
&lt;div&gt;&lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;module Models1
{
    Model : 
    {
        Id : Integer64 = AutoNumber();
        Name : Text;
    }* &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; identity Id;   
}
module Models2
{
    Model :( 
    {
        Id : Integer64 = AutoNumber();
        Name : Text;
    } &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; identity Id)*; 
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In this sample I&amp;#39;d have two Modules - each with a single ExtentDeclaration.&amp;nbsp; But the first ExtentDeclaration&amp;#39;s Type property is a ParamaterizedExpression.&amp;nbsp; A ParameterizedExpression has an Arguments collection, and that&amp;#39;s where you can get back to the actual definition.&amp;nbsp; In this case its ParameterizedExpression is made up of two arguments: one is a CollectionType that shows me the {Id, Name} structure, and the other is another ParamaterizedExpression that is the definition of the where statement.&amp;nbsp; The second Module (Models2) has a single ExtentDeclaration, but its Type is Collection (because of the parenthesis and the way the MSchema is parsed).&amp;nbsp; At the end of the day these two extents really are the *same* semantically - but because of the slightly different syntax - the object model ends up looking different.&lt;/p&gt;
&lt;p&gt;If I where to parse my &amp;quot;foo&amp;quot; example,&amp;nbsp; I&amp;#39;d end up with one Module with two members, and if I wanted to figure out where the definition of the ExtentDeclaration came from,&amp;nbsp; I&amp;#39;d have to go down the object model until I found the type declaration for the collection type that foos is made up of.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jfland/types_5F00_2.png" target="_blank"&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" alt="types" src="https://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jfland/types_5F00_thumb.png" width="802" height="290" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Here is some code (included in the project you can download at the end) that finds the type name for every ExtentDeclaration in a Module, at least using all the various M sources I have :)&amp;nbsp; (That is - it works on my machine).&lt;/p&gt;
&lt;div&gt;&lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; FindExtentTypeName(ExtentDeclaration extent)
     {
         &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; name = &lt;span style="color:#006080;"&gt;&amp;quot;Not Found&amp;quot;&lt;/span&gt;;
         var et = extent.Type &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; Microsoft.M.CollectionType;
         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (et != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
         {
             &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (et.ElementType &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; ParameterizedExpression)
             {
                 var theExpression = et.ElementType &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; ParameterizedExpression;
                 &lt;span style="color:#008000;"&gt;//check to see if expression refers to a type&lt;/span&gt;
                 var results = (from arg &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; theExpression.Arguments
                                &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; arg.GetType() == &lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(DeclarationReference)
                                select arg);
                 &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (results != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; results.Count() &amp;gt; 0)&lt;span style="color:#008000;"&gt;//we have an extent&lt;/span&gt;
                 {
                     var dr = results.First() &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; DeclarationReference;
                     &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (dr != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
                     {
                         name = dr.Name;

                     }
                 }
                 &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;
                 {

                     name= extent.Name.Value;
                    
                 }
             }&lt;span style="color:#008000;"&gt;//direct extent&lt;/span&gt;
             &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (et.ElementType &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; DeclarationReference)
             {

                 name = ((DeclarationReference)et.ElementType).Name;
                 
             }
         }
         &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;
         {
             var parm = extent.Type &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; ParameterizedExpression;
             &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (parm != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
             {
                 CollectionType collectionType = (from ex &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; parm.Arguments
                                                  &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; ex.GetType() == &lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(CollectionType)
                                                  select ex).First() &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; CollectionType;
                 &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (collectionType.ElementType &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; EntityType)
                 {
                     name = extent.Name.Value;

                 }
                 &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (collectionType.ElementType &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; DeclarationReference)
                 {
                     name = ((DeclarationReference)collectionType.ElementType).Name;

                 }
             }
         }
         &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; name;
     }
  
 }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So the output looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jfland/output_5F00_2.png"&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" alt="output" src="https://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jfland/output_5F00_thumb.png" width="244" height="165" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Happy M parsing.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;a href="http://www.masteringbiztalk.com/blogs/jon/content/binary/ProgrammingM.zip"&gt;ProgrammingM.zip (16.12 KB)&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=57347" width="1" height="1"&gt;</description><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/Oslo/default.aspx">Oslo</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/M/default.aspx">M</category></item><item><title>Google removes SOAP API</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/07/google-removes-soap-api.aspx</link><pubDate>Sun, 08 Mar 2009 01:15:09 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:57346</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=57346</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/03/07/google-removes-soap-api.aspx#comments</comments><description>&lt;p&gt;Google, in an unsurprising move is retiring its &lt;a href="http://blogoscoped.com/archive/2009-03-03-n84.html" target="_blank"&gt;SOAP API&lt;/a&gt;.&amp;nbsp; Just like Microsoft and Azure (although I have to think the people at Google knew this before the people at Microsoft as a general proposition) things are moving the REST way.&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=57346" width="1" height="1"&gt;</description><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/REST/default.aspx">REST</category></item><item><title>Demos from VSLive SF</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/02/25/demos-from-vslive-sf.aspx</link><pubDate>Wed, 25 Feb 2009 21:28:15 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:56985</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=56985</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/02/25/demos-from-vslive-sf.aspx#comments</comments><description>&lt;p&gt;Had two great groups of attendees for my talks on Oslo and REST.&lt;/p&gt;  &lt;p&gt;Thanks a lot&amp;#160; - and please fill out the evals, they do help shape who speaks and on what.&amp;#160; Of course if you didn’t like my session, you can feel free not to fill out the eval ;-)&lt;/p&gt;  &lt;p&gt;Demos for the talks:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.masteringbiztalk.com/blogs/jon/content/binary/Oslo.zip" target="_blank"&gt;Oslo&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.masteringbiztalk.com/blogs/jon/content/binary/RESTDEMO.zip" target="_blank"&gt;REST&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56985" width="1" height="1"&gt;</description><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/Oslo/default.aspx">Oslo</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/M/default.aspx">M</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/WCF/default.aspx">WCF</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/REST/default.aspx">REST</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/MGrammar/default.aspx">MGrammar</category></item><item><title>Geek Speak Web Cast on Oslo</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/02/19/geek-speak-web-cast-on-oslo.aspx</link><pubDate>Fri, 20 Feb 2009 00:35:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:56840</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=56840</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/02/19/geek-speak-web-cast-on-oslo.aspx#comments</comments><description>&lt;p&gt;I did a fun web cast yesterday with &lt;a target="_blank" href="http://blogs.msdn.com/SoCalDevGal/"&gt;Lynn&lt;/a&gt; and &lt;a target="_blank" href="http://blogs.msdn.com/glengordon/"&gt;Glenn&lt;/a&gt;, had a bunch of great questions and did I think a cool demo with a language for ASP.NET MVC routing.&amp;nbsp; Enjoy &lt;a target="_blank" href="https://www106.livemeeting.com/cc/mseventsbmo/view?id=1032402585&amp;amp;role=attend&amp;amp;pw=68A75334"&gt;here&lt;/a&gt;.&amp;nbsp; If you are looking for the code&amp;nbsp; that I&amp;#39;ll post the code after&amp;nbsp; my talk on Oslo/M&amp;nbsp;next week at &lt;a target="_blank" href="http://vslive.com/2009/sf/agenda.aspx"&gt;VSLive&lt;/a&gt;&amp;nbsp;&amp;nbsp;(and probably a little more exposition on the code as well)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56840" width="1" height="1"&gt;</description><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/Oslo/default.aspx">Oslo</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/M/default.aspx">M</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/MGrammar/default.aspx">MGrammar</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/Quadrant/default.aspx">Quadrant</category></item><item><title>My first sighting of my book in the wild for analog purchase</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/02/04/my-first-sighting-of-my-book-in-the-wild-for-analog-purchase.aspx</link><pubDate>Thu, 05 Feb 2009 05:36:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:56601</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=56601</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/02/04/my-first-sighting-of-my-book-in-the-wild-for-analog-purchase.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jfland/IMG_5F00_0001_5F00_24A7B668.jpg"&gt;&lt;img title="IMG_0001" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="244" alt="IMG_0001" src="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jfland/IMG_5F00_0001_5F00_thumb_5F00_2ADE6729.jpg" width="184" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Found at the Barnes and Noble in downtown Seattle.&amp;#160; Although still found for digital based purchase at &lt;a href="http://www.amazon.com/dp/0596519206?tag=flandersoft-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0596519206&amp;amp;adid=1Z8YG40XZN7X7BMWE74S&amp;amp;" target="_blank"&gt;Amazon&lt;/a&gt; ;-)&lt;/p&gt;  &lt;p&gt;If you are interested in learning more – also check out my &lt;a href="http://www.pluralsight.com/main/ilt/course.aspx?id=AP28"&gt;REST course&lt;/a&gt; – May 4th in New York nothing like spring in New York learning cool technology.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56601" width="1" height="1"&gt;</description></item><item><title>New Oslo SDK is live</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/01/30/new-oslo-sdk-is-live.aspx</link><pubDate>Sat, 31 Jan 2009 00:24:03 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:56497</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=56497</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/01/30/new-oslo-sdk-is-live.aspx#comments</comments><description>&lt;p&gt;Get it &lt;a href="http://go.microsoft.com/?linkid=9648444"&gt;here&lt;/a&gt;.&amp;#160; One note of caution – delete your Repository database first.&amp;#160;&amp;#160; I didn’t and had to completely uninstall and re-install again – YMMV but at least you are warned :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56497" width="1" height="1"&gt;</description></item><item><title>Received another nice review of my book on REST...</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/01/26/received-another-nice-review-of-my-book-on-rest.aspx</link><pubDate>Mon, 26 Jan 2009 16:56:30 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:56403</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=56403</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/01/26/received-another-nice-review-of-my-book-on-rest.aspx#comments</comments><description>&lt;p&gt;... at &lt;a href="http://blogcritics.org/archives/2009/01/25/095716.php" target="_blank"&gt;blog critics magazine&lt;/a&gt;; and at &lt;a href="http://www.amazon.com/dp/0596519206?tag=flandersoft-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0596519206&amp;amp;adid=1B7HF01MMHT5MN7GWZ66&amp;amp;" target="_blank"&gt;Amazon&lt;/a&gt; I&amp;#39;m up to 5 reviews (avg 5 stars). Thanks to everyone who has bought the book and special thanks to those that reviewed it! Good reviews at Amazon are as important as getting good evaluation scores at conferences these days - so double thanks to everyone.&amp;nbsp;&amp;nbsp; Nice way to wake up on a Monday morning :)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56403" width="1" height="1"&gt;</description></item><item><title>Speaking part two</title><link>http://www.pluralsight.com/community/blogs/jfland/archive/2009/01/19/speaking-part-two.aspx</link><pubDate>Mon, 19 Jan 2009 20:52:25 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:56286</guid><dc:creator>jon-flanders</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jfland/rsscomments.aspx?PostID=56286</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jfland/archive/2009/01/19/speaking-part-two.aspx#comments</comments><description>&lt;p&gt;Whoops&amp;#160; - I forgot one!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.socalcodecamp.com/"&gt;http://www.socalcodecamp.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’ll be doing a session on Oslo on Sunday (mostly on M), and right after a talk on REST.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56286" width="1" height="1"&gt;</description><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/Oslo/default.aspx">Oslo</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/M/default.aspx">M</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/REST/default.aspx">REST</category><category domain="http://www.pluralsight.com/community/blogs/jfland/archive/tags/MGrammar/default.aspx">MGrammar</category></item></channel></rss>