Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

issue #164 Round Robin Load Balancing Breaks Glimpse #165

Closed
wants to merge 3 commits into from

2 participants

@stevenlauwers22

No description provided.

@nikmd23
Owner

Good news bad news on this one:

Bad news is we won't be taking on this pull request, the good news is that it isn't needed as of RC1.

Thanks @stevenlauwers22

@nikmd23 nikmd23 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 29, 2012
  1. @stevenlauwers22
Commits on May 22, 2012
  1. @stevenlauwers22
Commits on Aug 1, 2012
  1. @stevenlauwers22
This page is out of date. Refresh to see the latest.
Showing with 681 additions and 5 deletions.
  1. +26 −0 Glimpse.All.sln
  2. BIN  lib/NHibernate/NH_330/Iesi.Collections.dll
  3. BIN  lib/NHibernate/NH_330/NHibernate.dll
  4. BIN  lib/NHibernate/NH_331/Iesi.Collections.dll
  5. BIN  lib/NHibernate/NH_331/NHibernate.dll
  6. +38 −4 source/Glimpse.Core/Extensions/HttpContextBaseExtensions.cs
  7. +2 −1  source/Glimpse.Elmah/Plugin/Elmah.cs
  8. +2 −0  source/Glimpse.NH/Glimpse.Nh.csproj
  9. +111 −0 source/Glimpse.NH/Plumbing/Profiler/GlimpseProfileDbDriverNh330.cs
  10. +111 −0 source/Glimpse.NH/Plumbing/Profiler/GlimpseProfileDbDriverNh331.cs
  11. +22 −0 source/Glimpse.Test.NH330/App.config
  12. BIN  source/Glimpse.Test.NH330/Dummy.sdf
  13. +112 −0 source/Glimpse.Test.NH330/Glimpse.Test.Nh330.csproj
  14. +35 −0 source/Glimpse.Test.NH330/Properties/AssemblyInfo.cs
  15. +10 −0 ...ce/Glimpse.Test.NH330/When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType_for_NH330.cs
  16. +17 −0 source/Glimpse.Test.NH330/When_the_WrapDbDriver_is_told_to_Inject_for_NH330.cs
  17. +6 −0 source/Glimpse.Test.NH330/packages.config
  18. +22 −0 source/Glimpse.Test.NH331/App.config
  19. BIN  source/Glimpse.Test.NH331/Dummy.sdf
  20. +98 −0 source/Glimpse.Test.NH331/Glimpse.Test.NH331.csproj
  21. +36 −0 source/Glimpse.Test.NH331/Properties/AssemblyInfo.cs
  22. +10 −0 ...ce/Glimpse.Test.NH331/When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType_for_NH330.cs
  23. +17 −0 source/Glimpse.Test.NH331/When_the_WrapDbDriver_is_told_to_Inject_for_NH330.cs
  24. +6 −0 source/Glimpse.Test.NH331/packages.config
