Show / Hide Table of Contents

Class QuoteListsByNameProvider

Wildcard list provider for Quote Management lists; see remarks for naming conventions. If you cannot dynamically generate the proper list name, then see QuoteListsByIdProvider, which has a fixed name and instead takes a QuoteAlternativeId.

Inheritance
object
QuoteListsByNameProvider
Implements
IWildcardMDOProvider
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
[WildcardMDOProviderPlugin("QuoteListsByName")]
public sealed class QuoteListsByNameProvider : IWildcardMDOProvider
Remarks

Quote lists, supplied by the Quote Management connectors, adhere to the following naming convention:
If the list is named 'PaymentTerms', and the context is sale with id 5, then the list name QM_5_PaymentTerms will retrieve the correct list via the correct connector.

The first part must be uppercase QM, the second part must be a valid sale that has a quote, and the third part must be a list name recognized by the connector. Underscore is the delimiter character.

Quote list dispatching is a two-step process. A Quote Connector may choose to implement its own MDO List provider(s), in which case the lists must be called "<ListName><ConnectorName>". If such a provider plugin class exists, then it will be called.

Otherwise, we dispatch to a generic facade that will in turn call the plugins' IQuoteListProvider.GetQuoteList method, which is a much simpler interface to implement than the full-size MDO provider. If the connector does not have that capability, then we finally give up.

If the call fails for any reason, then an empty list is returned. Only flat lists are supported by this mechanism. Quote Connector assemblies may implement their own WildcardMDOProvider that has a different behaviour (icons, headings etc) if they wish to do so - just use a low priority value in the declaring attribute and you will be called first.

If the saleId is 0, then an aggregate list from all visible connectors is requested (good for searching). Delegates to list "erpProductFamily" or "ErpProductCategory" list provider, which calls us back once for each list the user can see.

Constructors

QuoteListsByNameProvider(ISoListProviderFactory)

Wildcard list provider for Quote Management lists; see remarks for naming conventions. If you cannot dynamically generate the proper list name, then see QuoteListsByIdProvider, which has a fixed name and instead takes a QuoteAlternativeId.

Declaration
public QuoteListsByNameProvider(ISoListProviderFactory soListProviderFactory)
Parameters
Type Name Description
ISoListProviderFactory soListProviderFactory
Remarks

Quote lists, supplied by the Quote Management connectors, adhere to the following naming convention:
If the list is named 'PaymentTerms', and the context is sale with id 5, then the list name QM_5_PaymentTerms will retrieve the correct list via the correct connector.

The first part must be uppercase QM, the second part must be a valid sale that has a quote, and the third part must be a list name recognized by the connector. Underscore is the delimiter character.

Quote list dispatching is a two-step process. A Quote Connector may choose to implement its own MDO List provider(s), in which case the lists must be called "<ListName><ConnectorName>". If such a provider plugin class exists, then it will be called.

Otherwise, we dispatch to a generic facade that will in turn call the plugins' IQuoteListProvider.GetQuoteList method, which is a much simpler interface to implement than the full-size MDO provider. If the connector does not have that capability, then we finally give up.

If the call fails for any reason, then an empty list is returned. Only flat lists are supported by this mechanism. Quote Connector assemblies may implement their own WildcardMDOProvider that has a different behaviour (icons, headings etc) if they wish to do so - just use a low priority value in the declaring attribute and you will be called first.

If the saleId is 0, then an aggregate list from all visible connectors is requested (good for searching). Delegates to list "erpProductFamily" or "ErpProductCategory" list provider, which calls us back once for each list the user can see.

Fields

Prefix

Wildcard list provider for Quote Management lists; see remarks for naming conventions. If you cannot dynamically generate the proper list name, then see QuoteListsByIdProvider, which has a fixed name and instead takes a QuoteAlternativeId.

Declaration
public const string Prefix = "QM"
Field Value
Type Description
string
Remarks

Quote lists, supplied by the Quote Management connectors, adhere to the following naming convention:
If the list is named 'PaymentTerms', and the context is sale with id 5, then the list name QM_5_PaymentTerms will retrieve the correct list via the correct connector.

The first part must be uppercase QM, the second part must be a valid sale that has a quote, and the third part must be a list name recognized by the connector. Underscore is the delimiter character.

Quote list dispatching is a two-step process. A Quote Connector may choose to implement its own MDO List provider(s), in which case the lists must be called "<ListName><ConnectorName>". If such a provider plugin class exists, then it will be called.

Otherwise, we dispatch to a generic facade that will in turn call the plugins' IQuoteListProvider.GetQuoteList method, which is a much simpler interface to implement than the full-size MDO provider. If the connector does not have that capability, then we finally give up.

If the call fails for any reason, then an empty list is returned. Only flat lists are supported by this mechanism. Quote Connector assemblies may implement their own WildcardMDOProvider that has a different behaviour (icons, headings etc) if they wish to do so - just use a low priority value in the declaring attribute and you will be called first.

If the saleId is 0, then an aggregate list from all visible connectors is requested (good for searching). Delegates to list "erpProductFamily" or "ErpProductCategory" list provider, which calls us back once for each list the user can see.

