Base: Add ToURLQueryString function for dictionay
This commit is contained in:
parent
c5b6498f1b
commit
e5b5c259d7
@ -57,6 +57,7 @@
|
|||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.Transactions" />
|
<Reference Include="System.Transactions" />
|
||||||
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
Imports System.Runtime.CompilerServices
|
Imports System.Runtime.CompilerServices
|
||||||
|
Imports System.Web
|
||||||
|
|
||||||
Public Module ModuleExtensions
|
Public Module ModuleExtensions
|
||||||
Const UnixEraStartTicks As Long = 621355968000000000
|
Const UnixEraStartTicks As Long = 621355968000000000
|
||||||
@ -55,6 +56,21 @@ Public Module ModuleExtensions
|
|||||||
Return (pString.Trim().ToLower() = "true") OrElse (pString.Trim() = "1")
|
Return (pString.Trim().ToLower() = "true") OrElse (pString.Trim() = "1")
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' ======================================================
|
||||||
|
' === DICTIONARY
|
||||||
|
' ======================================================
|
||||||
|
|
||||||
|
<Extension()>
|
||||||
|
Public Function ToURLQueryString(pDictionary As IDictionary(Of String, String)) As String
|
||||||
|
Dim oQueryString = HttpUtility.ParseQueryString(String.Empty)
|
||||||
|
|
||||||
|
For Each oItem As KeyValuePair(Of String, String) In pDictionary
|
||||||
|
oQueryString.Add(oItem.Key, oItem.Value)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oQueryString.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
' ======================================================
|
' ======================================================
|
||||||
' === DATATABLE
|
' === DATATABLE
|
||||||
' ======================================================
|
' ======================================================
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user