Пример #1
0
        /// <summary>
        /// Creates a new <see cref="Gw2Client"/>.
        /// </summary>
        /// <param name="connection">The connection used to make requests, see <see cref="IConnection"/>.</param>
        /// <exception cref="ArgumentNullException"><paramref name="connection"/> is <see langword="null"/>.</exception>
        public Gw2Client(IConnection connection)
        {
            if (connection == null)
            {
                throw new ArgumentNullException(nameof(connection));
            }

            this.mumble = new Gw2MumbleClient(connection.MumbleClientReaderFactory);
            this.webApi = new Gw2WebApiClient(connection, this);
        }
Пример #2
0
        /// <summary>
        /// Creates a new <see cref="Gw2Client"/>.
        /// </summary>
        /// <param name="connection">The connection used to make requests, see <see cref="IConnection"/>.</param>
        /// <exception cref="ArgumentNullException"><paramref name="connection"/> is <c>null</c>.</exception>
        public Gw2Client(IConnection connection) :
            base(connection, null)
        {
            if (connection == null)
            {
                throw new ArgumentNullException(nameof(connection));
            }

            this.Gw2Client = this;
            this.mumble    = new Gw2MumbleClient(connection, this.Gw2Client);
            this.webApi    = new Gw2WebApiClient(connection, this.Gw2Client);
        }
Пример #3
0
 public Update(IGw2MumbleClient data)
 {
     name       = data.CharacterName;
     commander  = data.IsCommander;
     race       = data.Race.ToString();
     profession = data.Profession.ToString();
     eliteSpec  = EliteSpec.GetElite(data.Specialization);
     position   = new
     {
         data.PlayerLocationMap.X,
         data.PlayerLocationMap.Y
     };
     map           = data.MapId;
     serverAddress = data.ServerAddress;
 }
Пример #4
0
 public Mumble(string mumbleFile = DEFAULT_MUMBLE_LINK_MAP_NAME)
 {
     _mumbleLinkFile = mumbleFile;
     _mumbleClient   = new Gw2Client().Mumble[_mumbleLinkFile];
     _requestStop    = false;
 }
Пример #5
0
 protected override void Initialize()
 {
     _rawClient = new Gw2Client().Mumble[ApplicationSettings.Instance.MumbleMapName ?? DEFAULT_MUMBLEMAPNAME];
 }
 internal MumbleUpdatedArgs(IGw2MumbleClient MumbleData)
 {
     this.MumbleData = MumbleData;
 }