public void SetProperty(int precedence, Property prop) { int entry = this.GetEntry(precedence); this.SetPropertyImpl(entry, prop.Id, prop.Value); }
public void GetPropertyList(out Property[] propertyList, out FlagProperties effectiveFlagProperties, out PropertyBitMask effectivePropertyMask) { effectiveFlagProperties = default(FlagProperties); effectivePropertyMask = this.PropertyMask; for (int i = this.topEntry - 1; i >= 0; i--) { effectiveFlagProperties.Merge(this.entries[i].FlagProperties); } if (this.nonFlagPropertiesCount != 0) { propertyList = new Property[this.nonFlagPropertiesCount]; if (this.topEntry == 1) { Array.Copy(this.entries[0].Properties, 0, propertyList, 0, this.nonFlagPropertiesCount); } else if (this.topEntry == 2) { Property[] properties = this.entries[0].Properties; Property[] properties2 = this.entries[1].Properties; int num = 0; int num2 = 0; int count = this.entries[0].Count; int count2 = this.entries[1].Count; int num3 = 0; for (;;) { if (num < count) { if (num2 == count2 || properties[num].Id <= properties2[num2].Id) { propertyList[num3++] = properties[num++]; } else { propertyList[num3++] = properties2[num2++]; } } else { if (num2 >= count2) { break; } propertyList[num3++] = properties2[num2++]; } } } else { PropertyId propertyId = PropertyId.MergedCell; int num4 = 0; while ((propertyId += 1) < PropertyId.MaxValue) { if (this.PropertyMask.IsSet(propertyId)) { int num5; int num6; this.FindProperty(propertyId, out num5, out num6); propertyList[num4++] = this.entries[num5].Properties[num6]; } } } } else { propertyList = null; } this.Clean(); }