ATML1671Translator.forms.ATMLTranslatorToolWindow.ProcessProcedure C# (CSharp) Method

ProcessProcedure() private method

private ProcessProcedure ( XAttribute procRefIdAttribute, XAttribute refIdAttribute, string delimiter ) : void
procRefIdAttribute XAttribute
refIdAttribute XAttribute
delimiter string
return void
        private void ProcessProcedure( XAttribute procRefIdAttribute, XAttribute refIdAttribute, string delimiter )
        {
            string procRefId = procRefIdAttribute != null
                                   ? procRefIdAttribute.Value
                                   : refIdAttribute != null ? refIdAttribute.Value : null;
            if (!string.IsNullOrEmpty( procRefId ))
            {
                //--- Lookup Procedure and extract whats done ---//
                XElement pnode =
                    _aixmlDocument.XPathSelectElement( string.Format( "//*[@id='{0}' ]/statements",
                                                                      procRefId ) );
                if (pnode != null)
                {
                    if (pnode.Parent != null)
                    {
                        XAttribute name = pnode.Parent.Attribute( "name" );
                        LogManager.Trace( string.Format( delimiter, "START", name == null ? "" : name.Value ) );
                        foreach (XElement xElement in pnode.Elements())
                        {
                            ProcessStatement( xElement );
                        }
                        LogManager.Trace( string.Format( delimiter, "END", name == null ? "" : name.Value ) );
                    }
                }
            }
        }
ATMLTranslatorToolWindow