<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>NetInverse Developers Blog</title>
	<atom:link href="http://netinverse.com/devblogs/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://netinverse.com/devblogs</link>
	<description>All rights reserved.</description>
	<pubDate>Tue, 01 Jun 2010 07:01:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>10 Must-Know Topics For Software Architects In 2009</title>
		<link>http://netinverse.com/devblogs/architecture/10-must-know-topics-for-software-architects-in-2009/891/</link>
		<comments>http://netinverse.com/devblogs/architecture/10-must-know-topics-for-software-architects-in-2009/891/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 07:01:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Architecture]]></category>

		<category><![CDATA[Add new tag]]></category>

		<category><![CDATA[Architect]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=891</guid>
		<description><![CDATA[
Cloud Computing
Non-relational databases
Next-generation distributed computing
Web-Oriented Architecture (WOA)
Mashups
Open Supply Chains via APIs
Dynamic Languages
Social computing
Crowdsourcing and peer production architectures
New Application Models

From http://hinchcliffe.org/archive/2009/03/17/16712.aspx
]]></description>
			<content:encoded><![CDATA[<ol>
<li>Cloud Computing</li>
<li>Non-relational databases</li>
<li>Next-generation distributed computing</li>
<li>Web-Oriented Architecture (WOA)</li>
<li>Mashups</li>
<li>Open Supply Chains via APIs</li>
<li>Dynamic Languages</li>
<li>Social computing</li>
<li>Crowdsourcing and peer production architectures</li>
<li>New Application Models</li>
</ol>
<p>From http://hinchcliffe.org/archive/2009/03/17/16712.aspx</p>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/architecture/10-must-know-topics-for-software-architects-in-2009/891/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Useful Network Tools and Commands</title>
		<link>http://netinverse.com/devblogs/network/useful-network-tools-and-commands/885/</link>
		<comments>http://netinverse.com/devblogs/network/useful-network-tools-and-commands/885/#comments</comments>
		<pubDate>Mon, 31 May 2010 22:18:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Network]]></category>

		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=885</guid>
		<description><![CDATA[superscan - Ping sweep
nslookup
> Server ipaddress
> Set type=any
> Ls –d target.com
sqlping2
net view /domain  - Identify domains on the wire
net view /domain:domain_name - Identify machines in the domain
net use \\10.1.1.20\ipc$ "" /user:"" - Establish null session connection
getmac \\10.1.1.20  - Obtain network transport information
psexec \\10.1.1.20 cmd.exe  - Obtain a remote command shell
netmon 3.0
You may [...]]]></description>
			<content:encoded><![CDATA[<p><code>superscan</code> - Ping sweep<br />
<code>nslookup<br />
> Server ipaddress<br />
> Set type=any<br />
> Ls –d target.com</code></p>
<p><code>sqlping2</code><br />
<code>net view /domain  </code>- Identify domains on the wire<br />
<code>net view /domain:domain_name </code>- Identify machines in the domain<br />
<code>net use \\10.1.1.20\ipc$ "" /user:"" </code>- Establish null session connection<br />
<code>getmac \\10.1.1.20  </code>- Obtain network transport information<br />
<code>psexec \\10.1.1.20 cmd.exe  </code>- Obtain a remote command shell<br />
<code>netmon 3.0</code></p>
<p>You may want to check the book: <strong>Hacking Exposed: Network Security Secrets and Solutions</strong> for more detailed tips and information.</p>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/network/useful-network-tools-and-commands/885/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Simple LINQ Provider Sample</title>
		<link>http://netinverse.com/devblogs/dotnet/a-simple-linq-provider-sample/882/</link>
		<comments>http://netinverse.com/devblogs/dotnet/a-simple-linq-provider-sample/882/#comments</comments>
		<pubDate>Tue, 04 May 2010 07:24:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.Net]]></category>

		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=882</guid>
		<description><![CDATA[A sample of LINQ provider. 

using System;
using System.Collections;

namespace LINQSample
{
    class Program
    {
        static void Main(string[] args)
        {
            var myNumberServer = new MyNumberServer(323, 2);
  [...]]]></description>
			<content:encoded><![CDATA[<p>A sample of LINQ provider. </p>
<pre>
using System;
using System.Collections;

namespace LINQSample
{
    class Program
    {
        static void Main(string[] args)
        {
            var myNumberServer = new MyNumberServer(323, 2);
            var query = from a in myNumberServer
                        where a != 3
                        select a;

            foreach(var item in query)
            {
                Console.WriteLine(item);
            }
        }
    }

    public class MyNumberServer
    {
        private readonly int _numberToServer;
        private readonly int _length;

        public MyNumberServer(int init, int length)
        {
            _numberToServer = init;
            _length = length;
        }

        public IEnumerator GetEnumerator()
        {
            for (int i = 0; i &lt; _length; i++)
            {
                yield return _numberToServer;
            }
        }
    }

    public static class Extensions
    {
        public static IEnumerable Where(this MyNumberServer source, Func&lt;int, bool&gt; predicate)
        {
            foreach (int item in source)
            {
                if (predicate(item))
                {
                    yield return item;
                }
            }
        }

        public static IEnumerable Select(this MyNumberServer source, Func&lt;object, object&gt; selector)
        {
            foreach (var item in source)
            {
                yield return selector(item);
            }
        }

        public static IEnumerable Cast(this MyNumberServer source)
        {
            foreach (var item in source)
            {
                yield return (int)(item);
            }
        }
    }
 }
</pre>
<p>Note: This is a sample from the book &#8220;Essential LINQ&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/dotnet/a-simple-linq-provider-sample/882/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IQueryable vs IEnumerable</title>
		<link>http://netinverse.com/devblogs/dotnet/iqueryable/876/</link>
		<comments>http://netinverse.com/devblogs/dotnet/iqueryable/876/#comments</comments>
		<pubDate>Tue, 04 May 2010 06:12:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.Net]]></category>

		<category><![CDATA[IQueryable]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=876</guid>
		<description><![CDATA[IQueryable&#60;T&#62; is the type used in LINQ to SQL queries. IQueryable&#60;T&#62; differs from IEnumerable&#60;T&#62; in that it includes an expression tree. In particular, the type takes the following shape:

public interface IQueryable&#60;T&#62; : IEnumerable&#60;T&#62;, IQueryable, IEnumerable
{
}

The important interface in this declaration is IQueryable:

public interface IQueryable: IEnumerable
{
   Type ElementType {get;}
   Expression Expression {get;}
   IQueryProvider Provider {get;}
}
The key [...]]]></description>
			<content:encoded><![CDATA[<p>IQueryable&lt;T&gt; is the type used in LINQ to SQL queries. IQueryable&lt;T&gt; differs from IEnumerable&lt;T&gt; in that it includes an expression tree. In particular, the type takes the following shape:</p>
<pre>
public interface IQueryable&lt;T&gt; : IEnumerable&lt;T&gt;, IQueryable, IEnumerable
{
}
</pre>
<p>The important interface in this declaration is IQueryable:</p>
<pre>
public interface IQueryable: IEnumerable
{
   Type ElementType {get;}
   Expression Expression {get;}
   IQueryProvider Provider {get;}
}</pre>
<p>The key property  here is the middle one - Expression. IQueryable&lt;T&gt; implements IEnumerable&lt;T&gt;.</p>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/dotnet/iqueryable/876/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LINQ Expression Sample: Static Reflection</title>
		<link>http://netinverse.com/devblogs/dotnet/linq-expression-sample-static-reflection/868/</link>
		<comments>http://netinverse.com/devblogs/dotnet/linq-expression-sample-static-reflection/868/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 06:32:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.Net]]></category>

		<category><![CDATA[Expression]]></category>

		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=868</guid>
		<description><![CDATA[Dynamic reflection is the classic .Net reflection. Now there is a new pattern called &#8220;Static Reflection&#8221; which is very popular in some open source code like nHibernate. Static Reflection&#8217;s main
benefit is &#8220;refactoring&#8221; friendly. For example, in the following code snippet, if you use the static relfection and change the property name, it won&#8217;t break. If [...]]]></description>
			<content:encoded><![CDATA[<p>Dynamic reflection is the classic .Net reflection. Now there is a new pattern called &#8220;<strong>Static Reflection</strong>&#8221; which is very popular in some open source code like nHibernate. Static Reflection&#8217;s main<br />
benefit is &#8220;refactoring&#8221; friendly. For example, in the following code snippet, if you use the static relfection and change the property name, it won&#8217;t break. If you use the string to locate the property, it will break easily.</p>
<pre>
    //Classic Reflection
    var entity = new SampleEntity();
    entity.SetValue(entity, "Id", 100); //dynamic binding
    entity.SetValue(entity, "Name", "Sample");

    //Static Relection
    var entity1 = new SampleEntity();
    entity1.SetValue(e =&gt; e.Id, 100); //early binding
    entity1.SetValue(e =&gt; e.Name, "Sample");
</pre>
<pre>
// Static reflections.cs

using System;
using System.Linq.Expressions;
using System.Reflection;

namespace LinqExpressionSample
{
    public class SampleEntity
    {
        public int Id { get; set; }
        public string Name { get; set; }

        public void SetValue&lt;T&gt;(T entity, string propertyName, object value)
        {
            PropertyInfo propertyInfo = typeof (T).GetProperty(propertyName);
            propertyInfo.SetValue(entity, value, null);
        }

    }

    public static class Extension
    {
        public static void SetValue&lt;T&gt;(this T entity, Expression&lt;Func&lt;T, object&gt;&gt; expression, object value)
        {
            MemberExpression memberExpression = GetMemberExpression(expression);
            var propertyInfo = memberExpression.Member as PropertyInfo;
            propertyInfo.SetValue(entity, value, null);
        }

        private static MemberExpression GetMemberExpression&lt;T, TValue&gt;(Expression&lt;Func&lt;T, TValue&gt;&gt; expression)
        {
            if (expression == null)
            {
                return null;
            }
            if (expression.Body is MemberExpression)
            {
                return (MemberExpression)expression.Body;
            }
            if (expression.Body is UnaryExpression)
            {
                var operand = ((UnaryExpression)expression.Body).Operand;
                if (operand is MemberExpression)
                {
                    return (MemberExpression)operand;
                }
                if (operand is MethodCallExpression)
                {
                    return ((MethodCallExpression)operand).Object as MemberExpression;
                }
            }
            return null;
        }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/dotnet/linq-expression-sample-static-reflection/868/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Use DataContract Attribute for Fast Object Xml Serialization/Deserialization</title>
		<link>http://netinverse.com/devblogs/dotnet/use-datacontract-attribute-for-fast-object-xml-serializationdeserialization/859/</link>
		<comments>http://netinverse.com/devblogs/dotnet/use-datacontract-attribute-for-fast-object-xml-serializationdeserialization/859/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 05:59:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.Net]]></category>

		<category><![CDATA[Add new tag]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Serialization]]></category>

		<category><![CDATA[WCF]]></category>

		<category><![CDATA[Xml]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=859</guid>
		<description><![CDATA[If you use WCF to create web services, you need to define your data contracts by using DataContract/DataMember attributes.
Actually you can use them directly for serialization/deserialization in your code. Following is a sample of how to use DataContract/DataMember attributes for fast object Xml serialization and deserialization. 

using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;

namespace DataContractSerialization
{
    [...]]]></description>
			<content:encoded><![CDATA[<p>If you use WCF to create web services, you need to define your data contracts by using DataContract/DataMember attributes.<br />
Actually you can use them directly for serialization/deserialization in your code. Following is a sample of how to use DataContract/DataMember attributes for fast object Xml serialization and deserialization. </p>
<pre name="code" class="c-sharp">
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;

namespace DataContractSerialization
{
    class Program
    {
        static void Main(string[] args)
        {
            Student student = new Student()
            {
                Age = 12,
                Name = "David"
            };

            DataContractSerializer dcs = new DataContractSerializer(typeof(Student));
            StringBuilder sb = new StringBuilder();

            using(XmlWriter writer = XmlWriter.Create(sb))
            {
                dcs.WriteObject(writer, student);
            }
            string xml = sb.ToString();

            using (XmlTextReader reader = new XmlTextReader(new StringReader(xml)))
            {
                Student newStudent = (Student) dcs.ReadObject(reader, true);
            }
        }
    }

    [DataContract(Namespace="http://www.netinverse.com")]
    public class Student
    {
        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public int Age { get; set; }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/dotnet/use-datacontract-attribute-for-fast-object-xml-serializationdeserialization/859/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MSI Installer Tips and Tricks - Force Install</title>
		<link>http://netinverse.com/devblogs/wix/msi-installer-tips-and-tricks/847/</link>
		<comments>http://netinverse.com/devblogs/wix/msi-installer-tips-and-tricks/847/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 04:33:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[WiX]]></category>

		<category><![CDATA[Installer]]></category>

		<category><![CDATA[MSI]]></category>

		<category><![CDATA[Setup]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=847</guid>
		<description><![CDATA[If you have worked with MSI for a while, I bet you have encountered this: You have built and installed an MSI. Later on you change the WiX of it and build the new MSI, when you try to uninstall the old MSI with the new one, the uninstall fails.
In this case, you can
1) Use [...]]]></description>
			<content:encoded><![CDATA[<p>If you have worked with MSI for a while, I bet you have encountered this: You have built and installed an MSI. Later on you change the WiX of it and build the new MSI, when you try to uninstall the old MSI with the new one, the uninstall fails.</p>
<p>In this case, you can</p>
<p>1) Use the utility tool MSIZap to clean up manually.<br />
2) Or, do a force install with the new MSI using msiexec&#8217;s <strong>Repair Options</strong>. After that you can uninstall the MSI and go back to the good state.</p>
<p><code>msiexec /i  /fe your_installer.msi</code></p>
<p>Repair Options<br />
/f[p|e|c|m|s|o|d|a|u|v]<br />
Repairs a product<br />
p - only if file is missing<br />
o - if file is missing or an older version is installed (default)<br />
e - if file is missing or an equal or older version is installed<br />
d - if file is missing or a different version is installed<br />
c - if file is missing or checksum does not match the calculated value<br />
a - forces all files to be reinstalled<br />
u - all required user-specific registry entries (default)<br />
m - all required computer-specific registry entries (default)<br />
s - all existing shortcuts (default)<br />
v - runs from source and recaches local package</p>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/wix/msi-installer-tips-and-tricks/847/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Use WiX include</title>
		<link>http://netinverse.com/devblogs/wix/how-to-use-wix-include/836/</link>
		<comments>http://netinverse.com/devblogs/wix/how-to-use-wix-include/836/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 09:38:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[WiX]]></category>

		<category><![CDATA[Include]]></category>

		<category><![CDATA[WXI]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=836</guid>
		<description><![CDATA[A sample master WiX file has includes: 

&#60;Directory Id="BIN" Name="bin"&#62;
    &#60;?include ..\include\shared.wxi?&#62;
        &#60;Component Id="Service.SharedFiles" DiskId="1" Guid="72e3b959-9515-40ba-a095-bf788aa3d617"&#62;
            &#60;CreateFolder&#62;
                &#60;Permission User="Administrators" [...]]]></description>
			<content:encoded><![CDATA[<p><H2>A sample master WiX file has includes: </H2></p>
<pre>
&lt;Directory Id="BIN" Name="bin"&gt;
    &lt;?include ..\include\shared.wxi?&gt;
        &lt;Component Id="Service.SharedFiles" DiskId="1" Guid="72e3b959-9515-40ba-a095-bf788aa3d617"&gt;
            &lt;CreateFolder&gt;
                &lt;Permission User="Administrators" GenericAll="yes" /&gt;
</pre>
<p><H2>A sample shared.wxi to be included: </H2></p>
<pre>
&lt;?xml version="1.0"?&gt;
&lt;Include&gt;
    &lt;Component Id="Component_1" Guid="58345065-0314-41fd-9992-d960f297ba9a" DiskId="1"&gt;
        &lt;File Id="File1" Name="Net_~1.dll" LongName="NetInverse.core.dll"
            KeyPath="yes" Compressed="yes" src="$(var.COREDIR)\bin\" /&gt;
 </pre>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/wix/how-to-use-wix-include/836/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Debug Managed Memory Leak</title>
		<link>http://netinverse.com/devblogs/debugging/how-to-debug-managed-memory-leak/829/</link>
		<comments>http://netinverse.com/devblogs/debugging/how-to-debug-managed-memory-leak/829/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 07:59:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Debugging]]></category>

		<category><![CDATA[.Net]]></category>

		<category><![CDATA[CLR]]></category>

		<category><![CDATA[SOS]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=829</guid>
		<description><![CDATA[Managed Memory Leak will be reported by an OutOfMemoryException exception thrown by the CLR. There are a few reasons will result in it.
1) Too many objects are alive.
2) Object handle leak. Use !sos.objsize to list handles.
3) Heap fragmentation. Use !sos.dumpheap to get excessive GC Heap fragmentation report.
]]></description>
			<content:encoded><![CDATA[<p>Managed Memory Leak will be reported by an OutOfMemoryException exception thrown by the CLR. There are a few reasons will result in it.</p>
<p>1) Too many objects are alive.<br />
2) Object handle leak. Use <strong>!sos.objsize</strong> to list handles.<br />
3) Heap fragmentation. Use <strong>!sos.dumpheap</strong> to get excessive GC Heap fragmentation report.</p>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/debugging/how-to-debug-managed-memory-leak/829/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is GCSTRESS?</title>
		<link>http://netinverse.com/devblogs/dotnet/what-is-gcstress/824/</link>
		<comments>http://netinverse.com/devblogs/dotnet/what-is-gcstress/824/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 07:42:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.Net]]></category>

		<category><![CDATA[CLR]]></category>

		<category><![CDATA[Debugging]]></category>

		<category><![CDATA[SOS]]></category>

		<guid isPermaLink="false">http://netinverse.com/devblogs/?p=824</guid>
		<description><![CDATA[There are two types of heap corruptions: 1) NT Heap Corruption 2) GC Heap Corruption.
GCSTRESS is a checked or debugging build with some registry keys set used to debug the GC Heap Corruption. It forces the garbage collection to occur very oftern to shake out a bug. 
]]></description>
			<content:encoded><![CDATA[<p>There are two types of heap corruptions: 1) NT Heap Corruption 2) GC Heap Corruption.</p>
<p>GCSTRESS is a checked or debugging build with some registry keys set used to debug the GC Heap Corruption. It forces the garbage collection to occur very oftern to <em>shake out</em> a bug. </p>
]]></content:encoded>
			<wfw:commentRss>http://netinverse.com/devblogs/dotnet/what-is-gcstress/824/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

