//************************************************************************* // Constructor: WhatEdgeToIncludeInformation() // /// <summary> /// Initializes a new instance of the <see /// cref="WhatEdgeToIncludeInformation" /> class. /// </summary> /// /// <param name="whatEdgeToInclude"> /// The flag in the <see /// cref="TwitterSearchNetworkAnalyzer.WhatToInclude" /> enumeration. /// </param> /// /// <param name="name"> /// The flag's friendly name, suitable for display in a dialog box. /// </param> //************************************************************************* private WhatEdgeToIncludeInformation ( TwitterSearchNetworkAnalyzer.WhatToInclude whatEdgeToInclude, String name ) { m_eWhatEdgeToInclude = whatEdgeToInclude; m_sName = name; AssertValid(); }
GetTwitterSearchNetwork ( DateTime oStartTime, String sNetworkConfigurationFilePath, NetworkConfigurationFileParser oNetworkConfigurationFileParser, out XmlDocument oXmlDocument, out String sNetworkFileFolderPath, out NetworkFileFormats eNetworkFileFormats, out String sNodeXLWorkbookSettingsFilePath, out Boolean bAutomateNodeXLWorkbook ) { Debug.Assert( !String.IsNullOrEmpty(sNetworkConfigurationFilePath) ); Debug.Assert(oNetworkConfigurationFileParser != null); oXmlDocument = null; sNetworkFileFolderPath = null; eNetworkFileFormats = NetworkFileFormats.None; sNodeXLWorkbookSettingsFilePath = null; bAutomateNodeXLWorkbook = false; String sSearchTerm = null; TwitterSearchNetworkAnalyzer.WhatToInclude eWhatToInclude = TwitterSearchNetworkAnalyzer.WhatToInclude.None; Int32 iMaximumTweets = Int32.MinValue; try { oNetworkConfigurationFileParser. GetTwitterSearchNetworkConfiguration(out sSearchTerm, out eWhatToInclude, out iMaximumTweets, out sNetworkFileFolderPath, out eNetworkFileFormats, out sNodeXLWorkbookSettingsFilePath, out bAutomateNodeXLWorkbook); } catch (XmlException oXmlException) { // (This call exits the program.) OnNetworkConfigurationFileException(oXmlException); } TwitterSearchNetworkAnalyzer oTwitterSearchNetworkAnalyzer = new TwitterSearchNetworkAnalyzer(); oTwitterSearchNetworkAnalyzer.ProgressChanged += new ProgressChangedEventHandler( HttpNetworkAnalyzer_ProgressChanged); Console.WriteLine( "Getting the Twitter Search network specified in \"{0}\". The" + " search term is \"{1}\"." , sNetworkConfigurationFilePath, sSearchTerm ); try { oXmlDocument = oTwitterSearchNetworkAnalyzer.GetNetwork( sSearchTerm, eWhatToInclude, iMaximumTweets); } catch (PartialNetworkException oPartialNetworkException) { oXmlDocument = OnGetNetworkPartialNetworkException( oStartTime, oPartialNetworkException, sNetworkConfigurationFilePath, sNetworkFileFolderPath, oTwitterSearchNetworkAnalyzer); } catch (Exception oException) { // (This call exits the program.) OnGetNetworkOtherException(oStartTime, oException, sNetworkConfigurationFilePath, sNetworkFileFolderPath, oTwitterSearchNetworkAnalyzer); } }