public void ShouldBeAbleToClearLabelsOfCurrentScope() { _labels = new LabelCollection(); _labels.Scopes.SetCurrent("Test Scenario 1"); _labels.Add(_label1Name, _label1Index); _labels.Count().Should().Be(1); _labels.Scopes.SetCurrent("Function 2"); _labels.Add(_label2Name, _label2Index); _labels.Count().Should().Be(2); _labels.Contains(_label1Name).Should().BeFalse(); _labels.GetValue(_label1Name).Should().Be(-1); _labels.Contains(_label2Name).Should().BeTrue(); _labels.GetValue(_label2Name).Should().Be(_label2Index); _labels.RemoveCurrentScopedValues(); _labels.Count().Should().Be(1); _labels.Contains(_label2Name).Should().BeFalse(); _labels.GetValue(_label2Name).Should().Be(-1); _labels.Contains(_label1Name).Should().BeTrue(); _labels.GetValue(_label1Name).Should().Be(_label1Index); }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: base.IfcParse(propIndex, value); break; case 3: if (_telephoneNumbers == null) { _telephoneNumbers = new LabelCollection(this); } _telephoneNumbers.Add(value.StringVal); break; case 4: if (_facsimileNumbers == null) { _facsimileNumbers = new LabelCollection(this); } _facsimileNumbers.Add(value.StringVal); break; case 5: _pagerNumber = value.StringVal; break; case 6: if (_electronicMailAddresses == null) { _electronicMailAddresses = new LabelCollection(this); } _electronicMailAddresses.Add(value.StringVal); break; case 7: _wwwHomePageUrl = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public void ShouldBeAbleToAddLabel() { _labels = new LabelCollection(); _labels.Scopes.SetCurrent("Test Scenario 1"); _labels.Add(_label1Name, _label1Index); _labels.Add(_label2Name, _label2Index); _labels.Count().Should().Be(2); _labels.Contains(_label1Name).Should().BeTrue(); _labels.GetValue(_label1Name).Should().Be(_label1Index); _labels.Contains(_label2Name).Should().BeTrue(); _labels.GetValue(_label2Name).Should().Be(_label2Index); }
public void SetMiddleNames(params string[] middleNames) { if (_middleNames == null) { _middleNames = new LabelCollection(this); } else { _middleNames.Clear(); } foreach (string item in middleNames) { _middleNames.Add(item); } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: base.IfcParse(propIndex, value); break; case 3: _internalLocation = value.StringVal; break; case 4: if (_addressLines == null) { _addressLines = new LabelCollection(this); } _addressLines.Add(value.StringVal); break; case 5: _postalBox = value.StringVal; break; case 6: _town = value.StringVal; break; case 7: _region = value.StringVal; break; case 8: _postalCode = value.StringVal; break; case 9: _country = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }