Пример #1
0
        public static Density operator /(Mass leftHandSide, Volume rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Density(leftHandSide.ValueInBaseUnit / rightHandSide.ValueInBaseUnit));
        }
Пример #2
0
        public static TSource SingleOfType <TSource>(this IEnumerable source, Func <TSource, bool> predicate)
        {
            ArgumentMust.NotBeNull(() => source);
            ArgumentMust.NotBeNull(() => predicate);

            return(source.OfType <TSource>().Single(predicate));
        }
Пример #3
0
        public RamViewModel(SampleMessenger messenger, RamSampleProviderService ramSampleProviderService)
        {
            ArgumentMust.NotBeNull(() => messenger);
            ArgumentMust.NotBeNull(() => messenger);

            messenger.SubscribeTo(this);
        }
Пример #4
0
        public static Volume operator *(Area leftHandSide, Length rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Volume(leftHandSide.ValueInBaseUnit * rightHandSide.ValueInBaseUnit));
        }
Пример #5
0
        public static bool None <T>(this IEnumerable <T> source, Func <T, bool> predicate)
        {
            ArgumentMust.NotBeNull(() => source);
            ArgumentMust.NotBeNull(() => predicate);

            return(EnumerablePredicates.None(source, predicate));
        }
Пример #6
0
        public static Power operator /(Energy leftHandSide, Time rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Power(leftHandSide.ValueInBaseUnit / rightHandSide.ValueInBaseUnit));
        }
Пример #7
0
        public static Power operator *(Area leftHandSide, Intensity rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(rightHandSide * leftHandSide);
        }
Пример #8
0
        public CpuSample(
            string name,
            Frequency clockSpeed,
            Frequency busSpeed,
            TotalUsage totalUsage,
            Temperature packageTemperature,
            IEnumerable <LogicalCore> cores,
            IEnumerable <Temperature> temperatures)
        {
            ArgumentMust.NotBeNullOrWhitespace(() => name);
            ArgumentMust.NotBeNull(() => clockSpeed);
            ArgumentMust.NotBeNull(() => busSpeed);
            ArgumentMust.NotBeNull(() => totalUsage);
            ArgumentMust.NotBeNull(() => packageTemperature);
            ArgumentMust.NotBeNullOrEmpty(() => cores);
            ArgumentMust.NotBeNullOrEmpty(() => temperatures);

            Name               = name;
            ClockSpeed         = clockSpeed;
            BusSpeed           = busSpeed;
            TotalUsage         = totalUsage;
            PackageTemperature = packageTemperature;
            Cores              = cores;
            Temperatures       = temperatures;
        }
Пример #9
0
        public void Load(IEnumerable <IIoCModule> modules)
        {
            ArgumentMust.NotBeNull(() => modules);
            ArgumentMust.NotContainNull(() => modules);

            modules.ForEach(module => module.Load());
        }
Пример #10
0
        public static Force operator *(Acceleration leftHandSide, Mass rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(rightHandSide * leftHandSide);
        }
Пример #11
0
        public static Force operator *(Mass leftHandSide, Acceleration rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Force(leftHandSide.ValueInBaseUnit * rightHandSide.ValueInBaseUnit));
        }
Пример #12
0
        public static Volume operator *(Length leftHandSide, Area rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(rightHandSide * leftHandSide);
        }
Пример #13
0
        public static Energy operator *(Time leftHandSide, Power rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(rightHandSide * leftHandSide);
        }
Пример #14
0
        public MainPageViewModel(
            CoresViewModel coresViewModel,
            CpuViewModel cpuViewModel,
            RamViewModel ramViewModel,
            GpuViewModel gpuViewModel,
            GpuClocksViewModel gpuClocksViewModel,
            VRamViewModel vRamViewModel,
            GpuLoadsViewModel gpuLoadsViewModel,
            SettingsViewModel settingsViewModel)
        {
            ArgumentMust.NotBeNull(() => coresViewModel);
            ArgumentMust.NotBeNull(() => cpuViewModel);
            ArgumentMust.NotBeNull(() => ramViewModel);
            ArgumentMust.NotBeNull(() => gpuViewModel);
            ArgumentMust.NotBeNull(() => gpuClocksViewModel);
            ArgumentMust.NotBeNull(() => vRamViewModel);
            ArgumentMust.NotBeNull(() => gpuLoadsViewModel);
            ArgumentMust.NotBeNull(() => settingsViewModel);

            CoresViewModel     = coresViewModel;
            CpuViewModel       = cpuViewModel;
            RamViewModel       = ramViewModel;
            GpuViewModel       = gpuViewModel;
            GpuClocksViewModel = gpuClocksViewModel;
            VRamViewModel      = vRamViewModel;
            GpuLoadsViewModel  = gpuLoadsViewModel;
            SettingsViewModel  = settingsViewModel;
        }
