Skip to content

Commit

Permalink
Reference NCalcSync.Signed
Browse files Browse the repository at this point in the history
  • Loading branch information
axunonb committed May 17, 2024
1 parent ac6c01c commit 0e1e912
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/SmartFormat.Extensions.LogiCalc/LogiCalcFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace SmartFormat.Extensions;
/// </summary>
/// <example>
/// var data = new { Arg1 = 3, Arg2 = 4 };
/// _ = Smart.Format("{:M(0.00):({Arg1} + {Arg2}) * 5}");
/// _ = Smart.Format("{:calc(0.00):({Arg1} + {Arg2}) * 5}");
/// result: 35.00
/// </example>
/// <remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,26 @@ It uses extensions to provide named placeholders, localization, pluralization, g
<AssemblyTitle>SmartFormat.Extensions.LogiCalc</AssemblyTitle>
<AssemblyName>SmartFormat.Extensions.LogiCalc</AssemblyName>
<PackageId>SmartFormat.Extensions.Logicalc</PackageId>
<PackageReleaseNotes>See the change log for the main project at
https://github.com/axuno/SmartFormat/blob/main/CHANGES.md
</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageLicenseFile></PackageLicenseFile>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/axuno/SmartFormat</PackageProjectUrl>
<PackageIcon>SmartFormat_365x365.png</PackageIcon>
<PackageTags>string-format stringformat template templating string-composition smartformat smart-format netstandard netcore netframework csharp c-sharp</PackageTags>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net461;net60</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Nullable>enable</Nullable>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>../SmartFormat/SmartFormat.snk</AssemblyOriginatorKeyFile>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<!-- Added to include SmartFormat.ZString.dll into the nuget package -->
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<PropertyGroup>
<!-- EmbedUntrackedSources for deterministic build -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReadmeFile>PkgReadMe.md</PackageReadmeFile>
<DelaySign>False</DelaySign>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\SmartFormat\SmartFormat.csproj" />
<None Include="../../SmartFormat_365x365.png" Pack="true" Visible="false" PackagePath="/" />
<None Include="../../PkgReadMe.md" Pack="true" PackagePath="/" />
</ItemGroup>

<!-- Added to include SmartFormat.ZString.dll into the nuget package -->
<!-- BuildOnlySettings will add XML-docs to *.nupkg, and PDBs to *.snupkg (if generated) -->
<!-- The order of DependsOnTargets arguments is important -->
<Target DependsOnTargets="BuildOnlySettings;ResolveReferences" Name="CopyProjectReferencesToPackage">
<ItemGroup>
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths-&gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
</ItemGroup>
</Target>

<ItemGroup>
<PackageReference Include="Brutal.Dev.StrongNameSigner" Version="3.4.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NCalcSync" Version="3.8.0" GeneratePathProperty="true" />
<PackageReference Include="NCalcSync.signed" Version="3.13.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netStandard2.0'">
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions src/SmartFormat/Utilities/FormattingInfoExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using SmartFormat.Core.Extensions;
using SmartFormat.Core.Formatting;
using SmartFormat.Core.Output;
Expand Down Expand Up @@ -71,7 +70,7 @@ public static ReadOnlySpan<char> FormatPlaceholderToSpan(this FormattingInfo for
public static ReadOnlySpan<char> FormatToSpan(this FormattingInfo formattingInfo, Format format,
IFormatProvider? provider, object? value)
{
using var zsOutput = new ZStringOutput(ZStringBuilderExtensions.CalcCapacity(format));
using var zsOutput = new ZStringOutput(ZString.ZStringBuilderUtilities.CalcCapacity(format));
using var fdObject = FormatDetailsPool.Instance.Get(out var formatDetails);
// We don't add the nestedFormattingInfo as child to the parent, so we have to dispose it
using var fiObject = FormattingInfoPool.Instance.Get(out var nestedFormattingInfo);
Expand Down

0 comments on commit 0e1e912

Please sign in to comment.