Skip to content

Instantly share code, notes, and snippets.

@jraps20
Last active May 11, 2018 20:01
Show Gist options
  • Save jraps20/964b5364ba576c62bae4475190919aaa to your computer and use it in GitHub Desktop.
Save jraps20/964b5364ba576c62bae4475190919aaa to your computer and use it in GitHub Desktop.
public class LogMessageRemoteMap
{
public void Initialize(PipelineArgs args)
{
EventManager.Subscribe<LogMessageRemoteEvent>(new Action<LogMessageRemoteEvent>(OnGenericRemoteEvent<LogMessageRemoteEvent>));
}
private static void OnGenericRemoteEvent<TEvent>(TEvent @event) where TEvent : IHasEventName
{
RemoteEventArgs<TEvent> remoteEventArgs = new RemoteEventArgs<TEvent>(@event);
Event.RaiseEvent(@event.EventName, (IPassNativeEventArgs) remoteEventArgs);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment