Skip to content

Commit

Permalink
Use 'Key' instead of 'Name' in InjectAttribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
Codespilot committed Sep 21, 2024
1 parent 70cdcf3 commit 9425f1b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/Euonia.Modularity/Dependency/InjectAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
namespace System;

/// <summary>
/// Indicate that the property or parameter would resolved from service container.
/// Indicate that the property or parameter would resolve from service container.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property)]
public class InjectAttribute : Attribute
{
/// <summary>
/// Initialize a new instance of <see cref="InjectAttribute"/>.
/// </summary>
/// <param name="name"></param>
public InjectAttribute(string name = null)
/// <param name="key">An object that specifies the key of service object to get.</param>
public InjectAttribute(object key = null)
{
Name = name;
Key = key;
}

/// <summary>
/// Specified the service name or service type name.
/// An object that specifies the key of service object to get.
/// </summary>
public string Name { get; }
public object Key { get; }
}

0 comments on commit 9425f1b

Please sign in to comment.