public AlchemyStreamDownloadClient201501(ImpersonationUserModel impersonationUserModel)
        {
            var factory = new ChannelFactory <IStreamDownload201501>("streamDownload_netTcp_201501");

            factory.Credentials.Windows.ClientCredential          = new NetworkCredential(impersonationUserModel.Username, impersonationUserModel.Password);
            factory.Credentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation;
            Channel = factory.CreateChannel();
        }
Пример #2
0
        public IAlchemyStreamDownload CreateSessionAwareCoreServiceDownloadClient(ImpersonationUserModel impersonationUserModel, SessionAwareCoreServiceEndPoint endpoint)
        {
            switch (endpoint)
            {
            case SessionAwareCoreServiceEndPoint.NetTcp201501:
                return(new AlchemyStreamDownloadClient201501(impersonationUserModel));

            case SessionAwareCoreServiceEndPoint.NetTcp201603:
                return(new AlchemyStreamDownloadClient201603(impersonationUserModel));

            default:
                return(new AlchemyStreamDownloadClient201501(impersonationUserModel));
            }
        }
Пример #3
0
 public AlchemyClients(string currentUser, SessionAwareCoreServiceEndPoint endPoint, ImpersonationUserModel impersonationUserModel)
 {
     this._currentUser            = currentUser;
     this.CoreServiceEndPoint     = endPoint;
     this._impersonationUserModel = impersonationUserModel;
 }