public override int GetHashCode() { int hashCode = -1676672959; if (Context != null) { hashCode += Context.GetHashCode(); } if (Errors != null) { hashCode += Errors.GetHashCode(); } if (SubscriptionEvents != null) { hashCode += SubscriptionEvents.GetHashCode(); } if (Cursor != null) { hashCode += Cursor.GetHashCode(); } return(hashCode); }
public Task ReceiveAsync(IContext context) { return(context.Message switch { Started => OnStarted(context), Stopping => OnStopping(), SubscriptionEvents request => OnSubscriptionEvents(request, context), _ => Task.CompletedTask });
/// <summary> /// Register subscription events /// </summary> /// <param name="services"></param> /// <returns></returns> public static IServiceCollection RegisterSubscriptionEvents(this IServiceCollection services) { SubscriptionEvents.RegisterEvents(); return(services); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListSubscriptionEventsResponse other && ((Context == null && other.Context == null) || (Context?.Equals(other.Context) == true)) && ((Errors == null && other.Errors == null) || (Errors?.Equals(other.Errors) == true)) && ((SubscriptionEvents == null && other.SubscriptionEvents == null) || (SubscriptionEvents?.Equals(other.SubscriptionEvents) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true))); }
public SubscriptionCreate(SubscriptionEvents eventName, string url) { Event = eventName.GetName(); Url = url; }