View
26 Glimpse.All.sln
@@ -49,6 +49,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glimpse.Test.Nh201", "sourc
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glimpse.Test.Nh121", "source\Glimpse.Test.NH121\Glimpse.Test.Nh121.csproj", "{686D136F-421F-4D29-9D59-D1A3547D03B8}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glimpse.Test.Nh330", "source\Glimpse.Test.NH330\Glimpse.Test.Nh330.csproj", "{2E12457F-0F9E-4487-9134-E3136E13F159}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glimpse.Test.NH331", "source\Glimpse.Test.NH331\Glimpse.Test.NH331.csproj", "{B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -249,6 +253,26 @@ Global
{686D136F-421F-4D29-9D59-D1A3547D03B8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{686D136F-421F-4D29-9D59-D1A3547D03B8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{686D136F-421F-4D29-9D59-D1A3547D03B8}.Release|x86.ActiveCfg = Release|Any CPU
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Debug|x86.ActiveCfg = Debug|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Debug|x86.Build.0 = Debug|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Release|Any CPU.ActiveCfg = Release|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Release|Mixed Platforms.Build.0 = Release|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Release|x86.ActiveCfg = Release|x86
+ {2E12457F-0F9E-4487-9134-E3136E13F159}.Release|x86.Build.0 = Release|x86
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -275,5 +299,7 @@ Global
{C88C62B6-6BD9-4480-9D37-BB5086C9855C} = {D31818A1-D8F8-4DA4-85D2-C2763A729134}
{C8BB6E17-6623-4B9C-A7FC-F0674BBC0DBA} = {D31818A1-D8F8-4DA4-85D2-C2763A729134}
{686D136F-421F-4D29-9D59-D1A3547D03B8} = {D31818A1-D8F8-4DA4-85D2-C2763A729134}
+ {2E12457F-0F9E-4487-9134-E3136E13F159} = {D31818A1-D8F8-4DA4-85D2-C2763A729134}
+ {B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA} = {D31818A1-D8F8-4DA4-85D2-C2763A729134}
EndGlobalSection
EndGlobal
View
BIN  lib/NHibernate/NH_330/Iesi.Collections.dll
Binary file not shown
View
BIN  lib/NHibernate/NH_330/NHibernate.dll
Binary file not shown
View
BIN  lib/NHibernate/NH_331/Iesi.Collections.dll
Binary file not shown
View
BIN  lib/NHibernate/NH_331/NHibernate.dll
Binary file not shown
View
42 source/Glimpse.Core/Extensions/HttpContextBaseExtensions.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
-using System.Reflection;
+using System.Configuration;
+using System.Globalization;
using System.Web;
using Glimpse.Core.Configuration;
using Glimpse.Core.Plumbing;
@@ -65,11 +66,44 @@ internal static bool TryGetData(this HttpContextBase context, out IDictionary<st
public static string GlimpseResourcePath(this HttpContextBase context, string resource)
{
- var root = VirtualPathUtility.ToAbsolute("~/", context.Request.ApplicationPath);
+ var virtualRootPath = context.GetGlimpseVirtualPathRoot();
+ if (resource == null)
+ return string.Format("{0}Glimpse.axd", virtualRootPath);
- if (resource == null) return string.Format("{0}Glimpse.axd", root);
+ return string.Format("{0}Glimpse.axd?{3}={4}&{2}={1}", virtualRootPath, resource, Handler.ResourceKey, Handler.VersionKey, Module.RunningVersion);
+ }
+
+ public static string GetGlimpseVirtualPathRoot(this HttpContextBase context)
+ {
+ var config = ConfigurationManager.GetSection("glimpse") as GlimpseConfiguration ?? new GlimpseConfiguration();
+ return context.GetGlimpseVirtualPathRoot(config.IpForwardingEnabled);
+ }
+
+ private static string GetGlimpseVirtualPathRoot(this HttpContextBase context, bool isIpForwardingEnabled)
+ {
+ var virtualPathRoot = VirtualPathUtility.ToAbsolute("~/", context.Request.ApplicationPath);
+ if (!isIpForwardingEnabled)
+ {
+ return virtualPathRoot;
+ }
+
+ // when behind a load balancer, make sure requests get routed to the server that handled the request.
+ // This limits Glimpse users to be on the local network.
+ string protocol;
+ string port;
+ if (context.Request.Url == null)
+ {
+ protocol = context.Request.IsSecureConnection ? "https" : "http";
+ port = context.Request.IsSecureConnection ? "443" : "80";
+ }
+ else
+ {
+ protocol = context.Request.Url.Scheme;
+ port = context.Request.Url.Port.ToString(CultureInfo.InvariantCulture);
+ }
- return string.Format("{0}Glimpse.axd?{3}={4}&{2}={1}", root, resource, Handler.ResourceKey, Handler.VersionKey, Module.RunningVersion);
+ var requestServerAddress = context.Request.ServerVariables["LOCAL_ADDR"];
+ return string.Format("{0}://{1}:{2}{3}", protocol, requestServerAddress, port, virtualPathRoot);
}
/* public static List<IGlimpseWarning> GetWarnings(this HttpContextBase context)
View
3  source/Glimpse.Elmah/Plugin/Elmah.cs
@@ -5,6 +5,7 @@
using System.Web;
using Elmah;
using Glimpse.Core.Extensibility;
+using Glimpse.Core.Extensions;
using Glimpse.Elmah.Plumbing;
namespace Glimpse.Elmah.Plugin
@@ -110,7 +111,7 @@ private object GetErrors(HttpContextBase context, int pageIndex, int pageSize)
};
// Create the data rows
- var path = VirtualPathUtility.ToAbsolute("~/", context.Request.ApplicationPath);
+ var path = context.GetGlimpseVirtualPathRoot();
var errorPageUrl = GetErrorPageUrl();
data.AddRange(errorList
View
2  source/Glimpse.NH/Glimpse.Nh.csproj
@@ -58,6 +58,8 @@
<EmbeddedResource Include="Plumbing\Profiler\GlimpseProfileDbDriverNh121.cs" />
<Compile Include="Plumbing\Injectors\GlimpseProfileDbDriverFactory.cs" />
<Compile Include="Plumbing\Injectors\IGlimpseProfileDbDriverFactory.cs" />
+ <EmbeddedResource Include="Plumbing\Profiler\GlimpseProfileDbDriverNh330.cs" />
+ <EmbeddedResource Include="Plumbing\Profiler\GlimpseProfileDbDriverNh331.cs" />
<Compile Include="Plumbing\Profiler\IGlimpseProfileDbDriver.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Service\NH.cs" />
View
111 source/Glimpse.NH/Plumbing/Profiler/GlimpseProfileDbDriverNh330.cs
@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.Common;
+using Glimpse.Ado.Plumbing;
+using Glimpse.Ado.Plumbing.Profiler;
+using Glimpse.NH.Plumbing.Profiler;
+using NHibernate.AdoNet;
+using NHibernate.Driver;
+using NHibernate.Engine;
+using NHibernate.SqlCommand;
+using NHibernate.SqlTypes;
+
+namespace Glimpse.NH.Plumbing.Profiler
+{
+ public class GlimpseProfileDbDriverNh330 : IGlimpseProfileDbDriver, IDriver, IEmbeddedBatcherFactoryProvider, ISqlParameterFormatter
+ {
+ private IDriver _innerDriver;
+ private ProviderStats _stats;
+
+ public void Wrap(object innerDriver)
+ {
+ if (innerDriver == null)
+ throw new ArgumentNullException("innerDriver");
+
+ _innerDriver = (IDriver)innerDriver;
+ _stats = new ProviderStats();
+ }
+
+ public void Configure(IDictionary<string, string> settings)
+ {
+ _innerDriver.Configure(settings);
+ }
+
+ public IDbConnection CreateConnection()
+ {
+ var innerConnection = _innerDriver.CreateConnection();
+ if (innerConnection is GlimpseProfileDbConnection)
+ return innerConnection;
+
+ var connection = new GlimpseProfileDbConnection(innerConnection as DbConnection, null, _stats, Guid.NewGuid());
+ return connection;
+ }
+
+ public IDbCommand GenerateCommand(CommandType type, SqlString sqlString, SqlType[] parameterTypes)
+ {
+ var innerCommand = _innerDriver.GenerateCommand(type, sqlString, parameterTypes);
+ if (innerCommand is GlimpseProfileDbCommand)
+ return innerCommand;
+
+ var command = new GlimpseProfileDbCommand(innerCommand as DbCommand, _stats);
+ return command;
+ }
+
+ public IDbDataParameter GenerateParameter(IDbCommand command, string name, SqlType sqlType)
+ {
+ var parameter = _innerDriver.GenerateParameter(command, name, sqlType);
+ return parameter;
+ }
+
+ public void RemoveUnusedCommandParameters(IDbCommand cmd, SqlString sqlString)
+ {
+ _innerDriver.RemoveUnusedCommandParameters(cmd, sqlString);
+ }
+
+ public void ExpandQueryParameters(IDbCommand cmd, SqlString sqlString)
+ {
+ _innerDriver.ExpandQueryParameters(cmd, sqlString);
+ }
+
+ public IResultSetsCommand GetResultSetsCommand(ISessionImplementor session)
+ {
+ return _innerDriver.GetResultSetsCommand(session);
+ }
+
+ public void AdjustCommand(IDbCommand command)
+ {
+ _innerDriver.AdjustCommand(command);
+ }
+
+ public void PrepareCommand(IDbCommand command)
+ {
+ _innerDriver.PrepareCommand(command);
+ }
+
+ public bool SupportsMultipleOpenReaders
+ {
+ get { return _innerDriver.SupportsMultipleOpenReaders; }
+ }
+
+ public bool SupportsMultipleQueries
+ {
+ get { return _innerDriver.SupportsMultipleQueries; }
+ }
+
+ public Type BatcherFactoryClass
+ {
+ get
+ {
+ var innerBatcherFactoryProvider = _innerDriver as IEmbeddedBatcherFactoryProvider;
+ return innerBatcherFactoryProvider != null ? innerBatcherFactoryProvider.BatcherFactoryClass : null;
+ }
+ }
+
+ public string GetParameterName(int index)
+ {
+ var innerSqlParameterFormatter = _innerDriver as ISqlParameterFormatter;
+ return innerSqlParameterFormatter != null ? innerSqlParameterFormatter.GetParameterName(index) : null;
+ }
+ }
+}
View
111 source/Glimpse.NH/Plumbing/Profiler/GlimpseProfileDbDriverNh331.cs
@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.Common;
+using Glimpse.Ado.Plumbing;
+using Glimpse.Ado.Plumbing.Profiler;
+using Glimpse.NH.Plumbing.Profiler;
+using NHibernate.AdoNet;
+using NHibernate.Driver;
+using NHibernate.Engine;
+using NHibernate.SqlCommand;
+using NHibernate.SqlTypes;
+
+namespace Glimpse.NH.Plumbing.Profiler
+{
+ public class GlimpseProfileDbDriverNh331 : IGlimpseProfileDbDriver, IDriver, IEmbeddedBatcherFactoryProvider, ISqlParameterFormatter
+ {
+ private IDriver _innerDriver;
+ private ProviderStats _stats;
+
+ public void Wrap(object innerDriver)
+ {
+ if (innerDriver == null)
+ throw new ArgumentNullException("innerDriver");
+
+ _innerDriver = (IDriver)innerDriver;
+ _stats = new ProviderStats();
+ }
+
+ public void Configure(IDictionary<string, string> settings)
+ {
+ _innerDriver.Configure(settings);
+ }
+
+ public IDbConnection CreateConnection()
+ {
+ var innerConnection = _innerDriver.CreateConnection();
+ if (innerConnection is GlimpseProfileDbConnection)
+ return innerConnection;
+
+ var connection = new GlimpseProfileDbConnection(innerConnection as DbConnection, null, _stats, Guid.NewGuid());
+ return connection;
+ }
+
+ public IDbCommand GenerateCommand(CommandType type, SqlString sqlString, SqlType[] parameterTypes)
+ {
+ var innerCommand = _innerDriver.GenerateCommand(type, sqlString, parameterTypes);
+ if (innerCommand is GlimpseProfileDbCommand)
+ return innerCommand;
+
+ var command = new GlimpseProfileDbCommand(innerCommand as DbCommand, _stats);
+ return command;
+ }
+
+ public IDbDataParameter GenerateParameter(IDbCommand command, string name, SqlType sqlType)
+ {
+ var parameter = _innerDriver.GenerateParameter(command, name, sqlType);
+ return parameter;
+ }
+
+ public void RemoveUnusedCommandParameters(IDbCommand cmd, SqlString sqlString)
+ {
+ _innerDriver.RemoveUnusedCommandParameters(cmd, sqlString);
+ }
+
+ public void ExpandQueryParameters(IDbCommand cmd, SqlString sqlString)
+ {
+ _innerDriver.ExpandQueryParameters(cmd, sqlString);
+ }
+
+ public IResultSetsCommand GetResultSetsCommand(ISessionImplementor session)
+ {
+ return _innerDriver.GetResultSetsCommand(session);
+ }
+
+ public void AdjustCommand(IDbCommand command)
+ {
+ _innerDriver.AdjustCommand(command);
+ }
+
+ public void PrepareCommand(IDbCommand command)
+ {
+ _innerDriver.PrepareCommand(command);
+ }
+
+ public bool SupportsMultipleOpenReaders
+ {
+ get { return _innerDriver.SupportsMultipleOpenReaders; }
+ }
+
+ public bool SupportsMultipleQueries
+ {
+ get { return _innerDriver.SupportsMultipleQueries; }
+ }
+
+ public Type BatcherFactoryClass
+ {
+ get
+ {
+ var innerBatcherFactoryProvider = _innerDriver as IEmbeddedBatcherFactoryProvider;
+ return innerBatcherFactoryProvider != null ? innerBatcherFactoryProvider.BatcherFactoryClass : null;
+ }
+ }
+
+ public string GetParameterName(int index)
+ {
+ var innerSqlParameterFormatter = _innerDriver as ISqlParameterFormatter;
+ return innerSqlParameterFormatter != null ? innerSqlParameterFormatter.GetParameterName(index) : null;
+ }
+ }
+}
View
22 source/Glimpse.Test.NH330/App.config
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<configuration>
+ <configSections>
+ <section name="glimpse" type="Glimpse.Core.Configuration.GlimpseConfiguration, Glimpse.Core" />
+ <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
+ </configSections>
+
+ <glimpse enabled="true" loggingEnabled="true" cacheEnabled="false" />
+
+ <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
+ <session-factory>
+ <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
+ <property name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver, NHibernate</property>
+ <property name="connection.connection_string">Data Source=Dummy.sdf;</property>
+ <property name="dialect">NHibernate.Dialect.MsSqlCeDialect</property>
+ </session-factory>
+ </hibernate-configuration>
+
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
+ </startup>
+</configuration>
View
BIN  source/Glimpse.Test.NH330/Dummy.sdf
Binary file not shown
View
112 source/Glimpse.Test.NH330/Glimpse.Test.Nh330.csproj
@@ -0,0 +1,112 @@
+<?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)' == '' ">x86</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2E12457F-0F9E-4487-9134-E3136E13F159}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Glimpse.Test.NH330</RootNamespace>
+ <AssemblyName>Glimpse.Test.Nh330</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>
+ </TargetFrameworkProfile>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <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|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup>
+ <StartupObject />
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Iesi.Collections">
+ <HintPath>..\..\lib\NHibernate\NH_330\Iesi.Collections.dll</HintPath>
+ </Reference>
+ <Reference Include="Moq">
+ <HintPath>..\..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
+ </Reference>
+ <Reference Include="NHibernate">
+ <HintPath>..\..\lib\NHibernate\NH_330\NHibernate.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework">
+ <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.Data" />
+ <Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\..\packages\SqlServerCompact.4.0.8482.1\lib\System.Data.SqlServerCe.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType_for_NH330.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="When_the_WrapDbDriver_is_told_to_Inject_for_NH330.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Glimpse.Ado\Glimpse.Ado.csproj">
+ <Project>{4C993B73-D03A-4080-B31E-C04F23372997}</Project>
+ <Name>Glimpse.Ado</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Glimpse.Core\Glimpse.Core.csproj">
+ <Project>{21F99168-7D7B-49F2-A97C-5A983E0CA16F}</Project>
+ <Name>Glimpse.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Glimpse.NH\Glimpse.Nh.csproj">
+ <Project>{9339BA0C-9735-4356-A309-0B0DFD58D0BF}</Project>
+ <Name>Glimpse.Nh</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Glimpse.Test.NH\Glimpse.Test.Nh.csproj">
+ <Project>{C3FFC5EF-D6BB-4854-B875-C996960E4CE8}</Project>
+ <Name>Glimpse.Test.Nh</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Dummy.sdf">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PostBuildEvent>
+if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
+xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"
+if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
+xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"</PostBuildEvent>
+ </PropertyGroup>
+ <!-- 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>
View
35 source/Glimpse.Test.NH330/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Glimpse.Test.NH330")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Glimpse.Test.Nh330")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("7c1de50d-85b4-42ed-a574-2006809d46af")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
10 ...Glimpse.Test.NH330/When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType_for_NH330.cs
@@ -0,0 +1,10 @@
+using Glimpse.Test.NH;
+using NUnit.Framework;
+
+namespace Glimpse.Test.NH330
+{
+ [TestFixture]
+ public class When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType_for_NH330 : When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType
+ {
+ }
+}
View
17 source/Glimpse.Test.NH330/When_the_WrapDbDriver_is_told_to_Inject_for_NH330.cs
@@ -0,0 +1,17 @@
+using Glimpse.Test.NH;
+using NHibernate.Cfg;
+using NUnit.Framework;
+
+namespace Glimpse.Test.NH330
+{
+ [TestFixture]
+ public class When_the_WrapDbDriver_is_told_to_Inject_for_NH330 : When_the_WrapDbDriver_is_told_to_Inject
+ {
+ protected override void BuildSessionFactory()
+ {
+ new Configuration()
+ .Configure()
+ .BuildSessionFactory();
+ }
+ }
+}
View
6 source/Glimpse.Test.NH330/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Moq" version="4.0.10827" />
+ <package id="NUnit" version="2.5.10.11092" />
+ <package id="SqlServerCompact" version="4.0.8482.1" />
+</packages>
View
22 source/Glimpse.Test.NH331/App.config
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<configuration>
+ <configSections>
+ <section name="glimpse" type="Glimpse.Core.Configuration.GlimpseConfiguration, Glimpse.Core" />
+ <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
+ </configSections>
+
+ <glimpse enabled="true" loggingEnabled="true" cacheEnabled="false" />
+
+ <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
+ <session-factory>
+ <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
+ <property name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver, NHibernate</property>
+ <property name="connection.connection_string">Data Source=Dummy.sdf;</property>
+ <property name="dialect">NHibernate.Dialect.MsSqlCeDialect</property>
+ </session-factory>
+ </hibernate-configuration>
+
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
+ </startup>
+</configuration>
View
BIN  source/Glimpse.Test.NH331/Dummy.sdf
Binary file not shown
View
98 source/Glimpse.Test.NH331/Glimpse.Test.NH331.csproj
@@ -0,0 +1,98 @@
+<?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>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B0D8EAD8-15C0-4032-98F5-2B0F592E1DBA}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Glimpse.Test.NH331</RootNamespace>
+ <AssemblyName>Glimpse.Test.Nh331</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </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>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType_for_NH330.cs" />
+ <Compile Include="When_the_WrapDbDriver_is_told_to_Inject_for_NH330.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Glimpse.Ado\Glimpse.Ado.csproj">
+ <Project>{4C993B73-D03A-4080-B31E-C04F23372997}</Project>
+ <Name>Glimpse.Ado</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Glimpse.Core\Glimpse.Core.csproj">
+ <Project>{21F99168-7D7B-49F2-A97C-5A983E0CA16F}</Project>
+ <Name>Glimpse.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Glimpse.NH\Glimpse.Nh.csproj">
+ <Project>{9339BA0C-9735-4356-A309-0B0DFD58D0BF}</Project>
+ <Name>Glimpse.Nh</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Glimpse.Test.NH\Glimpse.Test.Nh.csproj">
+ <Project>{C3FFC5EF-D6BB-4854-B875-C996960E4CE8}</Project>
+ <Name>Glimpse.Test.Nh</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="Iesi.Collections">
+ <HintPath>..\..\lib\NHibernate\NH_331\Iesi.Collections.dll</HintPath>
+ </Reference>
+ <Reference Include="Moq">
+ <HintPath>..\..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
+ </Reference>
+ <Reference Include="NHibernate">
+ <HintPath>..\..\lib\NHibernate\NH_331\NHibernate.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework">
+ <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.Data" />
+ <Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\SqlServerCompact.4.0.8482.1\lib\System.Data.SqlServerCe.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Dummy.sdf">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\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>
View
36 source/Glimpse.Test.NH331/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Glimpse.Test.NH331")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Glimpse.Test.NH331")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0c2b5f5d-22fe-46d0-89b5-5b1f30418629")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
10 ...Glimpse.Test.NH331/When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType_for_NH330.cs
@@ -0,0 +1,10 @@
+using Glimpse.Test.NH;
+using NUnit.Framework;
+
+namespace Glimpse.Test.NH331
+{
+ [TestFixture]
+ public class When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType_for_NH331 : When_the_GlimpseProfileDbDriverFactory_is_told_to_GetProfileDbDriverType
+ {
+ }
+}
View
17 source/Glimpse.Test.NH331/When_the_WrapDbDriver_is_told_to_Inject_for_NH330.cs
@@ -0,0 +1,17 @@
+using Glimpse.Test.NH;
+using NHibernate.Cfg;
+using NUnit.Framework;
+
+namespace Glimpse.Test.NH331
+{
+ [TestFixture]
+ public class When_the_WrapDbDriver_is_told_to_Inject_for_NH331 : When_the_WrapDbDriver_is_told_to_Inject
+ {
+ protected override void BuildSessionFactory()
+ {
+ new Configuration()
+ .Configure()
+ .BuildSessionFactory();
+ }
+ }
+}
View
6 source/Glimpse.Test.NH331/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Moq" version="4.0.10827" />
+ <package id="NUnit" version="2.5.10.11092" />
+ <package id="SqlServerCompact" version="4.0.8482.1" />
+</packages>
Something went wrong with that request. Please try again.