|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Worker to download a chunk from a resource
Field Summary | |
---|---|
Naanou.ResourceExchange.Block | block |
System.Exception | caught |
Naanou.ResourceExchange.ResourceAvailRange | chunk |
bool | completed |
Naanou.ResourceExchange.Downloader | downloader |
Naanou.ResourceExchange.WorkStatusArgs | lastStatus |
Naanou.ResourceExchange.Source.Manifest | source |
System.Threading.Thread | thread |
Constructor Summary | |
---|---|
RangeGetter.RangeGetterWorker(Naanou.ResourceExchange.Downloader downloader, Naanou.ResourceExchange.Source.Manifest source, Naanou.ResourceExchange.ResourceAvailRange chunk) Constructor |
Property Summary | |
---|---|
Naanou.ResourceExchange.Block |
Block
Gets the block written to |
string |
Error
Returns an error string for any error that occurred (or null if none) |
bool |
IsComplete
Has worker completed? |
Naanou.ResourceExchange.WorkStatusArgs |
LastStatus
Gets the last recorded status of worker |
Naanou.ResourceExchange.Source.Manifest |
Manifest
Gets manifest |
Naanou.ResourceExchange.ByteRange |
Range
Gets range |
Naanou.ResourceExchange.ResourceAvailRange |
Range_
Gets the range the worker was getting |
Naanou.ResourceExchange.Source |
Source
Gets the soruce |
string |
SourceTitle
Gets a UI-friendly title for source |
bool |
WereErrors
Were there any errors while running? |
Method Summary | |
---|---|
void |
Abort() Aborts the worker. May not trigger Completion event |
void |
Join() Wait for worker to complete |
void |
Join(System.TimeSpan timeout) Wait a finite time for worker to complete |
void |
OnDownloadStatus(Naanou.ResourceExchange.IWorker worker, Naanou.ResourceExchange.WorkStatusArgs args) Status from the source re: download |
void |
PaintStatus(System.Drawing.Graphics g, System.Drawing.Rectangle rect) Paint worker status |
void |
Start() Starts worker in a new BelowNormal priority thread. Throws the Complete event when done |
void | StartImpl() |
void |
StartSync() Starts in same thread as caller |
string |
ToString() Gets a string representation of worker |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone |
Event Summary | |
---|---|
Naanou.ResourceExchange.WorkCompleteHandler |
Complete
Completion result is the block downloaded |
Naanou.ResourceExchange.WorkStatusHandler |
Status
Status |
Field Detail |
---|
private Naanou.ResourceExchange.Block block
private System.Exception caught
private Naanou.ResourceExchange.ResourceAvailRange chunk
private bool completed
private Naanou.ResourceExchange.Downloader downloader
private Naanou.ResourceExchange.WorkStatusArgs lastStatus
private Naanou.ResourceExchange.Source.Manifest source
private System.Threading.Thread thread
Constructor Detail |
---|
public RangeGetter.RangeGetterWorker(Naanou.ResourceExchange.Downloader downloader, Naanou.ResourceExchange.Source.Manifest source, Naanou.ResourceExchange.ResourceAvailRange chunk)
Constructor
Parameters:
downloader
- Downloadersource
- Source to usechunk
- ChunkProperty Detail |
---|
internal Naanou.ResourceExchange.Block Block
Gets the block written to
public string Error
Returns an error string for any error that occurred (or null if none)
public bool IsComplete
Has worker completed?
public Naanou.ResourceExchange.WorkStatusArgs LastStatus
Gets the last recorded status of worker
public Naanou.ResourceExchange.Source.Manifest Manifest
Gets manifest
public Naanou.ResourceExchange.ByteRange Range
Gets range
public Naanou.ResourceExchange.ResourceAvailRange Range_
Gets the range the worker was getting
public Naanou.ResourceExchange.Source Source
Gets the soruce
public string SourceTitle
Gets a UI-friendly title for source
public bool WereErrors
Were there any errors while running?
Method Detail |
---|
public void Abort()
Aborts the worker. May not trigger Completion event
public void Join()
Wait for worker to complete
public void Join(System.TimeSpan timeout)
Wait a finite time for worker to complete
Parameters:
timeout
- private void OnDownloadStatus(Naanou.ResourceExchange.IWorker worker, Naanou.ResourceExchange.WorkStatusArgs args)
Status from the source re: download
Parameters:
worker
- Nullargs
- Argspublic void PaintStatus(System.Drawing.Graphics g, System.Drawing.Rectangle rect)
Paint worker status
Parameters:
g
- rect
- public void Start()
Starts worker in a new BelowNormal priority thread. Throws the Complete event when done
private void StartImpl()
public void StartSync()
Starts in same thread as caller
public string ToString()
Gets a string representation of worker
Returns:
Event Detail |
---|
public Naanou.ResourceExchange.WorkCompleteHandler Complete
Completion result is the block downloaded
public Naanou.ResourceExchange.WorkStatusHandler Status
Status
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |