无法理解这段点网代码

时间:2019-08-21 10:49:17

标签: .net vb.net function semantics

有人可以告诉我这段代码的作用吗?
无法弄清楚它在寻找什么。我尝试执行InvalidOperationException的所有操作都会被引发。

+       A_0 {3/17/2012 12:26:40 PM} object {System.DateTime/*0x0200007D*/}
+       A_1 {Name = "XXXXXXX" FullName = "XXXXX.XXXXXX"}    System.Type/*0x02000148*/ {System.RuntimeType/*0x0200012C*/}
+       A_2 {System.Web.Script.Serialization.JavaScriptSerializer/*0x02000015*/}    System.Web.Script.Serialization.JavaScriptSerializer/*0x02000015*/
        A_3 true    bool
        A_4 null    object
Private Function \u206B\u206C\u206C\u206E\u206F\u202C\u206A\u206D\u206F\u206D\u200F\u206A\u202A\u202C\u202A\u206F\u206B\u206A\u206C\u200E\u206C\u202B\u206F\u206B\u202C\u200D\u206D\u206A\u200D\u200F\u206F\u202A\u202E\u202B\u200E\u206B\u206D\u200D\u202B\u202E(A_0 As Object, A_1 As Type, A_2 As JavaScriptSerializer, A_3 As Boolean, <System.Runtime.InteropServices.OutAttribute()> ByRef A_4 As Object) As Boolean
    Dim dictionary As IDictionary(Of String, Object) = TryCast(A_0, IDictionary(Of String, Object))
    If dictionary Is Nothing Then
        Dim list As IList
        While True
            IL_7B:
            list = TryCast(A_0, IList)
            If list IsNot Nothing Then
                GoTo Block_5
            End If
            IL_6D:
            While Not(A_1 Is Nothing)
                While True
                    Select Case(If((A_0.[GetType]() Is A_1), -1148124885, -356209712) Xor -1296792998 Xor 2130152129) Mod 11
                        Case 1
                            GoTo IL_7B
                        Case 2, 5
                            GoTo IL_178
                        Case 3
                            GoTo IL_191
                        Case 4
                            GoTo IL_19D
                        Case 6
                            Return True
                        Case 7
                            GoTo IL_197
                        Case 8
                            GoTo IL_6D
                        Case 9
                            Continue For
                        Case 10
                            GoTo IL_184
                    End Select
                    GoTo Block_2
                End While
            End While
            GoTo IL_19D
        End While
        Block_2:
        GoTo IL_8A
        Block_5:
        GoTo IL_184
        IL_8A:
        Dim converter As TypeConverter = TypeDescriptor.GetConverter(A_1)
        If converter.CanConvertFrom(A_0.[GetType]()) Then
            Try
                A_4 = converter.ConvertFrom(Nothing, CultureInfo.InvariantCulture, A_0)
                Return True
            Catch
                If A_3 Then
                    Throw
                End If
                A_4 = Nothing
                Return False
            End Try
        End If
        Dim result As Boolean
        If converter.CanConvertFrom(GetType(String)) Then
            Try
                Dim text As String
                If TypeOf A_0 Is DateTime Then
                    text = CType(A_0, DateTime).ToUniversalTime().ToString("u", CultureInfo.InvariantCulture)
                Else
                    text = TypeDescriptor.GetConverter(A_0).ConvertToInvariantString(A_0)
                End If
                A_4 = converter.ConvertFromInvariantString(text)
                result = True
            Catch
                If A_3 Then
                    Throw
                End If
                A_4 = Nothing
                result = False
            End Try
        Else
            If A_1.IsAssignableFrom(A_0.[GetType]()) Then
                A_4 = A_0
                Return True
            End If
            If Not A_3 Then
                A_4 = Nothing
                Return False
            End If
            Throw New InvalidOperationException(String.Format(CultureInfo.CurrentCulture, \u206C\u206A\u200D\u202B\u202E\u202E\u206E\u200F\u206F\u202D\u202C\u206C\u206F\u202E\u202E\u200B\u202D\u202E\u202A\u206D\u200E\u206F\u202C\u200D\u202A\u206C\u206D\u206E\u206B\u206A\u200E\u206D\u202E\u200D\u200D\u200F\u206B\u206D\u200F\u202E.\u200D\u206C\u200E\u206C\u206A\u202B\u200F\u200D\u200B\u202A\u202B\u200B\u206C\u202E\u202A\u206B\u200C\u206F\u200E\u206D\u206A\u202E\u206F\u206F\u202E\u200F\u200E\u200D\u206E\u202E\u200D\u206A\u206A\u200D\u200E\u206D\u202E\u206D\u202B\u202E, New Object() { A_0.[GetType](), A_1 }))
        End If
        Return result
        IL_184:
        Dim list2 As IList
        If Not \u206C\u200F\u200D\u200F\u200C\u202D\u202C\u200C\u202B\u200E\u202C\u202A\u202A\u206A\u200F\u200F\u206C\u200C\u200C\u202D\u206A\u206A\u202E\u200F\u206F\u200F\u200D\u200E\u202B\u200F\u206B\u202C\u206E\u206B\u206D\u202C\u206A\u200F\u200B\u202E.\u200F\u202B\u200D\u206B\u200B\u200C\u200D\u200E\u200C\u206D\u200F\u200B\u200B\u200C\u206D\u202A\u206B\u206E\u200B\u206A\u206E\u202E\u200E\u202D\u206C\u202A\u200F\u206A\u206A\u206F\u202E\u202A\u206C\u200B\u200D\u200E\u202A\u202E\u200E\u202E(list, A_1, A_2, A_3, list2) Then
            GoTo IL_197
        End If
        IL_191:
        A_4 = list2
        Return True
        IL_197:
        A_4 = Nothing
        Return False
        IL_19D:
        A_4 = A_0
        Return True
    End If
    IL_178:
    Return \u206C\u200F\u200D\u200F\u200C\u202D\u202C\u200C\u202B\u200E\u202C\u202A\u202A\u206A\u200F\u200F\u206C\u200C\u200C\u202D\u206A\u206A\u202E\u200F\u206F\u200F\u200D\u200E\u202B\u200F\u206B\u202C\u206E\u206B\u206D\u202C\u206A\u200F\u200B\u202E.\u206E\u200D\u206F\u202A\u206B\u206A\u202C\u206E\u200C\u206B\u200C\u202D\u202A\u202A\u200D\u206F\u206D\u202E\u206C\u206F\u200C\u202C\u200D\u202C\u200F\u202D\u200B\u206F\u202A\u206D\u200E\u202B\u200F\u200C\u202A\u206A\u202D\u202C\u200B\u202E(dictionary, A_1, A_2, A_3, A_4)
