/// <summary>
 /// Constructor
 /// </summary>
 public MeasurementValueFilterAttributes()
 {
     Deep = false;
     LimitResult = -1;
     OrderBy = new[] { new Order( 4, OrderDirection.Desc, Entity.Measurement ) };
     RequestedValueAttributes = new AttributeSelector( AllAttributeSelection.True );
     RequestedMeasurementAttributes = new AttributeSelector( AllAttributeSelection.True );
     AggregationMeasurements = AggregationMeasurementSelection.Default;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public InspectionPlanFilterAttributes()
 {
     WithHistory = false;
     RequestedPartAttributes = new AttributeSelector( AllAttributeSelection.True );
     RequestedCharacteristicAttributes = new AttributeSelector( AllAttributeSelection.True );
 }
        /// <summary>
        /// Fetches a list of characteristics below <paramref name="partPath"/>. If the parent part is <code>null</code> the characteristics below
        /// the root part will be returned. The search can be restricted using the various filter parameters. If the <see paramref="depth"/> is
        /// <code>0</code>, only the specified part will be returned.
        /// </summary>
        /// <param name="partPath">The parent part to fetch the children for.</param>
        /// <param name="withHistory">Determines whether to return the version history for each characteristic.</param>
        /// <param name="depth">The depth for the inspection plan search.</param>
        /// <param name="partUuids">The list of part uuids to restrict the search to.</param>
        /// <param name="requestedCharacteristicAttributes">The attribute selector to determine which attributes to return.</param>
        /// <param name="streamed">
        /// This controls whether to choose a streamed transfer mode or not. Using streamed mode has the side effect, that the result is transfered
        /// using http/s when the caller enumerates the result. The caller should be aware of because then enumerating might take longer than expected.
        /// Non streamed transfer mode first reads the whole result inside the task and then returns an enumerator over the buffered result. This is
        /// the preferred way when calling the task from UI code or when enumerating the whole result. The streamed mode would be preferred when the
        /// result is processed in blocks on non UI code or when not the complete result set is used.
        /// </param>
        /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
        public async Task <IEnumerable <InspectionPlanCharacteristic> > GetCharacteristics(PathInformation partPath = null, Guid[] partUuids = null, ushort?depth = null, AttributeSelector requestedCharacteristicAttributes = null, bool withHistory = false, bool streamed = false, CancellationToken cancellationToken = default(CancellationToken))
        {
            var parameter = RestClientHelper.ParseToParameter(partPath, partUuids, depth, requestedCharacteristicAttributes, withHistory: withHistory);

            if (streamed)
            {
                return(await GetEnumerated <InspectionPlanCharacteristic>("characteristics", cancellationToken, parameter.ToArray()).ConfigureAwait(false));
            }

            return(await Get <InspectionPlanCharacteristic[]>("characteristics", cancellationToken, parameter.ToArray()).ConfigureAwait(false));
        }
        /// <summary>
        /// Fetches a single characteristic by its uuid.
        /// </summary>
        /// <param name="charUuid">The characteristic's uuid</param>
        /// <param name="withHistory">Determines whether to return the version history for the characteristic.</param>
        /// <param name="requestedCharacteristicAttributes">The attribute selector to determine which attributes to return.</param>
        /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
        public async Task <InspectionPlanCharacteristic> GetCharacteristicByUuid(Guid charUuid, AttributeSelector requestedCharacteristicAttributes = null, bool withHistory = false, CancellationToken cancellationToken = default(CancellationToken))
        {
            var parameter = RestClientHelper.ParseToParameter(requestedCharacteristicAttributes: requestedCharacteristicAttributes, withHistory: withHistory);

            return(await Get <InspectionPlanCharacteristic>(string.Format("characteristics/{0}", charUuid), cancellationToken, parameter.ToArray()).ConfigureAwait(false));
        }
        /// <summary>
        /// Fetches a single part by its uuid.
        /// </summary>
        /// <param name="partUuid">The part's uuid</param>
        /// <param name="withHistory">Determines whether to return the version history for the part.</param>
        /// <param name="requestedPartAttributes">The attribute selector to determine which attributes to return.</param>
        /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
        public async Task <InspectionPlanPart> GetPartByUuid(Guid partUuid, AttributeSelector requestedPartAttributes = null, bool withHistory = false, CancellationToken cancellationToken = default(CancellationToken))
        {
            var parameter = RestClientHelper.ParseToParameter(requestedPartAttributes: requestedPartAttributes, withHistory: withHistory);

            return(await Get <InspectionPlanPart>(String.Format("parts/{0}", partUuid), cancellationToken, parameter.ToArray()).ConfigureAwait(false));
        }
예제 #6
0
 /// <summary>
 /// Constructor
 /// </summary>
 public InspectionPlanFilterAttributes()
 {
     WithHistory                       = false;
     RequestedPartAttributes           = new AttributeSelector(AllAttributeSelection.True);
     RequestedCharacteristicAttributes = new AttributeSelector(AllAttributeSelection.True);
 }
예제 #7
0
		/// <summary>
		/// Fetches a single characteristic by its uuid.
		/// </summary>
		/// <param name="charUuid">The characteristic's uuid</param>
		/// <param name="withHistory">Determines whether to return the version history for the characteristic.</param>
		/// <param name="requestedCharacteristicAttributes">The attribute selector to determine which attributes to return.</param>
		/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
		public async Task<InspectionPlanCharacteristic> GetCharacteristicByUuid( Guid charUuid, AttributeSelector requestedCharacteristicAttributes = null, bool withHistory = false, CancellationToken cancellationToken = default(CancellationToken) )
		{
			var parameter = RestClientHelper.ParseToParameter( requestedCharacteristicAttributes: requestedCharacteristicAttributes, withHistory: withHistory );
			return await Get<InspectionPlanCharacteristic>( string.Format( "characteristics/{0}", charUuid ), cancellationToken, parameter.ToArray() ).ConfigureAwait( false );
		}
예제 #8
0
		/// <summary>
		/// Fetches a list of characteristics below <paramref name="partPath"/>. If the parent part is <code>null</code> the characteristics below
		/// the root part will be returned. The search can be restricted using the various filter parameters. If the <see paramref="depth"/> is 
		/// <code>0</code>, only the specified part will be returned.
		/// </summary>
		/// <param name="partPath">The parent part to fetch the children for.</param> 
		/// <param name="withHistory">Determines whether to return the version history for each characteristic.</param>
		/// <param name="depth">The depth for the inspection plan search.</param>
		/// <param name="partUuids">The list of part uuids to restrict the search to.</param>
		/// <param name="requestedCharacteristicAttributes">The attribute selector to determine which attributes to return.</param>
		/// <param name="streamed">
		/// This controls whether to choose a streamed transfer mode or not. Using streamed mode has the side effect, that the result is transfered 
		/// using http/s when the caller enumerates the result. The caller should be aware of because then enumerating might take longer than expected.
		/// Non streamed transfer mode first reads the whole result inside the task and then returns an enumerator over the buffered result. This is
		/// the preferred way when calling the task from UI code or when enumerating the whole result. The streamed mode would be preferred when the 
		/// result is processed in blocks on non UI code or when not the complete result set is used.
		/// </param>
		/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
		public async Task<IEnumerable<InspectionPlanCharacteristic>> GetCharacteristics( PathInformation partPath = null, Guid[] partUuids = null, ushort? depth = null, AttributeSelector requestedCharacteristicAttributes = null, bool withHistory = false, bool streamed = false, CancellationToken cancellationToken = default(CancellationToken) )
		{
			var parameter = RestClientHelper.ParseToParameter( partPath, partUuids, depth, requestedCharacteristicAttributes, withHistory: withHistory );

			if( streamed )
				return await GetEnumerated<InspectionPlanCharacteristic>( "characteristics", cancellationToken, parameter.ToArray() ).ConfigureAwait( false );

			return await Get<InspectionPlanCharacteristic[]>( "characteristics", cancellationToken, parameter.ToArray() ).ConfigureAwait( false );
		}
예제 #9
0
		/// <summary>
		/// Fetches a single part by its uuid.
		/// </summary>
		/// <param name="partUuid">The part's uuid</param>
		/// <param name="withHistory">Determines whether to return the version history for the part.</param>
		/// <param name="requestedPartAttributes">The attribute selector to determine which attributes to return.</param>
		/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
		public async Task<InspectionPlanPart> GetPartByUuid( Guid partUuid, AttributeSelector requestedPartAttributes = null, bool withHistory = false, CancellationToken cancellationToken = default(CancellationToken) )
		{
			var parameter = RestClientHelper.ParseToParameter( requestedPartAttributes: requestedPartAttributes, withHistory: withHistory );
			return await Get<InspectionPlanPart>( String.Format( "parts/{0}", partUuid ), cancellationToken, parameter.ToArray() ).ConfigureAwait( false );
		}