Fix configuration
pull/1/head
unknown 5 years ago
parent 9f1bcfa923
commit 80b9a490a3

@ -19,7 +19,7 @@ namespace TestApp
{ {
Log.Info("Started"); Log.Info("Started");
ReadServiceInfo(); ReadServiceInfo();
var host = UseHost(); var host = UseHost(8800);
AutoregisterInboxes(host); AutoregisterInboxes(host);
host.OnConnect += Host_OnConnect; host.OnConnect += Host_OnConnect;
host.OnDisconnect += Host_OnDisconnect; host.OnDisconnect += Host_OnDisconnect;
@ -31,7 +31,7 @@ namespace TestApp
Interlocked.Exchange(ref counter, 0); Interlocked.Exchange(ref counter, 0);
}); });
//Exchange.RoutesStorage.Set("test.app", new IPEndPoint(IPAddress.Loopback, 8800)); Exchange.RoutesStorage.Set("test.app", new IPEndPoint(IPAddress.Loopback, 8800));
while (true) while (true)
{ {

@ -6,10 +6,11 @@ namespace TestApp
{ {
private static void Main(string[] args) private static void Main(string[] args)
{ {
Configuration.Save(Configuration.ReadFromApplicationConfig());
Bootstrap.Startup<MyService>(args, Bootstrap.Startup<MyService>(args,
() => Configuration.ReadSetFromIniFile("config.ini")) () => Configuration.ReadSetFromIniFile("config.ini"))
.EnableConsoleLog(ZeroLevel.Services.Logging.LogLevel.System | ZeroLevel.Services.Logging.LogLevel.FullDebug) .EnableConsoleLog(ZeroLevel.Services.Logging.LogLevel.System | ZeroLevel.Services.Logging.LogLevel.FullDebug)
.UseDiscovery() //.UseDiscovery()
.Run() .Run()
.WaitWhileStatus(ZeroServiceStatus.Running) .WaitWhileStatus(ZeroServiceStatus.Running)
.Stop(); .Stop();

@ -59,7 +59,7 @@ namespace ZeroLevel
} }
else else
{ {
throw new Exception("Default configuration exists already"); DefaultSet.Merge(Configuration.CreateSet(configuration));
} }
} }
@ -76,7 +76,7 @@ namespace ZeroLevel
} }
else else
{ {
throw new Exception("Default configurationset set already"); DefaultSet.Merge(configuration);
} }
} }

@ -5,17 +5,16 @@
<Description>Infrastructure layer library</Description> <Description>Infrastructure layer library</Description>
<Authors>ogoun</Authors> <Authors>ogoun</Authors>
<Company>ogoun</Company> <Company>ogoun</Company>
<AssemblyVersion>3.0.0.3</AssemblyVersion> <AssemblyVersion>3.0.0.4</AssemblyVersion>
<PackageReleaseNotes>Fix file transfer <PackageReleaseNotes>Fix configuration</PackageReleaseNotes>
Expand serialization types</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/ogoun/Zero/wiki</PackageProjectUrl> <PackageProjectUrl>https://github.com/ogoun/Zero/wiki</PackageProjectUrl>
<Copyright>Copyright Ogoun 2019</Copyright> <Copyright>Copyright Ogoun 2019</Copyright>
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl> <PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
<PackageIconUrl>https://raw.githubusercontent.com/ogoun/Zero/master/zero.png</PackageIconUrl> <PackageIconUrl>https://raw.githubusercontent.com/ogoun/Zero/master/zero.png</PackageIconUrl>
<RepositoryUrl>https://github.com/ogoun/Zero</RepositoryUrl> <RepositoryUrl>https://github.com/ogoun/Zero</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType> <RepositoryType>GitHub</RepositoryType>
<Version>3.0.3</Version> <Version>3.0.4</Version>
<FileVersion>3.0.0.3</FileVersion> <FileVersion>3.0.0.4</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

Loading…
Cancel
Save

Powered by TurnKey Linux.