ArgusTV.Recorders.Common.RecorderTunerServiceBase.ChannelAlreadyAllocatedOn C# (CSharp) Méthode

ChannelAlreadyAllocatedOn() protected méthode

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.
Résultat 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;
        }