Skip to content

Commit

Permalink
Merge remote branch 'craig/typedcollections' into typedcollections
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed May 5, 2010
2 parents 6d7a4df + 58e2610 commit 9591b3c
Show file tree
Hide file tree
Showing 70 changed files with 4,090 additions and 1,120 deletions.
24 changes: 24 additions & 0 deletions UpgradeLog.XML
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog>
<Properties><Property Name="Solution" Value="MongoDB-CSharp-2010">
</Property><Property Name="Solution File" Value="C:\projects\mongodb-csharp\MongoDB-CSharp-2010.sln">
</Property><Property Name="Date" Value="Tuesday, April 27, 2010">
</Property><Property Name="Time" Value="15:04 PM">
</Property></Properties><Event ErrorLevel="0" Project="SimpleVB" Source="examples\SimpleVB\SimpleVB.vbproj" Description="Project converted successfully">
</Event><Event ErrorLevel="3" Project="SimpleVB" Source="examples\SimpleVB\SimpleVB.vbproj" Description="Converted">
</Event><Event ErrorLevel="0" Project="Simple" Source="examples\Simple\Simple.csproj" Description="Project converted successfully">
</Event><Event ErrorLevel="3" Project="Simple" Source="examples\Simple\Simple.csproj" Description="Converted">
</Event><Event ErrorLevel="0" Project="MongoDB" Source="source\MongoDB\MongoDB.csproj" Description="The project file does not require conversion.">
</Event><Event ErrorLevel="3" Project="MongoDB" Source="source\MongoDB\MongoDB.csproj" Description="No Conversion Required">
</Event><Event ErrorLevel="0" Project="MongoDB.GridFS" Source="source\MongoDB.GridFS\MongoDB.GridFS.csproj" Description="The project file does not require conversion.">
</Event><Event ErrorLevel="3" Project="MongoDB.GridFS" Source="source\MongoDB.GridFS\MongoDB.GridFS.csproj" Description="No Conversion Required">
</Event><Event ErrorLevel="0" Project="MongoDB.GridFS.Tests" Source="source\MongoDB.GridFS.Tests\MongoDB.GridFS.Tests.csproj" Description="The project file does not require conversion.">
</Event><Event ErrorLevel="3" Project="MongoDB.GridFS.Tests" Source="source\MongoDB.GridFS.Tests\MongoDB.GridFS.Tests.csproj" Description="No Conversion Required">
</Event><Event ErrorLevel="0" Project="MongoDB.Tests" Source="source\MongoDB.Tests\MongoDB.Tests.csproj" Description="The project file does not require conversion.">
</Event><Event ErrorLevel="3" Project="MongoDB.Tests" Source="source\MongoDB.Tests\MongoDB.Tests.csproj" Description="No Conversion Required">
</Event><Event ErrorLevel="0" Project="Benchmark" Source="tools\Benchmark\Benchmark.csproj" Description="The project file does not require conversion.">
</Event><Event ErrorLevel="3" Project="Benchmark" Source="tools\Benchmark\Benchmark.csproj" Description="No Conversion Required">
</Event><Event ErrorLevel="0" Project="" Source="MongoDB-CSharp-2010.sln" Description="The solution file does not require conversion.">
</Event><Event ErrorLevel="3" Project="" Source="MongoDB-CSharp-2010.sln" Description="No Conversion Required">
</Event><Event ErrorLevel="0" Project="SimpleVB" Source="examples\SimpleVB\SimpleVB.vbproj" Description="Scan complete: Upgrade not required for project files.">
</Event><Event ErrorLevel="0" Project="Simple" Source="examples\Simple\Simple.csproj" Description="Scan complete: Upgrade not required for project files.">
</Event></UpgradeLog>
40 changes: 39 additions & 1 deletion examples/Simple/Simple.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,6 +10,25 @@
<RootNamespace>Simple</RootNamespace>
<AssemblyName>Simple</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -19,13 +38,15 @@
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand All @@ -48,4 +69,21 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
</Project>
42 changes: 41 additions & 1 deletion examples/SimpleVB/SimpleVB.vbproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -12,6 +12,25 @@
<OptionInfer>On</OptionInfer>
<AssemblyName>SimpleVB</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -20,13 +39,17 @@
<DefineTrace>false</DefineTrace>
<AdditionalParameters />
<DefineDebug>false</DefineDebug>
<NoWarn>42353,42354,42355</NoWarn>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<DefineTrace>false</DefineTrace>
<AdditionalParameters />
<DefineDebug>false</DefineDebug>
<NoWarn>42353,42354,42355</NoWarn>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
Expand All @@ -50,5 +73,22 @@
<ItemGroup>
<Folder Include="My Project\" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
</Project>
34 changes: 34 additions & 0 deletions source/MongoDB.Tests/IntegrationTests/Linq/LinqDomain.cs
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MongoDB.IntegrationTests.Linq
{
public class Person
{
//[MongoAlias("fn")]
public string FirstName { get; set; }

//[MongoAlias("ln")]
public string LastName { get; set; }

//[MongoAlias("age")]
public int Age { get; set; }

//[MongoAlias("add")]
public Address PrimaryAddress { get; set; }

//[MongoAlias("otherAdds")]
public List<Address> Addresses { get; set; }

//[MongoAlias("emps")]
public int[] EmployerIds { get; set; }
}

public class Address
{
//[MongoAlias("city")]
public string City { get; set; }
}
}
Expand Up @@ -52,6 +52,14 @@ public void TestSetup()
orgCollection.Insert(new Organization { Name = "The Muffler Shanty", Address = new Address { City = "London" } }, true);
}

[Test]
public void Delete()
{
personCollection.Delete(p => true);

Assert.AreEqual(0, personCollection.Count());
}

[Test]
public void Find()
{
Expand Down
27 changes: 0 additions & 27 deletions source/MongoDB.Tests/IntegrationTests/Linq/LinqTestsBase.cs
Expand Up @@ -20,32 +20,5 @@ public virtual void TestSetup()
collection = DB.GetCollection<Person>("people");
documentCollection = DB.GetCollection("people");
}

protected class Person
{
[MongoAlias("fn")]
public string FirstName { get; set; }

[MongoAlias("ln")]
public string LastName { get; set; }

[MongoAlias("age")]
public int Age { get; set; }

[MongoAlias("add")]
public Address PrimaryAddress { get; set; }

[MongoAlias("otherAdds")]
public List<Address> Addresses { get; set; }

[MongoAlias("emps")]
public int[] EmployerIds { get; set; }
}

protected class Address
{
[MongoAlias("city")]
public string City { get; set; }
}
}
}

0 comments on commit 9591b3c

Please sign in to comment.