-
Notifications
You must be signed in to change notification settings - Fork 8
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
vahid
committed
May 9, 2024
1 parent
e628868
commit 9c0d149
Showing
226 changed files
with
9,040 additions
and
9,300 deletions.
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
using System; | ||
namespace Jinget.Core.Attributes; | ||
|
||
namespace Jinget.Core.Attributes | ||
/// <summary> | ||
/// This attribute are useful in scenarios like Service Hub, where prior to calling an API we need to authenticate it | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method)] | ||
public class AuthenticationRequiredAttribute(bool required) : Attribute | ||
{ | ||
/// <summary> | ||
/// This attribute are useful in scenarios like Service Hub, where prior to calling an API we need to authenticate it | ||
/// </summary> | ||
public class AuthenticationRequiredAttribute(bool required) : Attribute | ||
{ | ||
public bool Required { get; set; } = required; | ||
} | ||
public bool Required { get; set; } = required; | ||
} |
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 |
---|---|---|
@@ -1,19 +1,13 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
namespace Jinget.Core.Attributes; | ||
|
||
namespace Jinget.Core.Attributes | ||
/// <summary> | ||
/// Used for assigning claims for actions | ||
/// </summary> | ||
|
||
public class ClaimAttribute : AuthorizeAttribute | ||
{ | ||
/// <summary> | ||
/// Used for assigning claims for actions | ||
/// Gets or sets the claim title. | ||
/// </summary> | ||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. | ||
|
||
public class ClaimAttribute : AuthorizeAttribute | ||
{ | ||
/// <summary> | ||
/// Gets or sets the claim title. | ||
/// </summary> | ||
public string Title { get; set; } | ||
} | ||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. | ||
|
||
public required string Title { get; set; } | ||
} |
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 |
---|---|---|
@@ -1,16 +1,14 @@ | ||
using System; | ||
namespace Jinget.Core.Attributes; | ||
|
||
namespace Jinget.Core.Attributes | ||
/// <summary> | ||
/// Used for assigning custom configurations for entity properties | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)] | ||
public class EntityAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Used for assigning custom configurations for entity properties | ||
/// <summary> | ||
/// Gets or sets a value indicating whether the entity is used as an elastic search index or not. | ||
/// </summary> | ||
public class EntityAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating whether the entity is used as an elastic search index or not. | ||
/// </summary> | ||
/// <value><c>true</c> if [elastic search enabled]; otherwise, <c>false</c>.</value> | ||
public bool ElasticSearchEnabled { get; set; } | ||
} | ||
/// <value><c>true</c> if [elastic search enabled]; otherwise, <c>false</c>.</value> | ||
public bool ElasticSearchEnabled { get; set; } | ||
} |
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 |
---|---|---|
@@ -1,20 +1,18 @@ | ||
using System; | ||
namespace Jinget.Core.Attributes; | ||
|
||
namespace Jinget.Core.Attributes | ||
/// <summary> | ||
/// Manage Method Summary Attribute | ||
/// </summary> | ||
/// <remarks> | ||
/// provide method summary for using in access management | ||
/// </remarks> | ||
/// <param name="description"></param> | ||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] | ||
public class SummaryAttribute(string description) : Attribute | ||
{ | ||
|
||
/// <summary> | ||
/// Manage Method Summary Attribute | ||
/// Action's description. this value will be shown to the end user | ||
/// </summary> | ||
/// <remarks> | ||
/// provide method summary for using in access management | ||
/// </remarks> | ||
/// <param name="description"></param> | ||
public class SummaryAttribute(string description) : Attribute | ||
{ | ||
|
||
/// <summary> | ||
/// Action's description. this value will be shown to the end user | ||
/// </summary> | ||
public string Description { get; set; } = description; | ||
} | ||
public string Description { get; set; } = description; | ||
} |
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 |
---|---|---|
@@ -1,7 +1,4 @@ | ||
using System; | ||
namespace Jinget.Core.Attributes; | ||
|
||
namespace Jinget.Core.Attributes | ||
{ | ||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)] | ||
public class SwaggerExcludeAttribute : Attribute { } | ||
} | ||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)] | ||
public class SwaggerExcludeAttribute : Attribute { } |
Oops, something went wrong.