Click here to Skip to main content
15,893,588 members
Articles / Programming Languages / C#

Dynamic Method Dispatcher

Rate me:
Please Sign up or sign in to vote.
4.98/5 (74 votes)
16 Apr 2012CPOL23 min read 136.4K   1.4K   114  
No more long switch statements!
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{45C06821-465C-4163-88A0-0C9F9CFC8016}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>TestMessageDispatching</RootNamespace>
    <AssemblyName>TestMessageDispatching</AssemblyName>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>..\bin.Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>..\bin.Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Forms\FormMessageHander.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Forms\FormMessageHander.Designer.cs">
      <DependentUpon>FormMessageHander.cs</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Code\IMessageLogger.cs" />
    <Compile Include="Code\MessageStructure.cs" />
    <Compile Include="Forms\FormMessageVisualizer.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Forms\FormMessageVisualizer.Designer.cs">
      <DependentUpon>FormMessageVisualizer.cs</DependentUpon>
    </Compile>
    <Compile Include="Forms\FormMessageVisualizer.Setup.designer.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Code\Messages.cs" />
    <Compile Include="Forms\FormMessageHander.Setup.designer.cs" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\SA.Universal.Technology\SA.Universal.Technology.2005.csproj">
      <Project>{0B00237F-9D19-4D3C-8AF0-A1DC5D9301AF}</Project>
      <Name>SA.Universal.Technology</Name>
    </ProjectReference>
  </ItemGroup>
  
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Physics, physical and quantum optics, mathematics, computer science, control systems for manufacturing, diagnostics, testing, and research, theory of music, musical instruments… Contact me: https://www.SAKryukov.org

Comments and Discussions