-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add context to state + a little moving around. (#157)
* Context * Post merge clean. * Update client. Add support for context. Move things around a little. * Fix name, also in an attempt to re-run tests on build server.
- Loading branch information
Showing
21 changed files
with
346 additions
and
255 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace NetDaemon.Common.Fluent | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class Context | ||
{ | ||
/// <summary> | ||
/// Id | ||
/// </summary> | ||
public string Id { get; set; } = ""; | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public string? ParentId { get; set; } | ||
/// <summary> | ||
/// The id of the user who is responsible for the connected item. | ||
/// </summary> | ||
public string? UserId { 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
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,45 @@ | ||
using System; | ||
|
||
namespace NetDaemon.Common.Fluent | ||
{ | ||
/// <summary> | ||
/// Properties on entities that can be filtered in lambda expression | ||
/// </summary> | ||
public interface IEntityProperties | ||
{ | ||
/// <summary> | ||
/// Filter on area where the entity device are at | ||
/// </summary> | ||
string? Area { get; set; } | ||
|
||
/// <summary> | ||
/// Filter on attribute | ||
/// </summary> | ||
dynamic? Attribute { get; set; } | ||
|
||
/// <summary> | ||
/// Filter on unique id of the entity | ||
/// </summary> | ||
string EntityId { get; set; } | ||
|
||
/// <summary> | ||
/// Filter on last changed time | ||
/// </summary> | ||
DateTime LastChanged { get; set; } | ||
|
||
/// <summary> | ||
/// Filter on last updated time | ||
/// </summary> | ||
DateTime LastUpdated { get; set; } | ||
|
||
/// <summary> | ||
/// Filter on state | ||
/// </summary> | ||
dynamic? State { get; set; } | ||
|
||
/// <summary> | ||
/// Context | ||
/// </summary> | ||
public Context? Context { 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
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
Oops, something went wrong.