C# Class Smrf.NodeXL.GraphDataProviders.HttpNetworkAnalyzerBase

Abstract base class for classes that analyze network information obtained via HTTP Web requests.
This base class implements properties related to HTTP Web requests, a BackgroundWorker instance, and properties, methods, and events related to the BackgroundWorker. The derived class must implement a method to start an analysis and implement the BackgroundWorker_DoWork method.
Inheritance: Object
Show file Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
HttpRetryDelaysSec System.Int32[]
m_oBackgroundWorker System.ComponentModel.BackgroundWorker

Public Methods

Method Description
CancelAsync ( ) : void
CreateHttpWebRequest ( String url ) : HttpWebRequest
ExceptionToMessage ( Exception oException ) : String
HttpNetworkAnalyzerBase ( ) : System

Initializes a new instance of the class.

Protected Methods

Method Description
AppendDoubleGraphMLAttributeValue ( XmlNode oXmlNodeToSelectFrom, String sXPath, XmlNamespaceManager oXmlNamespaceManager, GraphMLXmlDocument oGraphMLXmlDocument, XmlNode oEdgeOrVertexXmlNode, String sGraphMLAttributeID ) : System.Boolean
AppendEdgeXmlNode ( GraphMLXmlDocument oGraphMLXmlDocument, String sVertex1ID, String sVertex2ID, String sRelationship ) : XmlNode
AppendInt32GraphMLAttributeValue ( XmlNode oXmlNodeToSelectFrom, String sXPath, XmlNamespaceManager oXmlNamespaceManager, GraphMLXmlDocument oGraphMLXmlDocument, XmlNode oEdgeOrVertexXmlNode, String sGraphMLAttributeID ) : System.Boolean
AppendStringGraphMLAttributeValue ( XmlNode oXmlNodeToSelectFrom, String sXPath, XmlNamespaceManager oXmlNamespaceManager, GraphMLXmlDocument oGraphMLXmlDocument, XmlNode oEdgeOrVertexXmlNode, String sGraphMLAttributeID ) : System.Boolean
BackgroundWorker_DoWork ( object sender, DoWorkEventArgs e ) : void
BackgroundWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
BackgroundWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
CheckCancellationPending ( ) : void
CheckIsBusy ( String sMethodName ) : void
DefineCustomMenuGraphMLAttributes ( GraphMLXmlDocument oGraphMLXmlDocument ) : void
DefineImageFileGraphMLAttribute ( GraphMLXmlDocument oGraphMLXmlDocument ) : void
DefineLabelGraphMLAttribute ( GraphMLXmlDocument oGraphMLXmlDocument ) : void
DefineRelationshipGraphMLAttribute ( GraphMLXmlDocument oGraphMLXmlDocument ) : void
ExceptionIsWebOrXml ( Exception oException ) : System.Boolean
FireProgressChanged ( ProgressChangedEventArgs e ) : void
GetNeedToAppendVertices ( NetworkLevel eNetworkLevel, Int32 iRecursionLevel ) : System.Boolean
GetNeedToRecurse ( NetworkLevel eNetworkLevel, Int32 iRecursionLevel ) : System.Boolean
GetXmlDocumentNoRetries ( HttpWebRequest oHttpWebRequest ) : XmlDocument
GetXmlDocumentWithRetries ( String sUrl, HttpStatusCode aeHttpStatusCodesToFailImmediately, RequestStatistics oRequestStatistics ) : XmlDocument
NetworkLevelToString ( NetworkLevel eNetworkLevel ) : String
OnNetworkObtained ( XmlDocument oGraphMLXmlDocument, RequestStatistics oRequestStatistics, String sNetworkDescription, String sNetworkTitle ) : void
OnNetworkObtainedWithoutTerminatingException ( GraphMLXmlDocument oGraphMLXmlDocument, RequestStatistics oRequestStatistics, String sNetworkDescription ) : void
OnTerminatingException ( Exception oException ) : void
OnUnexpectedException ( Exception oException, XmlDocument oGraphMLXmlDocument, RequestStatistics oRequestStatistics ) : void
ReportProgress ( String sProgressMessage ) : void
WebExceptionHasHttpStatusCode ( WebException oWebException ) : System.Boolean

