Skip to content

Commit

Permalink
updated year in header
Browse files Browse the repository at this point in the history
  • Loading branch information
haf committed Jun 22, 2012
1 parent 8e1c142 commit 9fe512e
Show file tree
Hide file tree
Showing 159 changed files with 258 additions and 491 deletions.
2 changes: 0 additions & 2 deletions Castle.Transactions.sln
Expand Up @@ -5,8 +5,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
License.txt = License.txt
buildscripts\project_data.rb = buildscripts\project_data.rb
rakefile.rb = rakefile.rb
readme.md = readme.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Castle.Transactions.Tests", "src\Castle.Transactions.Tests\Castle.Transactions.Tests.csproj", "{67CDFD3A-450F-4CD4-9401-EF15361E2713}"
Expand Down
16 changes: 16 additions & 0 deletions Castle.Transactions.sln.DotSettings
@@ -0,0 +1,16 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">Copyright 2004-$CURRENT_YEAR$ Castle Project, Henrik Feldt &amp;contributors - https://github.com/castleproject&#xD;
&#xD;
Licensed under the Apache License, Version 2.0 (the "License");&#xD;
you may not use this file except in compliance with the License.&#xD;
You may obtain a copy of the License at&#xD;
&#xD;
http://www.apache.org/licenses/LICENSE-2.0&#xD;
&#xD;
Unless required by applicable law or agreed to in writing, software&#xD;
distributed under the License is distributed on an "AS IS" BASIS,&#xD;
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xD;
See the License for the specific language governing permissions and&#xD;
limitations under the License.&#xD;
</s:String></wpf:ResourceDictionary>
373 changes: 69 additions & 304 deletions Castle.Transactions.sln.DotSettings.user

Large diffs are not rendered by default.

@@ -1,4 +1,4 @@
// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
39 changes: 16 additions & 23 deletions src/Castle.Facilities.AutoTx/AutoTxFacility.cs
@@ -1,6 +1,4 @@
#region license

// Copyright 2004-2010 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -14,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#endregion

using Castle.Core.Logging;
using Castle.IO;
using Castle.IO.Internal;
using Castle.MicroKernel;
Expand All @@ -24,40 +21,35 @@
using Castle.MicroKernel.SubSystems.Naming;
using Castle.Transactions;
using Castle.Transactions.Activities;
using Castle.Transactions.Internal;
using Castle.Transactions.Helpers;
using Castle.Transactions.IO;
using NLog;

namespace Castle.Facilities.AutoTx
{
using Castle.Transactions.Helpers;

///<summary>
/// <para>A facility for automatically handling transactions using the lightweight
/// transaction manager. This facility does not depend on
/// any other facilities.</para>
/// <para>
/// Install the facility in your container with <code>c.AddFacility&lt;AutoTxFacility&gt;</code>
/// </para>
/// <para>A facility for automatically handling transactions using the lightweight
/// transaction manager. This facility does not depend on
/// any other facilities.</para> <para>Install the facility in your container with
/// <code>c.AddFacility&lt;AutoTxFacility&gt;</code>
/// </para>
///</summary>
public class AutoTxFacility : AbstractFacility
{
protected override void Init()
{
_Logger.Debug("initializing AutoTxFacility");
ILogger logger = NullLogger.Instance;
ILogger _Logger = NullLogger.Instance;

// check we have a logger factory
if (Kernel.HasComponent(typeof(ILoggerFactory)))
if (Kernel.HasComponent(typeof (ILoggerFactory)))
{
// get logger factory
var loggerFactory = Kernel.Resolve<ILoggerFactory>();
// get logger
logger = loggerFactory.Create(typeof(AutoTxFacility));
_Logger = loggerFactory.Create(typeof (AutoTxFacility));
}

if(logger.IsDebugEnabled)
logger.Debug("initializing AutoTxFacility");
if (_Logger.IsDebugEnabled)
_Logger.Debug("initializing AutoTxFacility");

Kernel.Register(
// the interceptor needs to be created for every method call
Expand Down Expand Up @@ -88,10 +80,11 @@ protected override void Init()
);

var componentInspector = new TransactionalComponentInspector();

Kernel.ComponentModelBuilder.AddContributor(componentInspector);

_Logger.Debug("inspecting previously registered components; this might throw if you have configured your components in the wrong way");
_Logger.Debug(
"inspecting previously registered components; this might throw if you have configured your components in the wrong way");

((INamingSubSystem) Kernel.GetSubSystem(SubSystemConstants.NamingKey))
.GetAllHandlers()
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.Facilities.AutoTx/ITransactionMetaInfoStore.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,4 +1,4 @@
// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project - http://www.castleproject.org/
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,20 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#endregion

using System;
using System.Diagnostics.Contracts;

using Castle.Transactions;

namespace Castle.Facilities.AutoTx.Lifestyles
{
/// <summary>
/// A lifestyle manager that resolves a fresh instance for every transaction. In my opinion, this
/// is the most semantically correct option of the two per-transaction lifestyle managers: it's possible
/// to audit your code to verify that sub-sequent calls to services don't start new transactions on their own.
/// With this lifestyle, code executing in other threads work as expected, as no instances are shared accross these
/// threads (this refers to the Fork=true option on the TransactionAttribute).
/// A lifestyle manager that resolves a fresh instance for every transaction. In my opinion, this is the most semantically correct option of the two per-transaction lifestyle managers: it's possible to audit your code to verify that sub-sequent calls to services don't start new transactions on their own. With this lifestyle, code executing in other threads work as expected, as no instances are shared accross these threads (this refers to the Fork=true option on the TransactionAttribute).
/// </summary>
public class PerTransactionLifestyleManager : PerTransactionLifestyleManagerBase
{
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.Facilities.AutoTx/Testing/IOResolveScope.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.Facilities.AutoTx/Testing/ResolveEx.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.Facilities.AutoTx/Testing/ResolveScope.cs
@@ -1,4 +1,4 @@
// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.Facilities.AutoTx/TransactionInterceptor.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.Facilities.AutoTx/TransactionalClassMetaInfo.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/Framework/StreamExtensions.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/InMemoryFileSystem_specs.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,4 +1,4 @@
// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/contexts/file_search_context.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/copying_files/locked_file.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/file_system.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/moving/directories.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/open_for_write/existing_file.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/open_for_write/non_existent_file.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/paths/directoryinfo_long_path.cs
@@ -1,4 +1,4 @@
// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/paths/file_names.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/renaming_files/locked_file.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/writing_content/using_append.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.IO.Tests/writing_content/using_opencreate.cs
@@ -1,6 +1,6 @@
#region license

// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2012 Castle Project, Henrik Feldt &contributors - https://github.com/castleproject
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 9fe512e

Please sign in to comment.