File tree Expand file tree Collapse file tree
src/Castle.Core/DynamicProxy/Generators Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515namespace Castle . DynamicProxy . Generators . Emitters . SimpleAST
1616{
17- using System ;
1817 using System . Diagnostics ;
1918 using System . Reflection . Emit ;
2019
21-
22- [ DebuggerDisplay ( "&{localReference}" ) ]
23- internal class ByRefReference : Reference
20+ [ DebuggerDisplay ( "&{reference}" ) ]
21+ internal class ByRefExpression : IExpression
2422 {
25- private readonly LocalReference localReference ;
26-
27- public ByRefReference ( LocalReference localReference )
28- : base ( localReference . Type )
29- {
30- this . localReference = localReference ;
31- }
32-
33- public override void LoadAddressOfReference ( ILGenerator gen )
34- {
35- localReference . LoadAddressOfReference ( gen ) ;
36- }
23+ private readonly Reference reference ;
3724
38- public override void LoadReference ( ILGenerator gen )
25+ public ByRefExpression ( Reference reference )
3926 {
40- localReference . LoadAddressOfReference ( gen ) ;
27+ this . reference = reference ;
4128 }
4229
43- public override void StoreReference ( IExpression expression , ILGenerator gen )
30+ public void Emit ( ILGenerator gen )
4431 {
45- throw new NotImplementedException ( ) ;
32+ reference . LoadAddressOfReference ( gen ) ;
4633 }
4734 }
4835}
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ protected virtual void ImplementInvokeMethodOnTarget(AbstractTypeEmitter invocat
149149 }
150150
151151 invokeMethodOnTarget . CodeBuilder . AddStatement ( new AssignStatement ( localReference , localValue ) ) ;
152- var byRefReference = new ByRefReference ( localReference ) ;
152+ var byRefReference = new ByRefExpression ( localReference ) ;
153153 args [ i ] = byRefReference ;
154154 byRefArguments [ i ] = localReference ;
155155 }
You can’t perform that action at this time.
0 commit comments