예제 #1
0
        public System.UInt32 RenameByObject(MSFTPrinter inInputObject, System.String inNewName)
        {
            var parameters = new CimMethodParametersCollection();

            if (inInputObject != null)
            {
                parameters.Add(CimMethodParameter.Create("InputObject", inInputObject.AsCimInstance(), CimType.Instance, inInputObject == null ? CimFlags.NullValue : CimFlags.None));
            }
            if (inNewName != null)
            {
                parameters.Add(CimMethodParameter.Create("NewName", inNewName, CimType.String, inNewName == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "RenameByObject", parameters);

            return((System.UInt32)result.ReturnValue.Value);
        }
예제 #2
0
        public System.UInt32 SuspendJobByPrinterObject(System.UInt32?inID, MSFTPrinter inPrinterObject)
        {
            var parameters = new CimMethodParametersCollection();

            if (inID.HasValue)
            {
                parameters.Add(CimMethodParameter.Create("ID", inID.Value, CimFlags.None));
            }
            if (inPrinterObject != null)
            {
                parameters.Add(CimMethodParameter.Create("PrinterObject", inPrinterObject.AsCimInstance(), CimType.Instance, inPrinterObject == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "SuspendJobByPrinterObject", parameters);

            return((System.UInt32)result.ReturnValue.Value);
        }
예제 #3
0
        public System.UInt32 SetByPrinterObject(System.Boolean?inCollate, System.Boolean?inColor, System.UInt32?inDuplexingMode, System.UInt32?inPaperSize, MSFTPrinter inPrinterObject, System.String inPrintTicketXML)
        {
            var parameters = new CimMethodParametersCollection();

            if (inCollate.HasValue)
            {
                parameters.Add(CimMethodParameter.Create("Collate", inCollate.Value, CimFlags.None));
            }
            if (inColor.HasValue)
            {
                parameters.Add(CimMethodParameter.Create("Color", inColor.Value, CimFlags.None));
            }
            if (inDuplexingMode.HasValue)
            {
                parameters.Add(CimMethodParameter.Create("DuplexingMode", inDuplexingMode.Value, CimFlags.None));
            }
            if (inPaperSize.HasValue)
            {
                parameters.Add(CimMethodParameter.Create("PaperSize", inPaperSize.Value, CimFlags.None));
            }
            if (inPrinterObject != null)
            {
                parameters.Add(CimMethodParameter.Create("PrinterObject", inPrinterObject.AsCimInstance(), CimType.Instance, inPrinterObject == null ? CimFlags.NullValue : CimFlags.None));
            }
            if (inPrintTicketXML != null)
            {
                parameters.Add(CimMethodParameter.Create("PrintTicketXML", inPrintTicketXML, CimType.String, inPrintTicketXML == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "SetByPrinterObject", parameters);

            return((System.UInt32)result.ReturnValue.Value);
        }
예제 #4
0
        public (System.UInt32 retval, IEnumerable <MSFTPrintJob> outcmdletOutput) GetByObject(System.UInt32?inID, MSFTPrinter inPrinterObject)
        {
            var parameters = new CimMethodParametersCollection();

            if (inID.HasValue)
            {
                parameters.Add(CimMethodParameter.Create("ID", inID.Value, CimFlags.None));
            }
            if (inPrinterObject != null)
            {
                parameters.Add(CimMethodParameter.Create("PrinterObject", inPrinterObject.AsCimInstance(), CimType.Instance, inPrinterObject == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "GetByObject", parameters);

            return((System.UInt32)result.ReturnValue.Value, (IEnumerable <MSFTPrintJob>)InfrastuctureObjectScope.Mapper.CreateMany <MSFTPrintJob>(InfrastuctureObjectScope, (IEnumerable <CimInstance>)result.OutParameters["cmdletOutput"].Value));
        }
예제 #5
0
        public (System.UInt32 retval, MSFTPrinterConfiguration outcmdletOutput) GetByPrinterObject(MSFTPrinter inPrinterObject)
        {
            var parameters = new CimMethodParametersCollection();

            if (inPrinterObject != null)
            {
                parameters.Add(CimMethodParameter.Create("PrinterObject", inPrinterObject.AsCimInstance(), CimType.Instance, inPrinterObject == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "GetByPrinterObject", parameters);

            return((System.UInt32)result.ReturnValue.Value, (MSFTPrinterConfiguration)InfrastuctureObjectScope.Mapper.Create(InfrastuctureObjectScope, (CimInstance)result.OutParameters["cmdletOutput"].Value));
        }