public override void Validate(ID3Versions version) { base.Validate(version); Exception innerException = null; if (version != ID3Versions.V2_4 && version != ID3Versions.V2_3) { innerException = new UnsupportedVersionException(version); } else { try { description.Validate(version); } catch (IOValidationException ex) { innerException = ex; } } if (innerException != null) { throw new FrameValidationException("Validation failed.", this, innerException); } }
public override void Validate(ID3Versions version) { Exception innerException = null; if ((version & ID3Versions.V2) != ID3Versions.V2) { innerException = new UnsupportedVersionException(version); } else if (url.TextEncodingType != URLLinkFrame.UrlEncodingType) { innerException = new InvalidTextEncodingTypeException( "URL not set with required TextEncodingType.", url.TextEncodingType); } else { try { url.Validate(version); } catch (IOValidationException ex) { innerException = ex; } } if (innerException != null) { throw new FrameValidationException("Validation failed.", this, innerException); } }
public override void Validate(ID3Versions version) { base.Validate(version); Exception innerException = null; if ((version & ID3Versions.V2) != ID3Versions.V2) { innerException = new UnsupportedVersionException(version); } else if (description.TextEncodingType != base.EncodedText.TextEncodingType) { innerException = new InvalidTextEncodingTypeException( "URL not set with required TextEncodingType.", description.TextEncodingType); } else { try { description.Validate(version); } catch (IOValidationException ex) { innerException = ex; } } if (innerException != null) { throw new FrameValidationException("Validation failed.", this, innerException); } }
public override void Validate(ID3Versions version) { Exception innerException = null; if ((version & ID3Versions.V2) != ID3Versions.V2) { innerException = new UnsupportedVersionException(version); } else { try { text.Validate(version); } catch (IOValidationException ex) { innerException = ex; } } if (innerException != null) { throw new FrameValidationException("Validation failed.", this, innerException); } }
public override void Validate(ID3Versions version) { Exception innerException = null; if ((version & ID3Versions.V2) != ID3Versions.V2) { innerException = new UnsupportedVersionException(version); } else if (mimeType.TextEncodingType != GEOBFrame.MimeTypeEncodingType) { innerException = new InvalidTextEncodingTypeException( "MIME type not set with required TextEncodingType.", mimeType.TextEncodingType); } else if (description.TextEncodingType != filename.TextEncodingType) { innerException = new InvalidTextEncodingTypeException( "Description and Text not set with same TextEncodingType.", description.TextEncodingType); } else { try { mimeType.Validate(version); filename.Validate(version); description.Validate(version); } catch (IOValidationException ex) { innerException = ex; } } if (innerException != null) { throw new FrameValidationException("Validation failed.", this, innerException); } }