public override int CompareTo(TimelineItem item) { ChildPropertyTimelineItem propertyTimelineItem = item as ChildPropertyTimelineItem; if (propertyTimelineItem == null) { return(0); } int num = this.stackOrder.CompareTo(propertyTimelineItem.stackOrder); if (num == 0) { return(string.Compare(this.DisplayName, propertyTimelineItem.DisplayName, StringComparison.CurrentCulture)); } return(num); }
public static ChildPropertyTimelineItem CreateChildPropertyTimelineItem(TimelineItemManager timelineItemManager, IProperty key, ElementTimelineItem elementTimelineItem) { ChildPropertyTimelineItem propertyTimelineItem = (ChildPropertyTimelineItem)null; foreach (ChildPropertyTimelineItemFactory.ChildPropertyTimelineItemEntry timelineItemEntry in ChildPropertyTimelineItemFactory.childPropertyTimelineItemFactory) { if (key.Equals((object)timelineItemEntry.property)) { propertyTimelineItem = timelineItemEntry.creator(timelineItemManager, key, elementTimelineItem, timelineItemEntry.type); propertyTimelineItem.EnableSelection = timelineItemEntry.enableSelection; propertyTimelineItem.ExpandParentOnInsertion = timelineItemEntry.expandParentOnInsertion; break; } } if (propertyTimelineItem == null) { ReferenceStep referenceStep = key as ReferenceStep; bool isAlternateContent = referenceStep != null && (referenceStep.Attributes[typeof(AlternateContentPropertyAttribute)] != null || PlatformNeutralAttributeHelper.AttributeExists((IEnumerable)referenceStep.Attributes, PlatformTypes.AlternateContentPropertyAttribute)); propertyTimelineItem = new ChildPropertyTimelineItem(timelineItemManager, key, elementTimelineItem, ChildPropertyTimelineItemType.Default, isAlternateContent); } return(propertyTimelineItem); }