예제 #1
0
        /// <summary>
        /// </summary>
        protected override void ProcessRecord()
        {
            if (ReferenceObject == null || ReferenceObject.Length == 0)
            {
                HandleDifferenceObjectOnly();
                return;
            }
            else if (DifferenceObject == null || DifferenceObject.Length == 0)
            {
                HandleReferenceObjectOnly();
                return;
            }

            if (_comparer == null && 0 < DifferenceObject.Length)
            {
                InitComparer();
            }

            List <PSObject>             differenceList    = new List <PSObject>(DifferenceObject);
            List <OrderByPropertyEntry> differenceEntries =
                OrderByProperty.CreateOrderMatrix(
                    this, differenceList, _orderByProperty.MshParameterList);

            foreach (OrderByPropertyEntry incomingEntry in differenceEntries)
            {
                Process(incomingEntry);
            }
        }
예제 #2
0
 private void HandleDifferenceObjectOnly()
 {
     if ((this.DifferenceObject != null) && (this.DifferenceObject.Length != 0))
     {
         List <PSObject> inputObjects = new List <PSObject>(this.DifferenceObject);
         this.orderByProperty = new OrderByProperty(this, inputObjects, this.Property, true, base._cultureInfo, (bool)base.CaseSensitive);
         foreach (OrderByPropertyEntry entry in OrderByProperty.CreateOrderMatrix(this, inputObjects, this.orderByProperty.MshParameterList))
         {
             this.EmitDifferenceOnly(entry);
         }
     }
 }
예제 #3
0
        private void HandleDifferenceObjectOnly()
        {
            if (DifferenceObject == null || DifferenceObject.Length == 0)
            {
                return;
            }

            List <PSObject> differenceList = new List <PSObject>(DifferenceObject);

            _orderByProperty = new OrderByProperty(
                this, differenceList, Property, true, _cultureInfo, CaseSensitive);
            List <OrderByPropertyEntry> differenceEntries =
                OrderByProperty.CreateOrderMatrix(
                    this, differenceList, _orderByProperty.MshParameterList);

            foreach (OrderByPropertyEntry entry in differenceEntries)
            {
                EmitDifferenceOnly(entry);
            }
        }
예제 #4
0
 protected override void ProcessRecord()
 {
     if ((this.ReferenceObject == null) || (this.ReferenceObject.Length == 0))
     {
         this.HandleDifferenceObjectOnly();
     }
     else if ((this.DifferenceObject == null) || (this.DifferenceObject.Length == 0))
     {
         this.HandleReferenceObjectOnly();
     }
     else
     {
         if ((this.comparer == null) && (0 < this.DifferenceObject.Length))
         {
             this.InitComparer();
         }
         List <PSObject> inputObjects = new List <PSObject>(this.DifferenceObject);
         foreach (OrderByPropertyEntry entry in OrderByProperty.CreateOrderMatrix(this, inputObjects, this.orderByProperty.MshParameterList))
         {
             this.Process(entry);
         }
     }
 }