示例#1
0
 protected override void OnNotificationEvent(T eventRaised, TFSIdentity identify)
 {
     if (NotificationDelegate != null)
     {
         NotificationDelegate(eventRaised, identify);
     }
 }
 public HarleysvilleCheckInAlert(CheckinEvent _cie, TFSIdentity _tfsUrl)
 {
     _ciEvent = _cie;
     _tfvc = new TFVC(_tfsUrl.Url);
     _teamAddress = ConfigurationManager.AppSettings.Get("ConfigCheckInAlertAddress");
     SeedCheckInHash();
     _Messages = GetAlertTypeMessages();
 }
        /// <summary>
        /// Main factory method that determines the workitem type 
        /// </summary>
        /// <param name="_wice">
        /// Workitem Change Event object
        /// </param>
        /// <returns>
        /// Correct child object for workitem changed
        /// </returns>
        public IHarleysvilleWorkItemAlerts GetWorkItem(WorkItemChangedEvent _wice, TFSIdentity _tfsId)
        {
            IHarleysvilleWorkItemAlerts _Ihar = null;

            foreach (StringField _sf in _wice.CoreFields.StringFields)
            {
                if (_sf.Name.Equals("Work Item Type", StringComparison.CurrentCultureIgnoreCase))
                {
                    switch (_sf.NewValue)
                    {
                        case "Deployment Backlog Item":
                            _Ihar = new HarleysvilleDBIAlerts(_wice, _tfsId);
                            break;
                        case "Build Backlong Item":
                            _Ihar = new HarelysvilleWorkItemAlerts();
                            break;
                        case "Sprint Backlog Item":
                            _Ihar = new HarelysvilleWorkItemAlerts();
                            break;
                        case "Release Backlog Item":
                            _Ihar = new HarelysvilleWorkItemAlerts();
                            break;
                        case "Product Backlog Item":
                            _Ihar = new HarelysvilleWorkItemAlerts();
                            break;
                        case "Label Backlog Item":
                            _Ihar = new HarleysvilleLBIAlerts(_wice, _tfsId);
                            break;
                        default :
                            _Ihar = new HarelysvilleWorkItemAlerts();
                            break;
                    }
                }
            }

            return _Ihar;
        }
示例#4
0
 //private BBIHelper _bbihelper;
 public HarleysvilleDBIAlerts(WorkItemChangedEvent _wice, TFSIdentity tfsId)
 {
     WIChangeEvent = _wice;
     _dbihelper.SetDBI(_wice, tfsId);
     SetMailPriority();
 }
示例#5
0
 public BuildStatusChangeEventArgs(BuildStatusChangeEvent eventRecieved, TFSIdentity identity)
     : base(eventRecieved, identity)
 {
 }
示例#6
0
 public CheckinEventArgs(CheckinEvent eventReceived, TFSIdentity identity)
     : base(eventReceived, identity)
 {
 }
示例#7
0
 public BuildCompletionEventArgs(BuildCompletionEvent eventRecieved, TFSIdentity identity)
     : base(eventRecieved, identity)
 {
 }
示例#8
0
        public void SetDBI(WorkItemChangedEvent wice, TFSIdentity tfsId)
        {
            _dbi = new DBI(GetDBINumber(wice.CoreFields.IntegerFields), tfsId.Url);

            this.SetWorkItemHelper(wice, (TFWI)_dbi);

            _dbiType = GetDBIType();
            _state = GetState();
            _stateChange = GetStateChangeType();
            _targetEnv = GetTargetEnvironment();

            if (ChangeType == ChangeTypes.New ||
                !HasBeenAutoFilled() ||
                Check4NewBuildPackage())
            {
                this.AutoFill();
                SetBuildNumbersField();
                ResetWIFields();
                PopBuildNumbersList();
                LinkBBIs();
            }
            else
            {
                PopBuildNumbersList();
                LinkBBIs();

            }

            if (WiFields["New Test Environment"].Equals("Production", StringComparison.CurrentCultureIgnoreCase))
            {
                _isPrd = true;
            }

            if ((_state == DBIStates.Ready4IRB || _state == DBIStates.IRBApproved) && _stateChange == WIStateChangeType.New)
            {
                _isIRB = true;
            }
        }
 public NotificationEventArgs(T eventRaised, TFSIdentity identity)
 {
     EventRaised = eventRaised;
     TFSIdentity = identity;
 }