示例#1
0
        public IAlchemyStreamUpload CreateSessionAwareCoreServiceUploadClient(SessionAwareCoreServiceEndPoint endpoint)
        {
            switch (endpoint)
            {
            case SessionAwareCoreServiceEndPoint.NetTcp201501:
                return(new AlchemyStreamUploadClient201501());

            case SessionAwareCoreServiceEndPoint.NetTcp201603:
                return(new AlchemyStreamUploadClient201603());

            default:
                return(new AlchemyStreamUploadClient201501());
            }
        }
示例#2
0
        /// <summary>
        /// Gets the endpoint configuration name, defaulting to "netTcp_2013".
        /// </summary>
        /// <param name="endPoint"></param>
        /// <returns></returns>
        private static string GetEnpointConfigurationName(SessionAwareCoreServiceEndPoint endPoint)
        {
            switch (endPoint)
            {
            case SessionAwareCoreServiceEndPoint.NetTcp2011:
                return("netTcp_2011");

            case SessionAwareCoreServiceEndPoint.NetTcp2012:
                return("netTcp_2012");

            case SessionAwareCoreServiceEndPoint.NetTcp201501:
                return("netTcp_201501");

            default:
                return("netTcp_2013");
            }
        }
示例#3
0
        public IAlchemyCoreServiceClient CreateSessionAwareCoreServiceClient(SessionAwareCoreServiceEndPoint endpoint)
        {
            switch (endpoint)
            {
            case SessionAwareCoreServiceEndPoint.NetTcp201501:
                var client201501 = new AlchemyCoreServiceClient201501();
                client201501.Impersonate(this._currentUser);
                return(client201501);

            case SessionAwareCoreServiceEndPoint.NetTcp201603:
                var client201603 = new AlchemyCoreServiceClient201603();
                client201603.Impersonate(this._currentUser);
                return(client201603);

            default:
                var client2013 = new AlchemyCoreServiceClient2013();
                client2013.Impersonate(this._currentUser);
                return(client2013);
            }
        }
示例#4
0
 /// <summary>
 /// Creates a new SessionAwareCoreServiceClient using the supplied endpoint.
 /// </summary>
 /// <param name="endPoint"></param>
 public AlchemySessionAwareCoreServiceClient(SessionAwareCoreServiceEndPoint endPoint)
     : base(GetEndpointConfigurationName(endPoint))
 {
     ClientEndpoint = endPoint;
 }
示例#5
0
 public AlchemyClients(string currentUser, SessionAwareCoreServiceEndPoint endPoint, ImpersonationUserModel impersonationUserModel)
 {
     this._currentUser            = currentUser;
     this.CoreServiceEndPoint     = endPoint;
     this._impersonationUserModel = impersonationUserModel;
 }
示例#6
0
 public AlchemyClients(string currentUser, SessionAwareCoreServiceEndPoint endPoint)
 {
     this._currentUser        = currentUser;
     this.CoreServiceEndPoint = endPoint;
 }
示例#7
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));
            }
        }
 /// <summary>
 /// Creates a new SessionAwareCoreServiceClient using the supplied endpoint.
 /// </summary>
 /// <param name="endPoint"></param>
 public AlchemySessionAwareCoreServiceClient(SessionAwareCoreServiceEndPoint endPoint)
     : base(GetEnpointConfigurationName(endPoint))
 {
     ClientEndpoint = endPoint;
 }
 /// <summary>
 /// Gets the endpoint configuration name, defaulting to "netTcp_2013".
 /// </summary>
 /// <param name="endPoint"></param>
 /// <returns></returns>
 private static string GetEnpointConfigurationName(SessionAwareCoreServiceEndPoint endPoint)
 {
     switch (endPoint)
     {
         case SessionAwareCoreServiceEndPoint.NetTcp2011:
             return "netTcp_2011";
         case SessionAwareCoreServiceEndPoint.NetTcp2012:
             return "netTcp_2012";
         default:
             return "netTcp_2013";
     }
 }