private static void Activate()
 {
     WbemProvider provider = new WbemProvider(@"root\ServiceModel", "ServiceModel");
     provider.Register("AppDomainInfo", new AppDomainInstanceProvider());
     provider.Register("Service", new ServiceInstanceProvider());
     provider.Register("Contract", new ContractInstanceProvider());
     provider.Register("Endpoint", new EndpointInstanceProvider());
     provider.Register("ServiceAppDomain", new ServiceAppDomainAssociationProvider());
     provider.Register("ServiceToEndpointAssociation", new ServiceEndpointAssociationProvider());
 }
コード例 #2
0
        private static void Activate()
        {
            WbemProvider provider = new WbemProvider(@"root\ServiceModel", "ServiceModel");

            provider.Register("AppDomainInfo", new AppDomainInstanceProvider());
            provider.Register("Service", new ServiceInstanceProvider());
            provider.Register("Contract", new ContractInstanceProvider());
            provider.Register("Endpoint", new EndpointInstanceProvider());
            provider.Register("ServiceAppDomain", new ServiceAppDomainAssociationProvider());
            provider.Register("ServiceToEndpointAssociation", new ServiceEndpointAssociationProvider());
        }
コード例 #3
0
        static void Activate()
        {
            WbemProvider wmi = new WbemProvider(AdministrationStrings.IndigoNamespace, AdministrationStrings.IndigoAppName);

            wmi.Register(AdministrationStrings.AppDomainInfo, new AppDomainInstanceProvider());
            wmi.Register(AdministrationStrings.Service, new ServiceInstanceProvider());
            wmi.Register(AdministrationStrings.Contract, new ContractInstanceProvider());
            wmi.Register(AdministrationStrings.Endpoint, new EndpointInstanceProvider());
            wmi.Register(AdministrationStrings.ServiceAppDomain, new ServiceAppDomainAssociationProvider());
            wmi.Register(AdministrationStrings.ServiceToEndpointAssociation, new ServiceEndpointAssociationProvider());
        }
コード例 #4
0
 internal WbemInstance(WbemProvider.WbemInstance wbemInstance, string className) : this(wbemInstance.parms, className)
 {
 }
コード例 #5
0
 internal WbemInstance(WbemProvider.ParameterContext parms, string className)
 {
     this.parms = parms;
     if (string.IsNullOrEmpty(className))
     {
         className = parms.ClassName;
     }
     this.className = className;
     WbemNative.IWbemClassObject ppObject = null;
     WbemException.ThrowIfFail(parms.WbemServices.GetObject(className, 0, parms.WbemContext, ref ppObject, IntPtr.Zero));
     if (ppObject != null)
     {
         WbemException.ThrowIfFail(ppObject.SpawnInstance(0, out this.wbemObject));
     }
 }
コード例 #6
0
 internal WbemInstance(WbemProvider.ParameterContext parms, WbemProvider.ObjectPathRegex objPathRegex) : this(parms, objPathRegex.ClassName)
 {
     foreach (KeyValuePair<string, object> pair in objPathRegex.Keys)
     {
         this.SetProperty(pair.Key, pair.Value);
     }
 }
コード例 #7
0
 internal WbemInstance(WbemProvider.ParameterContext parms, WbemNative.IWbemClassObject wbemObject)
 {
     this.parms = parms;
     this.wbemObject = wbemObject;
 }
コード例 #8
0
 internal MethodContext(WbemProvider.ParameterContext parms, string methodName, WbemNative.IWbemClassObject wbemInParms, WbemProvider.WbemInstance wbemInstance)
 {
     this.parms = parms;
     this.methodName = methodName;
     this.wbemInParms = wbemInParms;
     this.instance = new WbemProvider.InstanceContext(wbemInstance);
     WbemNative.IWbemClassObject ppObject = null;
     WbemException.ThrowIfFail(parms.WbemServices.GetObject(parms.ClassName, 0, parms.WbemContext, ref ppObject, IntPtr.Zero));
     WbemNative.IWbemClassObject ppOutSignature = null;
     WbemException.ThrowIfFail(ppObject.GetMethod(methodName, 0, IntPtr.Zero, out ppOutSignature));
     WbemException.ThrowIfFail(ppOutSignature.SpawnInstance(0, out this.wbemOutParms));
 }
コード例 #9
0
 internal InstancesContext(WbemProvider.ParameterContext parms)
 {
     this.parms = parms;
 }
コード例 #10
0
 internal InstanceContext(WbemProvider.WbemInstance wbemInstance)
 {
     this.wbemInstance = wbemInstance;
 }
コード例 #11
0
 static void Activate()
 {
     WbemProvider wmi = new WbemProvider(AdministrationStrings.IndigoNamespace, AdministrationStrings.IndigoAppName);
     wmi.Register(AdministrationStrings.AppDomainInfo, new AppDomainInstanceProvider());
     wmi.Register(AdministrationStrings.Service, new ServiceInstanceProvider());
     wmi.Register(AdministrationStrings.Contract, new ContractInstanceProvider());
     wmi.Register(AdministrationStrings.Endpoint, new EndpointInstanceProvider());
     wmi.Register(AdministrationStrings.ServiceAppDomain, new ServiceAppDomainAssociationProvider());
     wmi.Register(AdministrationStrings.ServiceToEndpointAssociation, new ServiceEndpointAssociationProvider());
 }