public void RegisterCimIndication(string computerName, string nameSpace, string queryDialect, string queryExpression, uint opreationTimeout)
        {
            object[] objArray = new object[2];
            objArray[0] = queryDialect;
            objArray[1] = queryExpression;
            DebugHelper.WriteLogEx("queryDialect = '{0}'; queryExpression = '{1}'", 0, objArray);
            this.TargetComputerName = computerName;
            CimSessionProxy cimSessionProxy = this.CreateSessionProxy(computerName, opreationTimeout);

            cimSessionProxy.SubscribeAsync(nameSpace, queryDialect, queryExpression);
            this.WaitForAckMessage();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Start an indication subscription target to the given computer.
        /// </summary>
        /// <param name="computerName">Null stands for localhost.</param>
        /// <param name="nameSpace"></param>
        /// <param name="queryDialect"></param>
        /// <param name="queryExpression"></param>
        /// <param name="operationTimeout"></param>
        public void RegisterCimIndication(
            string computerName,
            string nameSpace,
            string queryDialect,
            string queryExpression,
            UInt32 operationTimeout)
        {
            DebugHelper.WriteLogEx("queryDialect = '{0}'; queryExpression = '{1}'", 0, queryDialect, queryExpression);
            this.TargetComputerName = computerName;
            CimSessionProxy proxy = CreateSessionProxy(computerName, operationTimeout);

            proxy.SubscribeAsync(nameSpace, queryDialect, queryExpression);
            WaitForAckMessage();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Start an indication subscription through a given <see cref="CimSession"/>.
        /// </summary>
        /// <param name="cimSession">Cannot be null</param>
        /// <param name="nameSpace"></param>
        /// <param name="queryDialect"></param>
        /// <param name="queryExpression"></param>
        /// <param name="operationTimeout"></param>
        /// <exception cref="ArgumentNullException">throw if cimSession is null</exception>
        public void RegisterCimIndication(
            CimSession cimSession,
            string nameSpace,
            string queryDialect,
            string queryExpression,
            UInt32 operationTimeout)
        {
            DebugHelper.WriteLogEx("queryDialect = '{0}'; queryExpression = '{1}'", 0, queryDialect, queryExpression);
            if (cimSession == null)
            {
                throw new ArgumentNullException(String.Format(CultureInfo.CurrentUICulture, Strings.NullArgument, @"cimSession"));
            }
            this.TargetComputerName = cimSession.ComputerName;
            CimSessionProxy proxy = CreateSessionProxy(cimSession, operationTimeout);

            proxy.SubscribeAsync(nameSpace, queryDialect, queryExpression);
            WaitForAckMessage();
        }
 public void RegisterCimIndication(CimSession cimSession, string nameSpace, string queryDialect, string queryExpression, uint opreationTimeout)
 {
     object[] objArray = new object[2];
     objArray[0] = queryDialect;
     objArray[1] = queryExpression;
     DebugHelper.WriteLogEx("queryDialect = '{0}'; queryExpression = '{1}'", 0, objArray);
     if (cimSession != null)
     {
         this.TargetComputerName = cimSession.ComputerName;
         CimSessionProxy cimSessionProxy = this.CreateSessionProxy(cimSession, opreationTimeout);
         cimSessionProxy.SubscribeAsync(nameSpace, queryDialect, queryExpression);
         this.WaitForAckMessage();
         return;
     }
     else
     {
         object[] objArray1 = new object[1];
         objArray1[0] = "cimSession";
         throw new ArgumentNullException(string.Format(CultureInfo.CurrentUICulture, Strings.NullArgument, objArray1));
     }
 }