diff --git a/publish.ps1 b/publish.ps1 new file mode 100644 index 0000000..a890466 --- /dev/null +++ b/publish.ps1 @@ -0,0 +1,6 @@ +Remove-Item ./dist -Recurse -Force -Confirm:$false +dotnet build -c Release +$apikey = Read-Host -Prompt "nuget apikey" +foreach ($file in Get-ChildItem -Path ./dist/NSExt/bin/Release | Where-Object { $_.Name -match "nupkg" }) { + dotnet nuget push $file --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json +} \ No newline at end of file diff --git a/src/NSExt/Attributes/LocalizationAttribute.cs b/src/NSExt/Attributes/LocalizationAttribute.cs index 9b53058..4c157a8 100644 --- a/src/NSExt/Attributes/LocalizationAttribute.cs +++ b/src/NSExt/Attributes/LocalizationAttribute.cs @@ -9,7 +9,9 @@ public sealed class LocalizationAttribute : Attribute /// /// Initializes a new instance of the class. /// + #pragma warning disable IDE0290 public LocalizationAttribute(Type resourceClass) + #pragma warning restore IDE0290 { ResourceClass = resourceClass; } diff --git a/src/NSExt/Attributes/ResourceDescriptionAttribute.cs b/src/NSExt/Attributes/ResourceDescriptionAttribute.cs index f124234..c2e4386 100644 --- a/src/NSExt/Attributes/ResourceDescriptionAttribute.cs +++ b/src/NSExt/Attributes/ResourceDescriptionAttribute.cs @@ -9,7 +9,9 @@ public sealed class ResourceDescriptionAttribute : Attribute /// /// Initializes a new instance of the class. /// + #pragma warning disable IDE0290 public ResourceDescriptionAttribute(string resourceName) + #pragma warning restore IDE0290 { ResourceName = resourceName; } diff --git a/src/NSExt/Extensions/StreamExtensions.cs b/src/NSExt/Extensions/StreamExtensions.cs index 74fc642..0c8e61e 100644 --- a/src/NSExt/Extensions/StreamExtensions.cs +++ b/src/NSExt/Extensions/StreamExtensions.cs @@ -25,6 +25,8 @@ public static class StreamExtensions /// public static bool IsTextStream(this Stream me) { + #pragma warning disable IDE0300 return me.FirstByteIndex(new byte[] { 0x00, 0xff }) < 0; + #pragma warning restore IDE0300 } } \ No newline at end of file diff --git a/src/NSExt/NSExt.csproj b/src/NSExt/NSExt.csproj index 51325b9..22c816d 100644 --- a/src/NSExt/NSExt.csproj +++ b/src/NSExt/NSExt.csproj @@ -2,7 +2,7 @@ - +