Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlanningPokerAzureNode"/> class.
 /// </summary>
 /// <param name="planningPoker">The planning poker teams controller instance.</param>
 /// <param name="serviceBus">The service bus used to send messages between nodes.</param>
 /// <param name="configuration">The configuration of planning poker for Azure platform.</param>
 /// <param name="logger">Logger instance to log events.</param>
 public PlanningPokerAzureNode(IAzurePlanningPoker planningPoker, IServiceBus serviceBus, IAzurePlanningPokerConfiguration configuration, ILogger <PlanningPokerAzureNode> logger)
 {
     PlanningPoker = planningPoker ?? throw new ArgumentNullException(nameof(planningPoker));
     ServiceBus    = serviceBus ?? throw new ArgumentNullException(nameof(serviceBus));
     Configuration = configuration ?? new AzurePlanningPokerConfiguration();
     _logger       = logger;
     NodeId        = Guid.NewGuid().ToString();
 }
        private static PlanningPokerAzureNode CreatePlanningPokerAzureNode(
            IAzurePlanningPoker planningPoker = null,
            IServiceBus serviceBus            = null,
            IAzurePlanningPokerConfiguration configuration = null,
            ILogger <PlanningPokerAzureNode> logger        = null)
        {
            if (logger == null)
            {
                logger = Mock.Of <ILogger <PlanningPokerAzureNode> >();
            }

            return(new PlanningPokerAzureNode(planningPoker, serviceBus, configuration, logger));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlanningPokerAzureNode"/> class.
 /// </summary>
 /// <param name="planningPoker">The planning poker teams controller instance.</param>
 /// <param name="serviceBus">The service bus used to send messages between nodes.</param>
 /// <param name="configuration">The configuration of planning poker for Azure platform.</param>
 /// <param name="scrumTeamSerializer">The serializer that provides serialization and desserialization of Scrum Team.</param>
 /// <param name="logger">Logger instance to log events.</param>
 public PlanningPokerAzureNode(
     IAzurePlanningPoker planningPoker,
     IServiceBus serviceBus,
     IAzurePlanningPokerConfiguration configuration,
     ScrumTeamSerializer scrumTeamSerializer,
     ILogger <PlanningPokerAzureNode> logger)
 {
     PlanningPoker        = planningPoker ?? throw new ArgumentNullException(nameof(planningPoker));
     ServiceBus           = serviceBus ?? throw new ArgumentNullException(nameof(serviceBus));
     Configuration        = configuration ?? new AzurePlanningPokerConfiguration();
     _scrumTeamSerializer = scrumTeamSerializer ?? new ScrumTeamSerializer(PlanningPoker.DateTimeProvider);
     _logger = logger;
     NodeId  = Guid.NewGuid().ToString();
 }
        private static PlanningPokerAzureNode CreatePlanningPokerAzureNode(
            IAzurePlanningPoker planningPoker = null,
            IServiceBus serviceBus            = null,
            IAzurePlanningPokerConfiguration configuration = null,
            ILogger <PlanningPokerAzureNode> logger        = null,
            DateTimeProvider dateTimeProvider = null)
        {
            if (logger == null)
            {
                logger = Mock.Of <ILogger <PlanningPokerAzureNode> >();
            }

            var serializer = new ScrumTeamSerializer(dateTimeProvider ?? new DateTimeProviderMock());

            return(new PlanningPokerAzureNode(planningPoker, serviceBus, configuration, serializer, logger));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PlanningPokerAzureNode"/> class.
        /// </summary>
        /// <param name="planningPoker">The planning poker teams controller instance.</param>
        /// <param name="serviceBus">The service bus used to send messages between nodes.</param>
        /// <param name="configuration">The configuration of planning poker for Azure platform.</param>
        public PlanningPokerAzureNode(IAzurePlanningPoker planningPoker, IServiceBus serviceBus, IAzurePlanningPokerConfiguration configuration)
        {
            if (planningPoker == null)
            {
                throw new ArgumentNullException("planningPoker");
            }

            if (serviceBus == null)
            {
                throw new ArgumentNullException("serviceBus");
            }

            this.PlanningPoker = planningPoker;
            this.ServiceBus    = serviceBus;
            this.Configuration = configuration ?? new AzurePlanningPokerConfigurationElement();
            this.NodeId        = Guid.NewGuid().ToString();
        }