public void Remove(ChannelInstance channelInstance)
{
CollectionElement channelInstancesElement = m_physicalRecord.Body.Collection.GetCollectionByTag(ChannelInstancesTag);
List<CollectionElement> channelInstanceElements;
ChannelInstance instance;
if ((object)channelInstancesElement == null)
return;
channelInstanceElements = channelInstancesElement.GetElementsByTag(OneChannelInstanceTag).Cast<CollectionElement>().ToList();
foreach (CollectionElement channelSettingElement in channelInstanceElements)
{
instance = new ChannelInstance(channelSettingElement, this);
if (Equals(channelInstance, instance))
channelInstancesElement.RemoveElement(channelSettingElement);
}
}