Class EOSService
- Namespace
- PlayEveryWare.EpicOnlineServices
Contains implementation of common functionality between different EOS Service managers (Currently AchievementsService and StatsService).
public abstract class EOSService : IDisposable
- Inheritance
-
EOSService
- Implements
- Derived
- Inherited Members
Constructors
EOSService(bool)
Base constructor for Service managers.
protected EOSService(bool requiresAuthentication = true)
Parameters
requiresAuthentication
boolIndicates whether the service manager requires a user to be authenticated with the Connect Interface in order to function properly.
Properties
RequiresAuthentication
Indicates whether the service needs to have a user authenticated in order to function properly.
protected bool RequiresAuthentication { get; }
Property Value
Methods
Dispose()
Dispose function makes sure that the manager is removed from the collection of connect login listeners.
public void Dispose()
Dispose(bool)
Protected implementation of Dispose pattern. If this method is overridden in implementing classes, this base implementation should be called at the end of the overridden implementation.
protected virtual void Dispose(bool disposing)
Parameters
disposing
boolIndicates that disposing is taking place.
~EOSService()
Destructor is defined to catch cases where Dispose was not properly called before the service ceases to exist.
protected ~EOSService()
InternalRefreshAsync()
Implementation of this function should refresh the locally cached data managed by the service manager in question.
protected abstract Task InternalRefreshAsync()
Returns
NotifyUpdated()
Trigger the notification callbacks that have been registered, letting any consumers know that the data base been updated.
protected void NotifyUpdated()
OnLoggedIn()
Implement this method to perform tasks when a user authenticates. By default, there is no action taken.
protected virtual void OnLoggedIn()
OnLoggedOut()
If there are tasks that need to be done when logged out, consider overriding the Reset() function as that is where such things should be done.
protected void OnLoggedOut()
RefreshAsync()
Refreshes the service manager
public Task RefreshAsync()
Returns
Reset()
This method clears all state for the service. If overridden in an implementing class, this base implementation should be called at the end of that implementation. Implementing classes probably should override this function.
protected virtual void Reset()
TryGetProductUserId(out ProductUserId)
Try to get the product user id from the connect interface.
protected bool TryGetProductUserId(out ProductUserId productUserId)
Parameters
productUserId
ProductUserIdProductUserId for the currently logged in user.
Returns
- bool
True if the ProductUserId was successfully retrieved and is valid, false otherwise.
Events
Updated
Event that triggers when changes have been made that may require a user interface update.
public event EOSService.ServiceUpdatedEventHandler Updated