Beispiel #1
0
        /// <summary>
        /// Bind target object based on the supplied baseline.
        /// </summary>
        public void Bind(BaselineContext baseline, PSObject targetObject)
        {
            var binding = baseline.GetTargetBinding();

            TargetName   = _BindTargetName(binding.TargetName, !binding.IgnoreCase, targetObject);
            TargetType   = _BindTargetType(binding.TargetType, !binding.IgnoreCase, targetObject);
            ShouldFilter = !(_TypeFilter == null || _TypeFilter.Contains(TargetType));
            BindField(binding.Field, !binding.IgnoreCase, targetObject);
        }
Beispiel #2
0
        /// <summary>
        /// Bind target object based on the supplied baseline.
        /// </summary>
        public void Bind(BaselineContext baseline, PSObject targetObject)
        {
            var binding = baseline.GetTargetBinding();

            TargetName   = _BindTargetName(binding.TargetName, !binding.IgnoreCase, targetObject);
            TargetType   = _BindTargetType(binding.TargetType, !binding.IgnoreCase, targetObject);
            ShouldFilter = !(_TypeFilter == null || _TypeFilter.Contains(TargetType));

            // Use qualified name
            if (binding.UseQualifiedName)
            {
                TargetName = string.Concat(TargetType, binding.NameSeparator, TargetName);
            }

            // Bind custom fields
            BindField(binding.Field, !binding.IgnoreCase, targetObject);
        }