| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod DoSanityCheck (LibDMF_CommunicationChannelRoot communicationChannelRoot_i) | 
| { | 
|   Description: 'Go through all types and create error messages for each error found in each type' | 
|   TextBody: | 
|   [* | 
|     // soh yee Nov-6-2014 (created) | 
|      | 
|     // Delete sanity check message that has been fixed or sanity check message that is not ignored. | 
|     traverse( communicationChannelRoot_i, SanityCheckGroup.SanityCheckMessage, message, | 
|               message.IsValid() or message.IsShown() ) | 
|     { | 
|       message.Delete(); | 
|     } | 
|      | 
|     limit := communicationChannelRoot_i.SanityCheckParameters().SanityCheckLimit(); | 
|      | 
|     // Traverse invalid object and re-create messages that are not ignored. | 
|     traverse( communicationChannelRoot_i, SanityCheckGroup, group ) | 
|     { | 
|       numberofmessages := 0;      // Error which is ignored is not taken into account by the limit in global parameters. | 
|      | 
|       traverse( group, InvalidObject, object, limit > numberofmessages ) | 
|       { | 
|         feedbacks := construct( Strings ); | 
|         object.DoSanityCheck( feedbacks ); | 
|         feedback := feedbacks.ToString( String::NewLine() ); | 
|      | 
|         if( not isnull( group ) ) | 
|         { | 
|           LibDMF_SanityCheckMessage::Create( group, feedback, object, true ); | 
|           numberofmessages++; | 
|         } | 
|       } | 
|     } | 
|   *] | 
| } |