ArgusTV.Recorders.Common.RecorderTunerServiceBase.ChannelAlreadyAllocatedOn C# (CSharp) Method

ChannelAlreadyAllocatedOn() protected method

Check if a channel was already allocated to a card.
protected ChannelAlreadyAllocatedOn ( ArgusTV.DataContracts.CardChannelAllocation alreadyAllocated, string cardId, System.Guid channelId ) : bool
alreadyAllocated ArgusTV.DataContracts.CardChannelAllocation The array of previously allocated cards.
cardId string The ID of the card we want to check.
channelId System.Guid The ID of the channel.
return bool
        protected bool ChannelAlreadyAllocatedOn(CardChannelAllocation[] alreadyAllocated, string cardId, Guid channelId)
        {
            foreach (CardChannelAllocation allocation in alreadyAllocated)
            {
                if (allocation.CardId == cardId
                    && allocation.ChannelId == channelId)
                {
                    return true;
                }
            }
            return false;
        }