Example #1
0
        // Static Constructor
        static DataHub()
        {
            Downloader.ProgressUpdated   += ProgressUpdated;
            ModbusPoller.ProgressUpdated += ProgressUpdated;

            s_digits = "0123456789".ToCharArray();

            AcronymValidationAttribute acronymValidator = new AcronymValidationAttribute();

            s_isInvalidAcronymChar = testChar =>
            {
                lock (acronymValidator)
                    return(!acronymValidator.IsValid(testChar));
            };
        }
Example #2
0
        // Static Constructor
        static DataHub()
        {
            Downloader.ProgressUpdated   += ProgressUpdated;
            ModbusPoller.ProgressUpdated += (sender, args) => ProgressUpdated(sender, new EventArgs <string, List <ProgressUpdate> >(null, new List <ProgressUpdate>(new[] { args.Argument })));

            s_digits = "0123456789".ToCharArray();

            AcronymValidationAttribute acronymValidator = new AcronymValidationAttribute();

            s_isInvalidAcronymChar = testChar =>
            {
                lock (acronymValidator)
                    return(!acronymValidator.IsValid(testChar));
            };
        }