Пример #15
0
        public static Power operator *(Intensity leftHandSide, Area rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Power(leftHandSide.ValueInBaseUnit / rightHandSide.ValueInBaseUnit));
        }
Пример #16
0
        protected PhysicalQuantity(double value, Unit <TPhysicalQuantity> unit)
        {
            ArgumentMust.NotBeNull(() => unit);

            Value = value;
            Unit  = unit;
        }
Пример #17
0
        public static Acceleration operator /(Force leftHandSide, Mass rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Acceleration(leftHandSide.ValueInBaseUnit / rightHandSide.ValueInBaseUnit));
        }
Пример #18
0
        public static Energy operator *(Power leftHandSide, Time rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Energy(leftHandSide.ValueInBaseUnit * rightHandSide.ValueInBaseUnit));
        }
Пример #19
0
        public static Area operator *(Length leftHandSide, Length rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Area(leftHandSide.ValueInBaseUnit / rightHandSide.ValueInBaseUnit));
        }
Пример #20
0
        public static Length operator /(Area leftHandSide, Length rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Length(leftHandSide.ValueInBaseUnit / rightHandSide.ValueInBaseUnit));
        }
Пример #21
0
        public static Velocity operator /(Length leftHandSide, Time rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Velocity(leftHandSide.ValueInBaseUnit / rightHandSide.ValueInBaseUnit));
        }
Пример #22
0
        public static Velocity operator *(Time leftHandSide, Acceleration rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(rightHandSide * leftHandSide);
        }
Пример #23
0
        public static Area operator /(Power leftHandSide, Intensity rightHandSide)
        {
            ArgumentMust.NotBeNull(() => leftHandSide);
            ArgumentMust.NotBeNull(() => rightHandSide);

            return(new Area(leftHandSide.ValueInBaseUnit / rightHandSide.ValueInBaseUnit));
        }
Пример #24
0
        public async void OnMessageReceived(SamplesShouldBeAcquired message)
        {
            ArgumentMust.NotBeNull(() => message);

            var sample = await Client.GetGpuSampleAsync();

            Messenger.Post(new GpuSampleAcquired(sample));
        }
Пример #25
0
        public CpuSampleTimerService(SampleMessenger sampleMessenger)
        {
            ArgumentMust.NotBeNull(() => sampleMessenger);

            _sampleMessenger = sampleMessenger;

            SetupTimer();
        }
Пример #26
0
        public SyncCommand(Action executionAction, Func <bool> canExecuteFunc)
        {
            ArgumentMust.NotBeNull(() => executionAction);
            ArgumentMust.NotBeNull(() => canExecuteFunc);

            _executionAction = executionAction;
            _canExecuteFunc  = canExecuteFunc;
        }
Пример #27
0
        public void OnMessageReceived(GpuSampleAcquired message)
        {
            ArgumentMust.NotBeNull(() => message);

            GpuLoad.Value         = message.GpuSample.GpuLoads.CoreLoad.In <Percent>().Value;
            McuLoad.Value         = message.GpuSample.GpuLoads.MemoryControllerLoad.In <Percent>().Value;
            VideoEngineLoad.Value = message.GpuSample.GpuLoads.VideoEngineLoad.In <Percent>().Value;
        }
Пример #28
0
        public void OnMessageReceived(GpuSampleAcquired message)
        {
            ArgumentMust.NotBeNull(() => message);

            CoreClock.Value   = message.GpuSample.GpuClocks.CoreClock.In <GigaHertz>().Value;
            MemoryClock.Value = message.GpuSample.GpuClocks.MemoryClock.In <GigaHertz>().Value;
            ShaderClock.Value = message.GpuSample.GpuClocks.ShaderClock.In <GigaHertz>().Value;
        }
Пример #29
0
        public AsyncCommand(Func <Task> executionFunc, Func <bool> canExecuteFunc)
        {
            ArgumentMust.NotBeNull(() => executionFunc);
            ArgumentMust.NotBeNull(() => canExecuteFunc);

            _executionFunc  = executionFunc;
            _canExecuteFunc = canExecuteFunc;
        }
Пример #30
0
        public ConnectionSettingsService(ConnectionMessenger messenger)
        {
            ArgumentMust.NotBeNull(() => messenger);

            _messenger = messenger;

            ServerName = new ServerName();
        }