End Function

1 个答案:

答案 0 :(得分:0)

Private Function Apparently_ConvertSomeUnknownObjectToCertainType(ByVal A_0 As Object, ByVal A_1 As Type, ByVal A_2 As JavaScriptSerializer, ByVal A_3 As Boolean, <Out()> ByRef A_4 As Object) As Boolean
    Dim dictionary As IDictionary(Of String, Object) = TryCast(A_0, IDictionary(Of String, Object))
    If dictionary IsNot Nothing Then Return Apparently_DictionaryHandler.Apparently_ConvertDictionaryToCertainType(dictionary, A_1, A_2, A_3, A_4)

    Dim list As IList = TryCast(A_0, IList)

    If list IsNot Nothing Then
        Dim list2 As IList
        If Apparently_ListHandler.Apparently_ConvertListToCertainType(list, A_1, A_2, A_3, list2) Then
            A_4 = list2
            Return True
        Else
            A_4 = Nothing
            Return False
        End If
    End If

    If A_1 Is Nothing OrElse A_0.GetType Is A_1 Then
        A_4 = A_0
        Return True
    End If

    Dim converter As TypeConverter = TypeDescriptor.GetConverter(A_1)
    If converter.CanConvertFrom(A_0.GetType()) Then
        Try
            A_4 = converter.ConvertFrom(Nothing, CultureInfo.InvariantCulture, A_0)
            Return True
        Catch
            If A_3 Then
                Throw
            Else
                A_4 = Nothing
                Return False
            End If
        End Try
    End If

    Dim result As Boolean
    If converter.CanConvertFrom(GetType(String)) Then
        Try
            Dim text As String
            If TypeOf A_0 Is DateTime Then
                text = CType(A_0, DateTime).ToUniversalTime().ToString("u", CultureInfo.InvariantCulture)
            Else
                text = TypeDescriptor.GetConverter(A_0).ConvertToInvariantString(A_0)
            End If
            A_4 = converter.ConvertFromInvariantString(text)
            result = True
        Catch
            If A_3 Then
                Throw
            Else
                A_4 = Nothing
                result = False
            End If
        End Try
    Else
        If A_1.IsAssignableFrom(A_0.GetType()) Then
            A_4 = A_0
            Return True
        End If
        If Not A_3 Then
            A_4 = Nothing
            Return False
        End If
        Throw New InvalidOperationException(String.Format(CultureInfo.CurrentCulture, ObfuscatedName4.ObfuscatedName5, A_0.GetType(), A_1))
    End If
    Return result
End Function