Methods

GetListName(string, int)

Given a base list name and sale id, return the list name that uniquely specifies the "real" list name that can be used all over the place

Declaration
public static string GetListName(string name, int saleId)
Parameters
Type Name Description
string name
int saleId
Returns
Type Description
string
Remarks

Quote lists, supplied by the Quote Management connectors, adhere to the following naming convention:
If the list is named 'PaymentTerms', and the context is sale with id 5, then the list name QM_5_PaymentTerms will retrieve the correct list via the correct connector.

The first part must be uppercase QM, the second part must be a valid sale that has a quote, and the third part must be a list name recognized by the connector. Underscore is the delimiter character.

Quote list dispatching is a two-step process. A Quote Connector may choose to implement its own MDO List provider(s), in which case the lists must be called "<ListName><ConnectorName>". If such a provider plugin class exists, then it will be called.

Otherwise, we dispatch to a generic facade that will in turn call the plugins' IQuoteListProvider.GetQuoteList method, which is a much simpler interface to implement than the full-size MDO provider. If the connector does not have that capability, then we finally give up.

If the call fails for any reason, then an empty list is returned. Only flat lists are supported by this mechanism. Quote Connector assemblies may implement their own WildcardMDOProvider that has a different behaviour (icons, headings etc) if they wish to do so - just use a low priority value in the declaring attribute and you will be called first.

If the saleId is 0, then an aggregate list from all visible connectors is requested (good for searching). Delegates to list "erpProductFamily" or "ErpProductCategory" list provider, which calls us back once for each list the user can see.

GetListName(string, string)

Wildcard list provider for Quote Management lists; see remarks for naming conventions. If you cannot dynamically generate the proper list name, then see QuoteListsByIdProvider, which has a fixed name and instead takes a QuoteAlternativeId.

Declaration
public static string GetListName(string name, string connectorName)
Parameters
Type Name Description
string name
string connectorName
Returns
Type Description
string
Remarks

Quote lists, supplied by the Quote Management connectors, adhere to the following naming convention:
If the list is named 'PaymentTerms', and the context is sale with id 5, then the list name QM_5_PaymentTerms will retrieve the correct list via the correct connector.

The first part must be uppercase QM, the second part must be a valid sale that has a quote, and the third part must be a list name recognized by the connector. Underscore is the delimiter character.

Quote list dispatching is a two-step process. A Quote Connector may choose to implement its own MDO List provider(s), in which case the lists must be called "<ListName><ConnectorName>". If such a provider plugin class exists, then it will be called.

Otherwise, we dispatch to a generic facade that will in turn call the plugins' IQuoteListProvider.GetQuoteList method, which is a much simpler interface to implement than the full-size MDO provider. If the connector does not have that capability, then we finally give up.

If the call fails for any reason, then an empty list is returned. Only flat lists are supported by this mechanism. Quote Connector assemblies may implement their own WildcardMDOProvider that has a different behaviour (icons, headings etc) if they wish to do so - just use a low priority value in the declaring attribute and you will be called first.

If the saleId is 0, then an aggregate list from all visible connectors is requested (good for searching). Delegates to list "erpProductFamily" or "ErpProductCategory" list provider, which calls us back once for each list the user can see.

GetProviderAsync(string, CancellationToken)

Return a fully populated, concrete list provider for a given list name; or null. See class remarks for more information.

Declaration
public Task<ISoListProvider> GetProviderAsync(string listName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string listName

"qm_excelquoteconnector_productcategory" (generic connector name - during setup) or "qm_con3_productCategory" (3=connection id), or "qm_3_productCategory", where 3 = sale-id

CancellationToken cancellationToken
Returns
Type Description
Task<ISoListProvider>
Remarks

Quote lists, supplied by the Quote Management connectors, adhere to the following naming convention:
If the list is named 'PaymentTerms', and the context is sale with id 5, then the list name QM_5_PaymentTerms will retrieve the correct list via the correct connector.

The first part must be uppercase QM, the second part must be a valid sale that has a quote, and the third part must be a list name recognized by the connector. Underscore is the delimiter character.

Quote list dispatching is a two-step process. A Quote Connector may choose to implement its own MDO List provider(s), in which case the lists must be called "<ListName><ConnectorName>". If such a provider plugin class exists, then it will be called.

Otherwise, we dispatch to a generic facade that will in turn call the plugins' IQuoteListProvider.GetQuoteList method, which is a much simpler interface to implement than the full-size MDO provider. If the connector does not have that capability, then we finally give up.

If the call fails for any reason, then an empty list is returned. Only flat lists are supported by this mechanism. Quote Connector assemblies may implement their own WildcardMDOProvider that has a different behaviour (icons, headings etc) if they wish to do so - just use a low priority value in the declaring attribute and you will be called first.

If the saleId is 0, then an aggregate list from all visible connectors is requested (good for searching). Delegates to list "erpProductFamily" or "ErpProductCategory" list provider, which calls us back once for each list the user can see.

Implements

IWildcardMDOProvider

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top