public void GetApplicationModels( RemotingService sender, string clientAddress, string signature, out Data.Transfer.Device[] devices, out CryptoCoin[] configurations, out bool mining, out bool hasChanges, out bool dynamicIntensity) { ModelEventArgs ea = new ModelEventArgs(); ea.IpAddress = clientAddress; ea.Signature = signature; if (GetModelRequested != null) GetModelRequested(sender, ea); devices = ea.Devices.ToArray(); configurations = ea.ConfiguredCoins.ToArray(); mining = ea.Mining; hasChanges = ea.HasChanges; dynamicIntensity = ea.DynamicIntensity; }
private void GetModelRequested(object sender, ModelEventArgs ea) { PerformRequestedCommand(ea.IpAddress, ea.Signature, () => { ea.Devices = GetDeviceTransferObjects(); ea.ConfiguredCoins = localViewModel.ConfiguredCoins.ToList(); ea.Mining = miningEngine.Mining; ea.DynamicIntensity = localViewModel.DynamicIntensity; ea.HasChanges = localViewModel.HasChanges; }); }