Ejemplo n.º 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)));
        }
Ejemplo n.º 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)));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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)));
 }