private static void Main()
        {
            IDependencyResolver dependencyResolver = new NinjectDependencyResolver();
            dependencyResolver.Bind<IDependencyResolver>().ToConstant(dependencyResolver);
            dependencyResolver.Bind<IFingerprintService>().To<FingerprintService>();
            dependencyResolver.Bind<IWindowFunction>().To<HanningWindow>();
            dependencyResolver.Bind<IWaveletDecomposition>().To<HaarWavelet>();
            dependencyResolver.Bind<IFingerprintDescriptor>().To<FingerprintDescriptor>();
            dependencyResolver.Bind<IFingerprintingConfiguration>().To<DefaultFingerprintingConfiguration>();
            dependencyResolver.Bind<IAudioService>().To<BassAudioService>();
            dependencyResolver.Bind<ITagService>().To<TagService>();
            dependencyResolver.Bind<IWorkUnitBuilder>().To<WorkUnitBuilder>();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(dependencyResolver.Get<WinMain>());
        }
        public static void RegisterDependencyResolver()
        {
            var ninjectResolver = new NinjectDependencyResolver();
            ninjectResolver.Bind<IUnitOfWork>().To<PPPDbEntities>().InRequestScope();
            ninjectResolver.Bind<ILogger>().To<Log4NetLogger>();
            ninjectResolver.Bind<ICryptoServiceFactory>().To<CryptoServiceFactory>();
            ninjectResolver.Bind<ILoginService>().To<LoginService>();
            ninjectResolver.Bind<IFacebookProfileProxy>().To<FacebookProfileProxy>();
            ninjectResolver.Bind<IFacebookRequestService>().To<FacebookRequestService>();
            ninjectResolver.Bind<IFacebookRequestRepository>().To<FacebookRequestRepository>();
            ninjectResolver.Bind<IPoemService>().To<PoemService>();
            ninjectResolver.Bind<IPoemRepository>().To<PoemRepository>();
            ninjectResolver.Bind<IUserProfileService>().To<UserProfileService>();
            ninjectResolver.Bind<IUserProfileRepository>().To<UserProfileRepository>();
            ninjectResolver.Bind<IAuthorityTypeRepository>().To<CachedAuthorityTypeRepository>();
            ninjectResolver.Bind<IAuthorityTypeRepository>().To<AuthorityTypeRepository>().WhenInjectedInto<CachedAuthorityTypeRepository>();
            ninjectResolver.Bind<IPlayerRepository>().To<PlayerRepository>();
            ninjectResolver.Bind<IPlayerService>().To<PlayerService>();
            ninjectResolver.Bind<IEventsRepository>().To<EventsRepository>();
            ninjectResolver.Bind<IEventService>().To<EventService>();
            ninjectResolver.Bind<IVerseRepository>().To<VerseRepository>();
            ninjectResolver.Bind<IVerseService>().To<VerseService>();
            ninjectResolver.Bind<IVerseTypeRepository>().To<VerseTypeRepository>();
            ninjectResolver.Bind<IPoemRequestService>().To<PoemRequestService>();
            ninjectResolver.Bind<IPoemRequestRepository>().To<PoemRequestRepository>();
            ninjectResolver.Bind<ICache>().To<AspNetCache>();
            ninjectResolver.Bind<ISettingService>().To<AppConfigSettingService>();
            ninjectResolver.Kernel.Bind<ISignalizerFactory>().To<NinjectSignalizerFactory>().WithConstructorArgument("kernel", ninjectResolver.Kernel);

            DependencyResolver.SetResolver(ninjectResolver);
            GlobalConfiguration.Configuration.DependencyResolver = new NinjectWebApiDependencyResolver(ninjectResolver.Kernel);
        }