Click here to Skip to main content
15,881,803 members
Articles / Desktop Programming / WPF

Weak Events in C#

Rate me:
Please Sign up or sign in to vote.
4.95/5 (240 votes)
25 Apr 2009MIT12 min read 486.8K   5.4K   535  
Different approaches to weak events
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectGuid>{CEE328E8-556D-4F00-AC03-3177C9C4E084}</ProjectGuid>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <OutputType>Library</OutputType>
    <RootNamespace>WeakEvents</RootNamespace>
    <AssemblyName>WeakEvents</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <AppDesignerFolder>Properties</AppDesignerFolder>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <OutputPath>bin\Debug\</OutputPath>
    <DebugSymbols>True</DebugSymbols>
    <DebugType>Full</DebugType>
    <Optimize>False</Optimize>
    <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <OutputPath>bin\Release\</OutputPath>
    <DebugSymbols>False</DebugSymbols>
    <DebugType>None</DebugType>
    <Optimize>True</Optimize>
    <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
    <DefineConstants>TRACE</DefineConstants>
  </PropertyGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml" />
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="SmartWeakEvent\FastSmartWeakEvent.cs" />
    <Compile Include="SmartWeakEvent\SmartWeakEvent.cs" />
    <Compile Include="WeakEventHandler.cs" />
    <Compile Include="WeakEventManagerBase.cs" />
    <Compile Include="WeakReferenceToDelegate.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="SmartWeakEvent" />
  </ItemGroup>
</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 MIT License


Written By
Germany Germany
I am the lead developer on the SharpDevelop open source project.

Comments and Discussions