Skip to content

Commit 6eb0357

Browse files
author
Anatoliy Koperin
committed
NuGet publication
1 parent 4cbccce commit 6eb0357

12 files changed

Lines changed: 97 additions & 13 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ Release/*
88
test-results
99
*.user
1010
TestResults
11+
*.nupkg
1112

1213

NConfiguration.Tests/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1919
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
2020

21-
[assembly: AssemblyVersion("1.2.*")]
21+
[assembly: AssemblyVersion("1.0.*")]
2222

2323
// The following attributes are used to specify the signing key for the assembly,
2424
// if desired. See the Mono documentation for more information about signing.

NConfiguration/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1818
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
1919

20-
[assembly: AssemblyVersion("1.2.*")]
20+
[assembly: AssemblyVersion("1.0.*")]

NConfiguration/NConfiguration.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2424
<DebugType>pdbonly</DebugType>
2525
<Optimize>true</Optimize>
26-
<OutputPath>..\Release\</OutputPath>
26+
<OutputPath>..\Release\lib\</OutputPath>
2727
<ErrorReport>prompt</ErrorReport>
2828
<WarningLevel>4</WarningLevel>
2929
<ConsolePause>false</ConsolePause>
30-
<DocumentationFile>..\Release\NConfiguration.xml</DocumentationFile>
30+
<DocumentationFile>..\Release\lib\NConfiguration.xml</DocumentationFile>
3131
<GenerateDocumentation>true</GenerateDocumentation>
3232
<DebugSymbols>true</DebugSymbols>
3333
</PropertyGroup>

NuGet/NConfiguration.nuspec

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>NConfiguration</id>
5+
<version>1.0.1</version>
6+
<title>NConfiguration</title>
7+
<authors>Anatoliy Koperin</authors>
8+
<owners />
9+
<licenseUrl>https://github.com/ExM/NConfiguration/blob/master/License.txt</licenseUrl>
10+
<projectUrl>https://github.com/ExM/NConfiguration</projectUrl>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>C# library for convenient operation with configurations of one or groups of applications. The library supports work with standard XML configurations and included files in format of XML, JSON, or the INI.</description>
13+
<summary />
14+
<tags>
15+
configuration config admin reload
16+
</tags>
17+
</metadata>
18+
<files>
19+
<file src="..\Release\lib\*.*" target="lib\net40" />
20+
<file src="..\Release\RsaToolkit\*.*" target="tools\RsaToolkit" />
21+
</files>
22+
</package>

NuGet/NuGet.exe

760 KB
Binary file not shown.

NuGet/Pack.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
%~d0
2+
cd %~dp0
3+
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /m /target:Build /p:Configuration=Release /p:Platform="Any CPU" ..\NConfiguration.sln
4+
5+
del *.nupkg
6+
7+
NuGet.exe Pack NConfiguration.nuspec

README

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
NConfiguration
2+
===
3+
4+
Library for simple configuration management
5+
6+
Source code:
7+
git://github.com/ExM/NConfiguration.git
8+
9+
10+
Examples:
11+
---
12+
13+
In your `web.config` or `app.config` make sure you have a custom section:
14+
15+
```xml
16+
<configuration>
17+
<configSections>
18+
<section name="ExtConfigure" type="NConfiguration.PlainXmlSection, NConfiguration"/>
19+
</configSections>
20+
<ExtConfigure>
21+
<Include>
22+
<XmlFile Path="etc\externalConfig.xml" Search="All" Include="All" Required="true"/>
23+
<XmlFile Path="etc\machineSpecific.xml" Search="All" Include="All" Required="true"/>
24+
</Include>
25+
</ExtConfigure>
26+
27+
</configuration>
28+
```
29+
30+
Find and download all of the files in the parent directory.
31+
Tracking changed included files.
32+
33+
```c#
34+
public IAppSettings LoadSettings()
35+
{
36+
var strConv = new StringConverter();
37+
var deserializer = new GenericDeserializer();
38+
39+
var xmlFileLoader = new XmlFileSettingsLoader(deserializer, strConv);
40+
var loader = new SettingsLoader(xmlFileLoader);
41+
42+
loader.LoadSettings(new XmlSystemSettings("ExtConfigure", strConv, deserializer));
43+
44+
var result = loader.Settings;
45+
result.Changed += SettingsChanged;
46+
return result;
47+
}
48+
49+
private void SettingsChanged(object sender, EventArgs e)
50+
{
51+
//TODO: reload settings or application
52+
}
53+
```
54+
55+
Deserialization section with the name of all downloaded files.
56+
57+
```c#
58+
var configs = settings.LoadCollection<ConfigClass>("MyConfig")
59+
```

RsaToolkit.Tests/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@
2424
// You can specify all the values or you can default the Build and Revision Numbers
2525
// by using the '*' as shown below:
2626
// [assembly: AssemblyVersion("1.0.*")]
27-
[assembly: AssemblyVersion("1.0.0.0")]
28-
[assembly: AssemblyFileVersion("1.0.0.0")]
27+
[assembly: AssemblyVersion("1.0.*")]

0 commit comments

Comments
 (0)