Skip to content

Commit

Permalink
update readme and version info (#68)
Browse files Browse the repository at this point in the history
* update readme

* update version

* update test project dependencies
  • Loading branch information
hkutluay authored Oct 26, 2022
1 parent 55a21cd commit 30448c8
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,47 @@ PM> Install-Package UblTr
## InvoiceType Usage

### Serialize

Using implict operators to assign values
```csharp
private static void Main(string[] args)
{
var invoice = new UblTr.MainDoc.InvoiceType()
{
UUID = Guid.NewGuid().ToString(),
UBLVersionID ="2.1",
CustomizationID = "TR1.2",
ProfileID ="TEMELFATURA",
ID = "INV20200000000001",
CopyIndicator = false
};

XmlSerializer xmlSerializer = new XmlSerializer(typeof(UblTr.MainDoc.InvoiceType));
using TextWriter writer = new StreamWriter(@"./TestInvoice.xml"); //path to document
xmlSerializer.Serialize(writer, invoice, new UblTr.Serialization.UblTrNamespaces());
}
```

Or using explicilty assign values
```csharp
private static void Main(string[] args)
{
var invoice = new UblTr.MainDoc.InvoiceType()
{
UUID = new UblTr.Common.UUIDType() { Value = Guid.NewGuid().ToString() },
UBLVersionID = new UblTr.Common.UBLVersionIDType() { Value = "2.1" },
CustomizationID = new UblTr.Common.CustomizationIDType() { Value = "TR1.2" },
ProfileID = new UblTr.Common.ProfileIDType() { Value = "TEMELFATURA" },
ID = new UblTr.Common.IDType() { Value = "INV20200000000001" },
CopyIndicator = new UblTr.Common.CopyIndicatorType() { Value = false }
};

XmlSerializer xmlSerializer = new XmlSerializer(typeof(UblTr.MainDoc.InvoiceType));
using TextWriter writer = new StreamWriter(@"./TestInvoice.xml"); //path to document
xmlSerializer.Serialize(writer, invoice, new UblTr.Serialization.UblTrNamespaces());
}

```
```csharp
private static void Main(string[] args)
{
Expand Down Expand Up @@ -90,7 +131,7 @@ private static void Main(string[] args)
};

XmlSerializer xmlSerializer = new XmlSerializer(typeof(UblTr.MainDoc.DespatchAdviceType));
using TextWriter writer = new StreamWriter(@"C:\Temp\TestDespatch.xml"); //path to document
using TextWriter writer = new StreamWriter(@"./TestDespatch.xml"); //path to document
xmlSerializer.Serialize(writer, invoice, new UblTr.Serialization.UblTrNamespaces());
}

Expand Down
6 changes: 3 additions & 3 deletions Ubl-Tr/UblTr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<RepositoryType>Github</RepositoryType>
<PackageTags>ubltr ubl-tr e-invoice ubl ubl-tr-1.2.1 e-fatura fatura efatura e-despatch eirsaliye irsaliye applicationresponse uygulamayaniti creditnote receiptadvice </PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>1.2.0</Version>
<Version>1.3.0</Version>
<PackageIcon>icon.png</PackageIcon>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<FileVersion>1.3.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<None Include="Images\icon.png">
Expand Down
8 changes: 4 additions & 4 deletions UblTr.Tests/UblTr.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

<ItemGroup>

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.5" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.5" />
<PackageReference Include="coverlet.collector" Version="3.1.0"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="coverlet.collector" Version="3.1.2"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 30448c8

Please sign in to comment.