Initialize() public method

public Initialize ( ) : void
return void
Example #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;
            }
        }
Example #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;
            }
        }