Private Methods

Method Description
AssertValid ( ) : void

Method Details

AppendDoubleGraphMLAttributeValue() protected method

protected AppendDoubleGraphMLAttributeValue ( XmlNode oXmlNodeToSelectFrom, String sXPath, XmlNamespaceManager oXmlNamespaceManager, GraphMLXmlDocument oGraphMLXmlDocument, XmlNode oEdgeOrVertexXmlNode, String sGraphMLAttributeID ) : System.Boolean
oXmlNodeToSelectFrom System.Xml.XmlNode
sXPath String
oXmlNamespaceManager System.Xml.XmlNamespaceManager
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
oEdgeOrVertexXmlNode System.Xml.XmlNode
sGraphMLAttributeID String
return System.Boolean

AppendEdgeXmlNode() protected method

protected AppendEdgeXmlNode ( GraphMLXmlDocument oGraphMLXmlDocument, String sVertex1ID, String sVertex2ID, String sRelationship ) : XmlNode
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
sVertex1ID String
sVertex2ID String
sRelationship String
return System.Xml.XmlNode

AppendInt32GraphMLAttributeValue() protected method

protected AppendInt32GraphMLAttributeValue ( XmlNode oXmlNodeToSelectFrom, String sXPath, XmlNamespaceManager oXmlNamespaceManager, GraphMLXmlDocument oGraphMLXmlDocument, XmlNode oEdgeOrVertexXmlNode, String sGraphMLAttributeID ) : System.Boolean
oXmlNodeToSelectFrom System.Xml.XmlNode
sXPath String
oXmlNamespaceManager System.Xml.XmlNamespaceManager
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
oEdgeOrVertexXmlNode System.Xml.XmlNode
sGraphMLAttributeID String
return System.Boolean

AppendStringGraphMLAttributeValue() protected method

protected AppendStringGraphMLAttributeValue ( XmlNode oXmlNodeToSelectFrom, String sXPath, XmlNamespaceManager oXmlNamespaceManager, GraphMLXmlDocument oGraphMLXmlDocument, XmlNode oEdgeOrVertexXmlNode, String sGraphMLAttributeID ) : System.Boolean
oXmlNodeToSelectFrom System.Xml.XmlNode
sXPath String
oXmlNamespaceManager System.Xml.XmlNamespaceManager
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
oEdgeOrVertexXmlNode System.Xml.XmlNode
sGraphMLAttributeID String
return System.Boolean

BackgroundWorker_DoWork() protected abstract method

protected abstract BackgroundWorker_DoWork ( object sender, DoWorkEventArgs e ) : void
sender object
e System.ComponentModel.DoWorkEventArgs
return void

BackgroundWorker_ProgressChanged() protected method

protected BackgroundWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
sender object
e System.ComponentModel.ProgressChangedEventArgs
return void

BackgroundWorker_RunWorkerCompleted() protected method

protected BackgroundWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
sender object
e System.ComponentModel.RunWorkerCompletedEventArgs
return void

CancelAsync() public method

public CancelAsync ( ) : void
return void

CheckCancellationPending() protected method

protected CheckCancellationPending ( ) : void
return void

CheckIsBusy() protected method

protected CheckIsBusy ( String sMethodName ) : void
sMethodName String
return void

CreateHttpWebRequest() public static method

public static CreateHttpWebRequest ( String url ) : HttpWebRequest
url String
return System.Net.HttpWebRequest

DefineCustomMenuGraphMLAttributes() protected method

protected DefineCustomMenuGraphMLAttributes ( GraphMLXmlDocument oGraphMLXmlDocument ) : void
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
return void

DefineImageFileGraphMLAttribute() protected method

protected DefineImageFileGraphMLAttribute ( GraphMLXmlDocument oGraphMLXmlDocument ) : void
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
return void

DefineLabelGraphMLAttribute() protected method

