Message 1 of 2
Delete all transaction warning
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want delete all warning in transaction.
I have this ...It works, but if I add other failure in to the if ( ...then it doesn't work ...show it more warning then before
I need delete warnings.
public class PlintePreprocessor : IFailuresPreprocessor { public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor) { // Inside event handler, get all warnings IList<FailureMessageAccessor> failList = failuresAccessor.GetFailureMessages(); foreach (FailureMessageAccessor failure in failList) { FailureDefinitionId failId = failure.GetFailureDefinitionId(); if (failId == BuiltInFailures.OverlapFailures.WallsOverlap || failId == BuiltInFailures.JoinElementsFailures.JoiningDisjoint || failId == BuiltInFailures.JoinElementsFailures.JoiningDisjointWarn) { failuresAccessor.DeleteWarning(failure); } } return FailureProcessingResult.Continue; } }