public virtual IRuleMacro GetMacro(Item item)
 {
     Assert.ArgumentNotNull(item, "item");
     if (!item.HasChildren)
     {
         return null;
     }
     var macro = new ManualTreeMacro();
     macro.RootItem = item;
     return macro;
 }
 public virtual IRuleMacro GetMacro(Item item)
 {
     Assert.ArgumentNotNull(item, "item");
     if (!item.HasChildren)
     {
         return null;
     }
     var macro = new ManualTreeMacro();
     macro.RootItem = item;
     macro.DefaultWindowIcon = item.Appearance.Icon;
     macro.DefaultWindowTitle = "Select Value";
     macro.DefaultWindowText = "Select the value to use in the rule";
     return macro;
 }
 public virtual IRuleMacro GetMacro(Item item)
 {
     Assert.ArgumentNotNull(item, "item");
     if (!item.HasChildren)
     {
         return null;
     }
     Assert.IsNotNullOrEmpty(this.OperatorsFolderId, "OperatorsFolderId must have a value");
     Assert.IsTrue(ID.IsID(this.OperatorsFolderId), "OperatorsFolderId must be a valid ID");
     var folderId = new ID(this.OperatorsFolderId);
     var folderItem = Sitecore.Client.ContentDatabase.GetItem(folderId);
     Assert.IsNotNull(folderItem, string.Format("Cannot locate the item {0} which was specified for OperatorsFolderId", this.OperatorsFolderId));
     var macro = new ManualTreeMacro();
     macro.RootItem = folderItem;
     macro.DefaultWindowIcon = folderItem.Appearance.Icon;
     macro.DefaultWindowTitle = "Select Operator";
     macro.DefaultWindowText = "Select the operator to use in the rule";
     return macro;
 }