예제 #1
0
        public void PainterCreationWithoutReflectionTest()
        {
            SimpleFactory factory = SimpleFactory.GetFactory();
            IArtist       x       = factory.GetArtist(typeof(Painter));

            Assert.AreSame(x.GetType(), typeof(Painter));
        }
예제 #2
0
 internal static IntPtr GetPointer(IArtist artist)
 {
     if (artist.GetType() == typeof(ArtistWrapper))
     {
         return(((ArtistWrapper)artist).artist.artistPtr);
     }
     throw new ArgumentException("Invalid artist");
 }
예제 #3
0
파일: Artist.cs 프로젝트: Jc54/PlayMe
 internal static IntPtr GetPointer(IArtist artist)
 {
     if (artist.GetType() == typeof(ArtistWrapper))
         return ((ArtistWrapper)artist).artist.artistPtr;
     throw new ArgumentException("Invalid artist");
 }