Class SentimentScoreProvider
Inheritance
SentimentScoreProvider
Assembly: SoDataBase.BusinessLogic.dll
Syntax
[MDOProviderPlugin("Sentiment")]
public class SentimentScoreProvider : LiteralsOnlyBase, ISoListProvider, ISoList
Constructors
SentimentScoreProvider()
Declaration
public SentimentScoreProvider()
Fields
IdNegative
Declaration
public const int IdNegative = 2
Field Value
IdNeutral
Declaration
public const int IdNeutral = 3
Field Value
IdPositive
Declaration
public const int IdPositive = 1
Field Value
IdUnknown
Declaration
public const int IdUnknown = 4
Field Value
ProviderName
Declaration
public const string ProviderName = "Sentiment"
Field Value
ValueNegative
Declaration
public const string ValueNegative = "Sentiment_negative"
Field Value
ValueNeutral
Declaration
public const string ValueNeutral = "Sentiment_neutral"
Field Value
ValuePositive
Declaration
public const string ValuePositive = "Sentiment_positive"
Field Value
ValueUnknown
Declaration
public const string ValueUnknown = "Sentiment_unknown"
Field Value
Methods
AddItemsAsync(CancellationToken)
Subclass contract: use the RawRootItems and RawHeadingItems properties to add items to
your literals-only list. The base class will then perform any search or flattening required.
Declaration
protected override Task AddItemsAsync(CancellationToken cancellationToken)
Parameters
Returns
Overrides
Examples
This example shows a typical implementation of a literal list, in this case the date interval list from the Filter dialog:
[MDOProviderPlugin( "FilterFutureDate" )]
public class FilterFutureDateList : LiteralsOnlyBase
{
protected override void AddItems()
{
RawRootItems.Add( new SoListItem( 1, "[SR_DATE_RANGE_3MONTHS]", string.Empty, string.Empty ) );
RawRootItems.Add( new SoListItem( 2, "[SR_DATE_RANGE_4MONTHS]", string.Empty, string.Empty ) );
RawRootItems.Add( new SoListItem( 3, "[SR_DATE_RANGE_6MONTHS]", string.Empty, string.Empty ) );
RawRootItems.Add( new SoListItem( 4, "[SR_DATE_RANGE_1YEAR]", string.Empty, string.Empty ) );
RawRootItems.Add( new SoListItem( 5, "[SR_DATE_RANGE_2YEAR]", string.Empty, string.Empty ) );
}
}
Note that using a search in this case yields unexpected results. The search is performed on the raw items, which
contains resource tags - and that is not what you actually want to search against. So resources + search do not
go together.
Implements
Extension Methods