示例#1
0
        /// <summary>
        /// Attach to a existing session with the session id
        /// </summary>
        /// <param name="attachInfo">The attach info</param>
        /// <param name="binding">indicating the binding</param>
        /// <returns>A persistant session</returns>
        public static HpcSession AttachSession(SessionAttachInfo attachInfo, Binding binding)
        {
            Utility.ThrowIfNull(attachInfo, "attachInfo");

            return(new HpcSession(HpcV3Session.AttachSession(attachInfo, binding)));
        }
示例#2
0
        /// <summary>
        /// Asynchronous mode of submitting a job and get a ServiceJobSession object.
        /// </summary>
        /// <param name="info">The session start info for creating the service session</param>
        /// <param name="binding">indicating the binding</param>
        /// <returns>A service job session object, including the endpoint address and the two jobs related to this session</returns>
        public static async Task <HpcSession> CreateSessionAsync(SessionStartInfo startInfo, Binding binding)
        {
            Utility.ThrowIfNull(startInfo, "startInfo");

            return(new HpcSession(await HpcV3Session.CreateSessionAsync(startInfo, binding).ConfigureAwait(false)));
        }
示例#3
0
        /// <summary>
        /// This method closes the session with the given ID
        /// </summary>
        /// <param name="headnode">Headnode name</param>
        /// <param name="sessionId">The ID of the session to be closed</param>
        /// <param name="binding">indicating the binding</param>
        public static void CloseSession(string headnode, int sessionId, Binding binding, bool isAadUser = false)
        {
            Utility.ThrowIfNull(headnode, "headnode");

            HpcV3Session.CloseSession(headnode, sessionId, binding, isAadUser);
        }
示例#4
0
 /// <summary>
 /// Asynchronous mode of submitting a job and get a ServiceJobSession object.
 /// </summary>
 /// <param name="info">The session start info for creating the service session</param>
 /// <returns>A service job session object, including the endpoint address and the two jobs related to this session</returns>
 public static async Task <HpcSession> CreateSessionAsync(SessionStartInfo startInfo)
 {
     return(new HpcSession(await HpcV3Session.CreateSessionAsync(startInfo, null).ConfigureAwait(false)));
 }