51Degrees Pipeline .NET  4.2

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Engines.FiftyOne.FlowElements.ShareUsageBase Class Reference abstract

Detailed Description

Abstract base class for ShareUsage elements.

Contains common functionality such as filtering the evidence and building the XML records.

Inheritance diagram for FiftyOne.Pipeline.Engines.FiftyOne.FlowElements.ShareUsageBase:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Engines.FiftyOne.FlowElements.ShareUsageBase:

[legend]

Classes

class  ShareUsageData
Inner class that is used to store details of data in memory prior to it being sent to 51Degrees. More...

Public Member Functions

override void  AddPipeline (IPipeline pipeline)
Add More...
string  EncodeInvalidXMLChars (string text)
encodes any unusual characters into their hex representation More...

Public Member Functions inherited from FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< IElementData, IElementPropertyMetaData >

 FlowElementBase (ILogger< FlowElementBase< T, TMeta >> logger)
Constructor More...
 FlowElementBase (ILogger< FlowElementBase< T, TMeta >> logger, Func< IPipeline, FlowElementBase< T, TMeta >, T > elementDataFactory)
Constructor More...
virtual void  Process (IFlowData data)
Process the given IFlowData with this FlowElement. More...
void  Dispose ()
Dispose More...

Protected Member Functions

 ShareUsageBase (ILogger< ShareUsageBase > logger, HttpClient httpClient, double sharePercentage, int minimumEntriesPerMessage, int maximumQueueSize, int addTimeout, int takeTimeout, int repeatEvidenceIntervalMinutes, bool trackSession, string shareUsageUrl, List< string > blockedHttpHeaders, List< string > includedQueryStringParameters, List< KeyValuePair< string, string >> ignoreDataEvidenceFilter, string aspSessionCookieName=Engines.Constants.DEFAULT_ASP_COOKIE_NAME)
Constructor More...
 ShareUsageBase (ILogger< ShareUsageBase > logger, HttpClient httpClient, double sharePercentage, int minimumEntriesPerMessage, int maximumQueueSize, int addTimeout, int takeTimeout, int repeatEvidenceIntervalMinutes, bool trackSession, string shareUsageUrl, List< string > blockedHttpHeaders, List< string > includedQueryStringParameters, List< KeyValuePair< string, string >> ignoreDataEvidenceFilter, string aspSessionCookieName, ITracker tracker)
Constructor More...
override void  ProcessInternal (IFlowData data)
Process the data More...
override void  ManagedResourcesCleanup ()
Send any data which has built up locally and not yet been sent to the remote service. More...
override void  UnmanagedResourcesCleanup ()
Clean up any unmanaged resources. More...
void  TrySendData ()
Attempt to send the data to the remote service. More...
abstract void  BuildAndSendXml ()
virtual void  WriteData (XmlWriter writer, ShareUsageData data)
Virtual method to be overridden in extending usage share elements. More...
void  WriteDeviceData (XmlWriter writer, ShareUsageData data)
Write the specified device data using the specified writer. More...
virtual void  WritePipelineInfo (XmlWriter writer)
Virtual method to write details about the pipeline. More...

Protected Member Functions inherited from FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< IElementData, IElementPropertyMetaData >

abstract void  ProcessInternal (IFlowData data)
Abstract method called by Process(IFlowData). More...
virtual T  CreateElementData (IPipeline pipeline)
Method used to create element data instances that are populated by this flow element More...
virtual void  Dispose (bool disposing)
Dispose of any resources. More...

Protected Attributes

HttpClient  HttpClient => _httpClient
The HttpClient to use when sending the data. More...
string  ShareUsageUrl => ShareUsageUri.AbsoluteUri
The base URL to send usage data to. More...

Properties

BlockingCollection< ShareUsageData >  EvidenceCollection [get]
Queue used to store entries in memory prior to them being sent to 51Degrees. More...
int  TakeTimeout [get]
Timeout to use when taking from the queue. More...
int  MinEntriesPerMessage = Constants.SHARE_USAGE_DEFAULT_MIN_ENTRIES_PER_MESSAGE [get]
The minimum number of request entries per message sent to 51Degrees. More...
Uri  ShareUsageUri [get]
The base URL to send usage data to. More...
XmlWriterSettings  WriterSettings [get]
The settings to use when creating an XML payload to send to the usage sharing web service. More...
override string  ElementDataKey [get]
The data key for this element More...
override IEvidenceKeyFilter  EvidenceKeyFilter [get]
Get the evidence key filter for this element. More...
override IList< IElementPropertyMetaData >  Properties [get]
Get a list of the meta-data relating to the properties that this flow element will populate. More...
internal bool  IsCanceled = false [get, set]
Indicates whether share usage has been canceled as a result of an error. More...

Properties inherited from FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< IElementData, IElementPropertyMetaData >

ILogger< FlowElementBase< T, TMeta > >  Logger [get]
The logger for this instance More...
IReadOnlyList< IPipeline >  Pipelines [get]
Get a read only list of the pipelines that this element has been added to. More...
abstract string  ElementDataKey [get]
The string name of the key used to access the data populated by this element in the IFlowData. More...
abstract IEvidenceKeyFilter  EvidenceKeyFilter [get]
A list of all the evidence keys that this Flow Element can make use of. More...
abstract IList< TMeta >  Properties [get]
Details of the properties that this engine can populate More...
virtual bool  Asynchronous [get]
True if the element can be run totally asynchronously, false otherwise. More...
virtual bool  IsConcurrent [get]
True if the element starts multiple threads. More...
bool  IsDisposed [get]
True if the element has been disposed More...
ITypedKey< T >  ElementDataKeyTyped [get]
Get the key used to access the data populated by this element in the IFlowData. More...

Constructor & Destructor Documentation

◆ ShareUsageBase() [1/2]

FiftyOne.Pipeline.Engines.FiftyOne.FlowElements.ShareUsageBase.ShareUsageBase ( ILogger< ShareUsageBase >   logger,
HttpClient