Пример #1
0
        internal MediaPlayer(swig.MediaPlayer coreInstance)
        {
#if DEBUG
            // 唯一の対応するクラスであることを保証
            if (GC.MediaPlayers.Contains(coreInstance.GetPtr()))
            {
                Particular.Helper.ThrowException("");
            }
#endif
            CoreInstance = coreInstance;
        }
Пример #2
0
        internal static MediaPlayer GenerateMediaPlayer(swig.MediaPlayer o, GenerationType type)
        {
            if (o == null)
            {
                return(null);
            }
            var p = o.GetPtr();

            var existing = GC.MediaPlayers.GetObject(p);

            existing = GenerateInternal(existing, o, type);
            if (existing != null)
            {
                return(existing);
            }

            var ret = new MediaPlayer(o);

            GC.MediaPlayers.AddObject(p, ret);
            return(ret);
        }