SerializationValidator
Helpers & Utilities · AiDotNet.Validation
Provides validation methods for serialization and deserialization operations.
Methods
| Method | Summary |
|---|---|
void ValidateFilePath(string filePath, string component, string operation) |
Validates that a file path is not null or empty. |
void ValidateLayerTypeExists(string layerTypeName, Type layerType, string component, string operation) |
Validates that a layer type exists and can be instantiated. |
void ValidateLayerTypeName(string layerTypeName, string component, string operation) |
Validates that a layer type name is not null or empty. |
void ValidateReader(BinaryReader reader, string component, string operation) |
Validates that a binary reader is not null. |
void ValidateStream(Stream stream, bool requireRead, bool requireWrite, string component, string operation) |
Validates that a stream is not null and has the expected capabilities. |
void ValidateVersion(int actualVersion, int expectedVersion, string component, string operation) |
Validates that a serialized version matches the expected version. |
void ValidateWriter(BinaryWriter writer, string component, string operation) |
Validates that a binary writer is not null. |