예제 #1
0
        /// <summary>
        /// Instantiates a deep copy of <paramref name="optionsToClone"/>
        /// </summary>
        /// <param name="optionsToClone">options to clone</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="optionsToClone"/> is <c>null</c></exception>
        public CimSubscriptionDeliveryOptions(CimSubscriptionDeliveryOptions optionsToClone)
        {
            if (optionsToClone == null)
            {
                throw new ArgumentNullException("optionsToClone");
            }
            MI_SubscriptionDeliveryOptions tmp;
            MI_Result result = optionsToClone.SubscriptionDeliveryOptionsHandle.Clone(out tmp);

            CimException.ThrowIfMiResultFailure(result);
            this._subscriptionDeliveryOptionsHandle = tmp;
        }
		public CimSubscriptionDeliveryOptions(CimSubscriptionDeliveryOptions optionsToClone)
		{
			SubscriptionDeliveryOptionsHandle subscriptionDeliveryOptionsHandle = null;
			if (optionsToClone != null)
			{
				MiResult miResult = MiResult.OK; //TODO: SubscriptionDeliveryOptionsMethods.Clone(optionsToClone.SubscriptionDeliveryOptionsHandle, out subscriptionDeliveryOptionsHandle);
				CimException.ThrowIfMiResultFailure(miResult);
				this._subscriptionDeliveryOptionsHandle = subscriptionDeliveryOptionsHandle;
				return;
			}
			else
			{
				throw new ArgumentNullException("optionsToClone");
			}
		}
예제 #3
0
        public CimSubscriptionDeliveryOptions(CimSubscriptionDeliveryOptions optionsToClone)
        {
            SubscriptionDeliveryOptionsHandle subscriptionDeliveryOptionsHandle = null;

            if (optionsToClone != null)
            {
                MiResult miResult = MiResult.OK;                 //TODO: SubscriptionDeliveryOptionsMethods.Clone(optionsToClone.SubscriptionDeliveryOptionsHandle, out subscriptionDeliveryOptionsHandle);
                CimException.ThrowIfMiResultFailure(miResult);
                this._subscriptionDeliveryOptionsHandle = subscriptionDeliveryOptionsHandle;
                return;
            }
            else
            {
                throw new ArgumentNullException("optionsToClone");
            }
        }
예제 #4
0
파일: CimSession.cs 프로젝트: nickchal/pash
		private OperationHandle SubscribeCore(string namespaceName, string queryDialect, string queryExpression, CimOperationOptions operationOptions, CimSubscriptionDeliveryOptions options, CimAsyncCallbacksReceiverBase asyncCallbacksReceiver)
		{
			OperationHandle operationHandle = null;
			SessionMethods.Subscribe(this._handle, operationOptions.GetOperationFlags(), operationOptions.GetOperationOptionsHandle(), namespaceName, queryDialect, queryExpression, options.GetSubscriptionDeliveryOptionsHandle(), operationOptions.GetOperationCallbacks(asyncCallbacksReceiver), out operationHandle);
			return operationHandle;
		}
예제 #5
0
파일: CimSession.cs 프로젝트: nickchal/pash
		public CimAsyncMultipleResults<CimSubscriptionResult> SubscribeAsync(string namespaceName, string queryDialect, string queryExpression, CimOperationOptions operationOptions, CimSubscriptionDeliveryOptions options)
		{
			this.AssertNotDisposed();
			if (!string.IsNullOrWhiteSpace(queryDialect))
			{
				if (!string.IsNullOrWhiteSpace(queryExpression))
				{
					IObservable<CimSubscriptionResult> cimAsyncIndicationObservable = new CimAsyncIndicationObservable(operationOptions, (CimAsyncCallbacksReceiverBase asyncCallbacksReceiver) => this.SubscribeCore(namespaceName, queryDialect, queryExpression, operationOptions, options, asyncCallbacksReceiver));
					return new CimAsyncMultipleResults<CimSubscriptionResult>(cimAsyncIndicationObservable);
				}
				else
				{
					throw new ArgumentNullException("queryExpression");
				}
			}
			else
			{
				throw new ArgumentNullException("queryDialect");
			}
		}
예제 #6
0
파일: CimSession.cs 프로젝트: nickchal/pash
		public CimAsyncMultipleResults<CimSubscriptionResult> SubscribeAsync(string namespaceName, string queryDialect, string queryExpression, CimSubscriptionDeliveryOptions options)
		{
			return this.SubscribeAsync(namespaceName, queryDialect, queryExpression, null, options);
		}
예제 #7
0
파일: CimSession.cs 프로젝트: nickchal/pash
		public IEnumerable<CimSubscriptionResult> Subscribe(string namespaceName, string queryDialect, string queryExpression, CimSubscriptionDeliveryOptions options)
		{
			return this.Subscribe(namespaceName, queryDialect, queryExpression, null, options);
		}