~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyContainer.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
                        return false;
163
163
                }
164
164
                
 
165
                internal void RemoveAll (Type type)
 
166
                {
 
167
                        if (policies != null) {
 
168
                                foreach (var p in policies.ToArray ()) {
 
169
                                        if (p.Key.PolicyType == type) {
 
170
                                                policies.Remove (p.Key);
 
171
                                                OnPolicyChanged (type, p.Key.Scope);
 
172
                                        }
 
173
                                }
 
174
                                if (policies.Count == 0)
 
175
                                        policies = null;
 
176
                        }
 
177
                }
 
178
 
 
179
                internal void RemoveAll (PolicyKey[] keys)
 
180
                {
 
181
                        if (policies != null) {
 
182
                                foreach (var k in keys) {
 
183
                                        policies.Remove (k);
 
184
                                        OnPolicyChanged (k.PolicyType, k.Scope);
 
185
                                }
 
186
                                if (policies.Count == 0)
 
187
                                        policies = null;
 
188
                        }
 
189
                }
 
190
 
165
191
                /// <summary>
166
192
                /// Copies the policies defined in another container
167
193
                /// </summary>