Permalink
Browse files

spaces to tabs convertion

sqlite binaries added to tests (they are installed by nuget install script)
  • Loading branch information...
1 parent 701f1ba commit e2eb83b91d3f63bcd6772ab36c3ff6160cbf4857 @akurdyukov akurdyukov committed Sep 9, 2012
@@ -147,10 +147,10 @@ public Maybe<IInterceptor> Interceptor
get { return Maybe.None<IInterceptor>(); }
}
- public Configuration Config
- {
- get { return new ExampleInstaller().Config; }
- }
+ public Configuration Config
+ {
+ get { return new ExampleInstaller().Config; }
+ }
public void Registered(ISessionFactory factory)
{
@@ -175,10 +175,10 @@ public Maybe<IInterceptor> Interceptor
get { return Maybe.None<IInterceptor>(); }
}
- public Configuration Config
- {
- get { return new ExampleInstaller().Config; }
- }
+ public Configuration Config
+ {
+ get { return new ExampleInstaller().Config; }
+ }
public void Registered(ISessionFactory factory)
{
@@ -203,10 +203,10 @@ public Maybe<IInterceptor> Interceptor
get { return Maybe.None<IInterceptor>(); }
}
- public Configuration Config
- {
- get { return new ExampleInstaller().Config; }
- }
+ public Configuration Config
+ {
+ get { return new ExampleInstaller().Config; }
+ }
public void Registered(ISessionFactory factory)
{
@@ -44,12 +44,12 @@ public Maybe<IInterceptor> Interceptor
get { return interceptor; }
}
- public global::NHibernate.Cfg.Configuration Config
- {
- get { return BuildFluent().BuildConfiguration(); }
- }
+ public global::NHibernate.Cfg.Configuration Config
+ {
+ get { return BuildFluent().BuildConfiguration(); }
+ }
- public bool IsDefault
+ public bool IsDefault
{
get { return true; }
}
Binary file not shown.
Binary file not shown.
@@ -15,12 +15,12 @@
namespace Castle.Facilities.NHibernate
{
- using System.Diagnostics.Contracts;
+ using System.Diagnostics.Contracts;
using Transactions;
- using global::NHibernate.Cfg;
- using global::NHibernate;
+ using global::NHibernate.Cfg;
+ using global::NHibernate;
/// <summary>
/// Register a bunch of these; one for each database.
@@ -44,16 +44,16 @@ public interface INHibernateInstaller
/// </summary>
Maybe<IInterceptor> Interceptor { get; }
- /// <summary>
- /// Returns NHibernate configuration
- /// </summary>
- Configuration Config { get; }
-
- /// <summary>
- /// Call-back to the installer, when the factory is registered
- /// and correctly set up in Windsor..
- /// </summary>
- /// <param name = "factory"></param>
- void Registered(ISessionFactory factory);
+ /// <summary>
+ /// Returns NHibernate configuration
+ /// </summary>
+ Configuration Config { get; }
+
+ /// <summary>
+ /// Call-back to the installer, when the factory is registered
+ /// and correctly set up in Windsor..
+ /// </summary>
+ /// <param name = "factory"></param>
+ void Registered(ISessionFactory factory);
}
}
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -49,14 +49,14 @@ public Maybe<IInterceptor> Interceptor
}
}
- public Configuration Config
- {
- get
- {
- Contract.Ensures(Contract.Result<Configuration>() != null);
- throw new NotImplementedException();
- }
- }
+ public Configuration Config
+ {
+ get
+ {
+ Contract.Ensures(Contract.Result<Configuration>() != null);
+ throw new NotImplementedException();
+ }
+ }
public void Registered(ISessionFactory factory)
{
@@ -237,7 +237,7 @@ protected override void Init()
private IRegistration RegisterStatelessSession(Data x, uint index)
{
Contract.Requires(index < 3,
- "there are only three supported lifestyles; per transaction, per web request and transient");
+ "there are only three supported lifestyles; per transaction, per web request and transient");
Contract.Requires(x != null);
Contract.Ensures(Contract.Result<IRegistration>() != null);
@@ -250,7 +250,7 @@ private IRegistration RegisterStatelessSession(Data x, uint index)
private IRegistration RegisterSession(Data x, uint index)
{
Contract.Requires(index < 3,
- "there are only three supported lifestyles; per transaction, per web request and transient");
+ "there are only three supported lifestyles; per transaction, per web request and transient");
Contract.Requires(x != null);
Contract.Ensures(Contract.Result<IRegistration>() != null);
@@ -270,7 +270,7 @@ private ComponentRegistration<T> GetLifeStyle<T>(ComponentRegistration<T> regist
where T : class
{
Contract.Requires(index < 3,
- "there are only three supported lifestyles; per transaction, per web request and transient");
+ "there are only three supported lifestyles; per transaction, per web request and transient");
Contract.Ensures(Contract.Result<ComponentRegistration<T>>() != null);
switch (defaultLifeStyle)
@@ -290,20 +290,20 @@ private ComponentRegistration<T> GetLifeStyle<T>(ComponentRegistration<T> regist
return registration.Named(baseName + SessionPerTxSuffix).LifeStyle.PerTopTransaction();
if (index == 2)
return registration.Named(baseName + SessionTransientSuffix).LifeStyle.Transient;
- break;
- case DefaultSessionLifeStyleOption.SessionTransient:
+ break;
+ case DefaultSessionLifeStyleOption.SessionTransient:
if (index == 0)
return registration.Named(baseName + SessionTransientSuffix).LifeStyle.Transient;
if (index == 1)
return registration.Named(baseName + SessionPerTxSuffix).LifeStyle.PerTopTransaction();
if (index == 2)
return registration.Named(baseName + SessionPWRSuffix).LifeStyle.PerWebRequest;
- break;
- default:
+ break;
+ default:
throw new FacilityException("Unknown default life style - please file a bug report");
}
- throw new FacilityException("Invalid index passed to GetLifeStyle<T> - please file a bug report");
- }
+ throw new FacilityException("Invalid index passed to GetLifeStyle<T> - please file a bug report");
+ }
private class Data
{
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,32 +17,32 @@
namespace NHibernate.AttrExampleConsoleApp
{
- [Serializable]
- [Class(Table = "LOGLINES")]
- public class LogLine
- {
- /// <summary>
- /// Gets the ID of the line in the log.
- /// </summary>
- [Id(Name = "Id", Column = "ID")]
- [Generator(1, Class = "guid.comb")]
- public virtual Guid Id { get; protected set; }
+ [Serializable]
+ [Class(Table = "LOGLINES")]
+ public class LogLine
+ {
+ /// <summary>
+ /// Gets the ID of the line in the log.
+ /// </summary>
+ [Id(Name = "Id", Column = "ID")]
+ [Generator(1, Class = "guid.comb")]
+ public virtual Guid Id { get; protected set; }
- /// <summary>
- /// Gets the log-line.
- /// </summary>
- [Property(Column = "LINE", NotNull = true, TypeType = typeof(string))]
- public virtual string Line { get; protected set; }
+ /// <summary>
+ /// Gets the log-line.
+ /// </summary>
+ [Property(Column = "LINE", NotNull = true, TypeType = typeof(string))]
+ public virtual string Line { get; protected set; }
- /// <summary> for serialization </summary>
- [Obsolete("for serialization")]
- protected LogLine()
- {
- }
+ /// <summary> for serialization </summary>
+ [Obsolete("for serialization")]
+ protected LogLine()
+ {
+ }
- public LogLine(string line)
- {
- Line = line;
- }
- }
+ public LogLine(string line)
+ {
+ Line = line;
+ }
+ }
}
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,34 +17,34 @@
namespace NHibernate.AttrExampleConsoleApp
{
- public class Logger
- {
- private readonly Func<ISession> getSession;
+ public class Logger
+ {
+ private readonly Func<ISession> getSession;
- public Logger(Func<ISession> getSession)
- {
- this.getSession = getSession;
- }
+ public Logger(Func<ISession> getSession)
+ {
+ this.getSession = getSession;
+ }
- [Transaction]
- public virtual void WriteToLog(string text)
- {
- using (var s = getSession())
- {
- s.Save(new LogLine(text));
- }
- }
+ [Transaction]
+ public virtual void WriteToLog(string text)
+ {
+ using (var s = getSession())
+ {
+ s.Save(new LogLine(text));
+ }
+ }
- [Transaction]
- public virtual void ReadLog(Action<string> reader)
- {
- using (var s = getSession())
- {
- foreach (var line in s.CreateCriteria<LogLine>().List<LogLine>())
- {
- reader(line.Line);
- }
- }
- }
- }
+ [Transaction]
+ public virtual void ReadLog(Action<string> reader)
+ {
+ using (var s = getSession())
+ {
+ foreach (var line in s.CreateCriteria<LogLine>().List<LogLine>())
+ {
+ reader(line.Line);
+ }
+ }
+ }
+ }
}
Oops, something went wrong.

0 comments on commit e2eb83b

Please sign in to comment.