Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlayerFactory"/> class.
 /// </summary>
 /// <param name="sampNatives">General Samp natives needed for <see cref="Player"/>.</param>
 /// <param name="playersNatives">Natives needed for every <see cref="Player"/> instance.</param>
 public PlayerFactory(
     ISampNatives sampNatives,
     IPlayersNatives playersNatives)
 {
     this.sampNatives    = sampNatives;
     this.playersNatives = playersNatives;
 }
Exemplo n.º 2
0
 public ChatListener(
     IEventAggregator eventAggregator,
     ILogger <ChatListener> logger,
     IPlayersNatives playersNatives,
     ISampNatives sampNatives,
     IDialogHandler dialogHandler)
 {
     this.eventAggregator = eventAggregator;
     this.logger          = logger;
     this.playersNatives  = playersNatives;
     this.sampNatives     = sampNatives;
     this.dialogHandler   = dialogHandler;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Player"/> class.
        /// </summary>
        /// <param name="id">The id of this player.</param>
        /// <param name="entityRemoval">Pool removal delgate.</param>
        /// <param name="sampNatives">General samp natives needed for this entity.</param>
        /// <param name="playersNatives">Natives needed for this entity.</param>
        public Player(
            int id,
            IPlayerPool.RemoveEntityDelegate entityRemoval,
            ISampNatives sampNatives,
            IPlayersNatives playersNatives)
            : base(id)
        {
            this.entityRemoval  = entityRemoval;
            this.sampNatives    = sampNatives;
            this.playersNatives = playersNatives;

            this.Principal = new ClaimsPrincipal();
        }