-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace GraphQL.DI | ||
{ | ||
/// <summary> | ||
/// Marks a method's return graph type to be a specified DI graph type. | ||
/// Useful when the return type cannot be inferred (often when it is of type <see cref="object"/>). | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method, Inherited = false)] | ||
public class DIGraphAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Marks a method's return graph type to be a specified DI graph type. | ||
/// </summary> | ||
/// <param name="graphBaseType">A type that inherits <see cref="DIObjectGraphBase"/>.</param> | ||
public DIGraphAttribute(Type graphBaseType) | ||
{ | ||
GraphBaseType = graphBaseType; | ||
} | ||
|
||
/// <summary> | ||
/// The DI graph type that inherits <see cref="DIObjectGraphBase"/>. | ||
/// </summary> | ||
public Type GraphBaseType { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters