C# Class PleaseIgnore.IntelMap.IntelChannelContainer

Manages the list of IntelChannel watched by an instance of IntelReporter.
Inheritance: INestedContainer, INotifyPropertyChanged
Mostra file Open project: EtherealWake/test-intel Class Usage Examples

Private Properties

Property Type Description
IContainer void
IContainer void
ObjectInvariant void
OnPropertyChanged void
channel_IntelReported void
channel_PropertyChanged void
timer_Callback void

Public Methods

Method Description
Dispose ( ) : void

Releases the managed and unmanaged resources used by the IntelChannelContainer.

GetChannelList ( ) : string[]

Downloads the list of channels to monitor from the Test Alliance Intel Map server.

GetChannelList ( Uri serviceUri ) : string[]

Downloads the list of channels to monitor from a specific reporting server.

GetChannelList ( string serviceUri ) : string[]

Downloads the list of channels to monitor from a specific reporting server.

IntelChannelContainer ( ) : System

Initializes a new instance of the IntelChannelContainer class.

IntelChannelContainer ( IComponent owner ) : System

Initializes a new instance of the IntelChannelContainer class with the specified owning Component.

Start ( ) : void

Downloads the channel list and begins the acquisition of log entries from the EVE chat logs. This method enables IntelReported events.

Stop ( ) : void

Stops the IntelChannelContainer from providing location data and events. IntelReported events will no longer be raised nor will the channel list be updated.

Protected Methods

Method Description
CreateChannel ( string channelName ) : IntelChannel

Creates an instance of IntelChannel to manage the monitoring of an intel channel log file.

Classes derived from IntelChannelContainer are free to override CreateChannel and completely replace the logic without calling the base implementation. In this case, the derivative class must register handlers to call OnUpdateStatus and OnIntelReported under the appropriate circumstances. The IComponent.Site must be initialzied to a proper linking instance of ISite.

Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the IntelChannelContainer and optionally releases the managed resources.

OnIntelReported ( IntelEventArgs e ) : void

Raises the IntelReported event.

OnIntelReported makes no changes to the internal object state and can be safely called at any time. If the logic within CreateChannel is replaced, the IntelChannel.IntelReported event needs to be forwarded to OnIntelReported.

OnPropertyChanged ( PropertyChangedEventArgs e ) : void

Raises the PropertyChanged event.

OnIntelReported makes no changes to the internal object state and can be safely called at any time. The PropertyChanged event is scheduled for asynchronous handling by the ThreadPool.

OnRemoveChannel ( IntelChannel channel ) : void

If the user attempts to IDisposable.Dispose an IntelChannel this function will be part of the IComponent tear-down process.

OnStart ( ) : void

Called after Start has been called.

OnStart will be called from within a synchronized context so derived classes should not attempt to perform any additional synchronization themselves.

OnStop ( ) : void

Called after Stop has been called.

OnStop will be called from within a synchronized context so derived classes should not attempt to perform any additional synchronization themselves.

OnUpdateList ( ) : void

Called periodically to download the intel channel list and update the list of IntelChannel components.

As OnUpdateList downloads data from a remote server, locks should not be maintained on object state during the call to OnUpdateList as this may lead to significantly impairments of the UI.

OnUpdateStatus ( ) : void

Updates the Status property to reflect the aggregate state of those components in Channels.

If a derived class replaces CreateChannel, it must ensure that OnUpdateStatus is called when there is a change to the IntelChannel.Status property by monitoring the IntelChannel.PropertyChanged event.

Private Methods

Method Description
IContainer ( IComponent component ) : void

Adds the specified IComponent to the IContainer at the end of the list.

IContainer ( IComponent component, string name ) : void

Adds the specified IComponent to the IContainer at the end of the list, and assigns a name to the component.

ObjectInvariant ( ) : void
OnPropertyChanged ( string propertyName ) : void

Raises the PropertyChanged event.

channel_IntelReported ( object sender, IntelEventArgs e ) : void

Calls OnIntelReported.

channel_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Calls OnUpdateStatus.

timer_Callback ( object state ) : void

Calls OnUpdateList, trapping any exceptions.

Method Details

CreateChannel() protected method

