Inheritance: System.NativeObject, IArtist
Ejemplo n.º 1
0
        internal static IArtist Get(ISession session, IntPtr handle)
        {
            lock (_instanceLock)
            {
                NativeArtist instance;

                if (!_instances.TryGetValue(handle, out instance))
                {
                    instance = new NativeArtist(session, handle);
                    _instances.Add(handle, instance);
                    instance.Initialize();
                }

                return instance;
            }
        }
Ejemplo n.º 2
0
        internal static IArtist Get(ISession session, IntPtr handle)
        {
            lock (_instanceLock)
            {
                NativeArtist artist;

                if (_instances.TryGetValue(handle, out artist))
                {
                    return artist;
                }

                artist = new NativeArtist(session, handle);
                artist.Initialize();

                if (SessionFactory.IsInternalCachingEnabled)
                {
                    _instances.SetValue(handle, artist);
                }

                return artist;
            }
        }