Skip to content

Made Baseperiod multilingual #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions PCAxis.Core/PaxiOM/ContInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Namespace PCAxis.Paxiom
Public Sub New()
mContact = New String(0) {}
mUnits = New String(0) {}
mBaseperiod = New String(0) {}
mContact(0) = ""
mContactInfo = New List(Of Contact)(0) {}
End Sub
Expand All @@ -29,6 +30,7 @@ Namespace PCAxis.Paxiom
Public Sub New(ByVal internalBufferSize As Integer)
mContact = New String(internalBufferSize) {}
mUnits = New String(internalBufferSize) {}
mBaseperiod = New String(internalBufferSize) {}
mContactInfo = New List(Of Contact)(internalBufferSize) {}
End Sub

Expand All @@ -45,12 +47,14 @@ Namespace PCAxis.Paxiom
ci = CType(Me.MemberwiseClone(), ContInfo)
ci.mContact = New String(numberOfLanguages - 1) {}
ci.mUnits = New String(numberOfLanguages - 1) {}
ci.mBaseperiod = New String(numberOfLanguages - 1) {}

If Me.mContact.Count() = ci.mContact.Count() AndAlso Me.mContact.Count() = numberOfLanguages Then
For i As Integer = 0 To numberOfLanguages - 1
ci.mContact(i) = Me.mContact(i)
ci.mUnits(i) = Me.mUnits(i)
ci.mContactInfo(i) = Me.mContactInfo(i)
ci.mBaseperiod(i) = Me.mBaseperiod(i)
Next
End If

Expand All @@ -77,7 +81,8 @@ Namespace PCAxis.Paxiom
#Region "Private fields"
'<value>The name of value that the ContInfo is connectet to</value>
Private mValue As String
Private mBaseperiod As String
<LanguageDependent()>
Private mBaseperiod() As String
Private mCFPrices As String
<LanguageDependent()>
Private mContact() As String
Expand Down Expand Up @@ -119,10 +124,10 @@ Namespace PCAxis.Paxiom
''' <remarks></remarks>
Public Property Baseperiod() As String
Get
Return Me.mBaseperiod
Return Me.mBaseperiod(mLanguageIndex)
End Get
Set(ByVal value As String)
Me.mBaseperiod = value
Me.mBaseperiod(mLanguageIndex) = value
End Set
End Property

Expand Down Expand Up @@ -313,7 +318,7 @@ Namespace PCAxis.Paxiom
Protected Friend Sub SetProperty(ByVal name As String, ByVal value As String, ByVal languageIndex As Integer)
Select Case name
Case PXKeywords.BASEPERIOD
Me.mBaseperiod = value
Me.mBaseperiod(languageIndex) = value
Case PXKeywords.CFPRICES
Me.mCFPrices = value
Case PXKeywords.CONTACT
Expand Down Expand Up @@ -416,7 +421,7 @@ Namespace PCAxis.Paxiom
''' <remarks></remarks>
Protected Friend Sub New(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext)
mContact = CType(info.GetValue("Contact", GetType(String())), String())
mBaseperiod = info.GetString("Baseperiod")
mBaseperiod = CType(info.GetValue("Baseperiod", GetType(String())), String())
mCFPrices = info.GetString("mCFPrices")
mLastUpdated = info.GetString("mLastUpdated")
mRefPeriod = info.GetString("mRefPeriod")
Expand Down
Loading