protected virtual InterOpStarTeam.StLabel createLabel(InterOpStarTeam.StView snapshot) { InterOpStarTeam.StLabel newLabel; InterOpStarTeam.StLabelFactoryClass starTeamLabelFactory = new InterOpStarTeam.StLabelFactoryClass(); // Create the new label and update the repository try { //default is view label if (_isRevision) { newLabel = starTeamLabelFactory.CreateRevisionLabel(snapshot, _labelName, _description); } else { newLabel = starTeamLabelFactory.CreateViewLabel(snapshot, _labelName, _description, _labelAsOfDate, _isBuildLabel); } newLabel.update(); string sLabelType; if (this._isRevision) { sLabelType = "Revision"; } else { sLabelType = (this._isBuildLabel ? "View Build" : "View"); } Log(Level.Info, "Created '{0}' label '{1}'", sLabelType, _labelName); return(newLabel); } catch (Exception ex) { throw new BuildException(string.Format("Creating label '{0}' failed.", _labelName), Location, ex); } }
protected virtual InterOpStarTeam.StLabel createLabel(InterOpStarTeam.StView snapshot) { InterOpStarTeam.StLabel newLabel; InterOpStarTeam.StLabelFactoryClass starTeamLabelFactory = new InterOpStarTeam.StLabelFactoryClass(); // Create the new label and update the repository try { //default is view label if(_isRevision) { newLabel = starTeamLabelFactory.CreateRevisionLabel(snapshot,_labelName, _description); } else { newLabel = starTeamLabelFactory.CreateViewLabel(snapshot,_labelName, _description, _labelAsOfDate, _isBuildLabel); } newLabel.update(); string sLabelType; if (this._isRevision) { sLabelType = "Revision"; } else { sLabelType = (this._isBuildLabel ? "View Build" : "View"); } Log(Level.Info, "Created '{0}' label '{1}'", sLabelType, _labelName); return newLabel; } catch(Exception ex) { throw new BuildException(string.Format("Creating label '{0}' failed.", _labelName), Location, ex); } }