protected DefineLabelGraphMLAttribute ( GraphMLXmlDocument oGraphMLXmlDocument ) : void
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
return void

DefineRelationshipGraphMLAttribute() protected method

protected DefineRelationshipGraphMLAttribute ( GraphMLXmlDocument oGraphMLXmlDocument ) : void
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
return void

ExceptionIsWebOrXml() protected method

protected ExceptionIsWebOrXml ( Exception oException ) : System.Boolean
oException System.Exception
return System.Boolean

ExceptionToMessage() public abstract method

public abstract ExceptionToMessage ( Exception oException ) : String
oException System.Exception
return String

FireProgressChanged() protected method

protected FireProgressChanged ( ProgressChangedEventArgs e ) : void
e System.ComponentModel.ProgressChangedEventArgs
return void

GetNeedToAppendVertices() protected method

protected GetNeedToAppendVertices ( NetworkLevel eNetworkLevel, Int32 iRecursionLevel ) : System.Boolean
eNetworkLevel NetworkLevel
iRecursionLevel System.Int32
return System.Boolean

GetNeedToRecurse() protected method

protected GetNeedToRecurse ( NetworkLevel eNetworkLevel, Int32 iRecursionLevel ) : System.Boolean
eNetworkLevel NetworkLevel
iRecursionLevel System.Int32
return System.Boolean

GetXmlDocumentNoRetries() protected method

protected GetXmlDocumentNoRetries ( HttpWebRequest oHttpWebRequest ) : XmlDocument
oHttpWebRequest System.Net.HttpWebRequest
return System.Xml.XmlDocument

GetXmlDocumentWithRetries() protected method

protected GetXmlDocumentWithRetries ( String sUrl, HttpStatusCode aeHttpStatusCodesToFailImmediately, RequestStatistics oRequestStatistics ) : XmlDocument
sUrl String
aeHttpStatusCodesToFailImmediately HttpStatusCode
oRequestStatistics RequestStatistics
return System.Xml.XmlDocument

HttpNetworkAnalyzerBase() public method

Initializes a new instance of the class.
public HttpNetworkAnalyzerBase ( ) : System
return System

NetworkLevelToString() protected method

protected NetworkLevelToString ( NetworkLevel eNetworkLevel ) : String
eNetworkLevel NetworkLevel
return String

OnNetworkObtained() protected method

protected OnNetworkObtained ( XmlDocument oGraphMLXmlDocument, RequestStatistics oRequestStatistics, String sNetworkDescription, String sNetworkTitle ) : void
oGraphMLXmlDocument System.Xml.XmlDocument
oRequestStatistics RequestStatistics
sNetworkDescription String
sNetworkTitle String
return void

OnNetworkObtainedWithoutTerminatingException() protected method

protected OnNetworkObtainedWithoutTerminatingException ( GraphMLXmlDocument oGraphMLXmlDocument, RequestStatistics oRequestStatistics, String sNetworkDescription ) : void
oGraphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
oRequestStatistics RequestStatistics
sNetworkDescription String
return void

OnTerminatingException() protected method

protected OnTerminatingException ( Exception oException ) : void
oException System.Exception
return void

OnUnexpectedException() protected method

protected OnUnexpectedException ( Exception oException, XmlDocument oGraphMLXmlDocument, RequestStatistics oRequestStatistics ) : void
oException System.Exception
oGraphMLXmlDocument System.Xml.XmlDocument
oRequestStatistics RequestStatistics
return void

ReportProgress() protected method

protected ReportProgress ( String sProgressMessage ) : void
sProgressMessage String
return void

WebExceptionHasHttpStatusCode() protected method

protected WebExceptionHasHttpStatusCode ( WebException oWebException ) : System.Boolean
oWebException System.Net.WebException
return System.Boolean

Property Details

HttpRetryDelaysSec protected static property

protected static Int32[],System HttpRetryDelaysSec
return System.Int32[]

m_oBackgroundWorker protected property

protected BackgroundWorker,System.ComponentModel m_oBackgroundWorker
return System.ComponentModel.BackgroundWorker