void IWmiProvider.EnumInstances(IWmiInstances instances)
 {
     foreach (ServiceInfo info in new ServiceInfoCollection(ManagementExtension.Services))
     {
         IWmiInstance inst = instances.NewInstance(null);
         inst.SetProperty("AppDomainInfo", AppDomainInstanceProvider.GetReference());
         inst.SetProperty("Service", ServiceInstanceProvider.GetReference(info));
         instances.AddInstance(inst);
     }
 }
        internal static IWmiInstance GetAppDomainInfo(IWmiInstance instance)
        {
            IWmiInstance instance2 = instance.NewInstance("AppDomainInfo");

            if (instance2 != null)
            {
                AppDomainInstanceProvider.FillAppDomainInfo(instance2);
            }
            return(instance2);
        }
Exemplo n.º 3
0
        internal static IWmiInstance GetAppDomainInfo(IWmiInstance instance)
        {
            Fx.Assert(null != instance, "");
            IWmiInstance appDomainInfo = instance.NewInstance(AdministrationStrings.AppDomainInfo);

            if (null != appDomainInfo)
            {
                AppDomainInstanceProvider.FillAppDomainInfo(appDomainInfo);
            }

            return(appDomainInfo);
        }
Exemplo n.º 4
0
        void IWmiProvider.EnumInstances(IWmiInstances instances)
        {
            Fx.Assert(null != instances, "");
            foreach (ServiceInfo info in new ServiceInfoCollection(ManagementExtension.Services))
            {
                IWmiInstance instance = instances.NewInstance(null);

                instance.SetProperty(AdministrationStrings.AppDomainInfo, AppDomainInstanceProvider.GetReference());
                instance.SetProperty(AdministrationStrings.Service, ServiceInstanceProvider.GetReference(info));

                instances.AddInstance(instance);
            }
        }