Exemplo n.º 1
0
        public void PainterCreationWithoutReflectionTest()
        {
            SimpleFactory factory = SimpleFactory.GetFactory();
            IArtist       x       = factory.GetArtist(typeof(Painter));

            Assert.AreSame(x.GetType(), typeof(Painter));
        }
Exemplo n.º 2
0
 internal static IntPtr GetPointer(IArtist artist)
 {
     if (artist.GetType() == typeof(ArtistWrapper))
     {
         return(((ArtistWrapper)artist).artist.artistPtr);
     }
     throw new ArgumentException("Invalid artist");
 }
Exemplo n.º 3
0
 internal static IntPtr GetPointer(IArtist artist)
 {
     if (artist.GetType() == typeof(ArtistWrapper))
         return ((ArtistWrapper)artist).artist.artistPtr;
     throw new ArgumentException("Invalid artist");
 }