fully switch to mediator from events
This commit is contained in:
		
							
								
								
									
										18
									
								
								MareSynchronos/Utils/MediatorSubscriberBase.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								MareSynchronos/Utils/MediatorSubscriberBase.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| using MareSynchronos.Mediator; | ||||
|  | ||||
| namespace MareSynchronos.Utils; | ||||
|  | ||||
| public abstract class MediatorSubscriberBase : IDisposable | ||||
| { | ||||
|     protected MediatorSubscriberBase(MareMediator mediator) | ||||
|     { | ||||
|         Mediator = mediator; | ||||
|     } | ||||
|  | ||||
|     protected MareMediator Mediator; | ||||
|  | ||||
|     public virtual void Dispose() | ||||
|     { | ||||
|         Mediator.UnsubscribeAll(this); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 rootdarkarchon
					rootdarkarchon