轻量级动态框架 ImpromptuInterface

使用NuGet包安装ImpromptuInterface 一个轻量级的C#动态框架。ImpromptuInterface轻松将动态对象和接口绑定起来,从而直接利用接口中提供的属性和方法。使用示例程序:

  1. namespace ImpromptuExample {
  2. class Program {
  3. static void Main(string[] args) {
  4. dynamic expando = new ExpandoObject();
  5. expando.Name = "Albert";
  6. expando.Age = "24";
  7. expando.GetAge = (Func<int>)(() => { return 24; });
  8. expando.Prop1 = "WPF";
  9. //Improptu.ActLike动态实现继承接口的对象
  10. IMyInterface myInterface = Impromptu.ActLike(expando);
  11. Console.WriteLine(expando.Age);
  12. Console.WriteLine(expando.GetAge);
  13. Console.WriteLine(myInterface.Prop1);
  14. Console.ReadLine();
  15. }
  16. }
  17. public interface IMyInterface {
  18. string Prop1 { get; }
  19. long Prop2 { get; }
  20. Guid Prop3 { get; }
  21. bool Meth1(int x);
  22. }
  23. }

定时任务 Hangfire

https://www.hangfire.io/

SqlSugar ORM

https://www.donet5.com/Home/Doc