Пример #1
0
        /// <summary>
        /// Attach to a existing session async with the session attach info and binding
        /// </summary>
        /// <param name="attachInfo">The attach info</param>
        /// <param name="binding">indicting the binding</param>
        /// <returns>A persistant session</returns>
        public static async Task <V3Session> AttachSessionAsync(SessionAttachInfo attachInfo, Binding binding)
        {
            Utility.ThrowIfNull(attachInfo, "attachInfo");

            Utility.ThrowIfEmpty(attachInfo.Headnode, "headNode");

            return((V3Session)await new SessionFactory().AttachSession(attachInfo, false, Timeout.Infinite, binding).ConfigureAwait(false));
        }
Пример #2
0
 /// <summary>
 /// Attach to a existing session async
 /// </summary>
 /// <param name="attachInfo">The attach info</param>
 /// <returns>A persistent session</returns>
 public static async Task <DurableSession> AttachSessionAsync(SessionAttachInfo attachInfo)
 {
     return(await AttachSessionAsync(attachInfo, null).ConfigureAwait(false));
 }
Пример #3
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 persistent session</returns>
 public static DurableSession AttachSession(SessionAttachInfo attachInfo, Binding binding)
 {
     return(AttachSessionAsync(attachInfo, binding).GetAwaiter().GetResult());
 }
Пример #4
0
 /// <summary>
 ///   <para>Attaches a service-oriented architecture (SOA) client to an
 /// existing durable session by using the specified information about the session.</para>
 /// </summary>
 /// <param name="attachInfo">
 ///   <para>A
 /// <see cref="SessionAttachInfo" /> object that specifies information about the durable session to which you want to attach the SOA client, including the name of the head node for the cluster that hosts the session and the identifier of the session.</para>
 /// </param>
 /// <returns>
 ///   <para>A <see cref="DurableSession" /> that represents the durable session to which the client attached.</para>
 /// </returns>
 public static DurableSession AttachSession(SessionAttachInfo attachInfo)
 {
     return(AttachSession(attachInfo, null));
 }
Пример #5
0
 public static Session AttachSession(SessionAttachInfo attachInfo)
 {
     return(AttachSessionAsync(attachInfo).GetAwaiter().GetResult());
 }
Пример #6
0
        public static async Task <Session> AttachSessionAsync(SessionAttachInfo attachInfo)
        {
            Utility.ThrowIfNull(attachInfo, "attachInfo");

            return(new Session(await V3Session.AttachSessionAsync(attachInfo, null).ConfigureAwait(false)));
        }