diff --git a/Esiur.Examples.StandaloneWebServerDemo/Demo.cs b/Esiur.Examples.StandaloneWebServerDemo/Demo.cs new file mode 100644 index 0000000..4495153 --- /dev/null +++ b/Esiur.Examples.StandaloneWebServerDemo/Demo.cs @@ -0,0 +1,18 @@ +using Esiur.Resource; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Esiur.Examples.StandaloneWebServerDemo +{ + [Export] + [Resource] + public partial class Demo + { + [Export] int age { get; set; } + [Export] string name { get; set;} + [Export] + } +} diff --git a/Esiur.Examples.StandaloneWebServerDemo/Esiur.Examples.StandaloneWebServerDemo.csproj b/Esiur.Examples.StandaloneWebServerDemo/Esiur.Examples.StandaloneWebServerDemo.csproj new file mode 100644 index 0000000..69d181d --- /dev/null +++ b/Esiur.Examples.StandaloneWebServerDemo/Esiur.Examples.StandaloneWebServerDemo.csproj @@ -0,0 +1,14 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + diff --git a/Esiur.Examples.StandaloneWebServerDemo/Program.cs b/Esiur.Examples.StandaloneWebServerDemo/Program.cs new file mode 100644 index 0000000..83ed235 --- /dev/null +++ b/Esiur.Examples.StandaloneWebServerDemo/Program.cs @@ -0,0 +1,22 @@ + +using Esiur.Net.IIP; +using Esiur.Resource; +using Esiur.Stores; + +internal class Program +{ + private static async Task Main(string[] args) + { + // Create a store to keep objects. + var system = await Warehouse.Put("sys", new MemoryStore()); + // Create a distibuted server + var esiurServer = await Warehouse.Put("sys/server", new DistributedServer()); + // Add your object to the store + var service = await Warehouse.Put("sys/demo", new EsiurGreeter()); + + + // Start your server + await Warehouse.Open(); + + } +} \ No newline at end of file diff --git a/Esiur.sln b/Esiur.sln index 5db624e..2fa3f3b 100644 --- a/Esiur.sln +++ b/Esiur.sln @@ -10,7 +10,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Esiur.Stores.EntityCore", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "Test\Test.csproj", "{331F82B6-6B90-4533-9718-F7C8090D8F19}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Esiur.Security.Cryptography", "Esiur.Security.Cryptography\Esiur.Security.Cryptography.csproj", "{C0C55C1A-7C48-41EB-9A65-27BC99D82F6D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Esiur.Security.Cryptography", "Esiur.Security.Cryptography\Esiur.Security.Cryptography.csproj", "{C0C55C1A-7C48-41EB-9A65-27BC99D82F6D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Esiur.Examples.StandaloneWebServerDemo", "Esiur.Examples.StandaloneWebServerDemo\Esiur.Examples.StandaloneWebServerDemo.csproj", "{A00BBD34-601D-4803-94AE-B807DC75D53A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -38,6 +40,10 @@ Global {C0C55C1A-7C48-41EB-9A65-27BC99D82F6D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C0C55C1A-7C48-41EB-9A65-27BC99D82F6D}.Release|Any CPU.ActiveCfg = Release|Any CPU {C0C55C1A-7C48-41EB-9A65-27BC99D82F6D}.Release|Any CPU.Build.0 = Release|Any CPU + {A00BBD34-601D-4803-94AE-B807DC75D53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A00BBD34-601D-4803-94AE-B807DC75D53A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A00BBD34-601D-4803-94AE-B807DC75D53A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A00BBD34-601D-4803-94AE-B807DC75D53A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Esiur/Esiur.csproj b/Esiur/Esiur.csproj index bbda5b7..1a0a12b 100644 --- a/Esiur/Esiur.csproj +++ b/Esiur/Esiur.csproj @@ -5,7 +5,7 @@ Ahmed Kh. Zamil http://www.esiur.com true - 2.4.0 + 2.4.1 https://github.com/esiur/esiur-dotnet Ahmed Kh. Zamil