public IObservable <CIMBaseMetricValue> DependentAsync(CIMBaseMetricDefinition inAntecedent, CimOperationOptions options = null) { var scope = _scope; var instances = _resolver.ResolveTargetAsync(scope, inAntecedent.AsCimInstance(), options); return(instances.Select(i => (CIMBaseMetricValue)scope.Mapper.Create(scope, i))); }
public IEnumerable <CIMManagedElement> Antecedent(CIMBaseMetricDefinition inDependent, CimOperationOptions options = null) { var scope = _scope; var instances = _resolver.ResolveSource(scope, inDependent.AsCimInstance(), options); return(instances.Select(i => (CIMManagedElement)scope.Mapper.Create(scope, i))); }
public System.UInt32 ControlMetricsByClass(CIMBaseMetricDefinition inDefinition, System.UInt16?inMetricCollectionEnabled, CIMManagedElement inSubject) { var parameters = new CimMethodParametersCollection(); if (inDefinition != null) { parameters.Add(CimMethodParameter.Create("Definition", inDefinition.AsCimInstance(), CimType.Reference, inDefinition == null ? CimFlags.NullValue : CimFlags.None)); } if (inMetricCollectionEnabled.HasValue) { parameters.Add(CimMethodParameter.Create("MetricCollectionEnabled", inMetricCollectionEnabled.Value, CimFlags.None)); } if (inSubject != null) { parameters.Add(CimMethodParameter.Create("Subject", inSubject.AsCimInstance(), CimType.Reference, inSubject == null ? CimFlags.NullValue : CimFlags.None)); } var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "ControlMetricsByClass", parameters); return((System.UInt32)result.ReturnValue.Value); }
public (System.UInt32 retval, IEnumerable <CIMBaseMetricValue> outValues) GetMetricValues(System.UInt16?inCount, CIMBaseMetricDefinition inDefinition, System.UInt16?inRange) { var parameters = new CimMethodParametersCollection(); if (inCount.HasValue) { parameters.Add(CimMethodParameter.Create("Count", inCount.Value, CimFlags.None)); } if (inDefinition != null) { parameters.Add(CimMethodParameter.Create("Definition", inDefinition.AsCimInstance(), CimType.Reference, inDefinition == null ? CimFlags.NullValue : CimFlags.None)); } if (inRange.HasValue) { parameters.Add(CimMethodParameter.Create("Range", inRange.Value, CimFlags.None)); } var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "GetMetricValues", parameters); return((System.UInt32)result.ReturnValue.Value, (IEnumerable <CIMBaseMetricValue>)InfrastuctureObjectScope.Mapper.CreateMany <CIMBaseMetricValue>(InfrastuctureObjectScope, (IEnumerable <CimInstance>)result.OutParameters["Values"].Value)); }
public (System.UInt32 retval, IEnumerable <CIMBaseMetricDefinition> outDefinitionList, System.UInt16[] outMetricCollectionEnabled, System.String[] outMetricNames) ShowMetricsByClass(CIMBaseMetricDefinition inDefinition, CIMManagedElement inSubject) { var parameters = new CimMethodParametersCollection(); if (inDefinition != null) { parameters.Add(CimMethodParameter.Create("Definition", inDefinition.AsCimInstance(), CimType.Reference, inDefinition == null ? CimFlags.NullValue : CimFlags.None)); } if (inSubject != null) { parameters.Add(CimMethodParameter.Create("Subject", inSubject.AsCimInstance(), CimType.Reference, inSubject == null ? CimFlags.NullValue : CimFlags.None)); } var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "ShowMetricsByClass", parameters); return((System.UInt32)result.ReturnValue.Value, (IEnumerable <CIMBaseMetricDefinition>)InfrastuctureObjectScope.Mapper.CreateMany <CIMBaseMetricDefinition>(InfrastuctureObjectScope, (IEnumerable <CimInstance>)result.OutParameters["DefinitionList"].Value), (System.UInt16[])result.OutParameters["MetricCollectionEnabled"].Value, (System.String[])result.OutParameters["MetricNames"].Value); }