コード例 #1
0
        public PcaWampClient(Uri address, string realm, IWampClientAuthenticator authenticator, TypeMapper typeMapper)
        {
            var serializer = new Newtonsoft.Json.JsonSerializer();

            if (typeMapper != null)
            {
                serializer.Converters.Add(new DerivedEntityJsonConverter(typeMapper));
            }

            var builder =
                new WampChannelFactory().ConnectToRealm(realm)
                .WebSocketTransport(address)
                .JsonSerialization(serializer);

            this.channel = authenticator != null?
                           builder.Authenticator(authenticator).Build() :
                               builder.Build();
        }
コード例 #2
0
 public PcaWampClient(Uri address, string realm, TypeMapper typeMapper)
     : this(address, realm, null, typeMapper)
 {
 }