Esempio n. 1
0
 protected override void EndProcessing()
 {
     try
     {
         WriteVerbose("name[" + Name + "] level[" + Level + "] valueType[" + ValueType + "]");
         IshFields ishFields = new IshFields(_incomingIshField);
         // Check if enum values are set
         IshField ishField = new IshRequestedMetadataField(Name, Level, ValueType);
         ishFields.AddOrUpdateField(ishField, Enumerations.ActionMode.Read);
         WriteObject(ishFields.Fields(), true);
     }
     catch (TrisoftAutomationException trisoftAutomationException)
     {
         ThrowTerminatingError(new ErrorRecord(trisoftAutomationException, base.GetType().Name, ErrorCategory.InvalidOperation, null));
     }
     catch (Exception exception)
     {
         ThrowTerminatingError(new ErrorRecord(exception, base.GetType().Name, ErrorCategory.NotSpecified, null));
     }
     finally
     {
         base.EndProcessing();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Remove a field from the current list.
        /// </summary>
        /// <param name="fieldName">The name of the field.</param>
        /// <param name="fieldLevel">The level of the field (<see cref="Enumerations.Level"/>).</param>
        /// <param name="valueType">The type of the field (<see cref="Enumerations.ValueType"/>).</param>
        /// <returns>The current list of <see cref="IshFields"/>.</returns>
        public IshFields RemoveField(string fieldName, Enumerations.Level fieldLevel, Enumerations.ValueType valueType)
        {
            var compareField = new IshRequestedMetadataField(fieldName, fieldLevel, valueType);

            return(RemoveField(compareField));
        }