-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from calebjenkins/dev/feature-07-meta-objects
Update Dev WorkFlow - 1 push for 3 packages
- Loading branch information
Showing
22 changed files
with
439 additions
and
106 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
namespace Calebs.Data.KeyValueRepo; | ||
|
||
| ||
public interface IKeyValueRepo | ||
{ | ||
Task Update<T>(string key, T value) where T : class; | ||
Task<T?> Get<T>(string key) where T : class; | ||
Task<T?> Get<T>(int key) where T : class => Get<T>(key.ToString()); | ||
Task<IList<T>> GetAll<T>() where T : class; | ||
|
||
Task Update<T>(string key, T value) where T : class; | ||
Task Update<T>(int key, T value) where T : class => Update<T>(key.ToString(), value); | ||
Task<MetaObject<T>?> GetMeta<T>(string key) where T : class; | ||
Task<IList<MetaObject<T>>> GetHistory<T>(string key) where T : class; | ||
Task<IList<MetaObject<T>>> GetMetaAll<T>() where T : class; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Calebs.Data.KeyValueRepo; | ||
|
||
public static class KeyValueRepoExtensions | ||
{ | ||
public static Task<MetaObject<T>?> GetMeta<T>(this IKeyValueRepo repo, int key) where T : class => repo.GetMeta<T>(key.ToString()); | ||
public static Task<T?> Get<T>(this IKeyValueRepo repo, int key) where T : class => repo.Get<T>(key.ToString()); | ||
public static Task<IList<MetaObject<T>>?> GetHistory<T>(this IKeyValueRepo repo, int key) where T : class => repo.GetHistory<T>(key.ToString()); | ||
Check warning on line 7 in src/KeyValueRepo/KeyValueRepoExtensions.cs GitHub Actions / build
|
||
public static Task Update<T>(this IKeyValueRepo repo, int key, T value) where T : class => repo.Update<T>(key.ToString(), value); | ||
} |
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,9 @@ | ||
| ||
public class MetaObject<T> where T : class | ||
{ | ||
public string? CreatedBy { get; set; } | ||
public DateTime CreatedOn { get; set; } | ||
public string? UpdatedBy { get; init; } | ||
public DateTime UpdatedOn { get; init; } | ||
public T? Value { 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 +1,2 @@ | ||
global using Calebs.Extensions; | ||
global using Calebs.Extensions; | ||
global using System.Security.Claims; |
Oops, something went wrong.