public byte[] GenerateExport(Cuesheet cuesheet)
 {
     if (IsExportable == true)
     {
         var builder = new StringBuilder();
         if (SchemeHead != null)
         {
             builder.AppendLine(SchemeHead.GetExportResult(cuesheet));
         }
         if (SchemeTracks != null)
         {
             foreach (var track in cuesheet.Tracks)
             {
                 builder.AppendLine(SchemeTracks.GetExportResult(track));
             }
         }
         if (SchemeFooter != null)
         {
             builder.AppendLine(SchemeFooter.GetExportResult(cuesheet));
         }
         return(Encoding.UTF8.GetBytes(builder.ToString()));
     }
     else
     {
         return(null);
     }
 }
 protected override void Validate()
 {
     if (String.IsNullOrEmpty(SchemeCuesheet))
     {
         validationErrors.Add(new ValidationError(FieldReference.Create(this, nameof(SchemeCuesheet)), ValidationErrorType.Warning, "{0} has no value!", nameof(SchemeCuesheet)));
     }
     else
     {
         if (AvailableSchemesTrack != null)
         {
             Boolean addValidationError = false;
             foreach (var availableScheme in AvailableSchemesTrack)
             {
                 if (SchemeCuesheet.Contains(availableScheme.Value) == true)
                 {
                     addValidationError = true;
                     break;
                 }
             }
             if (addValidationError == true)
             {
                 validationErrors.Add(new ValidationError(FieldReference.Create(this, nameof(SchemeCuesheet)), ValidationErrorType.Warning, "Scheme contains placeholders that can not be solved!"));
             }
         }
     }
     if (String.IsNullOrEmpty(SchemeTracks))
     {
         validationErrors.Add(new ValidationError(FieldReference.Create(this, nameof(SchemeTracks)), ValidationErrorType.Warning, "{0} has no value!", nameof(SchemeTracks)));
     }
     else
     {
         if (AvailableSchemeCuesheet != null)
         {
             Boolean addValidationError = false;
             foreach (var availableScheme in AvailableSchemeCuesheet)
             {
                 if (SchemeTracks.Contains(availableScheme.Value) == true)
                 {
                     addValidationError = true;
                     break;
                 }
             }
             if (addValidationError == true)
             {
                 validationErrors.Add(new ValidationError(FieldReference.Create(this, nameof(SchemeTracks)), ValidationErrorType.Warning, "Scheme contains placeholders that can not be solved!"));
             }
         }
     }
 }