⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 argumentoutofrangeexception.cls

📁 VB 加密----------能够加密解密控件
💻 CLS
📖 第 1 页 / 共 2 页
字号:
' Provides a basic implementation of the Equals function of the <b>IObject</b> interface.
'
' @param Value The value to determine if is the same object instance as the exception.
' @return Returns True if Value is the same instance as the exception object, False otherwise.
'
Public Function Equals(ByRef Value As Variant) As Boolean
    Equals = mBase.Equals(Value)
End Function

''
' Provides a basic implementation of the GetHashcode function of the <b>IObject</b> interface.
'
' @return A 32-bit value used to help identify the exception object.
' @remarks The value generated is not unique across all hashcodes. Additional
' measures must be taken to find a unique value that happens to have the same
' hashcode as the exception object.
'
Public Function GetHashCode() As Long
    GetHashCode = mBase.GetHashCode
End Function


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'   Friend Interface
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Friend Sub Init(ByRef Message As String, ByRef ParamName As String, ByRef ActualValue As Variant, ByRef InnerException As Exception)
    Set mBase = Cor.NewExceptionBase(Me, App.Title, Message, InnerException, DEF_HRESULT)
    If Not IsMissing(ActualValue) Then Call mBase.SetValue(PROP_ACTUALVALUE, ActualValue)
    If Len(ParamName) > 0 Then Call mBase.SetValue(PROP_PARAMNAME, ParamName)
End Sub


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'   Class Events
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Class_InitProperties()
    Call Init(Environment.GetResourceString(ArgumentOutOfRange_Exception), DEF_PARAMNAME, MissingVariant, Nothing)
End Sub

Private Sub Class_ReadProperties(PropBag As PropertyBag)
    Set mBase = PropBag.ReadProperty(PROP_BASE, Nothing)
End Sub

Private Sub Class_WriteProperties(PropBag As PropertyBag)
    PropBag.WriteProperty PROP_BASE, mBase
End Sub


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'   ArgumentException Interface
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Property Get ArgumentException_Data() As IDictionary
    Set ArgumentException_Data = Data
End Property

Private Function ArgumentException_Equals(Value As Variant) As Boolean
    ArgumentException_Equals = Equals(Value)
End Function

Private Function ArgumentException_GetBaseException() As Exception
    Set ArgumentException_GetBaseException = GetBaseException
End Function

Private Function ArgumentException_GetHashCode() As Long
    ArgumentException_GetHashCode = GetHashCode
End Function

Private Property Let ArgumentException_HelpLink(ByVal RHS As String)
    HelpLink = RHS
End Property

Private Property Get ArgumentException_HelpLink() As String
    ArgumentException_HelpLink = HelpLink
End Property

Private Property Let ArgumentException_HResult(ByVal RHS As Long)
    HResult = RHS
End Property

Private Property Get ArgumentException_HResult() As Long
    ArgumentException_HResult = HResult
End Property

Private Property Get ArgumentException_InnerException() As Exception
    Set ArgumentException_InnerException = InnerException
End Property

Private Property Get ArgumentException_Message() As String
    ArgumentException_Message = Message
End Property

Private Property Get ArgumentException_ParamName() As String
    ArgumentException_ParamName = ParamName
End Property

Private Property Let ArgumentException_Source(ByVal RHS As String)
    Source = RHS
End Property

Private Property Get ArgumentException_Source() As String
    ArgumentException_Source = Source
End Property

Private Function ArgumentException_ToString() As String
    ArgumentException_ToString = ToString
End Function


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'   IObject Interface
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Function IObject_Equals(Value As Variant) As Boolean
    IObject_Equals = Equals(Value)
End Function

Private Function IObject_GetHashcode() As Long
    IObject_GetHashcode = GetHashCode
End Function

Private Function IObject_ToString() As String
    IObject_ToString = ToString
End Function


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'   Exception Interface
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Property Get Exception_Data() As IDictionary
    Set Exception_Data = Data
End Property

Private Function Exception_Equals(Value As Variant) As Boolean
    Exception_Equals = Equals(Value)
End Function

Private Function Exception_GetBaseException() As Exception
    Set Exception_GetBaseException = GetBaseException
End Function

Private Function Exception_GetHashCode() As Long
    Exception_GetHashCode = GetHashCode
End Function

Private Property Let Exception_HelpLink(ByVal RHS As String)
    HelpLink = RHS
End Property

Private Property Get Exception_HelpLink() As String
    Exception_HelpLink = HelpLink
End Property

Private Property Let Exception_HResult(ByVal RHS As Long)
    HResult = RHS
End Property

Private Property Get Exception_HResult() As Long
    Exception_HResult = HResult
End Property

Private Property Get Exception_InnerException() As Exception
    Set Exception_InnerException = InnerException
End Property

Private Property Get Exception_Message() As String
    Exception_Message = Message
End Property

Private Property Let Exception_Source(ByVal RHS As String)
    Source = RHS
End Property

Private Property Get Exception_Source() As String
    Exception_Source = Source
End Property

Private Function Exception_ToString() As String
    Exception_ToString = ToString
End Function



'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'   SystemException Interface
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Property Get SystemException_Data() As IDictionary
    Set SystemException_Data = Data
End Property

Private Function SystemException_Equals(Value As Variant) As Boolean
    SystemException_Equals = Equals(Value)
End Function

Private Function SystemException_GetBaseException() As Exception
    Set SystemException_GetBaseException = GetBaseException
End Function

Private Function SystemException_GetHashCode() As Long
    SystemException_GetHashCode = GetHashCode
End Function

Private Property Let SystemException_HelpLink(ByVal RHS As String)
    HelpLink = RHS
End Property

Private Property Get SystemException_HelpLink() As String
    SystemException_HelpLink = HelpLink
End Property

Private Property Let SystemException_HResult(ByVal RHS As Long)
    HResult = RHS
End Property

Private Property Get SystemException_HResult() As Long
    SystemException_HResult = HResult
End Property

Private Property Get SystemException_InnerException() As Exception
    Set SystemException_InnerException = InnerException
End Property

Private Property Get SystemException_Message() As String
    SystemException_Message = Message
End Property

Private Property Let SystemException_Source(ByVal RHS As String)
    Source = RHS
End Property

Private Property Get SystemException_Source() As String
    SystemException_Source = Source
End Property

Private Function SystemException_ToString() As String
    SystemException_ToString = ToString
End Function




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -