fCraft.PlayerEnumerable.NotSpectating C# (CSharp) Method

NotSpectating() private method

private NotSpectating ( [ source, [ player ) : IEnumerable
source [
player [
return IEnumerable
        public static IEnumerable<Player> NotSpectating( [NotNull] this IEnumerable<Player> source, [NotNull] Player player ) {
            if( source == null ) throw new ArgumentNullException( "source" );
            if( player == null ) throw new ArgumentNullException( "player" );
            foreach( Player otherPlayer in source ) {
                if( otherPlayer.SpectatedPlayer != player ) {
                    yield return otherPlayer;
                }
            }
        }