Validates the format and content of a revision time string and updates the registry with warnings for any
detected issues.
Namespace: Lextm.SharpSnmpPro.MibAssembly: SharpSnmpPro.Mib (in SharpSnmpPro.Mib.dll) Version: 2.1.3+8c6e8963be682b1d7fd7055c260d7b3d449dbc11
Syntaxpublic bool Validate(
ErrorRegistry registry,
string file
)
Public Function Validate (
registry As ErrorRegistry,
file As String
) As Boolean
Dim instance As Revision
Dim registry As ErrorRegistry
Dim file As String
Dim returnValue As Boolean
returnValue = instance.Validate(registry,
file)
public:
bool Validate(
ErrorRegistry^ registry,
String^ file
)
member Validate :
registry : ErrorRegistry *
file : string -> bool
Parameters
- registry ErrorRegistry
- The ErrorRegistry instance where validation warnings will be recorded.
- file String
- The name of the file associated with the revision time string, used for context in warnings.
Return Value
Boolean if the revision time string is valid; otherwise,
.
RemarksThe method checks the following conditions for the revision time string:
- The string must be either 13 or 15 characters long.
- The string must be
enclosed in double quotes.
- The string must end with the character 'Z'.
- The string
must contain valid numeric values for year, month, day, hour, and minute.
If any of these
conditions are not met, a warning is added to the
registry and the method returns
.
See Also