Class ShippingSystem
Inheritance
System.Object
ShippingSystem
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: NFX.Web.dll
Syntax
public abstract class ShippingSystem : ServiceWithInstrumentationBase<object>, IApplicationComponent, IDisposable, IService, INamed, ILocalizedTimeProvider, IWebClientCaller, IShippingSystemImplementation, IShippingSystem, IConfigurable, IInstrumentable, IExternallyParameterized
Constructors
ShippingSystem(String, IConfigSectionNode)
Declaration
public ShippingSystem(string name, IConfigSectionNode node)
Parameters
ShippingSystem(String, IConfigSectionNode, Object)
Declaration
public ShippingSystem(string name, IConfigSectionNode node, object director)
Parameters
Fields
CONFIG_AUTO_START_ATTR
Declaration
public const string CONFIG_AUTO_START_ATTR = "auto-start"
Field Value
Type |
Description |
System.String |
|
CONFIG_CARRIER_SECTION
Declaration
public const string CONFIG_CARRIER_SECTION = "carrier"
Field Value
Type |
Description |
System.String |
|
CONFIG_CARRIERS_SECTION
Declaration
public const string CONFIG_CARRIERS_SECTION = "carriers"
Field Value
Type |
Description |
System.String |
|
CONFIG_SHIPPING_PROCESSING_SECTION
Declaration
public const string CONFIG_SHIPPING_PROCESSING_SECTION = "shipping-processing"
Field Value
Type |
Description |
System.String |
|
CONFIG_SHIPPING_SYSTEM_HOST_SECTION
Declaration
public const string CONFIG_SHIPPING_SYSTEM_HOST_SECTION = "shipping-system-host"
Field Value
Type |
Description |
System.String |
|
CONFIG_SHIPPING_SYSTEM_SECTION
Declaration
public const string CONFIG_SHIPPING_SYSTEM_SECTION = "shipping-system"
Field Value
Type |
Description |
System.String |
|
DEFAULT_LOG_LEVEL
Declaration
public const MessageType DEFAULT_LOG_LEVEL = MessageType.Warning
Field Value
DHL_EXPRESS_CARRIER_ID
Declaration
public const string DHL_EXPRESS_CARRIER_ID = "DHL_EXPRESS"
Field Value
Type |
Description |
System.String |
|
FEDEX_CARRIER_ID
Declaration
public const string FEDEX_CARRIER_ID = "FEDEX"
Field Value
Type |
Description |
System.String |
|
UPS_CARRIER_ID
Declaration
public const string UPS_CARRIER_ID = "UPS"
Field Value
Type |
Description |
System.String |
|
USPS_CARRIER_ID
Declaration
public const string USPS_CARRIER_ID = "USPS"
Field Value
Type |
Description |
System.String |
|
Properties
Capabilities
Declaration
public abstract IShippingSystemCapabilities Capabilities { get; }
Property Value
DefaultSessionConnectParams
Declaration
protected ShippingConnectionParameters DefaultSessionConnectParams { get; }
Property Value
DefaultSessionConnectParamsCfg
Declaration
[Config("default-session-connect-params")]
public IConfigSectionNode DefaultSessionConnectParamsCfg { get; set; }
Property Value
Instances
Declaration
public static Registry<ShippingSystem> Instances { get; }
Property Value
InstrumentationEnabled
Declaration
[Config(Default = false)]
[ExternalParameter(new string[]{"instrumentation", "shipping"})]
public override bool InstrumentationEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
NFX.ServiceModel.ServiceWithInstrumentationBase<System.Object>.InstrumentationEnabled
IsShippingSystemHost
Declaration
public static bool IsShippingSystemHost { get; }
Property Value
Type |
Description |
System.Boolean |
|
KeepAlive
Declaration
[Config(Default = true)]
public bool KeepAlive { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
LogLevel
Declaration
[Config(Default = MessageType.Warning)]
[ExternalParameter(new string[]{"shipping"})]
public MessageType LogLevel { get; set; }
Property Value
Pipelined
Declaration
[Config(Default = true)]
public bool Pipelined { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public IRegistry<ShippingCarrier> PreconfiguredShippingCarriers { get; }
Property Value
ShippingSystemHost
Returns process-global shipping system host
Declaration
public static IShippingSystemHost ShippingSystemHost { get; }
Property Value
WebServiceCallTimeoutMs
Declaration
[Config(Default = 20000)]
public int WebServiceCallTimeoutMs { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
___SetShippingSystemHost(IShippingSystemHostImplementation)
Sets process-global shipping system host.
If ShippingSystemStarter is used then the host may be auto-injected from configuration if it is there.
Developers: Do not call this method as it is used for dependency injection from system code
Declaration
public static void ___SetShippingSystemHost(IShippingSystemHostImplementation host)
Parameters
AutoStartSystems()
Declaration
public static void AutoStartSystems()
CreateLabel(ShippingSession, IShippingContext, Shipment)
Declaration
public abstract Label CreateLabel(ShippingSession session, IShippingContext context, Shipment shipment)
Parameters
Returns
Destructor()
Declaration
protected override void Destructor()
Overrides
DoAcceptManagerVisit(Object, DateTime)
Declaration
protected override void DoAcceptManagerVisit(object manager, DateTime managerNow)
Parameters
Type |
Name |
Description |
System.Object |
manager |
|
System.DateTime |
managerNow |
|
Overrides
Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Overrides
DoStart()
Declaration
protected override void DoStart()
Overrides
DoStartSession(ShippingConnectionParameters)
Declaration
protected abstract ShippingSession DoStartSession(ShippingConnectionParameters cParams = null)
Parameters
Returns
DoWaitForCompleteStop()
Declaration
protected override void DoWaitForCompleteStop()
Overrides
EstimateShippingCost(ShippingSession, IShippingContext, Shipment)
Declaration
public abstract ShippingRate EstimateShippingCost(ShippingSession session, IShippingContext context, Shipment shipment)
Parameters
Returns
GetShippingCarriers(ShippingSession, IShippingContext)
Declaration
public virtual IEnumerable<ShippingCarrier> GetShippingCarriers(ShippingSession session, IShippingContext context)
Parameters
Returns
GetTrackingURL(ShippingSession, IShippingContext, String, String)
Declaration
public virtual string GetTrackingURL(ShippingSession session, IShippingContext context, string carrierID, string trackingNumber)
Parameters
Returns
Type |
Description |
System.String |
|
Log(MessageType, String, String, Exception, Nullable<Guid>, String)
Declaration
protected Guid Log(MessageType type, string from, string message, Exception error = null, Guid? relatedMessageID = default (Guid? ), string parameters = null)
Parameters
Type |
Name |
Description |
MessageType |
type |
|
System.String |
from |
|
System.String |
message |
|
System.Exception |
error |
|
System.Nullable<System.Guid> |
relatedMessageID |
|
System.String |
parameters |
|
Returns
Type |
Description |
System.Guid |
|
MakeDefaultSessionConnectParams(IConfigSectionNode)
Declaration
protected abstract ShippingConnectionParameters MakeDefaultSessionConnectParams(IConfigSectionNode paramsSection)
Parameters
Returns
StartSession(ShippingConnectionParameters)
Declaration
public ShippingSession StartSession(ShippingConnectionParameters cParams = null)
Parameters
Returns
StatCreateLabel()
Declaration
protected void StatCreateLabel()
StatCreateLabelError()
Declaration
protected void StatCreateLabelError()
StatEstimateShippingCostCount()
Declaration
protected void StatEstimateShippingCostCount()
StatEstimateShippingCostErrorCount()
Declaration
protected void StatEstimateShippingCostErrorCount()
StatTrackShipmentCount()
Declaration
protected void StatTrackShipmentCount()
StatTrackShipmentErrorCount()
Declaration
protected void StatTrackShipmentErrorCount()
StatValidateAddressCount()
Declaration
protected void StatValidateAddressCount()
StatValidateAddressErrorCount()
Declaration
protected void StatValidateAddressErrorCount()
TrackShipment(ShippingSession, IShippingContext, String, String)
Declaration
public virtual TrackInfo TrackShipment(ShippingSession session, IShippingContext context, string carrierID, string trackingNumber)
Parameters
Returns
ValidateAddress(ShippingSession, IShippingContext, Address, out ValidateShippingAddressException)
Declaration
public abstract Address ValidateAddress(ShippingSession session, IShippingContext context, Address address, out ValidateShippingAddressException error)
Parameters
Returns
Implements
System.IDisposable
Extension Methods