Permalink
Browse files

first checkin of Cassandra support for LINQPad

  • Loading branch information...
1 parent 6b59025 commit 245f6fd43a2a805101ebb3f6d55b9202ba76438b @nberardi nberardi committed Jan 6, 2012
Showing with 959 additions and 142 deletions.
  1. +6 −0 .nuget/NuGet.Config
  2. BIN .nuget/NuGet.exe
  3. +52 −0 .nuget/NuGet.targets
  4. +18 −0 FluentCassandra.sln
  5. BIN lib/LINQPad.exe
  6. BIN lib/NuGet.exe
  7. BIN lib/nunit.framework.dll
  8. +8 −3 src/CassandraContext.cs
  9. +3 −0 src/FluentCassandra.csproj
  10. +0 −14 test/FluentCassandra.Blog.Tests/App.config
  11. +0 −36 test/FluentCassandra.Blog.Tests/Controllers/PostsControllerTest.cs
  12. +0 −77 test/FluentCassandra.Blog.Tests/FluentCassandra.Blog.Tests.csproj
  13. +3 −0 test/FluentCassandra.Sandbox/FluentCassandra.Sandbox.csproj
  14. +3 −0 test/FluentCassandra.StressTest/FluentCassandra.StressTest.csproj
  15. +15 −2 test/FluentCassandra.Tests/FluentCassandra.Tests.csproj
  16. 0 test/{FluentCassandra.Blog.Tests → FluentCassandra.Tests}/packages.config
  17. +6 −0 utility/FluentCassandra.LinqPad/App.xaml
  18. +45 −0 utility/FluentCassandra.LinqPad/CassandraConectionDialog.xaml
  19. +30 −0 utility/FluentCassandra.LinqPad/CassandraConectionDialog.xaml.cs
  20. +219 −0 utility/FluentCassandra.LinqPad/CassandraConnectionInfo.cs
  21. +102 −0 utility/FluentCassandra.LinqPad/CassandraDriver.cs
  22. +78 −0 utility/FluentCassandra.LinqPad/CassandraDriverContext.cs
  23. +1 −0 utility/FluentCassandra.LinqPad/DevDeploy.bat
  24. +122 −0 utility/FluentCassandra.LinqPad/FluentCassandra.LinqPad.csproj
  25. +9 −10 {test/FluentCassandra.Blog.Tests → utility/FluentCassandra.LinqPad}/Properties/AssemblyInfo.cs
  26. +125 −0 utility/FluentCassandra.LinqPad/RavenLinqpadDriver.csproj
  27. +13 −0 utility/FluentCassandra.LinqPad/Utility.cs
  28. +34 −0 utility/FluentCassandra.LinqPad/ViewModel/MainViewModel.cs
  29. +58 −0 utility/FluentCassandra.LinqPad/ViewModel/ViewModelLocator.cs
  30. +5 −0 utility/FluentCassandra.LinqPad/header.xml
  31. +4 −0 utility/FluentCassandra.LinqPad/packages.config
