Example #1
0
        public IObservable <MsvmManagementCollection> CollectionAsync(CIMCollectionOfMSEs inMember, CimOperationOptions options = null)
        {
            var scope     = _scope;
            var instances = _resolver.ResolveSourceAsync(scope, inMember.AsCimInstance(), options);

            return(instances.Select(i => (MsvmManagementCollection)scope.Mapper.Create(scope, i)));
        }
        public IObservable <CIMCollection> DependentAsync(CIMCollectionOfMSEs inAntecedent, CimOperationOptions options = null)
        {
            var scope     = _scope;
            var instances = _resolver.ResolveTargetAsync(scope, inAntecedent.AsCimInstance(), options);

            return(instances.Select(i => (CIMCollection)scope.Mapper.Create(scope, i)));
        }
        public (System.UInt32 retval, CIMConcreteJob outJob) DestroyCollection(CIMCollectionOfMSEs inCollection)
        {
            var parameters = new CimMethodParametersCollection();

            if (inCollection != null)
            {
                parameters.Add(CimMethodParameter.Create("Collection", inCollection.AsCimInstance(), CimType.Reference, inCollection == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "DestroyCollection", parameters);

            return((System.UInt32)result.ReturnValue.Value, (CIMConcreteJob)InfrastuctureObjectScope.Mapper.Create(InfrastuctureObjectScope, (CimInstance)result.OutParameters["Job"].Value));
        }
        public (System.UInt32 retval, CIMCollection outResultingSnapshotCollection, CIMConcreteJob outJob) CreateSnapshot(CIMCollectionOfMSEs inCollection, CIMCollection inResultingSnapshotCollection, System.String inSnapshotSettings, System.UInt16?inSnapshotType)
        {
            var parameters = new CimMethodParametersCollection();

            if (inCollection != null)
            {
                parameters.Add(CimMethodParameter.Create("Collection", inCollection.AsCimInstance(), CimType.Reference, inCollection == null ? CimFlags.NullValue : CimFlags.None));
            }
            if (inResultingSnapshotCollection != null)
            {
                parameters.Add(CimMethodParameter.Create("ResultingSnapshotCollection", inResultingSnapshotCollection.AsCimInstance(), CimType.Reference, inResultingSnapshotCollection == null ? CimFlags.NullValue : CimFlags.None));
            }
            if (inSnapshotSettings != null)
            {
                parameters.Add(CimMethodParameter.Create("SnapshotSettings", inSnapshotSettings, CimType.String, inSnapshotSettings == null ? CimFlags.NullValue : CimFlags.None));
            }
            if (inSnapshotType.HasValue)
            {
                parameters.Add(CimMethodParameter.Create("SnapshotType", inSnapshotType.Value, CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "CreateSnapshot", parameters);

            return((System.UInt32)result.ReturnValue.Value, (CIMCollection)InfrastuctureObjectScope.Mapper.Create(InfrastuctureObjectScope, (CimInstance)result.OutParameters["ResultingSnapshotCollection"].Value), (CIMConcreteJob)InfrastuctureObjectScope.Mapper.Create(InfrastuctureObjectScope, (CimInstance)result.OutParameters["Job"].Value));
        }