Пример #1
0
 internal static ConsumerRegistration Create <T>(ConsumerRegistration registration, TheStorageMirror <T> store) where T : TheDataBase, INotifyPropertyChanged, new()
 {
     if (registration.MaintainHistoryStore && !registration.ExternalHistoryStore)
     {
         registration = new TheStorageMirrorHistorian.ConsumerRegistrationWithStore <T>(registration, store);
     }
     else
     {
         registration = new ConsumerRegistration(registration);
     }
     return(registration);
 }
Пример #2
0
        public ConsumerRegistration(ConsumerRegistration param) : base(param)
        {
            Token                 = param.Token;
            cdeMID                = param.Token;
            ThingMid              = param.ThingMid;
            LastAccess            = param.LastAccess;
            InitialValuesReported = param.InitialValuesReported;
            DataLossDetected      = param.DataLossDetected;

            LastSequenceNumberRead  = param.LastSequenceNumberRead;
            SequenceNumberTruncated = param.SequenceNumberTruncated;
            DataLossDetected        = param.DataLossDetected;
        }
Пример #3
0
        internal static ConsumerRegistration Create <T>(TheThing tThing, Guid token, TheHistoryParameters registrationParameters, TheStorageMirror <T> store) where T : TheDataBase, INotifyPropertyChanged, new()
        {
            ConsumerRegistration registration;

            if (registrationParameters.MaintainHistoryStore)
            {
                registration = new TheStorageMirrorHistorian.ConsumerRegistrationWithStore <T>(tThing, token, registrationParameters, store);
            }
            else
            {
                registration = new ConsumerRegistration(tThing, token, registrationParameters);
            }
            return(registration);
        }