public static IChannelMatcher Invert(IChannelMatcher matcher) => new InvertMatcher(matcher);
public InvertMatcher(IChannelMatcher matcher) { this.matcher = matcher; }
public static void SendPacket(this IChannelGroup channelGroup, PacketDefinition packet, IChannelMatcher matcher) => channelGroup.SendPackets(new[] { packet }, matcher);
public static void SendPackets(this IChannelGroup channelGroup, IEnumerable <PacketDefinition> packets, IChannelMatcher matcher) { var packetDefinitions = packets as PacketDefinition[] ?? packets.ToArray(); if (packetDefinitions.Length == 0) { return; } if (matcher == null) { channelGroup?.WriteAndFlushAsync(PacketFactory.Serialize(packetDefinitions)); } else { channelGroup?.WriteAndFlushAsync(PacketFactory.Serialize(packetDefinitions), matcher); } }
public InvertMatcher(IChannelMatcher matcher) { _matcher = matcher; }
public void SetUp() { cacheMock = new Mock <ICacheManager>(); channelMatcher = new ChannelMatcher(cacheMock.Object); }
static ChannelMatchers() { AllMatcher = new AllChannelMatcher(); ServerChannelMatcher = IsInstanceOf(typeof(IServerChannel)); NonServerChannelMatcher = IsNotInstanceOf(typeof(IServerChannel)); }
public static IChannelMatcher Invert(IChannelMatcher matcher) { return new InvertMatcher(matcher); }
public static Task SendPacketAsync(this IBroadcastable channelGroup, IPacket packet, IChannelMatcher matcher) { return(channelGroup.SendPacketsAsync(new[] { packet }, matcher)); }