View
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <solution>
+ <add key="disableSourceControlIntegration" value="true" />
+ </solution>
+</configuration>
View
Binary file not shown.
View
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
+ <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
+ <NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
+ <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
+ <PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
+ <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
+
+ <!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
+ <PackageSources>""</PackageSources>
+
+ <!-- Enable the restore command to run before builds -->
+ <RestorePackages Condition="$(RestorePackages) == ''">false</RestorePackages>
+
+ <!-- Property that enables building a package from a project -->
+ <BuildPackage Condition="$(BuildPackage) == ''">false</BuildPackage>
+
+ <!-- Commands -->
+ <RestoreCommand>"$(NuGetExePath)" install "$(PackagesConfig)" -source $(PackageSources) -o "$(PackagesDir)"</RestoreCommand>
+ <BuildCommand>"$(NuGetExePath)" pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
+
+ <!-- Make the build depend on restore packages -->
+ <BuildDependsOn Condition="$(RestorePackages) == 'true'">
+ RestorePackages;
+ $(BuildDependsOn);
+ </BuildDependsOn>
+
+ <!-- Make the build depend on restore packages -->
+ <BuildDependsOn Condition="$(BuildPackage) == 'true'">
+ $(BuildDependsOn);
+ BuildPackage;
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="CheckPrerequisites">
+ <!-- Raise an error if we're unable to locate nuget.exe -->
+ <Error Condition="!Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
+ </Target>
+
+ <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(RestoreCommand)"
+ LogStandardErrorAsError="true"
+ Condition="Exists('$(PackagesConfig)')" />
+ </Target>
+
+ <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(BuildCommand)"
+ LogStandardErrorAsError="true" />
+ </Target>
+</Project>
View
@@ -14,6 +14,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCassandra.StressTest", "test\FluentCassandra.StressTest\FluentCassandra.StressTest.csproj", "{AC3818E2-E260-4193-A3D1-6E3FF87383F6}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCassandra.LinqPad", "utility\FluentCassandra.LinqPad\FluentCassandra.LinqPad.csproj", "{CACA3463-BBEE-4C7E-AC89-49240B0D8F46}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{BF5D399F-A637-4DE2-980F-1CF057A6953C}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\NuGet.exe = .nuget\NuGet.exe
+ .nuget\NuGet.targets = .nuget\NuGet.targets
+ EndProjectSection
+EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = FluentCassandra.vsmdi
@@ -67,6 +75,16 @@ Global
{AC3818E2-E260-4193-A3D1-6E3FF87383F6}.Release|Mixed Platforms.Build.0 = Release|x86
{AC3818E2-E260-4193-A3D1-6E3FF87383F6}.Release|x86.ActiveCfg = Release|x86
{AC3818E2-E260-4193-A3D1-6E3FF87383F6}.Release|x86.Build.0 = Release|x86
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {CACA3463-BBEE-4C7E-AC89-49240B0D8F46}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -18,7 +18,6 @@ public static ConnectionBuilder CurrentConnectionBuilder
}
private IList<IFluentMutationTracker> _trackers;
- private bool _disposed;
/// <summary>
///
@@ -181,6 +180,12 @@ public TResult ExecuteOperation<TResult>(Operation<TResult> action, bool? throwO
#region IDisposable Members
+ public bool WasDisposed
+ {
+ get;
+ private set;
+ }
+
/// <summary>
///
/// </summary>
@@ -198,13 +203,13 @@ public void Dispose()
/// </param>
protected virtual void Dispose(bool disposing)
{
- if (!_disposed && disposing && CassandraSession.Current != null)
+ if (!WasDisposed && disposing && CassandraSession.Current != null)
{
CassandraSession.Current.Dispose();
CassandraSession.Current = null;
}
- _disposed = true;
+ WasDisposed = true;
}
/// <summary>
@@ -17,6 +17,8 @@
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile />
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\FluentCassandra\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -280,6 +282,7 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.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">
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- Note: Add entries to the App.config file for configuration settings
- that apply only to the Test project.
--->
-<configuration>
- <appSettings>
-
- </appSettings>
-
- <connectionStrings>
-
- </connectionStrings>
-</configuration>
@@ -1,36 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Web.Mvc;
-using FluentCassandra.Blog;
-using FluentCassandra.Blog.Controllers;
-using NUnit.Framework;
-
-namespace FluentCassandra.Blog.Tests.Controllers
-{
- [TestFixture]
- public class PostsControllerTest
- {
- private PostsController _controller = new PostsController();
-
- [Test]
- public void Index()
- {
- // arrange
- var count = 5;
-
- // act
- var result = _controller.Index();
-
- // assert
- Assert.IsInstanceOf<ViewResult>(result);
-
- var viewResult = (ViewResult)result;
- Assert.IsNotNull(viewResult.Model);
-
- dynamic posts = viewResult.Model;
- Assert.AreEqual(count, posts.Count);
- }
- }
-}
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>
- </ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{C3E57452-3D37-435B-9DEE-8B222B6724E3}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>FluentCassandra.Blog.Tests</RootNamespace>
- <AssemblyName>FluentCassandra.Blog.Tests</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </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="Microsoft.CSharp" />
- <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <HintPath>..\..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="nunit.mocks, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <HintPath>..\..\packages\NUnit.2.5.10.11092\lib\nunit.mocks.dll</HintPath>
- </Reference>
- <Reference Include="pnunit.framework">
- <HintPath>..\..\packages\NUnit.2.5.10.11092\lib\pnunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.ComponentModel.DataAnnotations" />
- <Reference Include="System.Configuration" />
- <Reference Include="System.Core" />
- <Reference Include="System.Data" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.ApplicationServices" />
- <Reference Include="System.Web.Extensions" />
- <Reference Include="System.Web.Abstractions" />
- <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
- <Reference Include="System.Web.Routing" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Controllers\PostsControllerTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <None Include="packages.config" />
- </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>
@@ -14,6 +14,8 @@
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\FluentCassandra\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -58,6 +60,7 @@
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.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">
@@ -14,6 +14,8 @@
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\FluentCassandra\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -55,6 +57,7 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.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">
@@ -14,6 +14,8 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\FluentCassandra\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -34,8 +36,15 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
- <Reference Include="nunit.framework">
- <HintPath>..\..\lib\nunit.framework.dll</HintPath>
+ <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.mocks">
+ <HintPath>..\..\packages\NUnit.2.5.10.11092\lib\nunit.mocks.dll</HintPath>
+ </Reference>
+ <Reference Include="pnunit.framework">
+ <HintPath>..\..\packages\NUnit.2.5.10.11092\lib\pnunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
@@ -94,7 +103,11 @@
<Name>FluentCassandra</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.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">
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="FluentCassandra.LinqPad.App" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:vm="clr-namespace:FluentCassandra.LinqPad.ViewModel">
+ <Application.Resources>
+ <vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />
+ </Application.Resources>
+</Application>
Oops, something went wrong.

0 comments on commit 245f6fd

Please sign in to comment.