Exemplo n.º 1
0
			public void SetClassShutter(ClassShutter shutter)
			{
				this._enclosing.classShutter = shutter;
			}
Exemplo n.º 2
0
		/// <summary>Set the LiveConnect access filter for this context.</summary>
		/// <remarks>
		/// Set the LiveConnect access filter for this context.
		/// <p>
		/// <see cref="ClassShutter">ClassShutter</see>
		/// may only be set if it is currently null.
		/// Otherwise a SecurityException is thrown.
		/// </remarks>
		/// <param name="shutter">a ClassShutter object</param>
		/// <exception cref="System.Security.SecurityException">
		/// if there is already a ClassShutter
		/// object for this Context
		/// </exception>
		public void SetClassShutter(ClassShutter shutter)
		{
			lock (this)
			{
				if (@sealed)
				{
					OnSealedMutation();
				}
				if (shutter == null)
				{
					throw new ArgumentException();
				}
				if (hasClassShutter)
				{
					throw new SecurityException("Cannot overwrite existing " + "ClassShutter object");
				}
				classShutter = shutter;
				hasClassShutter = true;
			}
		}