ICSharpCode.NRefactory.MonoCSharp.Nullable.Unwrap.Emit C# (CSharp) Method

Emit() public method

public Emit ( EmitContext ec ) : void
ec EmitContext
return void
		public override void Emit (EmitContext ec)
		{
			Store (ec);

			var call = new CallEmitter ();
			call.InstanceExpression = this;

			//
			// Using GetGetValueOrDefault is prefered because JIT can possibly
			// inline it whereas Value property contains a throw which is very
			// unlikely to be inlined
			//
			if (useDefaultValue)
				call.EmitPredefined (ec, NullableInfo.GetGetValueOrDefault (expr.Type), null);
			else
				call.EmitPredefined (ec, NullableInfo.GetValue (expr.Type), null);
		}