コード例 #1
0
        public override bool CanHandleObject(object ob)
        {
            SolutionItem p = ob as SolutionItem;

            if (p == null)
            {
                return(false);
            }

            var pr = ob as Project;

            if (pr != null && ProjectCapability != null)
            {
                if (!pr.IsCapabilityMatch(ProjectCapability))
                {
                    return(false);
                }
            }
            if (guid != null)
            {
                var typeGuids = p.GetItemTypeGuids();
                if (!typeGuids.Any(g => string.Equals(g, guid, StringComparison.InvariantCultureIgnoreCase)))
                {
                    return(false);
                }
            }
            return(true);
        }
コード例 #2
0
        public override bool CanHandleObject(object ob)
        {
            SolutionItem p = ob as SolutionItem;

            if (p == null)
            {
                return(false);
            }

            if (guid == null)
            {
                return(true);
            }

            var typeGuids = p.GetItemTypeGuids();

            return(typeGuids.Any(g => string.Equals(g, guid, StringComparison.InvariantCultureIgnoreCase)));
        }