Opc.Ua.Server.SamplingGroupManager.ApplyChanges C# (CSharp) Method

ApplyChanges() public method

Applies any pending changes caused by adding,changing or removing monitored items.
public ApplyChanges ( ) : void
return void
        public virtual void ApplyChanges()
        {            
            lock (m_lock)
            {
                List<SamplingGroup> unusedGroups = new List<SamplingGroup>();

                // apply changes to groups.
                foreach (SamplingGroup samplingGroup in m_samplingGroups)
                {
                    if (samplingGroup.ApplyChanges())
                    {
                        unusedGroups.Add(samplingGroup);
                    }
                }
                
                // remove unused groups.
                foreach (SamplingGroup samplingGroup in unusedGroups)
                {
                    samplingGroup.Shutdown();
                    m_samplingGroups.Remove(samplingGroup);
                }
            }   
        }
        #endregion