Class ExtensibleStoreService
An abstract store service to extend an existing Store Service which will handle all of the basic IStoreService implementations The main purpose of this is to allow a custom store to add implementations of extended features to this service. The calls to IStoreService are kept virtual so that the derivations of the base store implementing them can be added to or overridden.
Implements
Inherited Members
Namespace: UnityEngine .Purchasing
Assembly: Unity.Purchasing.dll
Syntax
public abstract class ExtensibleStoreService : IStoreService
Constructors
ExtensibleStoreService(IStoreService)
Constructor to be used by derived classes
Declaration
protected ExtensibleStoreService(IStoreService baseStoreService)
Parameters
Type | Name | Description |
---|---|---|
IStore |
baseStoreService | The base service implementation which implements IStoreService |
Properties
Amazon
Amazon Specific Store Extensions
Declaration
public virtual IAmazonAppsStoreExtendedService Amazon { get; }
Property Value
Type | Description |
---|---|
IAmazon |
Apple
Apple Specific Store Extensions
Declaration
public virtual IAppleStoreExtendedService Apple { get; }
Property Value
Type | Description |
---|---|
IApple |
Google Specific Store Extensions
Declaration
public virtual IGooglePlayStoreExtendedService Google { get; }
Property Value
Type | Description |
---|---|
IGoogle |
Methods
AddOnStoreDisconnectedAction(Action<StoreConnectionFailureDescription>)
Add an action to be called when connection is lost to the current store.
Declaration
public virtual void AddOnStoreDisconnectedAction(Action<StoreConnectionFailureDescription> onStoreDisconnected)
Parameters
Type | Name | Description |
---|---|---|
Action<Store |
onStoreDisconnected | The action to be added to the list of callbacks. |
ConnectAsync()
Initiates a connection to the store.
Declaration
public virtual Task ConnectAsync()
Returns
Type | Description |
---|---|
Task | Return a handle to the initialization operation. |
Exceptions
Type | Condition |
---|---|
Store |
Throws an exception if the connection fails. |
RemoveOnStoreDisconnectedAction(Action<StoreConnectionFailureDescription>)
Remove an action to be called when connection is lost to the current store.
Declaration
public virtual void RemoveOnStoreDisconnectedAction(Action<StoreConnectionFailureDescription> onStoreDisconnected)
Parameters
Type | Name | Description |
---|---|---|
Action<Store |
onStoreDisconnected | The action to be removed from the list of callbacks. |
SetStoreReconnectionRetryPolicyOnDisconnection(IRetryPolicy)
Set a custom reconnection policy when the store disconnects.
Declaration
public virtual void SetStoreReconnectionRetryPolicyOnDisconnection(IRetryPolicy retryPolicy)
Parameters
Type | Name | Description |
---|---|---|
IRetry |
retryPolicy | The policy that will be used to determine if reconnection should be attempted. |