Пример #1
0
 // Override if new properties in a derived class need to be considered in the comparison
 internal virtual bool IsEqual(TheSenderThing senderThingToAdd)
 {
     return
         (senderThingToAdd != null
          //&& cdeMID == senderThingToAdd.cdeMID
          && ChangeBufferLatency == senderThingToAdd.ChangeBufferLatency &&
          ChangeBufferTimeBucketSize == senderThingToAdd.ChangeBufferTimeBucketSize &&
          ChangeNaNToNull == senderThingToAdd.ChangeNaNToNull &&
          Disable == senderThingToAdd.Disable &&
          PartitionKey == senderThingToAdd.PartitionKey &&
          EventFormat == senderThingToAdd.EventFormat &&
          StaticProperties == senderThingToAdd.StaticProperties &&
          AddThingIdentity == senderThingToAdd.AddThingIdentity &&
          TheCommonUtils.CGuid(ThingMID) == TheCommonUtils.CGuid(senderThingToAdd.ThingMID) &&
          PropertiesIncluded == senderThingToAdd.PropertiesIncluded &&
          PropertiesExcluded == senderThingToAdd.PropertiesExcluded &&
          (ForceAllProperties ?? false) == (senderThingToAdd.ForceAllProperties ?? false) &&
          (ForceConfigProperties ?? false) == (senderThingToAdd.ForceConfigProperties ?? false) &&
          PreserveOrder == senderThingToAdd.PreserveOrder &&
          SendUnchangedValue == senderThingToAdd.SendUnchangedValue &&
          (SendInitialValues ?? false) == (senderThingToAdd.SendInitialValues ?? false) &&
          (IgnoreExistingHistory ?? false) == (senderThingToAdd.IgnoreExistingHistory ?? false) &&
          TokenExpirationInHours == senderThingToAdd.TokenExpirationInHours &&
          KeepDurableHistory == senderThingToAdd.KeepDurableHistory &&
          MaxHistoryCount == senderThingToAdd.MaxHistoryCount &&
          MaxHistoryTime == senderThingToAdd.MaxHistoryTime &&
          IgnorePartialFailure == senderThingToAdd.IgnorePartialFailure &&
          EngineName == senderThingToAdd.EngineName &&
          FriendlyName == senderThingToAdd.FriendlyName &&
          DeviceType == senderThingToAdd.DeviceType &&
          PropertiesToMatch == senderThingToAdd.PropertiesToMatch &&
          ContinueMatching == senderThingToAdd.ContinueMatching
         );
 }
Пример #2
0
        /// <summary>
        /// Determines if the sender thing will return all the properties requested by the other sender thing
        /// </summary>
        /// <param name="senderThing"></param>
        /// <returns></returns>
        internal virtual bool DoesInclude(TheSenderThing senderThing)
        {
            var result =
                IsMatching(senderThing) &&
                CanSatisfy(this.GetHistoryParameters(), senderThing.GetHistoryParameters());

            return(result);
        }
Пример #3
0
 /// <summary>
 /// Determines if the history parameters for two sender things can be satisfied by the same historian request, only differing in the properties requested
 /// </summary>
 /// <param name="senderThing"></param>
 /// <returns></returns>
 internal virtual bool IsMatching(TheSenderThing senderThing)
 {
     return(ThingMidAsGuid == senderThing.ThingMidAsGuid &&
            StaticProperties == senderThing.StaticProperties &&
            SendUnchangedValue == senderThing.SendUnchangedValue &&
            (SendInitialValues ?? false) == (senderThing.SendInitialValues ?? false) &&
            IgnoreExistingHistory == senderThing.IgnoreExistingHistory &&
            TokenExpirationInHours == senderThing.TokenExpirationInHours &&
            PreserveOrder == senderThing.PreserveOrder &&
            MaxHistoryTime == senderThing.MaxHistoryTime &&
            MaxHistoryCount == senderThing.MaxHistoryCount &&
            KeepDurableHistory == senderThing.KeepDurableHistory &&
            IgnorePartialFailure == senderThing.IgnorePartialFailure &&
            EventFormat == senderThing.EventFormat
            //&& Disable == senderThing.Disable
            && ChangeNaNToNull == senderThing.ChangeNaNToNull &&
            ChangeBufferLatency == senderThing.ChangeBufferLatency &&
            ChangeBufferTimeBucketSize == senderThing.ChangeBufferTimeBucketSize &&
            AddThingIdentity == senderThing.AddThingIdentity
            );
 }