hammett     2004/04/12 20:31:30

  Modified:    avalon-net/DynamicProxy/DynamicProxyTest
                        ProxyGeneratorTestCase.cs
               avalon-net/DynamicProxy ProxyGenerator.cs
  Log:
  Bug correction.
  
  Revision  Changes    Path
  1.4       +27 -6     
avalon-sandbox/avalon-net/DynamicProxy/DynamicProxyTest/ProxyGeneratorTestCase.cs
  
  Index: ProxyGeneratorTestCase.cs
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/DynamicProxy/DynamicProxyTest/ProxyGeneratorTestCase.cs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProxyGeneratorTestCase.cs 10 Apr 2004 02:11:48 -0000      1.3
  +++ ProxyGeneratorTestCase.cs 13 Apr 2004 03:31:30 -0000      1.4
  @@ -30,6 +30,7 @@
                protected String m_nameProperty;
                protected String m_addressProperty;
                protected State m_state = State.Invalid;
  +             protected bool m_started;
   
                [Test]
                public void TestSimpleCase()
  @@ -40,8 +41,10 @@
   
                        IMyInterface inter = (IMyInterface) proxy;
                        inter.Calc(1, "ola");
  -                     inter.Nome = "opa";
  -                     AssertEquals( "opa", inter.Nome );
  +                     inter.Name = "opa";
  +                     AssertEquals( "opa", inter.Name );
  +                     inter.Started = true;
  +                     AssertEquals( true, inter.Started );
                        AssertEquals( 45, inter.Calc( 20, 25 ) );
                }
   
  @@ -55,8 +58,8 @@
   
                        IMySecondInterface inter = (IMySecondInterface) proxy;
                        inter.Calc(1, "ola");
  -                     inter.Nome = "opa";
  -                     AssertEquals( "opa", inter.Nome );
  +                     inter.Name = "opa";
  +                     AssertEquals( "opa", inter.Name );
                        inter.Address = "pereira leite, 44";
                        AssertEquals( "pereira leite, 44", inter.Address );
                        AssertEquals( 45, inter.Calc( 20, 25 ) );
  @@ -99,7 +102,7 @@
   
                #region IMyInterface Members
   
  -             public String Nome
  +             public String Name
                {
                        get
                        {
  @@ -111,6 +114,18 @@
                        }
                }
   
  +             public bool Started
  +             {
  +                     get
  +                     {
  +                             return m_started;
  +                     }
  +                     set
  +                     {
  +                             m_started = value;
  +                     }
  +             }
  +
                public void Calc(int x, String y)
                {
                }
  @@ -187,7 +202,13 @@
        /// </summary>
        public interface IMyInterface
        {
  -             String Nome
  +             String Name
  +             {
  +                     get;
  +                     set;
  +             }
  +
  +             bool Started
                {
                        get;
                        set;
  
  
  
  1.4       +4 -0      avalon-sandbox/avalon-net/DynamicProxy/ProxyGenerator.cs
  
  Index: ProxyGenerator.cs
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/avalon-net/DynamicProxy/ProxyGenerator.cs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProxyGenerator.cs 7 Mar 2004 22:06:40 -0000       1.3
  +++ ProxyGenerator.cs 13 Apr 2004 03:31:30 -0000      1.4
  @@ -403,6 +403,10 @@
                        {
                                return OpCodes.Ldind_U4;
                        }
  +                     else if ( type.Equals( typeof(Boolean) ) )
  +                     {
  +                             return OpCodes.Ldind_I4;
  +                     }
                        else
                        {
                                throw new ArgumentException("Type " + type + " could 
not be converted to a OpCode");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to