Description: An Object Explorer Written in a Map/Filter style with C# Partial Application Functions
Recently I wanted to visually inspect the structure of an object created by some service, so I wrote a function that reflects over an object and builds a tree of the various class properties and drills into List<T> collections. Simple enough, but I thought, gee, this might be useful, I'd like to expand it to handle Dictionary<A, B>, enums, nullable property types, etc. The main recursive function ended up being a 130 line long sort of organized mess. Thinking about refactoring it into more manageable pieces, it occurred to me that all this code was basically an imperative implementation of map and filter operations.
To Search:
File list (Check if you may need any files):
article\diagram.fsd
article\diagram.png
article\diagram-layout.xml
article\index.htm
article\screenshot.png
article\simpleList.png
InstanceExplorer.sln
InstanceTreeMapper\bin\Debug\InstanceTreeMapper.dll
InstanceTreeMapper\bin\Debug\InstanceTreeMapper.pdb
InstanceTreeMapper\Converter.cs
InstanceTreeMapper\ExtensionMethods.cs
InstanceTreeMapper\InstanceNode.cs
InstanceTreeMapper\InstanceTreeMapper.csproj
InstanceTreeMapper\Mapper.cs
InstanceTreeMapper\obj\Debug\CoreCompileInputs.cache
InstanceTreeMapper\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
InstanceTreeMapper\obj\Debug\InstanceTreeMapper.csproj.FileListAbsolute.txt
InstanceTreeMapper\obj\Debug\InstanceTreeMapper.csprojResolveAssemblyReference.cache
InstanceTreeMapper\obj\Debug\InstanceTreeMapper.dll
InstanceTreeMapper\obj\Debug\InstanceTreeMapper.pdb
InstanceTreeMapper\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
InstanceTreeMapper\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
InstanceTreeMapper\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
InstanceTreeMapper\Properties\AssemblyInfo.cs
MapperUnitTests\BasicTypeTests.cs
MapperUnitTests\bin\Debug\FluentAssertions.Core.dll
MapperUnitTests\bin\Debug\FluentAssertions.Core.pdb
MapperUnitTests\bin\Debug\FluentAssertions.Core.xml
MapperUnitTests\bin\Debug\FluentAssertions.dll
MapperUnitTests\bin\Debug\FluentAssertions.pdb
MapperUnitTests\bin\Debug\FluentAssertions.xml
MapperUnitTests\bin\Debug\InstanceTreeMapper.dll
MapperUnitTests\bin\Debug\InstanceTreeMapper.pdb
MapperUnitTests\bin\Debug\MapperUnitTests.dll
MapperUnitTests\bin\Debug\MapperUnitTests.pdb
MapperUnitTests\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll
MapperUnitTests\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll
MapperUnitTests\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll
MapperUnitTests\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
MapperUnitTests\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
MapperUnitTests\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
MapperUnitTests\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.xml
MapperUnitTests\MapperUnitTests.csproj
MapperUnitTests\obj\Debug\CoreCompileInputs.cache
MapperUnitTests\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
MapperUnitTests\obj\Debug\MapperUnitTests.csproj.FileListAbsolute.txt
MapperUnitTests\obj\Debug\MapperUnitTests.csprojResolveAssemblyReference.cache
MapperUnitTests\obj\Debug\MapperUnitTests.dll
MapperUnitTests\obj\Debug\MapperUnitTests.pdb
MapperUnitTests\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
MapperUnitTests\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
MapperUnitTests\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
MapperUnitTests\packages.config
MapperUnitTests\Properties\AssemblyInfo.cs
MapperUnitTests\StructuralTests.cs
MapReduceFilterExample\App.config
MapReduceFilterExample\bin\Debug\MapReduceFilterExample.exe
MapReduceFilterExample\bin\Debug\MapReduceFilterExample.exe.config
MapReduceFilterExample\bin\Debug\MapReduceFilterExample.pdb
MapReduceFilterExample\MapReduceFilterExample.csproj
MapReduceFilterExample\obj\Debug\CoreCompileInputs.cache
MapReduceFilterExample\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
MapReduceFilterExample\obj\Debug\MapReduceFilterExample.csproj.FileListAbsolute.txt
MapReduceFilterExample\obj\Debug\MapReduceFilterExample.csprojResolveAssemblyReference.cache
MapReduceFilterExample\obj\Debug\MapReduceFilterExample.exe
MapReduceFilterExample\obj\Debug\MapReduceFilterExample.pdb
MapReduceFilterExample\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
MapReduceFilterExample\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
MapReduceFilterExample\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
MapReduceFilterExample\Program - Copy (2).cs
MapReduceFilterExample\Program - Copy (3).cs
MapReduceFilterExample\Program - Copy (4).cs
MapReduceFilterExample\Program - Copy.cs
MapReduceFilterExample\Program.cs
MapReduceFilterExample\Properties\AssemblyInfo.cs
SampleInstance\bin\Debug\SampleInstance.dll
SampleInstance\bin\Debug\SampleInstance.pdb
SampleInstance\obj\Debug\CoreCompileInputs.cache
SampleInstance\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
SampleInstance\obj\Debug\SampleInstance.csproj.FileListAbsolute.txt
SampleInstance\obj\Debug\SampleInstance.csprojResolveAssemblyReference.cache
SampleInstance\obj\Debug\SampleInstance.dll
SampleInstance\obj\Debug\SampleInstance.pdb
SampleInstance\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
SampleInstance\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
SampleInstance\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
SampleInstance\Properties\AssemblyInfo.cs
SampleInstance\Sample.cs
SampleInstance\SampleInstance.csproj
WinFormDemo\App.config
WinFormDemo\bin\Debug\InstanceTreeMapper.dll
WinFormDemo\bin\Debug\InstanceTreeMapper.pdb
WinFormDemo\bin\Debug\MapReduceFilterExample.exe
WinFormDemo\bin\Debug\MapReduceFilterExample.exe.config
WinFormDemo\bin\Debug\MapReduceFilterExample.pdb
WinFormDemo\bin\Debug\SampleInstance.dll
WinFormDemo\bin\Debug\SampleInstance.pdb
WinFormDemo\bin\Debug\WinFormDemo.exe
WinFormDemo\bin\Debug\WinFormDemo.exe.config
WinFormDemo\bin\Debug\WinFormDemo.pdb