コード例 #1
0
 public Display(IDisplayProps props, IPasswordEncryption encryption,
                IZipEncrypt zipper, IModelAdapter <EmailAccount> email,
                IModelAdapter <UserAccount> userAccount,
                IModelAdapter <PasswordTracker> pwTracker,
                ITextFileReadWriter readerWriter) : this()
 {
     _props          = props;
     _pwTracker      = pwTracker;
     _email          = email;
     _userAccount    = userAccount;
     _zipper         = zipper;
     _encryptDecrypt = encryption;
     _readerWriter   = readerWriter;
     _loginForm      = new Login(_props, userAccount, _email);
 }
コード例 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            NinjectConfig.CreateKernel();
            var kernel = NinjectConfig.Kernel;

            IPasswordEncryption          encryption  = kernel.Get <IPasswordEncryption>();
            IZipEncrypt                  zipper      = kernel.Get <IZipEncrypt>();
            IModelAdapter <EmailAccount> email       = kernel.Get <IModelAdapter <EmailAccount> >();
            IModelAdapter <UserAccount>  userAccount =
                kernel.Get <IModelAdapter <UserAccount> >();
            IModelAdapter <PasswordTracker> pwTracker =
                kernel.Get <IModelAdapter <PasswordTracker> >();
            ITextFileReadWriter reader  = kernel.Get <ITextFileReadWriter>();
            IDisplayProps       props   = kernel.Get <IDisplayProps>();
            ISubscriberTracker  tracker = kernel.Get <ISubscriberTracker>();

            tracker.Subscribe(email);
            tracker.Subscribe(pwTracker);
            Application.Run(new Display(props, encryption, zipper, email, userAccount, pwTracker, reader));
        }
コード例 #3
0
 public Login(IDisplayProps props, IModelAdapter <UserAccount> userAdapter, IModelAdapter <EmailAccount> email) : this()
 {
     _props      = props;
     userAccount = userAdapter;
     emailAcc    = email;
 }