Example #1
0
 public string SelectionName(SelectionElement selection)
 {
     return (String.IsNullOrEmpty(selection.GetObjectName()) ? ObjectName(this.Selection, selection.Parent.Name) : selection.GetObjectName());
 }
        private static bool CanRedirectToSelection(HPatternInstance instance, out SelectionElement selection)
        {
            // Do we have an appropriate selection element?
            if (instance.Levels.Count > 0 &&
                instance.Levels[0].Selection != null &&
                CanRedirectTo(instance.Levels[0].Selection))
            {
                selection = instance.Levels[0].Selection;
                return true;
            }

            selection = null;
            return false;
        }