Skip to content

Commit

Permalink
Fix reporting SPLATDI001 for non-DI Register calls (#241)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
  • Loading branch information
Govorunb and ChrisPulman authored Sep 25, 2024
1 parent 47e4ad3 commit 30535f1
Show file tree
Hide file tree
Showing 14 changed files with 1,008 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//HintName: Splat.DI.Reg.g.cs

// <auto-generated />
namespace Splat
{
internal static partial class SplatRegistrations
{
static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
//HintName: Splat.DI.g.cs

// <auto-generated />
namespace Splat
{
/// <summary>
/// Extension methods for the Splat DI source generator.
/// </summary>
internal static partial class SplatRegistrations
{
/// <summary>
/// Registers a class with its concrete class.
/// </summary>
public static void Register<TInterface, TConcrete>()
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void Register<TInterface, TConcrete>(string contract)
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
public static void RegisterLazySingleton<TInterface, TConcrete>()
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="mode">The threading mode.</param>
public static void RegisterLazySingleton<TInterface, TConcrete>(System.Threading.LazyThreadSafetyMode mode)
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void RegisterLazySingleton<TInterface, TConcrete>(string contract)
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
/// <param name="mode">The threading mode.</param>
public static void RegisterLazySingleton<TInterface, TConcrete>(string contract, System.Threading.LazyThreadSafetyMode mode)
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
public static void Register<T>()
{
}


/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void Register<T>(string contract)
{
}

/// <summary>
/// Registers a lazy class with its concrete class.
/// </summary>
public static void RegisterLazySingleton<T>()
{
}


/// <summary>
/// Registers a lazy class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void RegisterLazySingleton<T>(string contract)
{
}

/// <summary>
/// Proxy for the Splat SetService.
/// </summary>
public static void RegisterConstant<T>(T instance) => Splat.Locator.CurrentMutable.RegisterConstant<T>(instance);

/// <summary>
/// Proxy for the Splat SetService.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void RegisterConstant<T>(T instance, string contract) => Splat.Locator.CurrentMutable.RegisterConstant<T>(instance, contract);

/// <summary>
/// Registers the registrations.
/// </summary>
public static void SetupIOC()
{
SetupIOCInternal(Splat.Locator.GetLocator());
}

/// <summary>
/// Registers the registrations.
/// </summary>
/// <param name="resolver">The resolver to register with.</param>
public static void SetupIOC(Splat.IDependencyResolver resolver)
{
SetupIOCInternal(resolver);
}


static partial void SetupIOCInternal(Splat.IDependencyResolver resolver);
}

/// <summary>
/// Makes the property get added by the DI engine.
/// </summary>
[System.AttributeUsage(System.AttributeTargets.Property)]
internal class DependencyInjectionPropertyAttribute : System.Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="DependencyInjectionPropertyAttribute"/> class.
/// </summary>
public DependencyInjectionPropertyAttribute()
{
}
}

/// <summary>
/// Makes this the constructor used by the DI engine.
/// </summary>
[System.AttributeUsage(System.AttributeTargets.Constructor)]
internal class DependencyInjectionConstructorAttribute : System.Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="DependencyInjectionConstructorAttribute"/> class.
/// </summary>
public DependencyInjectionConstructorAttribute()
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//HintName: Splat.DI.Reg.g.cs

// <auto-generated />
namespace Splat
{
internal static partial class SplatRegistrations
{
static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
//HintName: Splat.DI.g.cs

// <auto-generated />
namespace Splat
{
/// <summary>
/// Extension methods for the Splat DI source generator.
/// </summary>
internal static partial class SplatRegistrations
{
/// <summary>
/// Registers a class with its concrete class.
/// </summary>
public static void Register<TInterface, TConcrete>()
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void Register<TInterface, TConcrete>(string contract)
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
public static void RegisterLazySingleton<TInterface, TConcrete>()
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="mode">The threading mode.</param>
public static void RegisterLazySingleton<TInterface, TConcrete>(System.Threading.LazyThreadSafetyMode mode)
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void RegisterLazySingleton<TInterface, TConcrete>(string contract)
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
/// <param name="mode">The threading mode.</param>
public static void RegisterLazySingleton<TInterface, TConcrete>(string contract, System.Threading.LazyThreadSafetyMode mode)
{
}

/// <summary>
/// Registers a class with its concrete class.
/// </summary>
public static void Register<T>()
{
}


/// <summary>
/// Registers a class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void Register<T>(string contract)
{
}

/// <summary>
/// Registers a lazy class with its concrete class.
/// </summary>
public static void RegisterLazySingleton<T>()
{
}


/// <summary>
/// Registers a lazy class with its concrete class.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void RegisterLazySingleton<T>(string contract)
{
}

/// <summary>
/// Proxy for the Splat SetService.
/// </summary>
public static void RegisterConstant<T>(T instance) => Splat.Locator.CurrentMutable.RegisterConstant<T>(instance);

/// <summary>
/// Proxy for the Splat SetService.
/// </summary>
/// <param name="contract">Optional contract.</param>
public static void RegisterConstant<T>(T instance, string contract) => Splat.Locator.CurrentMutable.RegisterConstant<T>(instance, contract);

/// <summary>
/// Registers the registrations.
/// </summary>
public static void SetupIOC()
{
SetupIOCInternal(Splat.Locator.GetLocator());
}

/// <summary>
/// Registers the registrations.
/// </summary>
/// <param name="resolver">The resolver to register with.</param>
public static void SetupIOC(Splat.IDependencyResolver resolver)
{
SetupIOCInternal(resolver);
}


static partial void SetupIOCInternal(Splat.IDependencyResolver resolver);
}

/// <summary>
/// Makes the property get added by the DI engine.
/// </summary>
[System.AttributeUsage(System.AttributeTargets.Property)]
internal class DependencyInjectionPropertyAttribute : System.Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="DependencyInjectionPropertyAttribute"/> class.
/// </summary>
public DependencyInjectionPropertyAttribute()
{
}
}

/// <summary>
/// Makes this the constructor used by the DI engine.
/// </summary>
[System.AttributeUsage(System.AttributeTargets.Constructor)]
internal class DependencyInjectionConstructorAttribute : System.Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="DependencyInjectionConstructorAttribute"/> class.
/// </summary>
public DependencyInjectionConstructorAttribute()
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//HintName: Splat.DI.Reg.g.cs

// <auto-generated />
namespace Splat
{
internal static partial class SplatRegistrations
{
static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
{
}
}
}
Loading

0 comments on commit 30535f1

Please sign in to comment.