Skip to content

Commit

Permalink
Merge pull request #41 from JSkimming/internalize
Browse files Browse the repository at this point in the history
Made all the registrations and compositions internal
  • Loading branch information
JSkimming authored May 30, 2017
2 parents c47faa1 + d549c0d commit 093559b
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/Abioc/Composition/Compositions/CompositionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Abioc.Composition.Compositions
/// <summary>
/// A base class that provides a default implementation of a <see cref="IComposition"/>.
/// </summary>
public abstract class CompositionBase : IComposition
internal abstract class CompositionBase : IComposition
{
/// <inheritdoc />
public abstract Type Type { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Abioc.Composition.Compositions
/// <summary>
/// A composition to produce code to create a class via a constructor.
/// </summary>
public class ConstructorComposition : CompositionBase
internal class ConstructorComposition : CompositionBase
{
private readonly List<IParameterExpression> _parameterExpressions;

Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Composition/Compositions/FactoryComposition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Abioc.Composition.Compositions
/// <summary>
/// A composition to produce code to create a factory field.
/// </summary>
public class FactoryComposition : CompositionBase
internal class FactoryComposition : CompositionBase
{
/// <summary>
/// Initializes a new instance of the <see cref="FactoryComposition"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Abioc.Composition.Compositions
/// A composition to produce code for a injected value.
/// </summary>
/// <typeparam name="TImplementation">The type of the injected <see cref="Value"/>.</typeparam>
public class InjectedSingletonComposition<TImplementation> : CompositionBase
internal class InjectedSingletonComposition<TImplementation> : CompositionBase
{
/// <summary>
/// Initializes a new instance of the <see cref="InjectedSingletonComposition{TImplementation}"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Abioc.Composition.Compositions
/// <summary>
/// A composition to produce code for property dependency injection.
/// </summary>
public class PropertyDependencyComposition : IComposition
internal class PropertyDependencyComposition : IComposition
{
private static readonly string NewLine = Environment.NewLine;

Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Composition/Compositions/SingletonComposition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Abioc.Composition.Compositions
/// <summary>
/// A composition to produce code for a singleton value.
/// </summary>
public class SingletonComposition : IComposition
internal class SingletonComposition : IComposition
{
private static readonly string NewLine = Environment.NewLine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Abioc.Composition.Compositions
/// A composition to produce code to create a factory field.
/// </summary>
/// <typeparam name="TImplementation">The type of instance produced by the <see cref="Factory"/>.</typeparam>
public class TypedFactoryComposition<TImplementation> : CompositionBase
internal class TypedFactoryComposition<TImplementation> : CompositionBase
{
/// <summary>
/// Initializes a new instance of the <see cref="TypedFactoryComposition{TImplementation}"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Registration/FactoryRegistration.WithContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Abioc.Registration
/// The type of the <see cref="ConstructionContext{TExtra}.Extra"/> construction context information.
/// </typeparam>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class FactoryRegistration<TExtra> : RegistrationBase
internal class FactoryRegistration<TExtra> : RegistrationBase
{
/// <summary>
/// Initializes a new instance of the <see cref="FactoryRegistration{TExtra}"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Registration/FactoryRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Abioc.Registration
/// <see cref="IRegistration.ImplementationType"/> through a factory function.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class FactoryRegistration : RegistrationBase
internal class FactoryRegistration : RegistrationBase
{
/// <summary>
/// Initializes a new instance of the <see cref="FactoryRegistration"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Registration/InjectedSingletonRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Abioc.Registration
/// </summary>
/// <typeparam name="TImplementation">The <see cref="IRegistration.ImplementationType"/>.</typeparam>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class InjectedSingletonRegistration<TImplementation> : RegistrationBase
internal class InjectedSingletonRegistration<TImplementation> : RegistrationBase
{
/// <summary>
/// Initializes a new instance of the <see cref="InjectedSingletonRegistration{TImplementation}"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Registration/PropertyDependencyRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Abioc.Registration
/// A <see cref="IRegistration"/> entry that produces the code to use a injected constant value.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class PropertyDependencyRegistration : RegistrationBase
internal class PropertyDependencyRegistration : RegistrationBase
{
private readonly List<LambdaExpression> _propertyExpressions;

Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Registration/RegistrationBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Abioc.Registration
/// <summary>
/// A base class that provides a default implementation of a <see cref="IRegistration"/>.
/// </summary>
public abstract class RegistrationBase : IRegistration
internal abstract class RegistrationBase : IRegistration
{
/// <inheritdoc />
public abstract Type ImplementationType { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Registration/SingleConstructorRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Abioc.Registration
/// <see cref="IRegistration.ImplementationType"/> using a single public constructor.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class SingleConstructorRegistration : RegistrationBase
internal class SingleConstructorRegistration : RegistrationBase
{
/// <summary>
/// Initializes a new instance of the <see cref="SingleConstructorRegistration"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Registration/SingletonRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Abioc.Registration
/// <see cref="IRegistration.ImplementationType"/> through a factory function.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class SingletonRegistration : RegistrationBase
internal class SingletonRegistration : RegistrationBase
{
/// <summary>
/// Initializes a new instance of the <see cref="SingletonRegistration"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Abioc.Registration
/// </typeparam>
/// <typeparam name="TImplementation">The <see cref="IRegistration.ImplementationType"/>.</typeparam>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class TypedFactoryRegistration<TExtra, TImplementation> : RegistrationBase
internal class TypedFactoryRegistration<TExtra, TImplementation> : RegistrationBase
{
/// <summary>
/// Initializes a new instance of the <see cref="TypedFactoryRegistration{TExtra, ImplementationType}"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Abioc/Registration/TypedFactoryRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Abioc.Registration
/// </summary>
/// <typeparam name="TImplementation">The <see cref="IRegistration.ImplementationType"/>.</typeparam>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class TypedFactoryRegistration<TImplementation> : RegistrationBase
internal class TypedFactoryRegistration<TImplementation> : RegistrationBase
{
/// <summary>
/// Initializes a new instance of the <see cref="TypedFactoryRegistration{TImplementation}"/> class.
Expand Down
23 changes: 22 additions & 1 deletion test/Abioc.Tests.Internal/RequiresArgNullExAutoMoqAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Abioc
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Abioc.Composition.Compositions;
using Abioc.Generation;
using AutoTest.ArgNullEx;
using AutoTest.ArgNullEx.Xunit;
Expand Down Expand Up @@ -39,11 +40,31 @@ private static IArgumentNullExceptionFixture CreateFixture(Assembly assemblyUnde

fixture.Register<LambdaExpression>(fixture.Create<Expression<Action>>);
fixture.Register<GenerationContext>(fixture.Create<GenerationContextWrapper>);
fixture.Register<CompositionBase>(fixture.Create<TestComposition>);

var argNullFixture = new ArgumentNullExceptionFixture(assemblyUnderTest, fixture);

return argNullFixture;
}
}

private class TestComposition : CompositionBase
{
public override Type Type { get; }

public override string GetInstanceExpression(IGenerationContext context)
{
throw new NotImplementedException();
}

public override string GetComposeMethodName(IGenerationContext context)
{
throw new NotImplementedException();
}

public override bool RequiresConstructionContext(IGenerationContext context)
{
throw new NotImplementedException();
}
}
}
}

0 comments on commit 093559b

Please sign in to comment.