/// <summary>
        /// Finds the transform elements in the orchestration.
        /// </summary>
        /// <param name="orchestration">The orchestration to search.</param>
        /// <returns>Transforms, if found.</returns>
        public static Element[] FindTransforms(this Orchestration orchestration)
        {
            // Get the service declaration.
            var serviceDeclaration = orchestration.FindServiceDeclaration();

            return(serviceDeclaration.FindTransforms());
        }
 /// <summary>
 /// Finds the correlation declarations for the orchestration.
 /// </summary>
 /// <param name="orchestration">The orchestration to search.</param>
 /// <returns>Correlation declarations, if found.</returns>
 public static Element[] FindCorrelationDeclarations(this Orchestration orchestration)
 {
     return(orchestration.Model.Element.SingleOrDefault(e => e.Type == MetaModelConstants.ElementTypeModule)
            ?.Element1.SingleOrDefault(s => s.Type == MetaModelConstants.ElementTypeServiceDeclaration)
            ?.Element1?.Where(ms => ms.Type == MetaModelConstants.ElementTypeCorrelationDeclaration).ToArray());
 }
 /// <summary>
 /// Finds the service declaration for the orchestration.
 /// </summary>
 /// <param name="orchestration">The orchestration to search.</param>
 /// <returns>Service declaration, if found.</returns>
 public static Element FindServiceDeclaration(this Orchestration orchestration)
 {
     return(orchestration.Model.Element.SingleOrDefault(e => e.Type == MetaModelConstants.ElementTypeModule)?.Element1?.SingleOrDefault(s => s.Type == MetaModelConstants.ElementTypeServiceDeclaration));
 }
 /// <summary>
 /// Finds the multipart message types for the orchestration.
 /// </summary>
 /// <param name="orchestration">The orchestration to search.</param>
 /// <returns>Multipart message tyopes, if found.</returns>
 public static Element[] FindMultiPartMessageTypes(this Orchestration orchestration)
 {
     return(orchestration.Model.Element.SingleOrDefault(e => e.Type == MetaModelConstants.ElementTypeModule)?.Element1?.Where(m => m.Type == MetaModelConstants.ElementTypeMultipartMessageType).ToArray());
 }
 /// <summary>
 /// Finds the module for the orchestration.
 /// </summary>
 /// <param name="orchestration">The orchestration to search.</param>
 /// <returns>Module, if found.</returns>
 public static Element FindModule(this Orchestration orchestration)
 {
     return(orchestration.Model.Element.SingleOrDefault(e => e.Type == MetaModelConstants.ElementTypeModule));
 }