Mono.CSharp.AnonymousMethodStorey.CaptureParameter C# (CSharp) Method

CaptureParameter() public method

public CaptureParameter ( ResolveContext ec, Mono.CSharp.ParameterReference param_ref ) : void
ec ResolveContext
param_ref Mono.CSharp.ParameterReference
return void
		public void CaptureParameter (ResolveContext ec, ParameterReference param_ref)
		{
			ec.CurrentBlock.Explicit.HasCapturedVariable = true;
			AddReferenceFromChildrenBlock (ec.CurrentBlock.Explicit);

			if (param_ref.GetHoistedVariable (ec) != null)
				return;

			if (hoisted_params == null)
				hoisted_params = new List<HoistedParameter> (2);

			var expr = new HoistedParameter (this, param_ref);
			param_ref.Parameter.HoistedVariant = expr;
			hoisted_params.Add (expr);
		}