mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-09-13 12:43:17 +00:00
V3
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Title>Esiur ASP.Net Middleware</Title>
|
<Title>Esiur ASP.Net Middleware</Title>
|
||||||
@@ -25,11 +25,12 @@
|
|||||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.1" />
|
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
|
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
|
||||||
|
<PackageReference Include="System.Text.Encodings.Web" Version="4.7.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Esiur\Esiur.csproj" />
|
<ProjectReference Include="..\Esiur\Esiur.csproj" />
|
||||||
<None Include="README.md" Pack="true" PackagePath="\"/>
|
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Esiur\Esiur.csproj" />
|
<ProjectReference Include="..\Esiur\Esiur.csproj" />
|
||||||
<None Include="README.md" Pack="true" PackagePath="\"/>
|
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<AssemblyName>Esiur.Stores.EntityCore</AssemblyName>
|
<AssemblyName>Esiur.Stores.EntityCore</AssemblyName>
|
||||||
<Authors>Ahmed Kh. Zamil</Authors>
|
<Authors>Ahmed Kh. Zamil</Authors>
|
||||||
<Company>Esiur Foundation</Company>
|
<Company>Esiur Foundation</Company>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<Authors>Ahmed Kh. Zamil</Authors>
|
<Authors>Ahmed Kh. Zamil</Authors>
|
||||||
<Company>Esiur</Company>
|
<Company>Esiur</Company>
|
||||||
<Product>Esiur MongoDB Store</Product>
|
<Product>Esiur MongoDB Store</Product>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<Copyright>Ahmed Kh. Zamil</Copyright>
|
<Copyright>Ahmed Kh. Zamil</Copyright>
|
||||||
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
|
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
<Version>2.4.13</Version>
|
<Version>3.0.0</Version>
|
||||||
<RepositoryUrl>https://github.com/esiur/esiur-dotnet</RepositoryUrl>
|
<RepositoryUrl>https://github.com/esiur/esiur-dotnet</RepositoryUrl>
|
||||||
<Authors>Ahmed Kh. Zamil</Authors>
|
<Authors>Ahmed Kh. Zamil</Authors>
|
||||||
<AssemblyVersion></AssemblyVersion>
|
<AssemblyVersion></AssemblyVersion>
|
||||||
@@ -16,15 +16,16 @@
|
|||||||
<PackageId>Esiur</PackageId>
|
<PackageId>Esiur</PackageId>
|
||||||
<Product>Esiur</Product>
|
<Product>Esiur</Product>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
<IsRoslynComponent>true</IsRoslynComponent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
|
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
|
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
|
||||||
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
|
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
|
||||||
<PackageReference Include="System.Text.Json" Version="8.0.6" GeneratePathProperty="true" />
|
<PackageReference Include="System.Text.Json" Version="9.0.8" GeneratePathProperty="true" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017-2024 Esiur Foundation, Ahmed Kh. Zamil.
|
Copyright (c) 2017-2025 Esiur Foundation, Ahmed Kh. Zamil.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@@ -81,7 +81,7 @@ public partial class DistributedConnection : NetworkConnection, IStore
|
|||||||
// Fields
|
// Fields
|
||||||
bool invalidCredentials = false;
|
bool invalidCredentials = false;
|
||||||
|
|
||||||
Timer keepAliveTimer;
|
System.Timers.Timer keepAliveTimer;
|
||||||
DateTime? lastKeepAliveSent;
|
DateTime? lastKeepAliveSent;
|
||||||
DateTime? lastKeepAliveReceived;
|
DateTime? lastKeepAliveReceived;
|
||||||
|
|
||||||
@@ -362,12 +362,11 @@ public partial class DistributedConnection : NetworkConnection, IStore
|
|||||||
// set local nonce
|
// set local nonce
|
||||||
session.LocalHeaders[IIPAuthPacketHeader.Nonce] = Global.GenerateBytes(32);
|
session.LocalHeaders[IIPAuthPacketHeader.Nonce] = Global.GenerateBytes(32);
|
||||||
|
|
||||||
keepAliveTimer = new Timer(KeepAliveInterval * 1000);
|
keepAliveTimer = new System.Timers.Timer(KeepAliveInterval * 1000);
|
||||||
keepAliveTimer.Elapsed += KeepAliveTimer_Elapsed;
|
keepAliveTimer.Elapsed += KeepAliveTimer_Elapsed; ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void KeepAliveTimer_Elapsed(object? sender, ElapsedEventArgs e)
|
||||||
private void KeepAliveTimer_Elapsed(object sender, ElapsedEventArgs e)
|
|
||||||
{
|
{
|
||||||
if (!IsConnected)
|
if (!IsConnected)
|
||||||
return;
|
return;
|
||||||
|
@@ -174,17 +174,17 @@ $@" public partial class {ci.Name} : IResource {{
|
|||||||
|
|
||||||
classInfo = new ResourceClassInfo
|
classInfo = new ResourceClassInfo
|
||||||
(
|
(
|
||||||
Key: key,
|
key,
|
||||||
Name: cls.Name,
|
cls.Name,
|
||||||
ClassDeclaration: cds,
|
cds,
|
||||||
ClassSymbol: cls,
|
cls,
|
||||||
Fields: exportedFields,
|
exportedFields,
|
||||||
HasInterface: hasInterface,
|
hasInterface,
|
||||||
HasTrigger: hasTrigger
|
hasTrigger
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PerClass(importUrls, classInfo);
|
return new PerClass(classInfo, importUrls);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ImmutableArray<ResourceClassInfo> MergePartials(ImmutableArray<ResourceClassInfo> list)
|
private static ImmutableArray<ResourceClassInfo> MergePartials(ImmutableArray<ResourceClassInfo> list)
|
||||||
@@ -294,19 +294,39 @@ $@" public partial class {ci.Name} : IResource {{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// === Data carriers for the pipeline ===
|
// === Data carriers for the pipeline ===
|
||||||
private readonly record struct PerClass(
|
private readonly record struct PerClass {
|
||||||
ImmutableArray<string> ImportUrls,
|
public PerClass(ResourceClassInfo? classInfo, ImmutableArray<string> importUrls)
|
||||||
ResourceClassInfo? ClassInfo
|
{
|
||||||
);
|
this.ImportUrls = importUrls;
|
||||||
|
this.ClassInfo = classInfo;
|
||||||
|
}
|
||||||
|
|
||||||
private sealed record ResourceClassInfo(
|
public readonly ImmutableArray<string> ImportUrls;
|
||||||
string Key,
|
public readonly ResourceClassInfo? ClassInfo;
|
||||||
string Name,
|
}
|
||||||
ClassDeclarationSyntax ClassDeclaration,
|
|
||||||
ITypeSymbol ClassSymbol,
|
private sealed record ResourceClassInfo {
|
||||||
List<IFieldSymbol> Fields,
|
|
||||||
bool HasInterface,
|
public ResourceClassInfo(string key, string name ,
|
||||||
bool HasTrigger
|
ClassDeclarationSyntax classDeclaration,
|
||||||
);
|
ITypeSymbol classSymbol, List<IFieldSymbol> fileds, bool hasInterface, bool hasTrigger)
|
||||||
|
{
|
||||||
|
Key = key;
|
||||||
|
Name = name;
|
||||||
|
ClassDeclaration = classDeclaration;
|
||||||
|
ClassSymbol = classSymbol;
|
||||||
|
Fields = fileds;
|
||||||
|
HasInterface = hasInterface;
|
||||||
|
HasTrigger = hasTrigger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Key;
|
||||||
|
public string Name;
|
||||||
|
public ClassDeclarationSyntax ClassDeclaration;
|
||||||
|
public ITypeSymbol ClassSymbol;
|
||||||
|
public List<IFieldSymbol> Fields;
|
||||||
|
public bool HasInterface;
|
||||||
|
public bool HasTrigger;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -82,7 +82,7 @@ public static class ResourceProxy
|
|||||||
|
|
||||||
var props = from p in type.GetProperties()
|
var props = from p in type.GetProperties()
|
||||||
where p.CanWrite && p.GetSetMethod().IsVirtual &&
|
where p.CanWrite && p.GetSetMethod().IsVirtual &&
|
||||||
p.GetCustomAttributes(typeof(ResourceProperty), false).Count() > 0
|
p.GetCustomAttributes(typeof(ExportAttribute), false).Count() > 0
|
||||||
select p;
|
select p;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Reference in New Issue
Block a user