Click here to Skip to main content
15,881,882 members
Articles / Programming Languages / C#

Thread-safe Silverlight Cairngorm

Rate me:
Please Sign up or sign in to vote.
4.75/5 (9 votes)
20 Oct 2008CDDL6 min read 49.3K   320   21  
Some code changes and improvements that make the Silverlight Cairngorm thread-safe
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{71F5781C-47DD-4BC2-8213-0FC35468EE29}</ProjectGuid>
    <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>SilverlightCairngormDemo</RootNamespace>
    <AssemblyName>SilverlightCairngormDemo</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <SilverlightApplication>true</SilverlightApplication>
    <SupportedCultures>
    </SupportedCultures>
    <XapOutputs>true</XapOutputs>
    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
    <XapFilename>SilverlightCairngormDemo.xap</XapFilename>
    <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
    <SilverlightAppEntry>SilverlightCairngormDemo.App</SilverlightAppEntry>
    <TestPageFileName>TestPage.html</TestPageFileName>
    <CreateTestPage>true</CreateTestPage>
    <ValidateXaml>true</ValidateXaml>
    <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>Bin\Debug</OutputPath>
    <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <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;SILVERLIGHT</DefineConstants>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System.Windows" />
    <Reference Include="mscorlib" />
    <Reference Include="system" />
    <Reference Include="System.Core" />
    <Reference Include="System.Net" />
    <Reference Include="System.Windows.Controls.Data, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    <Reference Include="System.Windows.Controls.Extended, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Windows.Browser" />
    <Reference Include="System.Xml.Linq, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="App.xaml.cs">
      <DependentUpon>App.xaml</DependentUpon>
    </Compile>
    <Compile Include="Business\SearchPhotoDelegate.cs" />
    <Compile Include="Command\SearchPhotoCommand.cs" />
    <Compile Include="Control\SilverPhotoController.cs" />
    <Compile Include="Model\FlickRPhoto.cs" />
    <Compile Include="Model\SilverPhotoModel.cs" />
    <Compile Include="Page.xaml.cs">
      <DependentUpon>Page.xaml</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="View\ContentZone.xaml.cs">
      <DependentUpon>ContentZone.xaml</DependentUpon>
    </Compile>
    <Compile Include="View\PhotoList.xaml.cs">
      <DependentUpon>PhotoList.xaml</DependentUpon>
    </Compile>
    <Compile Include="View\PhotoSearch.xaml.cs">
      <DependentUpon>PhotoSearch.xaml</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <ApplicationDefinition Include="App.xaml">
      <Generator>MSBuild:MarkupCompilePass1</Generator>
      <SubType>Designer</SubType>
    </ApplicationDefinition>
    <Page Include="Page.xaml">
      <Generator>MSBuild:MarkupCompilePass1</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="View\ContentZone.xaml">
      <Generator>MSBuild:MarkupCompilePass1</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="View\PhotoList.xaml">
      <Generator>MSBuild:MarkupCompilePass1</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="View\PhotoSearch.xaml">
      <SubType>Page</SubType>
      <Generator>MSBuild:MarkupCompilePass1</Generator>
    </Page>
  </ItemGroup>
  <ItemGroup>
    <None Include="Properties\AppManifest.xml" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\SilverlightCairngorm\SilverlightCairngorm.csproj">
      <Project>{ADFAAD5B-BE4D-4874-A14C-E50974698079}</Project>
      <Name>SilverlightCairngorm</Name>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.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>
  -->
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
        <SilverlightProjectProperties />
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</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 Common Development and Distribution License (CDDL)


Written By
Technical Lead
United States United States
https://github.com/modesty

https://www.linkedin.com/in/modesty-zhang-9a43771

https://twitter.com/modestyqz

Comments and Discussions