public override void Process(BuildGutterIconDescriptorArgs args) { Assert.ArgumentNotNull(args, "args"); Assert.IsNotNull(args.Descriptor, "args.Descriptor"); Assert.IsNotNullOrEmpty(IconPath, "IconPath"); Assert.IsNotNullOrEmpty(TooltipKey, "TooltipKey"); args.Descriptor.Icon = IconPath; args.Descriptor.Tooltip = GetTooltip(args); args.Descriptor.Click = Constants.CommandNames.Refresh; }
protected override GutterIconDescriptor GetIconDescriptor(Item item) { Assert.ArgumentNotNull((object)item, "item"); var freshnessCheckArgs = new FreshnessCheckArgs() { Item = item }; CorePipeline.Run(PipelineNames.FreshnessCheck, freshnessCheckArgs); if (!freshnessCheckArgs.IsStale) return null; var descriptor = new GutterIconDescriptor(); var args = new BuildGutterIconDescriptorArgs() { Item = item, Descriptor = descriptor }; CorePipeline.Run(PipelineNames.BuildGutterIconDescriptor,args); return descriptor; }
public abstract void Process(BuildGutterIconDescriptorArgs args);
private String GetTooltip(BuildGutterIconDescriptorArgs args) { String format = Translate.Text(TooltipKey); String date = DateUtil.IsoDateToDateTime(args.Item[Constants.FieldNames.Refreshed]).ToShortDateString(); return String.Format(format, date); }