Creates an instance of IntelChannel to manage the monitoring of an intel channel log file.
Classes derived from IntelChannelContainer are free to override CreateChannel and completely replace the logic without calling the base implementation. In this case, the derivative class must register handlers to call OnUpdateStatus and OnIntelReported under the appropriate circumstances. The IComponent.Site must be initialzied to a proper linking instance of ISite.
protected CreateChannel ( string channelName ) : IntelChannel
channelName string The base file name of the intel channel to monitor.
return IntelChannel

Dispose() public method

Releases the managed and unmanaged resources used by the IntelChannelContainer.
public Dispose ( ) : void
return void

Dispose() protected method

Releases the unmanaged resources used by the IntelChannelContainer and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool /// to release both managed and unmanaged /// resources; to release only unmanaged /// resources. ///
return void

GetChannelList() public static method

Downloads the list of channels to monitor from the Test Alliance Intel Map server.
There was a problem contacting the /// server or the server response was invalid.
public static GetChannelList ( ) : string[]
return string[]

GetChannelList() public static method

Downloads the list of channels to monitor from a specific reporting server.
There was a problem contacting /// the server or the server response was invalid.
public static GetChannelList ( Uri serviceUri ) : string[]
serviceUri System.Uri The server to download /// the channel list from.
return string[]

GetChannelList() public static method

Downloads the list of channels to monitor from a specific reporting server.
There was a problem contacting /// the server or the server response was invalid.
public static GetChannelList ( string serviceUri ) : string[]
serviceUri string The server to download /// the channel list from.
return string[]

IntelChannelContainer() public method

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

IntelChannelContainer() public method

Initializes a new instance of the IntelChannelContainer class with the specified owning Component.
public IntelChannelContainer ( IComponent owner ) : System
owner IComponent The instance of which /// owns this .
return System

OnIntelReported() protected method

Raises the IntelReported event.
OnIntelReported makes no changes to the internal object state and can be safely called at any time. If the logic within CreateChannel is replaced, the IntelChannel.IntelReported event needs to be forwarded to OnIntelReported.
protected OnIntelReported ( IntelEventArgs e ) : void
e IntelEventArgs Arguments of the event being raised.
return void

OnPropertyChanged() protected method

Raises the PropertyChanged event.
OnIntelReported makes no changes to the internal object state and can be safely called at any time. The PropertyChanged event is scheduled for asynchronous handling by the ThreadPool.
protected OnPropertyChanged ( PropertyChangedEventArgs e ) : void
e System.ComponentModel.PropertyChangedEventArgs Arguments of the event being raised.
return void

OnRemoveChannel() protected method

If the user attempts to IDisposable.Dispose an IntelChannel this function will be part of the IComponent tear-down process.
protected OnRemoveChannel ( IntelChannel channel ) : void
channel IntelChannel /// The instance of being removed. ///
return void

OnStart() protected method

Called after Start has been called.
OnStart will be called from within a synchronized context so derived classes should not attempt to perform any additional synchronization themselves.
protected OnStart ( ) : void
return void

OnStop() protected method

Called after Stop has been called.
OnStop will be called from within a synchronized context so derived classes should not attempt to perform any additional synchronization themselves.
protected OnStop ( ) : void
return void

OnUpdateList() protected method

Called periodically to download the intel channel list and update the list of IntelChannel components.
As OnUpdateList downloads data from a remote server, locks should not be maintained on object state during the call to OnUpdateList as this may lead to significantly impairments of the UI.
protected OnUpdateList ( ) : void
return void

OnUpdateStatus() protected method

Updates the Status property to reflect the aggregate state of those components in Channels.
If a derived class replaces CreateChannel, it must ensure that OnUpdateStatus is called when there is a change to the IntelChannel.Status property by monitoring the IntelChannel.PropertyChanged event.
protected OnUpdateStatus ( ) : void
return void

Start() public method

Downloads the channel list and begins the acquisition of log entries from the EVE chat logs. This method enables IntelReported events.
public Start ( ) : void
return void

Stop() public method

Stops the IntelChannelContainer from providing location data and events. IntelReported events will no longer be raised nor will the channel list be updated.
public Stop ( ) : void
return void