mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-05-06 11:32:59 +00:00
await
This commit is contained in:
parent
264c1e1cd8
commit
b57352b013
@ -31,18 +31,18 @@ var webSocketOptions = new WebSocketOptions()
|
|||||||
app.UseWebSockets(webSocketOptions);
|
app.UseWebSockets(webSocketOptions);
|
||||||
|
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
//// Configure the HTTP request pipeline.
|
||||||
if (app.Environment.IsDevelopment())
|
//if (app.Environment.IsDevelopment())
|
||||||
{
|
//{
|
||||||
app.UseSwagger();
|
// app.UseSwagger();
|
||||||
app.UseSwaggerUI();
|
// app.UseSwaggerUI();
|
||||||
}
|
//}
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
//app.UseHttpsRedirection();
|
||||||
|
|
||||||
app.UseAuthorization();
|
//app.UseAuthorization();
|
||||||
|
|
||||||
app.MapControllers();
|
//app.MapControllers();
|
||||||
|
|
||||||
|
|
||||||
await Warehouse.Put("sys", new MemoryStore());
|
await Warehouse.Put("sys", new MemoryStore());
|
||||||
|
@ -1,9 +1,22 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<Description>Esiur distributed resource framework support for ASP.Net</Description>
|
||||||
|
<Copyright>Ahmed Kh. Zamil</Copyright>
|
||||||
|
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<Authors>Ahmed Kh. Zamil</Authors>
|
||||||
|
<Company>Esiur Foundation</Company>
|
||||||
|
|
||||||
|
<PackageLicenseUrl>https://github.com/Esiur/Esiur-dotnet/blob/master/LICENSE</PackageLicenseUrl>
|
||||||
|
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
|
||||||
|
<RepositoryUrl>https://github.com/esiur/esiur-dotnet/</RepositoryUrl>
|
||||||
|
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<Title>Esiur ASP.Net Middleware</Title>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -18,7 +18,8 @@ namespace Esiur.AspNetCore
|
|||||||
{
|
{
|
||||||
var buffer = new ArraySegment<byte>(new byte[10240]);
|
var buffer = new ArraySegment<byte>(new byte[10240]);
|
||||||
|
|
||||||
if (context.WebSockets.IsWebSocketRequest)
|
if (context.WebSockets.IsWebSocketRequest
|
||||||
|
&& context.WebSockets.WebSocketRequestedProtocols.Contains("iip"))
|
||||||
{
|
{
|
||||||
var webSocket = await context.WebSockets.AcceptWebSocketAsync("iip");
|
var webSocket = await context.WebSockets.AcceptWebSocketAsync("iip");
|
||||||
var socket = new FrameworkWebSocket(webSocket);
|
var socket = new FrameworkWebSocket(webSocket);
|
||||||
@ -27,7 +28,9 @@ namespace Esiur.AspNetCore
|
|||||||
iipConnection.Assign(socket);
|
iipConnection.Assign(socket);
|
||||||
socket.Begin();
|
socket.Begin();
|
||||||
|
|
||||||
while (webSocket.State == WebSocketState.Open) ;
|
// @TODO: Change this
|
||||||
|
while (webSocket.State == WebSocketState.Open)
|
||||||
|
await Task.Delay(500);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,19 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<Description>Esiur command-line tool</Description>
|
||||||
|
<Copyright>Ahmed Kh. Zamil</Copyright>
|
||||||
|
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<Authors>Ahmed Kh. Zamil</Authors>
|
||||||
|
<Company>Esiur Foundation</Company>
|
||||||
|
|
||||||
|
<PackageLicenseUrl>https://github.com/Esiur/Esiur-dotnet/blob/master/LICENSE</PackageLicenseUrl>
|
||||||
|
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
|
||||||
|
<RepositoryUrl>https://github.com/esiur/esiur-dotnet/</RepositoryUrl>
|
||||||
|
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"Esiur.CLI": {
|
"Esiur.CLI": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"commandLineArgs": "get-template iip://phase.delta.iq/sys/phase -d c:\\temp\\a"
|
"commandLineArgs": "get-template iip://phase.delta.iq/sys/phase --dir c:\\temp\\an"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,111 +1,111 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Distributed Resources Platform</Description>
|
<Description>Distributed Resources Platform</Description>
|
||||||
<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.5</Version>
|
<Version>2.4.5</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>
|
||||||
<Company>Esiur Foundation</Company>
|
<Company>Esiur Foundation</Company>
|
||||||
<FileVersion></FileVersion>
|
<FileVersion></FileVersion>
|
||||||
<AssemblyName>Esiur</AssemblyName>
|
<AssemblyName>Esiur</AssemblyName>
|
||||||
<RootNamespace>Esiur</RootNamespace>
|
<RootNamespace>Esiur</RootNamespace>
|
||||||
<PackageId>Esiur</PackageId>
|
<PackageId>Esiur</PackageId>
|
||||||
<Product>Esiur</Product>
|
<Product>Esiur</Product>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
</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;NETSTANDARD</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="obj\**" />
|
<Compile Remove="obj\**" />
|
||||||
<EmbeddedResource Remove="obj\**" />
|
<EmbeddedResource Remove="obj\**" />
|
||||||
<None Remove="obj\**" />
|
<None Remove="obj\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Core\AsyncBagAwaiterGeneric.cs" />
|
<Compile Remove="Core\AsyncBagAwaiterGeneric.cs" />
|
||||||
<Compile Remove="Core\AsyncBagGeneric.cs" />
|
<Compile Remove="Core\AsyncBagGeneric.cs" />
|
||||||
<Compile Remove="Core\AsyncReplyNon.cs" />
|
<Compile Remove="Core\AsyncReplyNon.cs" />
|
||||||
<Compile Remove="Core\IAsyncReply.cs" />
|
<Compile Remove="Core\IAsyncReply.cs" />
|
||||||
<Compile Remove="Data\DataType.cs" />
|
<Compile Remove="Data\DataType.cs" />
|
||||||
<Compile Remove="Resource\ResourceEvent.cs" />
|
<Compile Remove="Resource\ResourceEvent.cs" />
|
||||||
<Compile Remove="Resource\ResourceFunction.cs" />
|
<Compile Remove="Resource\ResourceFunction.cs" />
|
||||||
<Compile Remove="Resource\ResourceProperty.cs" />
|
<Compile Remove="Resource\ResourceProperty.cs" />
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Net\DataLink\Sources\" />
|
<Folder Include="Net\DataLink\Sources\" />
|
||||||
<Folder Include="Net\Packets\IIP\" />
|
<Folder Include="Net\Packets\IIP\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Core\AsyncBagAwaiterGeneric.cs" />
|
<None Include="Core\AsyncBagAwaiterGeneric.cs" />
|
||||||
<None Include="Core\AsyncReplyNon.cs" />
|
<None Include="Core\AsyncReplyNon.cs" />
|
||||||
<None Include="Core\IAsyncReply.cs" />
|
<None Include="Core\IAsyncReply.cs" />
|
||||||
<None Include="Data\DataType.cs" />
|
<None Include="Data\DataType.cs" />
|
||||||
<None Include="Resource\ResourceEvent.cs" />
|
<None Include="Resource\ResourceEvent.cs" />
|
||||||
<None Include="Resource\ResourceFunction.cs" />
|
<None Include="Resource\ResourceFunction.cs" />
|
||||||
<None Include="Resource\ResourceProperty.cs" />
|
<None Include="Resource\ResourceProperty.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.11.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.10.0" />
|
||||||
<PackageReference Include="System.Collections" Version="4.3.0" />
|
<PackageReference Include="System.Collections" Version="4.3.0" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
<PackageReference Include="System.Diagnostics.StackTrace" Version="4.3.0" />
|
<PackageReference Include="System.Diagnostics.StackTrace" Version="4.3.0" />
|
||||||
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
|
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
|
||||||
<PackageReference Include="System.Interactive.Async" Version="6.0.1" />
|
<PackageReference Include="System.Interactive.Async" Version="6.0.1" />
|
||||||
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
|
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
|
||||||
<PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" />
|
<PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" />
|
||||||
<PackageReference Include="System.Net.Security" Version="4.3.2" />
|
<PackageReference Include="System.Net.Security" Version="4.3.2" />
|
||||||
<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.5" GeneratePathProperty="true" />
|
<PackageReference Include="System.Text.Json" Version="8.0.5" GeneratePathProperty="true" />
|
||||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
|
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" PrivateAssets="all" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
|
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
|
||||||
<!-- Package the Newtonsoft.Json dependency alongside the generator assembly -->
|
<!-- Package the Newtonsoft.Json dependency alongside the generator assembly -->
|
||||||
<None Include="$(PkgSystem_Text_Json)\lib\netstandard2.0\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
|
<None Include="$(PkgSystem_Text_Json)\lib\netstandard2.0\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
|
||||||
<None Include="Tools/*" Pack="true" PackagePath="tools/" />
|
<None Include="Tools/*" Pack="true" PackagePath="tools/" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Core\AsyncBagGeneric.cs" />
|
<None Include="Core\AsyncBagGeneric.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="LICENSE" Pack="true" PackagePath="">
|
<None Include="LICENSE" Pack="true" PackagePath="">
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Include="Core\AsyncBagAwaiterGeneric.cs" />
|
<Page Include="Core\AsyncBagAwaiterGeneric.cs" />
|
||||||
<Page Include="Core\AsyncBagGeneric.cs" />
|
<Page Include="Core\AsyncBagGeneric.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user