protected override void ConfigureObjectCollector()
        {
            if (base.ObjectCollector == null)
            {
                var newWmiProvider = new WmiDataProvider(((RegKeyEffectiveRights53ConnectionProvider)base.ConnectionProvider).ConnectionScope);
                base.ObjectCollector = new RegKeyEffectiveRightsObjectCollector()
                {
                    TargetInfo                = this.TargetInfo,
                    WmiDataProvider           = newWmiProvider,
                    AccessControlListProvider = AccessControlListProvider.CreateInstance()
                };
            }

            if (base.ItemTypeGenerator == null)
            {
                base.ItemTypeGenerator =
                    new RegKeyEffectiveRightsItemTypeGenerator()
                {
                    OperationEvaluator = new RegKeyEffectiveRightsOperationEvaluator()
                    {
                        SystemDataSource = base.ObjectCollector
                    },

                    ObjectCollector = (RegKeyEffectiveRightsObjectCollector)base.ObjectCollector
                }
            }
            ;
            /* { SystemDataSource = base.ObjectCollector } */;
        }
        private RegKeyEffectiveRightsObjectCollector CreateObjectCollectorWithBehavior()
        {
            MockRepository mocks = new MockRepository();
            var            fakeWmiDataProvider = mocks.DynamicMock <WmiDataProvider>();
            var            fakeACLProvider     = AccessControlListProvider.CreateInstance();

            Expect.Call(fakeACLProvider.GetRegistryKeyEffectiveRights(null, 0, null, null))
            .IgnoreArguments()
            .Return(KEY_CREATE_LINK_PERMISSION);

            mocks.ReplayAll();

            return(new RegKeyEffectiveRightsObjectCollector()
            {
                TargetInfo = ProbeHelper.CreateFakeTarget(),
                WmiDataProvider = fakeWmiDataProvider,
                AccessControlListProvider = fakeACLProvider
            });
        }