Пример #1
0
 /// <summary>Freezes the context, making it impossible to add or remove context properties from the current context.</summary>
 /// <exception cref="T:System.InvalidOperationException">The context is already frozen. </exception>
 /// <PermissionSet>
 ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
 /// </PermissionSet>
 public virtual void Freeze()
 {
     if (this.context_properties != null)
     {
         foreach (object obj in this.context_properties)
         {
             IContextProperty contextProperty = (IContextProperty)obj;
             contextProperty.Freeze(this);
         }
     }
 }