conflict_resolution
stringlengths
27
16k
<<<<<<< using SIM.Extensions; namespace SIM.Instances ======= using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using SIM.Extensions; namespace SIM.Instances >>>>>>> using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using SIM.Extensions; namespace SIM.Instances <<<<<<< ======= >>>>>>>
<<<<<<< /// <summary> /// Provides information about the current programme environment. /// </summary> public class EnvironmentInfo : IEnvironmentInfo { #region Properties ======= using System; using System.IO; using System.Windows.Forms; using Microsoft.Win32; using Settings; using Util; /// <summary> /// Provides information about the current programme environment. /// </summary> public class EnvironmentInfo : IEnvironmentInfo { private string m_strApplicationPersonalDataFolderPath = null; private string m_strPersonalDataFolderPath = null; private string m_strTempPath = null; >>>>>>> using System; using System.IO; using System.Windows.Forms; using Microsoft.Win32; using Settings; using Util; /// <summary> /// Provides information about the current programme environment. /// </summary> public class EnvironmentInfo : IEnvironmentInfo { #region Properties private string m_strApplicationPersonalDataFolderPath = null; private string m_strPersonalDataFolderPath = null; private string m_strTempPath = null;
<<<<<<< using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework; ======= using System.Globalization; >>>>>>> using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework; using System.Globalization;
<<<<<<< new ApplicationViewInfo(Name.ARPTable, new PackIconMaterial() { Kind = PackIconMaterialKind.Matrix}), ======= new ApplicationViewInfo(Name.WakeOnLAN, new PackIconMaterial() { Kind = PackIconMaterialKind.Power }), new ApplicationViewInfo(Name.SubnetCalculator, new PackIconMaterial() { Kind = PackIconMaterialKind.Calculator }), >>>>>>> new ApplicationViewInfo(Name.WakeOnLAN, new PackIconMaterial() { Kind = PackIconMaterialKind.Power }), new ApplicationViewInfo(Name.SubnetCalculator, new PackIconMaterial() { Kind = PackIconMaterialKind.Calculator }), new ApplicationViewInfo(Name.ARPTable, new PackIconMaterial() { Kind = PackIconMaterialKind.Matrix}), <<<<<<< ARPTable, ======= WakeOnLAN, SubnetCalculator, >>>>>>> WakeOnLAN, SubnetCalculator, ARPTable,
<<<<<<< public FormBaseAirCorps fBaseAirCorps; ======= public FormJson fJson; >>>>>>> public FormBaseAirCorps fBaseAirCorps; public FormJson fJson; <<<<<<< SubForms.Add( fBaseAirCorps = new FormBaseAirCorps( this ) ); ======= SubForms.Add( fJson = new FormJson( this ) ); >>>>>>> SubForms.Add( fBaseAirCorps = new FormBaseAirCorps( this ) ); SubForms.Add( fJson = new FormJson( this ) ); <<<<<<< case "BaseAirCorps": return fBaseAirCorps; ======= case "Json": return fJson; >>>>>>> case "BaseAirCorps": return fBaseAirCorps; case "Json": return fJson;
<<<<<<< this.UI_BarColorMorphing = new System.Windows.Forms.CheckBox(); ======= this.FormFleet_BarColorMorphing = new System.Windows.Forms.CheckBox(); >>>>>>> this.UI_BarColorMorphing = new System.Windows.Forms.CheckBox(); <<<<<<< ======= this.Life_CanCloseFloatWindowInLock = new System.Windows.Forms.CheckBox(); >>>>>>> this.Life_CanCloseFloatWindowInLock = new System.Windows.Forms.CheckBox(); <<<<<<< // UI_BarColorMorphing // this.UI_BarColorMorphing.AutoSize = true; this.UI_BarColorMorphing.Location = new System.Drawing.Point(8, 64); this.UI_BarColorMorphing.Name = "UI_BarColorMorphing"; this.UI_BarColorMorphing.Size = new System.Drawing.Size(167, 19); this.UI_BarColorMorphing.TabIndex = 11; this.UI_BarColorMorphing.Text = "バーの色を滑らかに変化させる"; this.ToolTipInfo.SetToolTip(this.UI_BarColorMorphing, "HP・資源等のバーの色を、艦これUIと同様に滑らかに変化させるか指定します。"); this.UI_BarColorMorphing.UseVisualStyleBackColor = true; // ======= // FormFleet_BarColorMorphing // this.FormFleet_BarColorMorphing.AutoSize = true; this.FormFleet_BarColorMorphing.Location = new System.Drawing.Point(156, 138); this.FormFleet_BarColorMorphing.Name = "FormFleet_BarColorMorphing"; this.FormFleet_BarColorMorphing.Size = new System.Drawing.Size(167, 19); this.FormFleet_BarColorMorphing.TabIndex = 11; this.FormFleet_BarColorMorphing.Text = "バーの色を滑らかに変化させる"; this.ToolTipInfo.SetToolTip(this.FormFleet_BarColorMorphing, "HP・資源等のバーの色を、艦これUIと同様に滑らかに変化させるか指定します。"); this.FormFleet_BarColorMorphing.UseVisualStyleBackColor = true; // >>>>>>> // UI_BarColorMorphing // this.UI_BarColorMorphing.AutoSize = true; this.UI_BarColorMorphing.Location = new System.Drawing.Point(8, 64); this.UI_BarColorMorphing.Name = "UI_BarColorMorphing"; this.UI_BarColorMorphing.Size = new System.Drawing.Size(167, 19); this.UI_BarColorMorphing.TabIndex = 11; this.UI_BarColorMorphing.Text = "バーの色を滑らかに変化させる"; this.ToolTipInfo.SetToolTip(this.UI_BarColorMorphing, "HP・資源等のバーの色を、艦これUIと同様に滑らかに変化させるか指定します。"); this.UI_BarColorMorphing.UseVisualStyleBackColor = true; // <<<<<<< this.tabPage13.Size = new System.Drawing.Size(442, 201); ======= this.tabPage13.Size = new System.Drawing.Size(442, 221); >>>>>>> this.tabPage13.Size = new System.Drawing.Size(442, 221); <<<<<<< this.tabPage12.Size = new System.Drawing.Size(442, 201); ======= this.tabPage12.Size = new System.Drawing.Size(442, 221); >>>>>>> this.tabPage12.Size = new System.Drawing.Size(442, 221); <<<<<<< ======= // Life_CanCloseFloatWindowInLock // this.Life_CanCloseFloatWindowInLock.AutoSize = true; this.Life_CanCloseFloatWindowInLock.Location = new System.Drawing.Point(213, 60); this.Life_CanCloseFloatWindowInLock.Name = "Life_CanCloseFloatWindowInLock"; this.Life_CanCloseFloatWindowInLock.Size = new System.Drawing.Size(197, 19); this.Life_CanCloseFloatWindowInLock.TabIndex = 10; this.Life_CanCloseFloatWindowInLock.Text = "ロック中でもフロートウィンドウを閉じる"; this.ToolTipInfo.SetToolTip(this.Life_CanCloseFloatWindowInLock, "上記「レイアウトをロックする」が有効な時でも、\r\nフロートウィンドウ(本体とは分離したウィンドウ)を閉じられるようにするかを指定します。\r\nよくウィンドウを一時的" + "に開く方は有効にすると便利です。"); this.Life_CanCloseFloatWindowInLock.UseVisualStyleBackColor = true; // >>>>>>> // Life_CanCloseFloatWindowInLock // this.Life_CanCloseFloatWindowInLock.AutoSize = true; this.Life_CanCloseFloatWindowInLock.Location = new System.Drawing.Point(213, 60); this.Life_CanCloseFloatWindowInLock.Name = "Life_CanCloseFloatWindowInLock"; this.Life_CanCloseFloatWindowInLock.Size = new System.Drawing.Size(197, 19); this.Life_CanCloseFloatWindowInLock.TabIndex = 10; this.Life_CanCloseFloatWindowInLock.Text = "ロック中でもフロートウィンドウを閉じる"; this.ToolTipInfo.SetToolTip(this.Life_CanCloseFloatWindowInLock, "上記「レイアウトをロックする」が有効な時でも、\r\nフロートウィンドウ(本体とは分離したウィンドウ)を閉じられるようにするかを指定します。\r\nよくウィンドウを一時的" + "に開く方は有効にすると便利です。"); this.Life_CanCloseFloatWindowInLock.UseVisualStyleBackColor = true; // <<<<<<< private System.Windows.Forms.CheckBox UI_BarColorMorphing; ======= private System.Windows.Forms.CheckBox FormFleet_BarColorMorphing; private System.Windows.Forms.CheckBox Life_LockLayout; private System.Windows.Forms.CheckBox Life_CanCloseFloatWindowInLock; >>>>>>> private System.Windows.Forms.CheckBox Life_LockLayout; private System.Windows.Forms.CheckBox Life_CanCloseFloatWindowInLock; private System.Windows.Forms.CheckBox UI_BarColorMorphing;
<<<<<<< private const int HASH_SIZE = 32; /// <summary> Default number of threads to use </summary> private const int DEFAULT_THREADS = 1; ======= public const int HASH_SIZE = 32; >>>>>>> public const int HASH_SIZE = 32; /// <summary> Default number of threads to use </summary> public const int DEFAULT_THREADS = 1; <<<<<<< int maxThreads = 1; for (int testFor = 1; testFor <= 4; testFor++) if (args[0].IndexOf((char)('0' + testFor)) >= 0) maxThreads = testFor; #if DEBUG if (args[0].StartsWith("u", StringComparison.InvariantCultureIgnoreCase)) { Unittest(); return; } #endif ======= >>>>>>> int maxThreads = 1; for (int testFor = 1; testFor <= 4; testFor++) if (args[0].IndexOf((char)('0' + testFor)) >= 0) maxThreads = testFor; <<<<<<< #region Unittest code #if DEBUG /// <summary> /// Performs a unittest to ensure that the program performs as expected /// </summary> private static void Unittest() { const int MIN_SIZE = 1024 * 5; const int MAX_SIZE = 1024 * 1024 * 100; //100mb const int REPETIONS = 1000; bool allpass = true; Random rnd = new Random(); Console.WriteLine("Running unittest"); for (int useThreads = 1; useThreads <= 4; useThreads++) { //Test each supported version for (byte v = 0; v <= MAX_FILE_VERSION; v++) { SharpAESCrypt.DefaultFileVersion = v; // Test at boundaries and around the block/keysize margins foreach (int bound in new int[] { 1 << 6, 1 << 8, 1 << 10, 1 << 12, 1 << 14, 1 << 16, 1 << 20 }) for (int i = Math.Max(0, bound - 6 * BLOCK_SIZE - 1); i <= bound + (6 * BLOCK_SIZE + 1); i++) using (MemoryStream ms = new MemoryStream()) { byte[] tmp = new byte[i]; rnd.NextBytes(tmp); ms.Write(tmp, 0, tmp.Length); allpass &= Unittest(string.Format("Testing version {0} with length = {1}, using {2} Thread(s) => ", v, ms.Length, useThreads) , ms, -1, useThreads); } Console.WriteLine("allpass = {0}", allpass); } //Test each supported version with variavle buffer lengths for (byte v = 0; v <= MAX_FILE_VERSION; v++) { SharpAESCrypt.DefaultFileVersion = v; // Test at boundaries and around the block/keysize margins foreach (int bound in new int[] { 1 << 6, 1 << 8, 1 << 10, 1 << 12, 1 << 14, 1 << 16, 1 << 20 }) for (int i = Math.Max(0, bound - 6 * BLOCK_SIZE - 1); i <= bound + (6 * BLOCK_SIZE + 1); i++) using (MemoryStream ms = new MemoryStream()) { byte[] tmp = new byte[i]; rnd.NextBytes(tmp); ms.Write(tmp, 0, tmp.Length); allpass &= Unittest(string.Format("Testing version {0} with length = {1}, using {2} Thread(s) and variable buffer sizes => ", v, ms.Length, useThreads), ms, i + 3, useThreads); } Console.WriteLine("allpass = {0}", allpass); } } SharpAESCrypt.DefaultFileVersion = MAX_FILE_VERSION; Console.WriteLine(string.Format("Initial tests complete, running bulk tests with v{0}", SharpAESCrypt.DefaultFileVersion)); for (int i = 0; i < REPETIONS; i++) { using (MemoryStream ms = new MemoryStream()) { byte[] tmp = new byte[rnd.Next(MIN_SIZE, MAX_SIZE)]; rnd.NextBytes(tmp); ms.Write(tmp, 0, tmp.Length); int useThreads = (i % 4) + 1; allpass |= Unittest(string.Format("Testing bulk {0} of {1} with length = {2}, using {3} Thread(s) and variable buffer sizes => ", i, REPETIONS, ms.Length, useThreads) , ms, 4096, useThreads); } } { Console.WriteLine(); Console.WriteLine(); if (allpass) Console.WriteLine("**** All unittests passed ****"); else Console.WriteLine("**** SOME TESTS FAILED !! ****"); Console.WriteLine(); } } /// <summary> /// Helper function to perform a single test. /// </summary> /// <param name="message">A message printed to the console</param> /// <param name="input">The stream to test with</param> private static bool Unittest(string message, MemoryStream input, int useRndBufSize, int useThreads) { Console.Write(message); DateTime start = DateTime.Now; const string PASSWORD_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#¤%&/()=?`*'^¨-_.:,;<>|"; const int MIN_LEN = 1; const int MAX_LEN = 25; try { Random rnd = new Random(); char[] pwdchars = new char[rnd.Next(MIN_LEN, MAX_LEN)]; for (int i = 0; i < pwdchars.Length; i++) pwdchars[i] = PASSWORD_CHARS[rnd.Next(0, PASSWORD_CHARS.Length)]; input.Position = 0; using (MemoryStream enc = new MemoryStream()) using (MemoryStream dec = new MemoryStream()) { Encrypt(new string(pwdchars), input, enc, maxThreads: useThreads); enc.Position = 0; if (useRndBufSize <= 0) Decrypt(new string(pwdchars), enc, dec, maxThreads: useThreads); else UnitStreamDecrypt(new string(pwdchars), enc, dec, useRndBufSize, useThreads); dec.Position = 0; input.Position = 0; if (dec.Length != input.Length) throw new ApplicationException(string.Format("Length differ {0} vs {1}", dec.Length, input.Length)); for (int i = 0; i < dec.Length; i++) if (dec.ReadByte() != input.ReadByte()) throw new ApplicationException(string.Format("Streams differ at byte {0}", i)); } } catch (Exception ex) { string consMsg = string.Format("FAILED: {0}", ex.Message); Console.WriteLine(consMsg); // Write a message with detailed error info to err_out. this can be redirected to a file. Console.Error.WriteLine("{0}{1}{2}\r\n", message, consMsg, (ex is ApplicationException) ? "" : "\r\n" + ex.ToString()); return false; } TimeSpan dur = DateTime.Now - start; Console.WriteLine("OK! [{0:N0} ms, Throughput {1:N1} MB/s]", dur.TotalMilliseconds, input.Length / dur.TotalSeconds / (1024 * 1024)); return true; } /// <summary> /// For Unit testing: Decrypt a stream using the supplied password with changing (small) buffer sizes /// </summary> private static void UnitStreamDecrypt(string password, Stream input, Stream output, int bufferSizeSelect, int useThreads) { Random r = new Random(); int partBufs = Math.Min(bufferSizeSelect, 256); byte[][] buffer = new byte[partBufs][]; for (int bs = 1; bs < partBufs; bs++) buffer[bs] = new byte[bs]; buffer[0] = new byte[bufferSizeSelect]; int a; SharpAESCrypt c = new SharpAESCrypt(password, input, OperationMode.Decrypt); c.MaxCryptoThreads = useThreads; do { int bufLen = r.Next(bufferSizeSelect) + 1; byte[] useBuf = bufLen < partBufs ? buffer[bufLen] : buffer[0]; int useOffset = r.Next(useBuf.Length - bufLen + 1); a = c.Read(useBuf, useOffset, bufLen); output.Write(useBuf, useOffset, a); } while (a != 0); } #endif #endregion ======= >>>>>>>
<<<<<<< using Stratis.Bitcoin.Base; ======= using NBitcoin; using Stratis.Bitcoin.BlockPulling; >>>>>>> using Stratis.Bitcoin.Base; <<<<<<< services.AddSingleton<CoinView, CachedCoinView>(); ======= services.AddSingleton<ICoinView, CachedCoinView>(); services.AddSingleton<LookaheadBlockPuller>().AddSingleton<ILookaheadBlockPuller, LookaheadBlockPuller>(provider => provider.GetService<LookaheadBlockPuller>()); ; services.AddSingleton<IConsensusLoop, ConsensusLoop>() .AddSingleton<INetworkDifficulty, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop) .AddSingleton<IGetUnspentTransaction, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop); >>>>>>> services.AddSingleton<ICoinView, CachedCoinView>();
<<<<<<< using Stratis.Bitcoin.Base; ======= using NBitcoin.Rules; >>>>>>> using NBitcoin.Rules; using Stratis.Bitcoin.Base; <<<<<<< private Mock<IRuleRegistration> ruleRegistration; public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, IStakeChain stakeChain, IStakeValidator stakeValidator, IChainState chainState) : base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, stakeChain, stakeValidator, chainState) ======= public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, ILookaheadBlockPuller lookaheadBlockPuller, IStakeChain stakeChain, IStakeValidator stakeValidator) : base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, lookaheadBlockPuller, stakeChain, stakeValidator) >>>>>>> public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, IStakeChain stakeChain, IStakeValidator stakeValidator, IChainState chainState) : base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, stakeChain, stakeValidator, chainState) <<<<<<< testRulesContext.ConsensusRuleEngine = new PowConsensusRuleEngine(testRulesContext.Network, testRulesContext.LoggerFactory, testRulesContext.DateTimeProvider, testRulesContext.Chain, deployments, consensusSettings, testRulesContext.Checkpoints, new InMemoryCoinView(new uint256()), testRulesContext.ChainState).Register(new FullNodeBuilderConsensusExtension.PowConsensusRulesRegistration()); ======= testRulesContext.Consensus = new PowConsensusRules(testRulesContext.Network, testRulesContext.LoggerFactory, testRulesContext.DateTimeProvider, testRulesContext.Chain, deployments, consensusSettings, testRulesContext.Checkpoints, new InMemoryCoinView(new uint256()), new Mock<ILookaheadBlockPuller>().Object).Register(); >>>>>>> testRulesContext.ConsensusRuleEngine = new PowConsensusRuleEngine(testRulesContext.Network, testRulesContext.LoggerFactory, testRulesContext.DateTimeProvider, testRulesContext.Chain, deployments, consensusSettings, testRulesContext.Checkpoints, new InMemoryCoinView(new uint256()), testRulesContext.ChainState).Register();
<<<<<<< private readonly CoinView coinView; ======= private readonly LookaheadBlockPuller blockPuller; private readonly ICoinView coinView; >>>>>>> private readonly ICoinView coinView; <<<<<<< ======= private readonly StakeChainStore stakeChain; private readonly IRuleRegistration ruleRegistration; private readonly ConsensusSettings consensusSettings; private readonly IConsensusRules consensusRules; >>>>>>> <<<<<<< CoinView coinView, ======= LookaheadBlockPuller blockPuller, ICoinView coinView, >>>>>>> ICoinView coinView, <<<<<<< ======= this.ruleRegistration = ruleRegistration; this.consensusSettings = consensusSettings; this.consensusRules = consensusRules; >>>>>>> <<<<<<< this.signals.SubscribeForBlocks(this.consensusStats); ======= this.stakeChain?.LoadAsync().GetAwaiter().GetResult(); this.signals.SubscribeForBlocksConnected(this.consensusStats); this.consensusRules.Register(this.ruleRegistration); >>>>>>> this.signals.SubscribeForBlocksConnected(this.consensusStats); <<<<<<< services.AddSingleton<CoinView, CachedCoinView>(); ======= services.AddSingleton<ICoinView, CachedCoinView>(); services.AddSingleton<LookaheadBlockPuller>().AddSingleton<ILookaheadBlockPuller, LookaheadBlockPuller>(provider => provider.GetService<LookaheadBlockPuller>()); ; services.AddSingleton<IConsensusLoop, ConsensusLoop>() .AddSingleton<INetworkDifficulty, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop) .AddSingleton<IGetUnspentTransaction, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop); services.AddSingleton<IInitialBlockDownloadState, InitialBlockDownloadState>(); >>>>>>> services.AddSingleton<ICoinView, CachedCoinView>(); <<<<<<< services.AddSingleton<CoinView, CachedCoinView>(); ======= services.AddSingleton<ICoinView, CachedCoinView>(); services.AddSingleton<LookaheadBlockPuller>().AddSingleton<ILookaheadBlockPuller, LookaheadBlockPuller>(provider => provider.GetService<LookaheadBlockPuller>()); services.AddSingleton<IConsensusLoop, ConsensusLoop>() .AddSingleton<INetworkDifficulty, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop) .AddSingleton<IGetUnspentTransaction, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop); >>>>>>> services.AddSingleton<ICoinView, CachedCoinView>();
<<<<<<< this.consensusLoop = new Mock<IConsensusManager>(); this.network = Network.StratisTest; ======= this.consensusLoop = new Mock<IConsensusLoop>(); this.network = KnownNetworks.StratisTest; >>>>>>> this.consensusLoop = new Mock<IConsensusManager>(); this.network = KnownNetworks.StratisTest;
<<<<<<< : base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, network) ======= : base(consensusLoop, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network) >>>>>>> : base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network)
<<<<<<< ======= using NBitcoin.Rules; using Stratis.Bitcoin.Utilities; >>>>>>> using NBitcoin.Rules;
<<<<<<< [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.Test.Unit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] ======= [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.Android.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.iOS.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] >>>>>>> [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.Test.Unit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.Android.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.iOS.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] <<<<<<< [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.Test.Unit")] ======= [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.Android.Test")] [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.iOS.Test")] >>>>>>> [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.Test.Unit")] [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.Android.Test")] [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Mobile.iOS.Test")]
<<<<<<< this.signals.Verify(s => s.SignalBlock(It.IsAny<Block>()), Times.Exactly(0)); ======= var notification = new BlockNotification(this.LoggerFactory.Object, chain, new Mock<ILookaheadBlockPuller>().Object, signals.Object, new AsyncLoopFactory(new LoggerFactory()), lifetime); notification.Notify(lifetime.ApplicationStopping); signals.Verify(s => s.SignalBlockConnected(It.IsAny<Block>()), Times.Exactly(0)); >>>>>>> this.signals.Verify(s => s.SignalBlockConnected(It.IsAny<Block>()), Times.Exactly(0)); <<<<<<< this.signals.Verify(s => s.SignalBlock(It.IsAny<Block>()), Times.Exactly(2)); ======= signals.Verify(s => s.SignalBlockConnected(It.IsAny<Block>()), Times.Exactly(2)); >>>>>>> this.signals.Verify(s => s.SignalBlockConnected(It.IsAny<Block>()), Times.Exactly(2)); <<<<<<< this.signals.Setup(s => s.SignalBlock(It.Is<Block>(b => b.GetHash() == blocks[0].GetHash()))) ======= signals.Setup(s => s.SignalBlockConnected(It.Is<Block>(b => b.GetHash() == blocks[0].GetHash()))) >>>>>>> this.signals.Setup(s => s.SignalBlockConnected(It.Is<Block>(b => b.GetHash() == blocks[0].GetHash())))
<<<<<<< scriptPubKey = new Script(new[] { Op.GetPushOp(hex), OpcodeType.OP_CHECKSIG }); newBlock = new BlockTemplate(); entry = new TestMemPoolEntryHelper(); chain = new ConcurrentChain(network); network.Consensus.Options = new PowConsensusOptions(); cachedCoinView = new CachedCoinView(new InMemoryCoinView(chain.Tip.HashBlock)); consensus = new ConsensusLoop(new PowConsensusValidator(network), chain, cachedCoinView, new LookaheadBlockPuller(chain, new ConnectionManager(network, new NodeConnectionParameters(), new NodeSettings())),new NodeDeployments(this.network)); consensus.Initialize(); entry.Fee(11); entry.Height(11); ======= this.scriptPubKey = new Script(new[] { Op.GetPushOp(hex), OpcodeType.OP_CHECKSIG }); this.newBlock = new BlockTemplate(); this.entry = new TestMemPoolEntryHelper(); this.chain = new ConcurrentChain(this.network); this.network.Consensus.Options = new PowConsensusOptions(); this.cachedCoinView = new CachedCoinView(new InMemoryCoinView(this.chain.Tip.HashBlock)); this.consensus = new ConsensusLoop(new PowConsensusValidator(this.network), this.chain, this.cachedCoinView, new LookaheadBlockPuller(this.chain, new ConnectionManager(this.network, new NodeConnectionParameters(), new NodeSettings()))); this.consensus.Initialize(); this.entry.Fee(11); this.entry.Height(11); >>>>>>> this.scriptPubKey = new Script(new[] { Op.GetPushOp(hex), OpcodeType.OP_CHECKSIG }); this.newBlock = new BlockTemplate(); this.entry = new TestMemPoolEntryHelper(); this.chain = new ConcurrentChain(network); this.network.Consensus.Options = new PowConsensusOptions(); this.cachedCoinView = new CachedCoinView(new InMemoryCoinView(chain.Tip.HashBlock)); this.consensus = new ConsensusLoop(new PowConsensusValidator(network), chain, cachedCoinView, new LookaheadBlockPuller(chain, new ConnectionManager(network, new NodeConnectionParameters(), new NodeSettings())),new NodeDeployments(this.network)); this.consensus.Initialize(); this.entry.Fee(11); this.entry.Height(11);
<<<<<<< : base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, network, new BlockDefinitionOptions() { IsProofOfStake = false }) ======= : base(consensusLoop, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network) >>>>>>> : base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network)
<<<<<<< public WalletManager(ILoggerFactory loggerFactory, IConnectionManager connectionManager, Network network, ConcurrentChain chain, NodeSettings settings, DataFolder dataFolder, IWalletFeePolicy walletFeePolicy, MempoolValidator mempoolValidator = null) // mempool does not exist in a light wallet ======= public WalletManager(ILoggerFactory loggerFactory, ConnectionManager connectionManager, Network network, ConcurrentChain chain, NodeSettings settings, DataFolder dataFolder, IWalletFeePolicy walletFeePolicy, IAsyncLoopFactory asyncLoopFactory, FullNode.CancellationProvider cancellationProvider, MempoolValidator mempoolValidator = null) // mempool does not exist in a light wallet >>>>>>> public WalletManager(ILoggerFactory loggerFactory, IConnectionManager connectionManager, Network network, ConcurrentChain chain, NodeSettings settings, DataFolder dataFolder, IWalletFeePolicy walletFeePolicy, IAsyncLoopFactory asyncLoopFactory, FullNode.CancellationProvider cancellationProvider, MempoolValidator mempoolValidator = null) // mempool does not exist in a light wallet
<<<<<<< protected Mock<IBlockPuller> lookaheadBlockPuller; protected Mock<CoinView> coinView; ======= protected Mock<ILookaheadBlockPuller> lookaheadBlockPuller; protected Mock<ICoinView> coinView; >>>>>>> protected Mock<IBlockPuller> lookaheadBlockPuller; protected Mock<ICoinView> coinView; <<<<<<< this.lookaheadBlockPuller = new Mock<IBlockPuller>(); this.coinView = new Mock<CoinView>(); ======= this.lookaheadBlockPuller = new Mock<ILookaheadBlockPuller>(); this.coinView = new Mock<ICoinView>(); >>>>>>> this.lookaheadBlockPuller = new Mock<IBlockPuller>(); this.coinView = new Mock<ICoinView>(); <<<<<<< protected Mock<IBlockPuller> lookaheadBlockPuller; protected Mock<CoinView> coinView; ======= protected Mock<ILookaheadBlockPuller> lookaheadBlockPuller; protected Mock<ICoinView> coinView; >>>>>>> protected Mock<IBlockPuller> lookaheadBlockPuller; protected Mock<ICoinView> coinView; <<<<<<< this.lookaheadBlockPuller = new Mock<IBlockPuller>(); this.coinView = new Mock<CoinView>(); ======= this.lookaheadBlockPuller = new Mock<ILookaheadBlockPuller>(); this.coinView = new Mock<ICoinView>(); >>>>>>> this.lookaheadBlockPuller = new Mock<IBlockPuller>(); this.coinView = new Mock<ICoinView>();
<<<<<<< this.network.Consensus.Options = new ConsensusOptions(); ======= this.network.Consensus.Options = new ConsensusOptions(); this.network.Consensus.Rules = new SmartContractRuleRegistration().GetRules(); >>>>>>> this.network.Consensus.Options = new ConsensusOptions(); this.network.Consensus.Rules = new SmartContractPowRuleRegistration().GetRules(); <<<<<<< this.vm = new ReflectionVirtualMachine(this.validator, this.internalTxExecutorFactory, loggerFactory, this.network); this.executorFactory = new ReflectionSmartContractExecutorFactory(loggerFactory, this.serializer, this.refundProcessor, this.transferProcessor, this.vm); ======= >>>>>>> <<<<<<< var smartContractRuleRegistration = new SmartContractPowRuleRegistration(); ConsensusRules consensusRules = new SmartContractPowConsensusRuleEngine(this.chain, new Checkpoints(), consensusSettings, dateTimeProvider, this.executorFactory, loggerFactory, this.network, nodeDeployments, this.stateRoot, blockPuller, this.cachedCoinView, this.receiptStorage).Register(smartContractRuleRegistration); ======= ConsensusRules consensusRules = new SmartContractConsensusRules(this.chain, new Checkpoints(), consensusSettings, dateTimeProvider, this.executorFactory, loggerFactory, this.network, nodeDeployments, this.stateRoot, blockPuller, this.cachedCoinView, this.receiptStorage).Register(); >>>>>>> var smartContractRuleRegistration = new SmartContractPowRuleRegistration(); ConsensusRules consensusRules = new SmartContractPowConsensusRuleEngine(this.chain, new Checkpoints(), consensusSettings, dateTimeProvider, this.executorFactory, loggerFactory, this.network, nodeDeployments, this.stateRoot, blockPuller, this.cachedCoinView, this.receiptStorage).Register();
<<<<<<< PowBlockDefinition blockDefinition = CreatePowBlockAssembler(consensus, consensusRules, dateTimeProvider, loggerFactory as LoggerFactory, mempool, mempoolLock, network); ======= PowBlockDefinition blockDefinition = new PowBlockDefinition(consensusLoop, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network, consensusRules); >>>>>>> PowBlockDefinition blockDefinition = new PowBlockDefinition(consensus, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network, consensusRules); <<<<<<< blockDefinition = CreatePowBlockAssembler(consensus, consensusRules, dateTimeProvider, loggerFactory as LoggerFactory, mempool, mempoolLock, network); ======= blockDefinition = new PowBlockDefinition(consensusLoop, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network, consensusRules); >>>>>>> blockDefinition = new PowBlockDefinition(consensus, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network, consensusRules); <<<<<<< /// <summary> /// Creates a proof of work block assembler. /// </summary> private static PowBlockDefinition CreatePowBlockAssembler(IConsensusManager consensusManager, IConsensusRuleEngine consensusRules, IDateTimeProvider dateTimeProvider, LoggerFactory loggerFactory, TxMempool mempool, MempoolSchedulerLock mempoolLock, Network network) { var options = new BlockDefinitionOptions { BlockMaxWeight = network.Consensus.Options.MaxBlockWeight, BlockMaxSize = network.Consensus.Options.MaxBlockSerializedSize }; var blockMinFeeRate = new FeeRate(PowMining.DefaultBlockMinTxFee); options.BlockMinFeeRate = blockMinFeeRate; return new PowBlockDefinition(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, network, consensusRules, options); } ======= >>>>>>>
<<<<<<< using NBitcoin.Protocol; using Stratis.Bitcoin.Common.JsonErrors; ======= >>>>>>> using NBitcoin.Protocol; <<<<<<< ======= using Xunit; using System.Collections.Generic; using NBitcoin.Protocol; using System.Security; using Stratis.Bitcoin.Tests.Logging; using System.Linq; >>>>>>> <<<<<<< using Stratis.Bitcoin.Tests.Logging; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security; using Xunit; ======= using Stratis.Bitcoin.Utilities.JsonErrors; >>>>>>> using Stratis.Bitcoin.Tests.Logging; using Stratis.Bitcoin.Utilities.JsonErrors; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security; using Xunit;
<<<<<<< using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.Consensus; ======= >>>>>>> using Stratis.Bitcoin.Consensus;
<<<<<<< public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, CoinView uxtoSet, IStakeChain stakeChain, IStakeValidator stakeValidator, IChainState chainState) : base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, stakeChain, stakeValidator, chainState) ======= public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, ILookaheadBlockPuller lookaheadBlockPuller, IStakeChain stakeChain, IStakeValidator stakeValidator) : base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, lookaheadBlockPuller, stakeChain, stakeValidator) >>>>>>> public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, IStakeChain stakeChain, IStakeValidator stakeValidator, IChainState chainState) : base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, stakeChain, stakeValidator, chainState)
<<<<<<< return client.HttpClient.RequestWithoutHandlersAsync(HttpMethod.Post, MobileServiceAuthentication.LoginAsyncUriFragment + "/" + this.ProviderName, this.client.CurrentUser, token.ToString()); ======= string path = MobileServiceUrlBuilder.CombinePaths(MobileServiceAuthentication.LoginAsyncUriFragment, this.ProviderName); string queryString = MobileServiceUrlBuilder.GetQueryString(this.Parameters); string pathAndQuery = MobileServiceUrlBuilder.CombinePathAndQuery(path, queryString); return client.HttpClient.RequestWithoutHandlersAsync(HttpMethod.Post, pathAndQuery, client.CurrentUser, token.ToString()); >>>>>>> string path = MobileServiceUrlBuilder.CombinePaths(MobileServiceAuthentication.LoginAsyncUriFragment, this.ProviderName); string queryString = MobileServiceUrlBuilder.GetQueryString(this.Parameters); string pathAndQuery = MobileServiceUrlBuilder.CombinePathAndQuery(path, queryString); return client.HttpClient.RequestWithoutHandlersAsync(HttpMethod.Post, pathAndQuery, this.client.CurrentUser, token.ToString());
<<<<<<< ApiCop.RegisterRule(new UnusedFeatureApiCopRule("UserControlLogic.InfoBarMessageControl", "The InfoBarMessageControl is never found. This can have a negative impact on performance. Consider setting the SkipSearchingForInfoBarMessageControl or DefaultSkipSearchingForInfoBarMessageControlValue to true.", ApiCopRuleLevel.Error)); ======= DefaultUnloadBehaviorValue = UnloadBehavior.SaveAndCloseViewModel; >>>>>>> ApiCop.RegisterRule(new UnusedFeatureApiCopRule("UserControlLogic.InfoBarMessageControl", "The InfoBarMessageControl is never found. This can have a negative impact on performance. Consider setting the SkipSearchingForInfoBarMessageControl or DefaultSkipSearchingForInfoBarMessageControlValue to true.", ApiCopRuleLevel.Error)); DefaultUnloadBehaviorValue = UnloadBehavior.SaveAndCloseViewModel;
<<<<<<< if (!string.IsNullOrEmpty(dataErrorInfo[modelProperty])) { SetFieldValidationResult(FieldValidationResult.CreateError(mapping.ViewModelProperty, dataErrorInfo[modelProperty])); ======= validationContext.AddFieldValidationResult(FieldValidationResult.CreateError(mapping.ViewModelProperty, dataErrorInfo[modelProperty])); >>>>>>> if (!string.IsNullOrEmpty(dataErrorInfo[modelProperty])) { validationContext.AddFieldValidationResult(FieldValidationResult.CreateError(mapping.ViewModelProperty, dataErrorInfo[modelProperty])); <<<<<<< if (!string.IsNullOrEmpty(dataWarningInfo[modelProperty])) { SetFieldValidationResult(FieldValidationResult.CreateWarning(mapping.ViewModelProperty, dataWarningInfo[modelProperty])); ======= validationContext.AddFieldValidationResult(FieldValidationResult.CreateWarning(mapping.ViewModelProperty, dataWarningInfo[modelProperty])); >>>>>>> if (!string.IsNullOrEmpty(dataWarningInfo[modelProperty])) { validationContext.AddFieldValidationResult(FieldValidationResult.CreateWarning(mapping.ViewModelProperty, dataWarningInfo[modelProperty])); <<<<<<< if (!string.IsNullOrEmpty(error)) { SetFieldValidationResult(FieldValidationResult.CreateError(mapping.ViewModelProperty, error)); break; } ======= validationContext.AddFieldValidationResult(FieldValidationResult.CreateError(mapping.ViewModelProperty, error)); break; >>>>>>> if (!string.IsNullOrEmpty(error)) { validationContext.AddFieldValidationResult(FieldValidationResult.CreateError(mapping.ViewModelProperty, error)); break; } <<<<<<< if (!string.IsNullOrEmpty(warning)) { SetFieldValidationResult(FieldValidationResult.CreateWarning(mapping.ViewModelProperty, warning)); break; } ======= validationContext.AddFieldValidationResult(FieldValidationResult.CreateWarning(mapping.ViewModelProperty, warning)); break; >>>>>>> if (!string.IsNullOrEmpty(warning)) { validationContext.AddFieldValidationResult(FieldValidationResult.CreateWarning(mapping.ViewModelProperty, warning)); break; }
<<<<<<< Person person = new Person(); person.LastName = "last_name"; ======= var person = new Person(); person.LastName = "last name"; >>>>>>> var person = new Person(); person.LastName = "last_name";
<<<<<<< using ViewModels; ======= using Services; >>>>>>> using ViewModels; using Services; <<<<<<< var modelPropertyPropertyInfo = modelPropertyType.GetPropertyEx(valueProperty); if (modelPropertyPropertyInfo == null) ======= Log.Warning("Mapped viewmodel property '{0}' to model property '{1}' is invalid because property '{1}' is not found on the model '{2}'.\n\n" + "If the property is defined in a sub-interface, reflection does not return it as a valid property. If this is the case, you can safely ignore this warning", mapping.ViewModelProperty, mapping.ValueProperty, mapping.ModelProperty); //throw new PropertyNotFoundInModelException(mapping.ViewModelProperty, mapping.ModelProperty, mapping.ValueProperty); // Disabled because a property defined in an interface is not detected by FlattenHierarchy } else { if (viewModelPropertyType != modelPropertyPropertyInfo.PropertyType) >>>>>>> var modelPropertyPropertyInfo = modelPropertyType.GetPropertyEx(valueProperty); if (modelPropertyPropertyInfo == null) <<<<<<< ViewModelToModelMapping mapping = map.Value; IViewModelToModelConverter converter = mapping.Converter; if (converter.ShouldConvert(e.PropertyName)) ======= var mapping = map.Value; if (string.CompareOrdinal(mapping.ValueProperty, e.PropertyName) == 0) >>>>>>> var mapping = map.Value; IViewModelToModelConverter converter = mapping.Converter; if (converter.ShouldConvert(e.PropertyName))
<<<<<<< public int SentBubbleColor { get; set; } public int ReceivedBubbleColor { get; set; } public int SentFontColor { get; set; } public int ReceivedFontColor { get; set; } public bool BubbleColorsChosen { get; set; } ======= public bool BackgroundChosen { get; set; } public int BackgroundColor { get; set; } public string BackgroundImagePath { get; set; } >>>>>>> public int SentBubbleColor { get; set; } public int ReceivedBubbleColor { get; set; } public int SentFontColor { get; set; } public int ReceivedFontColor { get; set; } public bool BubbleColorsChosen { get; set; } public bool BackgroundChosen { get; set; } public int BackgroundColor { get; set; } public string BackgroundImagePath { get; set; }
<<<<<<< UnreadIndicatorGuid = null, LastUnreadSetTime = 0, ParticipantNicknames = null, RingtoneDisabled = false, VibrateOptionDisabled = false, SentBubbleColor = 0, ReceivedBubbleColor = 0, SentFontColor = 0, ReceivedFontColor = 0, BubbleColorsChosen = false, ======= Guid = group.ID, UnreadIndicatorGuid = null, LastUnreadSetTime = 0, >>>>>>> UnreadIndicatorGuid = null, LastUnreadSetTime = 0, ParticipantNicknames = null, RingtoneDisabled = false, VibrateOptionDisabled = false, SentBubbleColor = 0, ReceivedBubbleColor = 0, SentFontColor = 0, ReceivedFontColor = 0, BubbleColorsChosen = false, BackgroundChosen = false, BackgroundColor = 0, BackgroundImagePath = null, <<<<<<< public static void SetSentBubbleColor(BubbleGroup group, int sentBubbleColor) { InsertDefaultIfNull(group); group.Settings.SentBubbleColor = sentBubbleColor; Update(group.Settings); } public static void SetReceivedBubbleColor(BubbleGroup group, int receivedBubbleColor) { InsertDefaultIfNull(group); group.Settings.ReceivedBubbleColor = receivedBubbleColor; Update(group.Settings); } public static void SetSentFontColor(BubbleGroup group, int sentFontColor) { InsertDefaultIfNull(group); group.Settings.SentFontColor = sentFontColor; Update(group.Settings); } public static void SetReceivedFontColor(BubbleGroup group, int receivedFontColor) { InsertDefaultIfNull(group); group.Settings.ReceivedFontColor = receivedFontColor; Update(group.Settings); } public static void SetBubbleColorsChosen(BubbleGroup group, bool bubbleColorsChosen) { InsertDefaultIfNull(group); group.Settings.BubbleColorsChosen = bubbleColorsChosen; Update(group.Settings); } public static int GetSentBubbleColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.SentBubbleColor; } public static int GetReceivedBubbleColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.ReceivedBubbleColor; } public static int GetSentFontColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.SentFontColor; } public static int GetReceivedFontColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.ReceivedFontColor; } public static bool GetBubbleColorsChosen(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.BubbleColorsChosen; } ======= public static void SetBackgroundChosen(BubbleGroup group, bool backgroundChosen) { InsertDefaultIfNull(group); group.Settings.BackgroundChosen = backgroundChosen; Update(group.Settings); } public static void SetBackgroundColor(BubbleGroup group, int backgroundColor) { InsertDefaultIfNull(group); group.Settings.BackgroundColor = backgroundColor; Update(group.Settings); } public static void SetBackgroundImagePath(BubbleGroup group, string backgroundImagePath) { InsertDefaultIfNull(group); group.Settings.BackgroundImagePath = backgroundImagePath; Update(group.Settings); } public static bool GetBackgroundChosen(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.BackgroundChosen; } public static int GetBackgroundColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.BackgroundColor; } public static string GetBackgroundImagePath(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.BackgroundImagePath; } >>>>>>> public static void SetSentBubbleColor(BubbleGroup group, int sentBubbleColor) { InsertDefaultIfNull(group); group.Settings.SentBubbleColor = sentBubbleColor; Update(group.Settings); } public static void SetReceivedBubbleColor(BubbleGroup group, int receivedBubbleColor) { InsertDefaultIfNull(group); group.Settings.ReceivedBubbleColor = receivedBubbleColor; Update(group.Settings); } public static void SetSentFontColor(BubbleGroup group, int sentFontColor) { InsertDefaultIfNull(group); group.Settings.SentFontColor = sentFontColor; Update(group.Settings); } public static void SetReceivedFontColor(BubbleGroup group, int receivedFontColor) { InsertDefaultIfNull(group); group.Settings.ReceivedFontColor = receivedFontColor; Update(group.Settings); } public static void SetBubbleColorsChosen(BubbleGroup group, bool bubbleColorsChosen) { InsertDefaultIfNull(group); group.Settings.BubbleColorsChosen = bubbleColorsChosen; Update(group.Settings); } public static int GetSentBubbleColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.SentBubbleColor; } public static int GetReceivedBubbleColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.ReceivedBubbleColor; } public static int GetSentFontColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.SentFontColor; } public static int GetReceivedFontColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.ReceivedFontColor; } public static bool GetBubbleColorsChosen(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.BubbleColorsChosen; } public static void SetBackgroundChosen(BubbleGroup group, bool backgroundChosen) { InsertDefaultIfNull(group); group.Settings.BackgroundChosen = backgroundChosen; Update(group.Settings); } public static void SetBackgroundColor(BubbleGroup group, int backgroundColor) { InsertDefaultIfNull(group); group.Settings.BackgroundColor = backgroundColor; Update(group.Settings); } public static void SetBackgroundImagePath(BubbleGroup group, string backgroundImagePath) { InsertDefaultIfNull(group); group.Settings.BackgroundImagePath = backgroundImagePath; Update(group.Settings); } public static bool GetBackgroundChosen(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.BackgroundChosen; } public static int GetBackgroundColor(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.BackgroundColor; } public static string GetBackgroundImagePath(BubbleGroup group) { InsertDefaultIfNull(group); return group.Settings.BackgroundImagePath; }
<<<<<<< public static string QuotedAddressThemselves { get { return "&^%$#@?!themselves!?@#$%^&"; } } ======= public static string NonSignedChannel { get { return "&^%$#@?!nonSignedChannel!?@#$%^&"; } } >>>>>>> public static string QuotedAddressThemselves { get { return "&^%$#@?!themselves!?@#$%^&"; } } public static string NonSignedChannel { get { return "&^%$#@?!nonSignedChannel!?@#$%^&"; } }
<<<<<<< //string value = quantity.GetStandardizedValue(); // for better scientific precision comparisons. ======= >>>>>>> <<<<<<< { "value", q.GetValueAsBson() }, ======= { "value", new BsonDouble((double)q.Value) }, { "decimals", q.GetDecimalSearchableValue() }, >>>>>>> { "value", q.GetValueAsBson() }, { "decimals", q.GetDecimalSearchableValue() },
<<<<<<< public static class InfrastructureExtensions { public static Infrastructure AddLocalhost(this Infrastructure infrastructure, ILocalhost localhost) { infrastructure.Localhost = localhost; return infrastructure; } public static Infrastructure AddLocalhost(this Infrastructure infrastructure, Uri url) { return infrastructure.AddLocalhost(new Localhost(url)); } public static FhirService CreateService(this Infrastructure infrastructure) { return new FhirService(infrastructure); } public static Infrastructure AddListener(this Infrastructure infrastructure, IServiceListener listener) { if (infrastructure.ServiceListener == null) { infrastructure.ServiceListener = new ServiceListener(); } (infrastructure.ServiceListener as ServiceListener).Add(listener); return infrastructure; } } ======= >>>>>>>
<<<<<<< using AccessibilityInsights.SharedUx.FileBug; using AccessibilityInsights.SharedUx.Highlighting; ======= using AccessibilityInsights.SharedUx.FileIssue; >>>>>>> using AccessibilityInsights.SharedUx.Highlighting; using AccessibilityInsights.SharedUx.FileIssue;
<<<<<<< using Microsoft.TeamFoundation.SourceControl.WebApi; ======= >>>>>>> using WebApi = Microsoft.TeamFoundation.SourceControl.WebApi; <<<<<<< using System.Text; ======= >>>>>>> <<<<<<< var refNames = new Dictionary<Sha1Id, List<string>>(); var oldCommits = new HashSet<Sha1Id>(); var unknowns = new List<RefUpdateResultGroup>(); ======= var refLookup = new Dictionary<byte[], List<GitRef>>(new ByteArrayComparer()); var deletedRefs = new List<GitRef>(); var oldCommits = new HashSet<TfsGitCommit>(new TfsGitObjectEqualityComparer()); var unknowns = new List<TfsGitRefUpdateResult>(); >>>>>>> var refLookup = new Dictionary<Sha1Id, List<GitRef>>(); var deletedRefs = new List<GitRef>(); var oldCommits = new HashSet<TfsGitCommit>(new TfsGitObjectEqualityComparer()); var unknowns = new List<TfsGitRefUpdateResult>(); <<<<<<< foreach (Sha1Id commitId in pushNotification.IncludedCommits.TakeWhile(c => notification.Count < maxLines)) ======= foreach (var commitId in pushNotification.IncludedCommits.TakeWhile(c => notification.Count < maxLines)) >>>>>>> foreach (var commitId in pushNotification.IncludedCommits.TakeWhile(c => notification.Count < maxLines)) <<<<<<< Sha1Id newObjectId = refUpdateResultGroup.NewObjectId; ======= var newObjectId = refUpdateResult.NewObjectId; >>>>>>> var newObjectId = refUpdateResult.NewObjectId; <<<<<<< private static string[] RefsToStrings(IEnumerable<TfsGitRefUpdateResult> refUpdateResults) { if (refUpdateResults.Count() == 0) return null; var refStrings = new List<string>(); foreach (var gitRef in refUpdateResults) { StringBuilder sb = new StringBuilder(); sb.Append('['); if (gitRef.Name.StartsWith("refs/heads/") && gitRef.OldObjectId.IsEmpty) sb.Append('+'); sb.AppendFormat("{0}]", gitRef.Name.Replace("refs/heads/", "").Replace("refs/tags/", "")); refStrings.Add(sb.ToString()); } return refStrings.ToArray(); } ======= >>>>>>> <<<<<<< TfsGitCommit gitCommit, CommitRowType rowType, PushNotification pushNotification, Dictionary<Sha1Id, List<string>> refNames) ======= TfsGitCommit gitCommit, CommitRowType rowType, PushNotification pushNotification, Dictionary<byte[], List<GitRef>> refLookup) >>>>>>> TfsGitCommit gitCommit, CommitRowType rowType, PushNotification pushNotification, Dictionary<Sha1Id, List<GitRef>> refLookup) <<<<<<< class RefUpdateResultGroup { public RefUpdateResultGroup(Sha1Id newObjectId, IEnumerable<TfsGitRefUpdateResult> refUpdateResults) { this.NewObjectId = newObjectId; this.RefUpdateResults = refUpdateResults; } public Sha1Id NewObjectId { get; set; } public IEnumerable<TfsGitRefUpdateResult> RefUpdateResults { get; set; } } ======= >>>>>>>
<<<<<<< private const string EmptyPartitionId = "::empty"; ======= private readonly InMemoryPersistenceOptions _options; >>>>>>> private readonly InMemoryPersistenceOptions _options; private const string EmptyPartitionId = "::empty";
<<<<<<< public const string QueryDir = "QueryDir"; ======= public const string QueryInfo = "QueryInfo"; >>>>>>> public const string QueryDir = "QueryDir"; public const string QueryInfo = "QueryInfo";
<<<<<<< public const string CalliphoraPartial = "Png/CalliphoraPartial.png"; ======= public const string Rgb48BppInterlaced = "Png/rgb-48bpp-interlaced.png"; >>>>>>> public const string CalliphoraPartial = "Png/CalliphoraPartial.png"; public const string Rgb48BppInterlaced = "Png/rgb-48bpp-interlaced.png";
<<<<<<< [Theory] [WithTestPatternImages(100, 100, PixelTypes.Rgba32)] public void CanSaveIndexedPng<TPixel>(TestImageProvider<TPixel> provider) where TPixel : struct, IPixel<TPixel> { // does saving a file then repoening mean both files are identical??? using (Image<TPixel> image = provider.GetImage()) using (MemoryStream ms = new MemoryStream()) { // image.Save(provider.Utility.GetTestOutputFileName("bmp")); image.MetaData.Quality = 256; image.Save(ms, new PngEncoder()); ms.Position = 0; using (Image<Rgba32> img2 = Image.Load<Rgba32>(ms, new PngDecoder())) { // img2.Save(provider.Utility.GetTestOutputFileName("bmp", "_loaded"), new BmpEncoder()); ImageComparer.VerifySimilarity(image, img2, 0.03f); } } } ======= // JJS: Disabled for now as the decoder now correctly decodes the full pixel components if the // paletted image has alpha of 0 //[Theory] //[WithTestPatternImages(100, 100, PixelTypes.Rgba32)] //public void CanSaveIndexedPng<TPixel>(TestImageProvider<TPixel> provider) // where TPixel : struct, IPixel<TPixel> //{ // // does saving a file then repoening mean both files are identical??? // using (Image<TPixel> image = provider.GetImage()) // using (MemoryStream ms = new MemoryStream()) // { // // image.Save(provider.Utility.GetTestOutputFileName("bmp")); // image.Save(ms, new PngEncoder() { PaletteSize = 256 }); // ms.Position = 0; // using (Image<Rgba32> img2 = Image.Load<Rgba32>(ms, new PngDecoder())) // { // // img2.Save(provider.Utility.GetTestOutputFileName("bmp", "_loaded"), new BmpEncoder()); // ImageComparer.CheckSimilarity(image, img2, 0.03f); // } // } //} >>>>>>> // JJS: Disabled for now as the decoder now correctly decodes the full pixel components if the // paletted image has alpha of 0 //[Theory] //[WithTestPatternImages(100, 100, PixelTypes.Rgba32)] //public void CanSaveIndexedPng<TPixel>(TestImageProvider<TPixel> provider) // where TPixel : struct, IPixel<TPixel> //{ // // does saving a file then repoening mean both files are identical??? // using (Image<TPixel> image = provider.GetImage()) // using (MemoryStream ms = new MemoryStream()) // { // // image.Save(provider.Utility.GetTestOutputFileName("bmp")); // image.Save(ms, new PngEncoder() { PaletteSize = 256 }); // ms.Position = 0; // using (Image<Rgba32> img2 = Image.Load<Rgba32>(ms, new PngDecoder())) // { ImageComparer.VerifySimilarity(image, img2, 0.03f); // ImageComparer.CheckSimilarity(image, img2, 0.03f); // } // } //}
<<<<<<< using System.IO; using System.Text; using Xunit; using ImageSharp.Formats; using ImageSharp.PixelFormats; ======= >>>>>>> <<<<<<< [Theory] [InlineData(TestImages.Png.Bpp1, 1)] [InlineData(TestImages.Png.Gray4Bpp, 4)] [InlineData(TestImages.Png.Palette8Bpp, 8)] [InlineData(TestImages.Png.Pd, 24)] [InlineData(TestImages.Png.Blur, 32)] [InlineData(TestImages.Png.Rgb48Bpp, 48)] [InlineData(TestImages.Png.Rgb48BppInterlaced, 48)] public void DetectPixelSize(string imagePath, int expectedPixelSize) { TestFile testFile = TestFile.Create(imagePath); using (var stream = new MemoryStream(testFile.Bytes, false)) { Assert.Equal(expectedPixelSize, Image.DetectPixelSize(stream)); } } ======= [Theory] [InlineData(PngChunkTypes.Header)] [InlineData(PngChunkTypes.Palette)] // [InlineData(PngChunkTypes.Data)] //TODO: Figure out how to test this [InlineData(PngChunkTypes.End)] public void Decode_IncorrectCRCForCriticalChunk_ExceptionIsThrown(string chunkName) { using (var memStream = new MemoryStream()) { memStream.Skip(8); WriteChunk(memStream, chunkName); CompressStream(memStream); var decoder = new PngDecoder(); ImageFormatException exception = Assert.Throws<ImageFormatException>(() => { decoder.Decode<Rgb24>(null, memStream); }); Assert.Equal($"CRC Error. PNG {chunkName} chunk is corrupt!", exception.Message); } } [Theory] [InlineData(PngChunkTypes.Gamma)] [InlineData(PngChunkTypes.PaletteAlpha)] [InlineData(PngChunkTypes.Physical)] //[InlineData(PngChunkTypes.Text)] //TODO: Figure out how to test this public void Decode_IncorrectCRCForNonCriticalChunk_ExceptionIsThrown(string chunkName) { using (var memStream = new MemoryStream()) { memStream.Skip(8); WriteChunk(memStream, chunkName); CompressStream(memStream); var decoder = new PngDecoder(); decoder.Decode<Rgb24>(null, memStream); } } private static void WriteChunk(MemoryStream memStream, string chunkName) { memStream.Write(new byte[] { 0, 0, 0, 1 }, 0, 4); memStream.Write(Encoding.GetEncoding("ASCII").GetBytes(chunkName), 0, 4); memStream.Write(new byte[] { 0, 0, 0, 0, 0 }, 0, 5); } private static void CompressStream(Stream stream) { stream.Position = 0; using (var deflateStream = new DeflateStream(stream, CompressionLevel.NoCompression, true)) { } stream.Position = 0; } >>>>>>> [Theory] [InlineData(TestImages.Png.Bpp1, 1)] [InlineData(TestImages.Png.Gray4Bpp, 4)] [InlineData(TestImages.Png.Palette8Bpp, 8)] [InlineData(TestImages.Png.Pd, 24)] [InlineData(TestImages.Png.Blur, 32)] [InlineData(TestImages.Png.Rgb48Bpp, 48)] [InlineData(TestImages.Png.Rgb48BppInterlaced, 48)] public void DetectPixelSize(string imagePath, int expectedPixelSize) { TestFile testFile = TestFile.Create(imagePath); using (var stream = new MemoryStream(testFile.Bytes, false)) { Assert.Equal(expectedPixelSize, Image.DetectPixelSize(stream)); } } [Theory] [InlineData(PngChunkTypes.Header)] [InlineData(PngChunkTypes.Palette)] // [InlineData(PngChunkTypes.Data)] //TODO: Figure out how to test this [InlineData(PngChunkTypes.End)] public void Decode_IncorrectCRCForCriticalChunk_ExceptionIsThrown(string chunkName) { using (var memStream = new MemoryStream()) { memStream.Skip(8); WriteChunk(memStream, chunkName); CompressStream(memStream); var decoder = new PngDecoder(); ImageFormatException exception = Assert.Throws<ImageFormatException>(() => { decoder.Decode<Rgb24>(null, memStream); }); Assert.Equal($"CRC Error. PNG {chunkName} chunk is corrupt!", exception.Message); } } [Theory] [InlineData(PngChunkTypes.Gamma)] [InlineData(PngChunkTypes.PaletteAlpha)] [InlineData(PngChunkTypes.Physical)] //[InlineData(PngChunkTypes.Text)] //TODO: Figure out how to test this public void Decode_IncorrectCRCForNonCriticalChunk_ExceptionIsThrown(string chunkName) { using (var memStream = new MemoryStream()) { memStream.Skip(8); WriteChunk(memStream, chunkName); CompressStream(memStream); var decoder = new PngDecoder(); decoder.Decode<Rgb24>(null, memStream); } } private static void WriteChunk(MemoryStream memStream, string chunkName) { memStream.Write(new byte[] { 0, 0, 0, 1 }, 0, 4); memStream.Write(Encoding.GetEncoding("ASCII").GetBytes(chunkName), 0, 4); memStream.Write(new byte[] { 0, 0, 0, 0, 0 }, 0, 5); } private static void CompressStream(Stream stream) { stream.Position = 0; using (var deflateStream = new DeflateStream(stream, CompressionLevel.NoCompression, true)) { } stream.Position = 0; }
<<<<<<< using System.Runtime.CompilerServices; using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation; ======= using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce; >>>>>>> using System.Runtime.CompilerServices; using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation; <<<<<<< Guard.NotNull(color, nameof(color)); Guard.NotNull(sourceWhitePoint, nameof(sourceWhitePoint)); this.CheckChromaticAdaptation(); ======= if (!this.IsChromaticAdaptationPerformed) { throw new InvalidOperationException("Cannot perform chromatic adaptation, provide a chromatic adaptation method and white point."); } >>>>>>> this.CheckChromaticAdaptation(); <<<<<<< Guard.NotNull(color, nameof(color)); this.CheckChromaticAdaptation(); ======= if (!this.IsChromaticAdaptationPerformed) { throw new InvalidOperationException("Cannot perform chromatic adaptation, provide a chromatic adaptation method and white point."); } >>>>>>> this.CheckChromaticAdaptation(); <<<<<<< Guard.NotNull(color, nameof(color)); this.CheckChromaticAdaptation(); ======= if (!this.IsChromaticAdaptationPerformed) { throw new InvalidOperationException("Cannot perform chromatic adaptation, provide a chromatic adaptation method and white point."); } >>>>>>> this.CheckChromaticAdaptation(); <<<<<<< Guard.NotNull(color, nameof(color)); this.CheckChromaticAdaptation(); ======= if (!this.IsChromaticAdaptationPerformed) { throw new InvalidOperationException("Cannot perform chromatic adaptation, provide a chromatic adaptation method and white point."); } >>>>>>> this.CheckChromaticAdaptation(); <<<<<<< Guard.NotNull(color, nameof(color)); this.CheckChromaticAdaptation(); ======= if (!this.IsChromaticAdaptationPerformed) { throw new InvalidOperationException("Cannot perform chromatic adaptation, provide a chromatic adaptation method and white point."); } >>>>>>> this.CheckChromaticAdaptation(); <<<<<<< Guard.NotNull(color, nameof(color)); this.CheckChromaticAdaptation(); ======= if (!this.IsChromaticAdaptationPerformed) { throw new InvalidOperationException("Cannot perform chromatic adaptation, provide a chromatic adaptation method and white point."); } >>>>>>> this.CheckChromaticAdaptation(); <<<<<<< Guard.NotNull(color, nameof(color)); this.CheckChromaticAdaptation(); ======= if (!this.IsChromaticAdaptationPerformed) { throw new InvalidOperationException("Cannot perform chromatic adaptation, provide a chromatic adaptation method and white point."); } >>>>>>> this.CheckChromaticAdaptation(); <<<<<<< Guard.NotNull(color, nameof(color)); var linearInput = this.ToLinearRgb(color); ======= LinearRgb linearInput = this.ToLinearRgb(color); >>>>>>> var linearInput = this.ToLinearRgb(color);
<<<<<<< using ImageSharp.Formats.Jpeg.GolangPort.Utils; using Xunit; using Xunit.Abstractions; ======= >>>>>>>
<<<<<<< public static Image Load(Configuration configuration, Stream stream, IImageDecoder decoder) => WithSeekableStream(configuration, stream, true, s => decoder.Decode(configuration, s)); ======= public static Image Load(Configuration configuration, Stream stream, IImageDecoder decoder) { Guard.NotNull(decoder, nameof(decoder)); return WithSeekableStream(configuration, stream, s => decoder.Decode(configuration, s)); } >>>>>>> public static Image Load(Configuration configuration, Stream stream, IImageDecoder decoder) => WithSeekableStream(configuration, stream, true, s => decoder.Decode(configuration, s)); <<<<<<< Guard.NotNull(configuration, nameof(configuration)); (Image<TPixel> img, IImageFormat format) data = WithSeekableStream(configuration, stream, true, s => Decode<TPixel>(s, configuration)); ======= (Image<TPixel> img, IImageFormat format) data = WithSeekableStream(configuration, stream, s => Decode<TPixel>(s, configuration)); >>>>>>> (Image<TPixel> img, IImageFormat format) data = WithSeekableStream(configuration, stream, true, s => Decode<TPixel>(s, configuration)); <<<<<<< Guard.NotNull(configuration, nameof(configuration)); (Image img, IImageFormat format) data = WithSeekableStream(configuration, stream, true, s => Decode(s, configuration)); ======= (Image img, IImageFormat format) data = WithSeekableStream(configuration, stream, s => Decode(s, configuration)); >>>>>>> (Image img, IImageFormat format) data = WithSeekableStream(configuration, stream, true, s => Decode(s, configuration));
<<<<<<< /// <param name="memoryManager">The <see cref="MemoryManager"/> to use for buffer allocations.</param> /// <param name="count">The code lengths</param> ======= /// <param name="memoryAllocator">The <see cref="MemoryAllocator"/> to use for buffer allocations.</param> /// <param name="lengths">The code lengths</param> >>>>>>> /// <param name="memoryAllocator">The <see cref="MemoryAllocator"/> to use for buffer allocations.</param> /// <param name="count">The code lengths</param>
<<<<<<< IndicatorRelease = 131, //Chart Operations ChartId = 206, ChartRedraw = 207, ChartApplyTemplate = 236, ChartSaveTemplate = 237, ChartWindowFind = 238, ChartTimePriceToXY = 239, ChartXYToTimePrice = 240, ChartOpen = 241, ChartFirst = 242, ChartNext = 243, ChartClose = 244, ChartSymbol = 245, ChartPeriod = 246, ChartSetDouble = 247, ChartSetInteger = 248, ChartSetString = 249, ChartGetDouble = 250, ChartGetInteger = 251, ChartGetString = 252, ChartNavigate = 253, ChartIndicatorDelete = 254, ChartIndicatorName = 255, ChartIndicatorsTotal = 256, ChartWindowOnDropped = 257, ChartPriceOnDropped = 258, ChartTimeOnDropped = 259, ChartXOnDropped = 260, ChartYOnDropped = 261, ChartSetSymbolPeriod = 262, ChartScreenShot = 263, // Windows Operations WindowBarsPerChart = 264, WindowExpertName = 265, WindowFind = 266, WindowFirstVisibleBar = 267, WindowHandle = 268, WindowIsVisible = 269, WindowOnDropped = 270, WindowPriceMax = 271, WindowPriceMin = 272, WindowPriceOnDropped = 273, WindowRedraw = 274, WindowScreenShot = 275, WindowTimeOnDropped = 276, WindowsTotal = 277, WindowXOnDropped = 278, WindowYOnDropped = 279, // Terminal Operations TerminalCompany = 68, TerminalName = 69, TerminalPath = 70, TerminalInfoString = 153, TerminalInfoInteger = 204, TerminalInfoDouble = 205, ======= IndicatorRelease = 131, //Checkup GetLastError = 132, TerminalInfoInteger = 133, //TODO TerminalInfoDouble = 134, //TODO TerminalInfoString = 135, //TODO //Common Functions Alert = 136, //TODO Comment = 137, //TODO GetTickCount = 138, //TODO GetMicrosecondCount = 139, //TODO MessageBox = 140, //TODO PeriodSeconds = 141, //TODO PlaySound = 142, //TODO Print = 68, ResetLastError = 143, SendNotification = 144, //TODO SendMail = 145 //TODO >>>>>>> IndicatorRelease = 131, //Chart Operations ChartId = 206, ChartRedraw = 207, ChartApplyTemplate = 236, ChartSaveTemplate = 237, ChartWindowFind = 238, ChartTimePriceToXY = 239, ChartXYToTimePrice = 240, ChartOpen = 241, ChartFirst = 242, ChartNext = 243, ChartClose = 244, ChartSymbol = 245, ChartPeriod = 246, ChartSetDouble = 247, ChartSetInteger = 248, ChartSetString = 249, ChartGetDouble = 250, ChartGetInteger = 251, ChartGetString = 252, ChartNavigate = 253, ChartIndicatorDelete = 254, ChartIndicatorName = 255, ChartIndicatorsTotal = 256, ChartWindowOnDropped = 257, ChartPriceOnDropped = 258, ChartTimeOnDropped = 259, ChartXOnDropped = 260, ChartYOnDropped = 261, ChartSetSymbolPeriod = 262, ChartScreenShot = 263, // Windows Operations WindowBarsPerChart = 264, WindowExpertName = 265, WindowFind = 266, WindowFirstVisibleBar = 267, WindowHandle = 268, WindowIsVisible = 269, WindowOnDropped = 270, WindowPriceMax = 271, WindowPriceMin = 272, WindowPriceOnDropped = 273, WindowRedraw = 274, WindowScreenShot = 275, WindowTimeOnDropped = 276, WindowsTotal = 277, WindowXOnDropped = 278, WindowYOnDropped = 279, // Terminal Operations TerminalCompany = 68, TerminalName = 69, TerminalPath = 70, //Checkup GetLastError = 132, TerminalInfoString = 153, //TODO TerminalInfoInteger = 204, //TODO TerminalInfoDouble = 205, //TODO //Common Functions Alert = 136, //TODO Comment = 137, //TODO GetTickCount = 138, //TODO GetMicrosecondCount = 139, //TODO MessageBox = 140, //TODO PeriodSeconds = 141, //TODO PlaySound = 142, //TODO Print = 68, ResetLastError = 143, SendNotification = 144, //TODO SendMail = 145 //TODO
<<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var labColor = this.ToCieLab(color); ======= CieLab labColor = this.ToCieLab(color); >>>>>>> var labColor = this.ToCieLab(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> CieXyz xyzColor = this.ToCieXyz(color);
<<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var labColor = this.ToCieLab(color); ======= CieLab labColor = this.ToCieLab(color); >>>>>>> var labColor = this.ToCieLab(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color);
<<<<<<< // ReSharper disable InconsistentNaming namespace ImageSharp.Tests { using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Numerics; using System.Reflection; using ImageSharp.PixelFormats; using Xunit; using Xunit.Abstractions; ======= using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using System.Reflection; using SixLabors.ImageSharp.PixelFormats; using Xunit; using Xunit.Abstractions; >>>>>>> using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using SixLabors.ImageSharp.PixelFormats; using Xunit; using Xunit.Abstractions; <<<<<<< ======= >>>>>>>
<<<<<<< using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation; ======= using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLabColorSapce; using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchColorSapce; >>>>>>> using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation; <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color); <<<<<<< Guard.NotNull(color, nameof(color)); var xyzColor = this.ToCieXyz(color); ======= CieXyz xyzColor = this.ToCieXyz(color); >>>>>>> var xyzColor = this.ToCieXyz(color);
<<<<<<< Rectangle bounds) where TPaletteDitherImageProcessor : struct, IPaletteDitherImageProcessor<TPixel> where TPixel : struct, IPixel<TPixel> ======= Rectangle bounds, float scale) where TPixel : unmanaged, IPixel<TPixel> >>>>>>> Rectangle bounds) where TPaletteDitherImageProcessor : struct, IPaletteDitherImageProcessor<TPixel> where TPixel : unmanaged, IPixel<TPixel> <<<<<<< private readonly struct PaletteDitherRowIntervalOperation<TPaletteDitherImageProcessor, TPixel> : IRowIntervalOperation where TPaletteDitherImageProcessor : struct, IPaletteDitherImageProcessor<TPixel> where TPixel : struct, IPixel<TPixel> ======= private readonly struct PaletteDitherRowIntervalOperation<TPixel> : IRowIntervalOperation where TPixel : unmanaged, IPixel<TPixel> >>>>>>> private readonly struct PaletteDitherRowIntervalOperation<TPaletteDitherImageProcessor, TPixel> : IRowIntervalOperation where TPaletteDitherImageProcessor : struct, IPaletteDitherImageProcessor<TPixel> where TPixel : unmanaged, IPixel<TPixel>
<<<<<<< using SixLabors.ImageSharp.Helpers; ======= using System.Text; using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Memory; >>>>>>> using SixLabors.ImageSharp.Helpers; using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Memory; <<<<<<< public struct AppliedOperation ======= public MemoryManager MemoryManager => this.source.GetConfiguration().MemoryManager; public struct AppliedOpperation >>>>>>> public struct AppliedOperation
<<<<<<< // Copyright (c) Six Labors and contributors. // Licensed under the GNU Affero General Public License, Version 3. ======= // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. >>>>>>> // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0.
<<<<<<< ======= /// <summary> /// Queues up a simple operation that provides access to the mutatable image. /// </summary> /// <typeparam name="TPixel">The pixel format.</typeparam> /// <param name="source">The image to rotate, flip, or both.</param> /// <param name="operation">The operations to perform on the source.</param> /// <returns>returns the current optinoatins class to allow chaining of oprations.</returns> public static IImageOperations<TPixel> Run<TPixel>(this IImageOperations<TPixel> source, Action<Image<TPixel>> operation) where TPixel : struct, IPixel<TPixel> => source.ApplyProcessor(new DelegateImageProcessor<TPixel>(operation)); /// <summary> /// Queues up a simple operation that provides access to the mutatable image. /// </summary> /// <typeparam name="TPixel">The pixel format.</typeparam> /// <param name="source">The image to rotate, flip, or both.</param> /// <param name="operations">The operations to perform on the source.</param> /// <returns>returns the current optinoatins class to allow chaining of oprations.</returns> internal static IImageOperations<TPixel> ApplyProcessors<TPixel>(this IImageOperations<TPixel> source, params IImageProcessor<TPixel>[] operations) where TPixel : struct, IPixel<TPixel> { foreach (IImageProcessor<TPixel> op in operations) { source = source.ApplyProcessor(op); } return source; } >>>>>>> /// <summary> /// Queues up a simple operation that provides access to the mutatable image. /// </summary> /// <typeparam name="TPixel">The pixel format.</typeparam> /// <param name="source">The image to rotate, flip, or both.</param> /// <param name="operation">The operations to perform on the source.</param> /// <returns>returns the current optinoatins class to allow chaining of oprations.</returns> public static IImageOperations<TPixel> Run<TPixel>(this IImageOperations<TPixel> source, Action<Image<TPixel>> operation) where TPixel : struct, IPixel<TPixel> => source.ApplyProcessor(new DelegateImageProcessor<TPixel>(operation));
<<<<<<< // Copyright (c) Six Labors and contributors. // Licensed under the GNU Affero General Public License, Version 3. ======= // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. >>>>>>> // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0.
<<<<<<< /// <summary> /// Perform a multi mapping query with arbitrary input parameters /// </summary> /// <typeparam name="TReturn">The return type</typeparam> /// <param name="cnn"></param> /// <param name="sql"></param> /// <param name="types">array of types in the recordset</param> /// <param name="map"></param> /// <param name="param"></param> /// <param name="transaction"></param> /// <param name="buffered"></param> /// <param name="splitOn">The Field we should split and read the second object from (default: id)</param> /// <param name="commandTimeout">Number of seconds before command execution timeout</param> /// <param name="commandType">Is it a stored proc or a batch?</param> /// <returns></returns> public static Task<IEnumerable<TReturn>> QueryAsync<TReturn>(this IDbConnection cnn, string sql, Type[] types, Func<object[], TReturn> map, dynamic param = null, IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null) { var command = new CommandDefinition(sql, (object)param, transaction, commandTimeout, commandType, buffered ? CommandFlags.Buffered : CommandFlags.None, default(CancellationToken)); return MultiMapAsync<TReturn>(cnn, command, types, map, splitOn); } private static async Task<IEnumerable<TReturn>> MultiMapAsync<TReturn>(this IDbConnection cnn, CommandDefinition command, Type[] types, Func<object[], TReturn> map, string splitOn) { if (types.Length < 1) { throw new ArgumentException("you must provide at least one type to deserialize"); } object param = command.Parameters; var identity = new Identity(command.CommandText, command.CommandType, cnn, types[0], param == null ? null : param.GetType(), types); var info = GetCacheInfo(identity, param, command.AddToCache); bool wasClosed = cnn.State == ConnectionState.Closed; try { if (wasClosed) await ((DbConnection)cnn).OpenAsync().ConfigureAwait(false); using (var cmd = (DbCommand)command.SetupCommand(cnn, info.ParamReader)) using (var reader = await cmd.ExecuteReaderAsync(command.CancellationToken).ConfigureAwait(false)) { var results = MultiMapImpl<TReturn>(null, default(CommandDefinition), types, map, splitOn, reader, identity); return command.Buffered ? results.ToList() : results; } } finally { if (wasClosed) cnn.Close(); } } private static IEnumerable<T> ExecuteReader<T>(IDataReader reader, Type effectiveType, Identity identity, CacheInfo info, bool addToCache) ======= private static IEnumerable<T> ExecuteReaderSync<T>(IDataReader reader, Func<IDataReader,object> func) >>>>>>> /// <summary> /// Perform a multi mapping query with arbitrary input parameters /// </summary> /// <typeparam name="TReturn">The return type</typeparam> /// <param name="cnn"></param> /// <param name="sql"></param> /// <param name="types">array of types in the recordset</param> /// <param name="map"></param> /// <param name="param"></param> /// <param name="transaction"></param> /// <param name="buffered"></param> /// <param name="splitOn">The Field we should split and read the second object from (default: id)</param> /// <param name="commandTimeout">Number of seconds before command execution timeout</param> /// <param name="commandType">Is it a stored proc or a batch?</param> /// <returns></returns> public static Task<IEnumerable<TReturn>> QueryAsync<TReturn>(this IDbConnection cnn, string sql, Type[] types, Func<object[], TReturn> map, dynamic param = null, IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null) { var command = new CommandDefinition(sql, (object)param, transaction, commandTimeout, commandType, buffered ? CommandFlags.Buffered : CommandFlags.None, default(CancellationToken)); return MultiMapAsync<TReturn>(cnn, command, types, map, splitOn); } private static async Task<IEnumerable<TReturn>> MultiMapAsync<TReturn>(this IDbConnection cnn, CommandDefinition command, Type[] types, Func<object[], TReturn> map, string splitOn) { if (types.Length < 1) { throw new ArgumentException("you must provide at least one type to deserialize"); } object param = command.Parameters; var identity = new Identity(command.CommandText, command.CommandType, cnn, types[0], param == null ? null : param.GetType(), types); var info = GetCacheInfo(identity, param, command.AddToCache); bool wasClosed = cnn.State == ConnectionState.Closed; try { if (wasClosed) await ((DbConnection)cnn).OpenAsync().ConfigureAwait(false); using (var cmd = (DbCommand)command.SetupCommand(cnn, info.ParamReader)) using (var reader = await cmd.ExecuteReaderAsync(command.CancellationToken).ConfigureAwait(false)) { var results = MultiMapImpl<TReturn>(null, default(CommandDefinition), types, map, splitOn, reader, identity); return command.Buffered ? results.ToList() : results; } } finally { if (wasClosed) cnn.Close(); } } private static IEnumerable<T> ExecuteReaderSync<T>(IDataReader reader, Func<IDataReader,object> func)
<<<<<<< image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 5, new[] { ======= using (FileStream output = File.OpenWrite($"{path}/Simple.png")) { image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 5, new SixLabors.Primitives.PointF[] { >>>>>>> image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 5, new SixLabors.Primitives.PointF[]{ <<<<<<< image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 5, new[] { ======= using (FileStream output = File.OpenWrite($"{path}/Simple_noantialias.png")) { image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 5, new SixLabors.Primitives.PointF[] { >>>>>>> image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 5, new SixLabors.Primitives.PointF[] { <<<<<<< image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.Dash(Rgba32.HotPink, 5), new[] { ======= using (FileStream output = File.OpenWrite($"{path}/Dashed.png")) { image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.Dash(Rgba32.HotPink, 5), new SixLabors.Primitives.PointF[] { >>>>>>> image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.Dash(Rgba32.HotPink, 5), new SixLabors.Primitives.PointF[] { <<<<<<< image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.Dot(Rgba32.HotPink, 5), new[] { ======= using (FileStream output = File.OpenWrite($"{path}/Dot.png")) { image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.Dot(Rgba32.HotPink, 5), new SixLabors.Primitives.PointF[] { >>>>>>> image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.Dot(Rgba32.HotPink, 5), new SixLabors.Primitives.PointF[] { <<<<<<< image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.DashDot(Rgba32.HotPink, 5), new[] { ======= using (FileStream output = File.OpenWrite($"{path}/DashDot.png")) { image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.DashDot(Rgba32.HotPink, 5), new SixLabors.Primitives.PointF[] { >>>>>>> image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.DashDot(Rgba32.HotPink, 5), new SixLabors.Primitives.PointF[] { <<<<<<< image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.DashDotDot(Rgba32.HotPink, 5), new[] { ======= using (FileStream output = File.OpenWrite($"{path}/DashDotDot.png")) { image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.DashDotDot(Rgba32.HotPink, 5), new SixLabors.Primitives.PointF[] { >>>>>>> image .BackgroundColor(Rgba32.Blue) .DrawLines(Pens.DashDotDot(Rgba32.HotPink, 5), new SixLabors.Primitives.PointF[] { <<<<<<< image .BackgroundColor(Rgba32.Blue) .DrawLines(color, 10, new[] { ======= using (FileStream output = File.OpenWrite($"{path}/Opacity.png")) { image .BackgroundColor(Rgba32.Blue) .DrawLines(color, 10, new SixLabors.Primitives.PointF[] { >>>>>>> image .BackgroundColor(Rgba32.Blue) .DrawLines(color, 10, new SixLabors.Primitives.PointF[] { <<<<<<< image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 10, new[] { ======= using (FileStream output = File.OpenWrite($"{path}/Rectangle.png")) { image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 10, new SixLabors.Primitives.PointF[] { >>>>>>> image .BackgroundColor(Rgba32.Blue) .DrawLines(Rgba32.HotPink, 10, new SixLabors.Primitives.PointF[] {
<<<<<<< public void SaveTestOutputFile<TPixel>( Image<TPixel> image, string extension = null, IImageEncoder encoder = null, IEncoderOptions options = null, object settings = null) ======= public void SaveTestOutputFile<TPixel>(Image<TPixel> image, string extension = null, IImageEncoder encoder = null, string tag = null) >>>>>>> public void SaveTestOutputFile<TPixel>( Image<TPixel> image, string extension = null, IImageEncoder encoder = null, IEncoderOptions options = null, object settings = null) <<<<<<< string path = this.GetTestOutputFileName(extension: extension, settings: settings); string extension1 = Path.GetExtension(path); IImageFormat format = GetImageFormatByExtension(extension1); encoder = encoder ?? format.Encoder; ======= string path = this.GetTestOutputFileName(extension: extension, tag:tag); extension = Path.GetExtension(path); encoder = encoder ?? GetImageFormatByExtension(extension); >>>>>>> string path = this.GetTestOutputFileName(extension: extension, settings: settings); string extension1 = Path.GetExtension(path); encoder = encoder ?? GetImageFormatByExtension(extension); IImageFormat format = GetImageFormatByExtension(extension1);
<<<<<<< class IntDynamicParam : Dapper.SqlMapper.IDynamicParameters { IEnumerable<int> numbers; public IntDynamicParam(IEnumerable<int> numbers) { this.numbers = numbers; } public void AddParameters(IDbCommand command) { var sqlCommand = (SqlCommand)command; sqlCommand.CommandType = CommandType.StoredProcedure; List<Microsoft.SqlServer.Server.SqlDataRecord> number_list = new List<Microsoft.SqlServer.Server.SqlDataRecord>(); // Create an SqlMetaData object that describes our table type. Microsoft.SqlServer.Server.SqlMetaData[] tvp_definition = { new Microsoft.SqlServer.Server.SqlMetaData("n", SqlDbType.Int) }; foreach (int n in numbers) { // Create a new record, using the metadata array above. Microsoft.SqlServer.Server.SqlDataRecord rec = new Microsoft.SqlServer.Server.SqlDataRecord(tvp_definition); rec.SetInt32(0, n); // Set the value. number_list.Add(rec); // Add it to the list. } // Add the table parameter. var p = sqlCommand.Parameters.Add("@ints", SqlDbType.Structured); p.Direction = ParameterDirection.Input; p.TypeName = "int_list_type"; p.Value = number_list; } } // SQL Server specific test to demonstrate TVP public void TestTVP() { try { connection.Execute("CREATE TYPE int_list_type AS TABLE (n int NOT NULL PRIMARY KEY)"); connection.Execute("CREATE PROC get_ints @ints int_list_type READONLY AS select * from @ints"); var nums = connection.Query<int>("get_ints", new IntDynamicParam(new int[] { 1, 2, 3 })).ToList(); nums[0].IsEqualTo(1); nums[1].IsEqualTo(2); nums[2].IsEqualTo(3); nums.Count.IsEqualTo(3); } finally { try { connection.Execute("DROP PROC get_ints"); } finally { connection.Execute("DROP TYPE int_list_type"); } } } ======= class Parent { public int Id { get; set; } public readonly List<Child> Children = new List<Child>(); } class Child { public int Id { get; set; } } public void ParentChildIdentityAssociations() { var lookup = new Dictionary<int, Parent>(); var parents = connection.Query<Parent, Child, Parent>(@"select 1 as [Id], 1 as [Id] union all select 1,2 union all select 2,3 union all select 1,4 union all select 3,5", (parent, child) => { Parent found; if (!lookup.TryGetValue(parent.Id, out found)) { lookup.Add(parent.Id, found = parent); } found.Children.Add(child); return found; }).Distinct().ToDictionary(p => p.Id); parents.Count().IsEqualTo(3); parents[1].Children.Select(c => c.Id).SequenceEqual(new[] { 1,2,4}).IsTrue(); parents[2].Children.Select(c => c.Id).SequenceEqual(new[] { 3 }).IsTrue(); parents[3].Children.Select(c => c.Id).SequenceEqual(new[] { 5 }).IsTrue(); } >>>>>>> class IntDynamicParam : Dapper.SqlMapper.IDynamicParameters { IEnumerable<int> numbers; public IntDynamicParam(IEnumerable<int> numbers) { this.numbers = numbers; } public void AddParameters(IDbCommand command) { var sqlCommand = (SqlCommand)command; sqlCommand.CommandType = CommandType.StoredProcedure; List<Microsoft.SqlServer.Server.SqlDataRecord> number_list = new List<Microsoft.SqlServer.Server.SqlDataRecord>(); // Create an SqlMetaData object that describes our table type. Microsoft.SqlServer.Server.SqlMetaData[] tvp_definition = { new Microsoft.SqlServer.Server.SqlMetaData("n", SqlDbType.Int) }; foreach (int n in numbers) { // Create a new record, using the metadata array above. Microsoft.SqlServer.Server.SqlDataRecord rec = new Microsoft.SqlServer.Server.SqlDataRecord(tvp_definition); rec.SetInt32(0, n); // Set the value. number_list.Add(rec); // Add it to the list. } // Add the table parameter. var p = sqlCommand.Parameters.Add("@ints", SqlDbType.Structured); p.Direction = ParameterDirection.Input; p.TypeName = "int_list_type"; p.Value = number_list; } } // SQL Server specific test to demonstrate TVP public void TestTVP() { try { connection.Execute("CREATE TYPE int_list_type AS TABLE (n int NOT NULL PRIMARY KEY)"); connection.Execute("CREATE PROC get_ints @ints int_list_type READONLY AS select * from @ints"); var nums = connection.Query<int>("get_ints", new IntDynamicParam(new int[] { 1, 2, 3 })).ToList(); nums[0].IsEqualTo(1); nums[1].IsEqualTo(2); nums[2].IsEqualTo(3); nums.Count.IsEqualTo(3); } finally { try { connection.Execute("DROP PROC get_ints"); } finally { connection.Execute("DROP TYPE int_list_type"); } } } class Parent { public int Id { get; set; } public readonly List<Child> Children = new List<Child>(); } class Child { public int Id { get; set; } } public void ParentChildIdentityAssociations() { var lookup = new Dictionary<int, Parent>(); var parents = connection.Query<Parent, Child, Parent>(@"select 1 as [Id], 1 as [Id] union all select 1,2 union all select 2,3 union all select 1,4 union all select 3,5", (parent, child) => { Parent found; if (!lookup.TryGetValue(parent.Id, out found)) { lookup.Add(parent.Id, found = parent); } found.Children.Add(child); return found; }).Distinct().ToDictionary(p => p.Id); parents.Count().IsEqualTo(3); parents[1].Children.Select(c => c.Id).SequenceEqual(new[] { 1,2,4}).IsTrue(); parents[2].Children.Select(c => c.Id).SequenceEqual(new[] { 3 }).IsTrue(); parents[3].Children.Select(c => c.Id).SequenceEqual(new[] { 5 }).IsTrue(); }
<<<<<<< // Copyright (c) Six Labors and contributors. // Licensed under the GNU Affero General Public License, Version 3. ======= // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. >>>>>>> // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0.
<<<<<<< trie.Serialize(fileName); }//); ======= trie.Serialize(fileNameTemplate); }); >>>>>>> trie.Serialize(fileName); });
<<<<<<< } if (isDbString && item as DbString != null) { var str = item as DbString; str.AddParameter(command, listParam.ParameterName); } else { listParam.Value = SanitizeParameterValue(item); if (listParam.DbType != dbType) { listParam.DbType = dbType; } command.Parameters.Add(listParam); ======= >>>>>>>
<<<<<<< /// <summary> /// Perform a multi mapping query with arbitrary input parameters /// </summary> /// <typeparam name="TReturn">The return type</typeparam> /// <param name="cnn"></param> /// <param name="sql"></param> /// <param name="types">array of types in the recordset</param> /// <param name="map"></param> /// <param name="param"></param> /// <param name="transaction"></param> /// <param name="buffered"></param> /// <param name="splitOn">The Field we should split and read the second object from (default: id)</param> /// <param name="commandTimeout">Number of seconds before command execution timeout</param> /// <param name="commandType">Is it a stored proc or a batch?</param> /// <returns></returns> public static Task<IEnumerable<TReturn>> QueryAsync<TReturn>(this IDbConnection cnn, string sql, Type[] types, Func<object[], TReturn> map, dynamic param = null, IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null) { var command = new CommandDefinition(sql, (object)param, transaction, commandTimeout, commandType, buffered ? CommandFlags.Buffered : CommandFlags.None, default(CancellationToken)); return MultiMapAsync<TReturn>(cnn, command, types, map, splitOn); } private static async Task<IEnumerable<TReturn>> MultiMapAsync<TReturn>(this IDbConnection cnn, CommandDefinition command, Type[] types, Func<object[], TReturn> map, string splitOn) { if (types.Length < 1) { throw new ArgumentException("you must provide at least one type to deserialize"); } object param = command.Parameters; var identity = new Identity(command.CommandText, command.CommandType, cnn, types[0], param == null ? null : param.GetType(), types); var info = GetCacheInfo(identity, param); bool wasClosed = cnn.State == ConnectionState.Closed; try { if (wasClosed) await ((DbConnection)cnn).OpenAsync().ConfigureAwait(false); using (var cmd = (DbCommand)command.SetupCommand(cnn, info.ParamReader)) using (var reader = await cmd.ExecuteReaderAsync(command.CancellationToken).ConfigureAwait(false)) { var results = MultiMapImpl<TReturn>(null, default(CommandDefinition), types, map, splitOn, reader, identity); return command.Buffered ? results.ToList() : results; } } finally { if (wasClosed) cnn.Close(); } } private static IEnumerable<T> ExecuteReader<T>(IDataReader reader, Type effectiveType, Identity identity, CacheInfo info) ======= private static IEnumerable<T> ExecuteReader<T>(IDataReader reader, Type effectiveType, Identity identity, CacheInfo info, bool addToCache) >>>>>>> /// <summary> /// Perform a multi mapping query with arbitrary input parameters /// </summary> /// <typeparam name="TReturn">The return type</typeparam> /// <param name="cnn"></param> /// <param name="sql"></param> /// <param name="types">array of types in the recordset</param> /// <param name="map"></param> /// <param name="param"></param> /// <param name="transaction"></param> /// <param name="buffered"></param> /// <param name="splitOn">The Field we should split and read the second object from (default: id)</param> /// <param name="commandTimeout">Number of seconds before command execution timeout</param> /// <param name="commandType">Is it a stored proc or a batch?</param> /// <returns></returns> public static Task<IEnumerable<TReturn>> QueryAsync<TReturn>(this IDbConnection cnn, string sql, Type[] types, Func<object[], TReturn> map, dynamic param = null, IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null) { var command = new CommandDefinition(sql, (object)param, transaction, commandTimeout, commandType, buffered ? CommandFlags.Buffered : CommandFlags.None, default(CancellationToken)); return MultiMapAsync<TReturn>(cnn, command, types, map, splitOn); } private static async Task<IEnumerable<TReturn>> MultiMapAsync<TReturn>(this IDbConnection cnn, CommandDefinition command, Type[] types, Func<object[], TReturn> map, string splitOn) { if (types.Length < 1) { throw new ArgumentException("you must provide at least one type to deserialize"); } object param = command.Parameters; var identity = new Identity(command.CommandText, command.CommandType, cnn, types[0], param == null ? null : param.GetType(), types); var info = GetCacheInfo(identity, param); bool wasClosed = cnn.State == ConnectionState.Closed; try { if (wasClosed) await ((DbConnection)cnn).OpenAsync().ConfigureAwait(false); using (var cmd = (DbCommand)command.SetupCommand(cnn, info.ParamReader)) using (var reader = await cmd.ExecuteReaderAsync(command.CancellationToken).ConfigureAwait(false)) { var results = MultiMapImpl<TReturn>(null, default(CommandDefinition), types, map, splitOn, reader, identity); return command.Buffered ? results.ToList() : results; } } finally { if (wasClosed) cnn.Close(); } } private static IEnumerable<T> ExecuteReader<T>(IDataReader reader, Type effectiveType, Identity identity, CacheInfo info, bool addToCache)
<<<<<<< var payload = new PayloadData(preparer.ParseAndBindParameters()); await Session.SendAsync(payload, cancellationToken).ConfigureAwait(false); reader = await MySqlDataReader.CreateAsync(this, behavior, cancellationToken).ConfigureAwait(false); ======= preparer.BindParameters(); var payload = new PayloadData(new ArraySegment<byte>(Payload.CreateEofStringPayload(CommandKind.Query, preparer.PreparedSql))); await Session.SendAsync(payload, ioBehavior, cancellationToken).ConfigureAwait(false); reader = await MySqlDataReader.CreateAsync(this, behavior, ioBehavior, cancellationToken).ConfigureAwait(false); >>>>>>> var payload = new PayloadData(preparer.ParseAndBindParameters()); await Session.SendAsync(payload, ioBehavior, cancellationToken).ConfigureAwait(false); reader = await MySqlDataReader.CreateAsync(this, behavior, ioBehavior, cancellationToken).ConfigureAwait(false);
<<<<<<< Reset(); await ReadResultSetHeaderAsync(cancellationToken).ConfigureAwait(false); ======= await ReadResultSetHeader(cancellationToken).ConfigureAwait(false); >>>>>>> await ReadResultSetHeaderAsync(cancellationToken).ConfigureAwait(false);
<<<<<<< /// <typeparam name="T">The type of the observable value.</typeparam> ======= >>>>>>> /// <typeparam name="T">The type of the observable value.</typeparam>
<<<<<<< Mode = mode; OpenCommand = ReactiveCommand.Create(NavigateToSelf); ======= OpenCommand = ReactiveCommand.Create( () => { NavigateToSelf(); }); >>>>>>> Mode = mode; OpenCommand = ReactiveCommand.Create( () => { NavigateToSelf(); });
<<<<<<< ======= GhostscriptVersionInfo _lastInstalledVersion = null; >>>>>>> private GhostscriptVersionInfo _lastInstalledVersion = null;
<<<<<<< public NavBarViewModel(NavigationStateViewModel navigationState, RoutingState router, WalletManagerViewModel walletManager) ======= public NavBarViewModel(IScreen screen, RoutingState router, WalletManagerViewModel walletManager, AddWalletPageViewModel addWalletPage) >>>>>>> public NavBarViewModel(NavigationStateViewModel navigationState, RoutingState router, WalletManagerViewModel walletManager, AddWalletPageViewModel addWalletPage) <<<<<<< var addWalletPage = new AddWalletPageViewModel(_navigationState); SelectedItem = new HomePageViewModel(_navigationState, walletManager, addWalletPage); ======= SelectedItem = new HomePageViewModel(screen, walletManager, addWalletPage); >>>>>>> SelectedItem = new HomePageViewModel(_navigationState, walletManager, addWalletPage);
<<<<<<< using System.Collections.Generic; using NBitcoin; ======= using Avalonia.Controls; using NBitcoin; >>>>>>> using Avalonia.Controls; using System.Collections.Generic; using NBitcoin; <<<<<<< private SortOrder _statusSortDirection; private SortOrder _privacySortDirection; private SortOrder _amountSortDirection; ======= private bool? _selectPrivateCheckBoxState; private bool? _selectNonPrivateCheckBoxState; private GridLength _coinJoinStatusWidth; >>>>>>> private SortOrder _statusSortDirection; private SortOrder _privacySortDirection; private SortOrder _amountSortDirection; private bool? _selectPrivateCheckBoxState; private bool? _selectNonPrivateCheckBoxState; private GridLength _coinJoinStatusWidth; <<<<<<< foreach (CoinViewModel coin in coins) ======= foreach (CoinViewModel coin in Coins) { >>>>>>> foreach (CoinViewModel coin in coins) { <<<<<<< SelectAllCheckBoxState = GetCheckBoxesSelectedState(); AmountSortDirection = SortOrder.Decreasing; ======= SelectPrivateCheckBoxCommand = ReactiveCommand.Create(() => { switch (SelectPrivateCheckBoxState) { case true: SelectAllCoins(true, x => x.AnonymitySet >= 50); break; case false: SelectAllCoins(false, x => x.AnonymitySet >= 50); break; case null: SelectAllCoins(false, x => x.AnonymitySet >= 50); SelectPrivateCheckBoxState = false; break; } }); SelectNonPrivateCheckBoxCommand = ReactiveCommand.Create(() => { switch (SelectNonPrivateCheckBoxState) { case true: SelectAllCoins(true, x => x.AnonymitySet < 50); break; case false: SelectAllCoins(false, x => x.AnonymitySet < 50); break; case null: SelectAllCoins(false, x => x.AnonymitySet < 50); SelectNonPrivateCheckBoxState = false; break; } }); SetSelections(); SetCoinJoinStatusWidth(); } private void SetSelections() { SelectAllCheckBoxState = GetCheckBoxesSelectedState(x => true); SelectPrivateCheckBoxState = GetCheckBoxesSelectedState(x => x.AnonymitySet >= 50); SelectNonPrivateCheckBoxState = GetCheckBoxesSelectedState(x => x.AnonymitySet < 50); } private void SetCoinJoinStatusWidth() { if (Coins.Any(x => x.Status == SmartCoinStatus.MixingConnectionConfirmation || x.Status == SmartCoinStatus.MixingInputRegistration || x.Status == SmartCoinStatus.MixingOnWaitingList || x.Status == SmartCoinStatus.MixingOutputRegistration || x.Status == SmartCoinStatus.MixingSigning || x.Status == SmartCoinStatus.MixingWaitingForConfirmation || x.Status == SmartCoinStatus.SpentAccordingToBackend)) { CoinJoinStatusWidth = new GridLength(180); } else { CoinJoinStatusWidth = new GridLength(0); } } private void Coins_CollectionChanging(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { foreach (CoinViewModel coin in Coins) { coin.PropertyChanged -= Coin_PropertyChanged; } } private void Coins_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { foreach (CoinViewModel coin in Coins) { coin.PropertyChanged += Coin_PropertyChanged; } SetSelections(); >>>>>>> SelectPrivateCheckBoxCommand = ReactiveCommand.Create(() => { switch (SelectPrivateCheckBoxState) { case true: SelectAllCoins(true, x => x.AnonymitySet >= 50); break; case false: SelectAllCoins(false, x => x.AnonymitySet >= 50); break; case null: SelectAllCoins(false, x => x.AnonymitySet >= 50); SelectPrivateCheckBoxState = false; break; } }); SelectNonPrivateCheckBoxCommand = ReactiveCommand.Create(() => { switch (SelectNonPrivateCheckBoxState) { case true: SelectAllCoins(true, x => x.AnonymitySet < 50); break; case false: SelectAllCoins(false, x => x.AnonymitySet < 50); break; case null: SelectAllCoins(false, x => x.AnonymitySet < 50); SelectNonPrivateCheckBoxState = false; break; } }); SetSelections(); SetCoinJoinStatusWidth(); AmountSortDirection = SortOrder.Decreasing; } private void SetSelections() { SelectAllCheckBoxState = GetCheckBoxesSelectedState(x => true); SelectPrivateCheckBoxState = GetCheckBoxesSelectedState(x => x.AnonymitySet >= 50); SelectNonPrivateCheckBoxState = GetCheckBoxesSelectedState(x => x.AnonymitySet < 50); } private void SetCoinJoinStatusWidth() { if (Coins.Any(x => x.Status == SmartCoinStatus.MixingConnectionConfirmation || x.Status == SmartCoinStatus.MixingInputRegistration || x.Status == SmartCoinStatus.MixingOnWaitingList || x.Status == SmartCoinStatus.MixingOutputRegistration || x.Status == SmartCoinStatus.MixingSigning || x.Status == SmartCoinStatus.MixingWaitingForConfirmation || x.Status == SmartCoinStatus.SpentAccordingToBackend)) { CoinJoinStatusWidth = new GridLength(180); } else { CoinJoinStatusWidth = new GridLength(0); } } private void Coins_CollectionChanging(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { foreach (CoinViewModel coin in Coins) { coin.PropertyChanged -= Coin_PropertyChanged; } } private void Coins_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { foreach (CoinViewModel coin in Coins) { coin.PropertyChanged += Coin_PropertyChanged; } SetSelections();
<<<<<<< _running = 0; BitcoinStore = bitcoinStore; WasabiClientFactory = wasabiClientFactory; WasabiClient = wasabiClientFactory.NewBackendClient(); ======= _running = StateNotStarted; >>>>>>> _running = StateNotStarted; BitcoinStore = bitcoinStore; WasabiClientFactory = wasabiClientFactory; WasabiClient = wasabiClientFactory.NewBackendClient(); <<<<<<< WasabiClient.Dispose(); Cancel?.Dispose(); ======= Cancel.Dispose(); WasabiClient?.Dispose(); WasabiClient = null; >>>>>>> WasabiClient.Dispose(); Cancel?.Dispose();
<<<<<<< using WalletWasabi.Fluent.ViewModels.Wallets.Actions; ======= using WalletWasabi.Fluent.ViewModels.Wallets.HardwareWallet; using WalletWasabi.Fluent.ViewModels.Wallets.WatchOnlyWallet; >>>>>>> using WalletWasabi.Fluent.ViewModels.Wallets.Actions; using WalletWasabi.Fluent.ViewModels.Wallets.HardwareWallet; using WalletWasabi.Fluent.ViewModels.Wallets.WatchOnlyWallet;
<<<<<<< public TransactionInfoTabViewModel(TransactionDetailsViewModel transaction) : base(string.Empty) ======= public TransactionInfoTabViewModel(TransactionInfo transaction) : base("") >>>>>>> public TransactionInfoTabViewModel(TransactionDetailsViewModel transaction) : base("")
<<<<<<< BackendApiHttpClient = new BackendHttpClient(new ClearnetHttpClient(regTestFixture.HttpClient, () => RegTestFixture.BackendEndPointApiUri)); ======= BackendHttpClient = new ClearnetHttpClient(() => RegTestFixture.BackendEndPointUri); BackendApiHttpClient = new ClearnetHttpClient(() => RegTestFixture.BackendEndPointApiUri); >>>>>>> BackendApiHttpClient = new ClearnetHttpClient(regTestFixture.HttpClient, () => RegTestFixture.BackendEndPointApiUri)); <<<<<<< ======= /// <summary>Clearnet HTTP client with predefined base URI for Wasabi Backend (note: <c>/api</c> is not part of base URI).</summary> public IHttpClient BackendHttpClient { get; } >>>>>>> /// <summary>Clearnet HTTP client with predefined base URI for Wasabi Backend (note: <c>/api</c> is not part of base URI).</summary> public IHttpClient BackendHttpClient { get; }
<<<<<<< }).StartShellApp("Wasabi Wallet", new DefaultLayoutFactory()); ======= Logger.SetFilePath(Path.Combine(Global.DataDir, "Logs.txt")); #if RELEASE Logger.SetMinimumLevel(LogLevel.Info); Logger.SetModes(LogMode.File); #else Logger.SetMinimumLevel(LogLevel.Debug); Logger.SetModes(LogMode.Debug, LogMode.Console, LogMode.File); #endif BuildAvaloniaApp().AfterSetup(async builder => { var configFilePath = Path.Combine(Global.DataDir, "Config.json"); var config = new Config(configFilePath); await config.LoadOrCreateDefaultFileAsync(); Logger.LogInfo<Config>("Config is successfully initialized."); await Global.InitializeAsync(config); }).StartShellApp("Wasabi Wallet"); } catch (Exception ex) { Logger.LogCritical<Program>(ex); } >>>>>>> Logger.SetFilePath(Path.Combine(Global.DataDir, "Logs.txt")); #if RELEASE Logger.SetMinimumLevel(LogLevel.Info); Logger.SetModes(LogMode.File); #else Logger.SetMinimumLevel(LogLevel.Debug); Logger.SetModes(LogMode.Debug, LogMode.Console, LogMode.File); #endif BuildAvaloniaApp().AfterSetup(async builder => { var configFilePath = Path.Combine(Global.DataDir, "Config.json"); var config = new Config(configFilePath); await config.LoadOrCreateDefaultFileAsync(); Logger.LogInfo<Config>("Config is successfully initialized."); await Global.InitializeAsync(config); }).StartShellApp("Wasabi Wallet", new DefaultLayoutFactory()); } catch (Exception ex) { Logger.LogCritical<Program>(ex); }
<<<<<<< private readonly TimeSpan _reasonableCoreShutdownTimeout = TimeSpan.FromSeconds(21); ======= private readonly TimeSpan ReasonableCoreShutdownTimeout = TimeSpan.FromSeconds(30); >>>>>>> private readonly TimeSpan _reasonableCoreShutdownTimeout = TimeSpan.FromSeconds(30);
<<<<<<< private readonly ReadOnlyObservableCollection<SearchItemViewModel> _searchItems; private NavBarItemViewModel _selectedItem; ======= private NavBarItemViewModel? _selectedItem; >>>>>>> private readonly ReadOnlyObservableCollection<SearchItemViewModel> _searchItems; private NavBarItemViewModel? _selectedItem; <<<<<<< var searchItems = new SourceList<SearchItemViewModel>(); searchItems.Add(new SearchItemViewModel(_navigationState, NavigationTarget.Home, "home_regular", "Home", () => new HomePageViewModel(_navigationState, walletManager, addWalletPage))); searchItems.Add(new SearchItemViewModel(_navigationState, NavigationTarget.Home, "settings_regular", "Settings", () => new SettingsPageViewModel(_navigationState))); searchItems.Add(new SearchItemViewModel(_navigationState, NavigationTarget.Dialog, "add_circle_regular", "Add Wallet", () => addWalletPage)); walletManager.Items.ToObservableChangeSet() .Cast(x => new SearchItemViewModel(_navigationState, NavigationTarget.Home, "web_asset_regular", x.WalletName, () => x)) .Sort(SortExpressionComparer<SearchItemViewModel>.Ascending(i => i.Title)) .Merge(searchItems.Connect()) .ObserveOn(RxApp.MainThreadScheduler) .Bind(out _searchItems) .AsObservableList(); SelectedItem = new HomePageViewModel(_navigationState, walletManager, addWalletPage); _topItems.Add(_selectedItem); ======= SelectedItem = new HomePageViewModel(navigationState, walletManager, addWalletPage); _topItems.Add(SelectedItem); >>>>>>> var searchItems = new SourceList<SearchItemViewModel>(); searchItems.Add(new SearchItemViewModel(_navigationState, NavigationTarget.Home, "home_regular", "Home", () => new HomePageViewModel(_navigationState, walletManager, addWalletPage))); searchItems.Add(new SearchItemViewModel(_navigationState, NavigationTarget.Home, "settings_regular", "Settings", () => new SettingsPageViewModel(_navigationState))); searchItems.Add(new SearchItemViewModel(_navigationState, NavigationTarget.Dialog, "add_circle_regular", "Add Wallet", () => addWalletPage)); walletManager.Items.ToObservableChangeSet() .Cast(x => new SearchItemViewModel(_navigationState, NavigationTarget.Home, "web_asset_regular", x.WalletName, () => x)) .Sort(SortExpressionComparer<SearchItemViewModel>.Ascending(i => i.Title)) .Merge(searchItems.Connect()) .ObserveOn(RxApp.MainThreadScheduler) .Bind(out _searchItems) .AsObservableList(); SelectedItem = new HomePageViewModel(navigationState, walletManager, addWalletPage); _topItems.Add(SelectedItem); <<<<<<< public ReadOnlyObservableCollection<SearchItemViewModel> SearchItems => _searchItems; public NavBarItemViewModel SelectedItem ======= public NavBarItemViewModel? SelectedItem >>>>>>> public ReadOnlyObservableCollection<SearchItemViewModel> SearchItems => _searchItems; public NavBarItemViewModel? SelectedItem
<<<<<<< [JsonConstructor] public SmartTransaction(Transaction transaction, Height height, uint256 blockHash = null, int blockIndex = 0, Label label = null, DateTimeOffset? firstSeenIfMempoolTime = null, bool isReplacement = false) ======= public SmartTransaction(Transaction transaction, Height height, uint256 blockHash = null, int blockIndex = 0, string label = "", bool isReplacement = false, DateTimeOffset firstSeen = default) >>>>>>> public SmartTransaction(Transaction transaction, Height height, uint256 blockHash = null, int blockIndex = 0, Label label = null, bool isReplacement = false, DateTimeOffset firstSeen = default)
<<<<<<< // It does not need to be accessed with a thread safe fasion with Interlocked through IsRunning, this may have some performance benefit ======= // It doesn't need to be accessed with a thread safe fashion with Interlocked through IsRunning, this may have some performance benefit >>>>>>> // It does not need to be accessed with a thread safe fashion with Interlocked through IsRunning, this may have some performance benefit
<<<<<<< Global.BitcoinStore.SmartHeaderChain .WhenAnyValue(x => x.TipHeight) .Throttle(TimeSpan.FromMilliseconds(100)) .Select(x => new Height(x)) .Merge(Model.WhenAnyValue(x => x.Height)) ======= Global.BitcoinStore.HashChain .WhenAnyValue(x => x.TipHeight).Select(_ => Unit.Default) .Merge(Model.WhenAnyValue(x => x.Height).Select(_ => Unit.Default)) >>>>>>> Global.BitcoinStore.SmartHeaderChain .WhenAnyValue(x => x.TipHeight).Select(_ => Unit.Default) .Merge(Model.WhenAnyValue(x => x.Height).Select(_ => Unit.Default))
<<<<<<< using WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet; ======= using WalletWasabi.Gui.Validation; using WalletWasabi.Models; using Avalonia; using Avalonia.Markup.Xaml.Styling; >>>>>>> using WalletWasabi.Gui.Validation; using WalletWasabi.Models; using Avalonia; using Avalonia.Markup.Xaml.Styling; using WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet; <<<<<<< public ICommand CreateWalletCommand { get; } ======= public ICommand ChangeThemeCommand { get; } >>>>>>> public ICommand ChangeThemeCommand { get; } public ICommand CreateWalletCommand { get; }
<<<<<<< await IoHelpers.TryDeleteDirectoryAsync(dir); await txStore.InitializeAsync(dir, Network.RegTest); ======= await IoHelpers.DeleteRecursivelyWithMagicDustAsync(dir); var txStore = new AllTransactionStore(dir, Network.RegTest); await txStore.InitializeAsync(); >>>>>>> await IoHelpers.TryDeleteDirectoryAsync(dir); var txStore = new AllTransactionStore(dir, Network.RegTest); await txStore.InitializeAsync();
<<<<<<< var res = await pb.SendCommandAsync("enumerate", openConsole: false, cts.Token); ======= var res = await pb.SendCommandAsync("version", false, cts.Token); >>>>>>> var res = await pb.SendCommandAsync("version", openConsole: false, cts.Token); <<<<<<< var res = await pb.SendCommandAsync("enumerate", openConsole: true, cts.Token); Assert.NotEmpty(res.response); ======= var res = await pb.SendCommandAsync("version", true, cts.Token); Assert.Contains("success", res.response); >>>>>>> var res = await pb.SendCommandAsync("version", openConsole: true, cts.Token); Assert.Contains("success", res.response);
<<<<<<< TerminateService = new TerminateService(TerminateApplicationAsync); CrashReporter = new CrashReporter(); ======= >>>>>>> TerminateService = new TerminateService(TerminateApplicationAsync); <<<<<<< ======= if (runGui) { CrashReporter.SetException(ex); } >>>>>>> <<<<<<< // There is no other way to stop the creation of the WasabiWindow, we have to exit the application here instead of return to Main. TerminateAppAndHandleException(ex, true); ======= var criticalException = ex is OperationCanceledException ? null : ex; if (criticalException is { }) { CrashReporter.SetException(ex); } // There is no other way to stop the creation of the WasabiWindow. await TerminateApplicationAsync(criticalException); >>>>>>> // There is no other way to stop the creation of the WasabiWindow, we have to exit the application here instead of return to Main. TerminateAppAndHandleException(ex, true); <<<<<<< Logger.LogDebug(ex); } else if (ex is { }) { Logger.LogCritical(ex); if (runGui) { CrashReporter.SetException(ex); } ======= Logger.LogCritical(criticalException); >>>>>>> Logger.LogDebug(ex); } else if (ex is { }) { Logger.LogCritical(ex); if (runGui) { CrashReporter.SetException(ex); }
<<<<<<< public void Draw(SpriteBatch spriteBatch, Rectangle visibleRectangle, bool useMapBackgroundColor = false) ======= public TiledObjectGroup GetObjectGroup(string name) { return _objectGroups.FirstOrDefault(i => i.Name == name); } public void Draw(SpriteBatch spriteBatch, Camera2D camera, bool useMapBackgroundColor = false) >>>>>>> public TiledObjectGroup GetObjectGroup(string name) { return _objectGroups.FirstOrDefault(i => i.Name == name); } public void Draw(SpriteBatch spriteBatch, Rectangle visibleRectangle, bool useMapBackgroundColor = false)
<<<<<<< /// <summary> /// Creates new <see cref="TorHttpClient"/>. /// </summary> public TorHttpClient NewBackendTorHttpClient(bool isolateStream) { return new TorHttpClient(BackendUriGetter, TorEndpoint, isolateStream); } ======= /// <summary> /// Creates new <see cref="TorHttpClient"/> or <see cref="ClearnetHttpClient"/> based on user settings. /// </summary> public IRelativeHttpClient NewHttpClient(Func<Uri> baseUriFn, bool isolateStream) { if (TorEndpoint is { }) { return new TorHttpClient(baseUriFn, TorEndpoint, isolateStream); } else { return new ClearnetHttpClient(baseUriFn); } } /// <summary> /// Creates new <see cref="TorHttpClient"/> instance with correctly set backend URL. /// </summary> public TorHttpClient NewBackendTorHttpClient(bool isolateStream) { return new TorHttpClient(BackendUriGetter, TorEndpoint, isolateStream); } >>>>>>> /// <summary> /// Creates new <see cref="TorHttpClient"/> or <see cref="ClearnetHttpClient"/> based on user settings. /// </summary> public IRelativeHttpClient NewHttpClient(Func<Uri> baseUriFn, bool isolateStream) { if (TorEndpoint is { }) { return new TorHttpClient(baseUriFn, TorEndpoint, isolateStream); } else { return new ClearnetHttpClient(baseUriFn); } } /// <summary> /// Creates new <see cref="TorHttpClient"/>. /// </summary> public TorHttpClient NewBackendTorHttpClient(bool isolateStream) { return new TorHttpClient(BackendUriGetter, TorEndpoint, isolateStream); }
<<<<<<< OpenDialogCommand = ReactiveCommand.CreateFromTask(async () => await ConfirmSetting.Handle("Please confirm the setting:").ToTask()); ConfirmSetting = new Interaction<string, bool>(); ConfirmSetting.RegisterHandler( async interaction => { var x = new TestDialogViewModel(interaction.Input); var result = await x.ShowDialogAsync(MainViewModel.Instance); interaction.SetOutput(result); }); ======= OpenDialogCommand = ReactiveCommand.Create(async () => { var x = new TestDialogViewModel(); var result = await x.ShowDialogAsync(MainViewModel.Instance); }); // For TextBox error look this.ValidateProperty(x => x.RandomString, (errors) => errors.Add(ErrorSeverity.Error, "Random Error Message")); this.RaisePropertyChanged(nameof(RandomString)); } public string RandomString { get => _randomString; set => this.RaiseAndSetIfChanged(ref _randomString, value); >>>>>>> OpenDialogCommand = ReactiveCommand.CreateFromTask(async () => await ConfirmSetting.Handle("Please confirm the setting:").ToTask()); ConfirmSetting = new Interaction<string, bool>(); ConfirmSetting.RegisterHandler( async interaction => { var x = new TestDialogViewModel(interaction.Input); var result = await x.ShowDialogAsync(MainViewModel.Instance); interaction.SetOutput(result); }); // For TextBox error look this.ValidateProperty(x => x.RandomString, (errors) => errors.Add(ErrorSeverity.Error, "Random Error Message")); this.RaisePropertyChanged(nameof(RandomString)); } public string RandomString { get => _randomString; set => this.RaiseAndSetIfChanged(ref _randomString, value);
<<<<<<< public EnterPasswordViewModel(NavigationStateViewModel navigationState, NavigationTarget navigationTarget) : base(navigationState, navigationTarget) ======= public EnterPasswordViewModel( string subtitle) >>>>>>> public EnterPasswordViewModel(NavigationStateViewModel navigationState, NavigationTarget navigationTarget, string subtitle) : base(navigationState, navigationTarget) <<<<<<< ======= public ICommand CancelCommand { get; } public string Subtitle { get; } >>>>>>> public string Subtitle { get; }
<<<<<<< /// <inheritdoc/> public WasabiClient(Func<Uri> baseUriAction, EndPoint? torSocks5EndPoint) : base(baseUriAction, torSocks5EndPoint) ======= private volatile bool _disposedValue = false; // To detect redundant calls public WasabiClient(Func<Uri> baseUriAction, EndPoint torSocks5EndPoint) >>>>>>> private volatile bool _disposedValue = false; // To detect redundant calls public WasabiClient(Func<Uri> baseUriAction, EndPoint? torSocks5EndPoint) <<<<<<< /// <inheritdoc/> public WasabiClient(Uri baseUri, EndPoint? torSocks5EndPoint) : base(baseUri, torSocks5EndPoint) ======= public WasabiClient(Uri baseUri, EndPoint torSocks5EndPoint) : this(() => baseUri, torSocks5EndPoint) >>>>>>> public WasabiClient(Uri baseUri, EndPoint? torSocks5EndPoint) : this(() => baseUri, torSocks5EndPoint)
<<<<<<< private int _anonymitySet = int.MaxValue; ======= private Cluster _cluster; >>>>>>> private Cluster _cluster; private int _anonymitySet = int.MaxValue; <<<<<<< public int AnonymitySet { get => _anonymitySet; set => RaiseAndSetIfChanged(ref _anonymitySet, value); } ======= public Cluster Cluster { get => _cluster; set => RaiseAndSetIfChanged(ref _cluster, value); } >>>>>>> public Cluster Cluster { get => _cluster; set => RaiseAndSetIfChanged(ref _cluster, value); } public int AnonymitySet { get => _anonymitySet; set => RaiseAndSetIfChanged(ref _anonymitySet, value); }
<<<<<<< using WalletWasabi.Coins; using WalletWasabi.Transactions; ======= using WalletWasabi.Blockchain.TransactionOutputs; >>>>>>> using WalletWasabi.Blockchain.TransactionOutputs; using WalletWasabi.Transactions;
<<<<<<< // When we invalidate a block, those transactions set in the invalidated block // are reintroduced when we generate a new block through the rpc call operations = new[]{ new WalletService.Operation(scp, Money.Coins(0.013m), "") }; ======= // When we invalidate a block, the transactions setted in the invalidated block // are reintroduced when we generate a new block though the rpc call operations = new[] { new WalletService.Operation(scp, Money.Coins(0.013m), "") }; >>>>>>> // When we invalidate a block, the transactions set in the invalidated block // are reintroduced when we generate a new block through the rpc call operations = new[] { new WalletService.Operation(scp, Money.Coins(0.013m), "") };
<<<<<<< IsBusy = true; ======= var wallet = walletViewModelBase.Wallet; >>>>>>> var wallet = walletViewModelBase.Wallet; <<<<<<< ForgotPasswordCommand = ReactiveCommand.Create(() => Navigate(NavigationTarget.DialogScreen).To(new PasswordFinderIntroduceViewModel(wallet))); ======= EnableAutoBusyOn(NextCommand); >>>>>>> ForgotPasswordCommand = ReactiveCommand.Create(() => Navigate(NavigationTarget.DialogScreen).To(new PasswordFinderIntroduceViewModel(wallet))); EnableAutoBusyOn(NextCommand);
<<<<<<< Interlocked.Exchange(ref _throttleId, 0); // So to notified the currently throttled threads that they do not have to run. ======= Interlocked.Exchange(ref _throttleId, 0); // So to notify the currently throttled threads that they don't have to run. >>>>>>> Interlocked.Exchange(ref _throttleId, 0); // So to notify the currently throttled threads that they do not have to run.
<<<<<<< _transactionInfo.ConfirmationTimeSpan = CalculateConfirmationTime(x); ======= SetXAxisCurrentValueIndex(x); >>>>>>> _transactionInfo.ConfirmationTimeSpan = CalculateConfirmationTime(x); SetXAxisCurrentValueIndex(x); <<<<<<< public ICommand PasteCommand { get; } public double XAxisMinValue { get; set; } = 1; public double XAxisMaxValue { get; set; } = 1008; private TimeSpan CalculateConfirmationTime(double x) { var targetedBlock = GetXAxisValueFromXAxisCurrentValue(x); var timeInMinutes = Math.Ceiling(targetedBlock) * 10; var time = TimeSpan.FromMinutes(timeInMinutes); return time; } ======= private void SetXAxisCurrentValueIndex(double xAxisCurrentValue) { if (!_updatingCurrentValue) { _updatingCurrentValue = true; if (_xAxisValues is not null) { XAxisCurrentValueIndex = GetCurrentValueIndex(xAxisCurrentValue, _xAxisValues); } _updatingCurrentValue = false; } } private void SetXAxisCurrentValue(int xAxisCurrentValueIndex) { if (_xAxisValues is not null) { if (!_updatingCurrentValue) { _updatingCurrentValue = true; var index = _xAxisValues.Length - xAxisCurrentValueIndex - 1; XAxisCurrentValue = _xAxisValues[index]; _updatingCurrentValue = false; } } } >>>>>>> public ICommand PasteCommand { get; } private TimeSpan CalculateConfirmationTime(double x) { var targetedBlock = GetXAxisValueFromXAxisCurrentValue(x); var timeInMinutes = Math.Ceiling(targetedBlock) * 10; var time = TimeSpan.FromMinutes(timeInMinutes); return time; } private void SetXAxisCurrentValueIndex(double xAxisCurrentValue) { if (!_updatingCurrentValue) { _updatingCurrentValue = true; if (_xAxisValues is not null) { XAxisCurrentValueIndex = GetCurrentValueIndex(xAxisCurrentValue, _xAxisValues); } _updatingCurrentValue = false; } } private void SetXAxisCurrentValue(int xAxisCurrentValueIndex) { if (_xAxisValues is not null) { if (!_updatingCurrentValue) { _updatingCurrentValue = true; var index = _xAxisValues.Length - xAxisCurrentValueIndex - 1; XAxisCurrentValue = _xAxisValues[index]; _updatingCurrentValue = false; } } } <<<<<<< private double GetXAxisValueFromXAxisCurrentValue(double x) { if (_xAxisValues is { }) { var scale = XAxisValues.Length / XAxisMaxValue; var selectedIndex = (int)(x * scale - 1); return XAxisValues.Reverse().ToArray()[selectedIndex]; } return 0; } ======= public ICommand PasteCommand { get; } >>>>>>> private double GetXAxisValueFromXAxisCurrentValue(double x) { if (_xAxisValues is { }) { var scale = XAxisValues.Length / XAxisMaxValue; var selectedIndex = (int)(x * scale - 1); return XAxisValues.Reverse().ToArray()[selectedIndex]; } return 0; }
<<<<<<< public SettingsPageViewModel(NavigationStateViewModel navigationState, Global global) : base(navigationState, NavigationTarget.HomeScreen) ======= private Global Global; public SettingsPageViewModel(NavigationStateViewModel navigationState) : base(navigationState) >>>>>>> public SettingsPageViewModel(NavigationStateViewModel navigationState, Global global) : base(navigationState)
<<<<<<< private Global _global; private NavigationStateViewModel _navigationState; ======= private readonly Global _global; >>>>>>> private readonly Global _global; <<<<<<< private DialogScreenViewModel _dialogScreen; private DialogViewModelBase _currentDialog; ======= private DialogViewModelBase? _currentDialog; >>>>>>> private DialogViewModelBase? _currentDialog; private NavigationStateViewModel _navigationState; private DialogScreenViewModel _dialogScreen; <<<<<<< _dialogScreen = new DialogScreenViewModel(); _navigationState = new NavigationStateViewModel() { MainScreen = () => this, DialogScreen = () => _dialogScreen, DialogHost = () => this }; ======= >>>>>>> _dialogScreen = new DialogScreenViewModel(); _navigationState = new NavigationStateViewModel() { MainScreen = () => this, DialogScreen = () => _dialogScreen, DialogHost = () => this }; <<<<<<< NavBar = new NavBarViewModel(_navigationState, Router, global.WalletManager, global.UiConfig); ======= _statusBar = new StatusBarViewModel(global.DataDir, global.Network, global.Config, global.HostedServices, global.BitcoinStore.SmartHeaderChain, global.Synchronizer, global.LegalDocuments); var walletManager = new WalletManagerViewModel(this, global.WalletManager, global.UiConfig); _navBar = new NavBarViewModel(this, Router, walletManager); >>>>>>> _statusBar = new StatusBarViewModel(global.DataDir, global.Network, global.Config, global.HostedServices, global.BitcoinStore.SmartHeaderChain, global.Synchronizer, global.LegalDocuments); var walletManager = new WalletManagerViewModel(this, global.WalletManager, global.UiConfig); _navBar = new NavBarViewModel(_navigationState, Router, walletManager); <<<<<<< public DialogScreenViewModel DialogScreen { get => _dialogScreen; set => this.RaiseAndSetIfChanged(ref _dialogScreen, value); } public DialogViewModelBase CurrentDialog ======= public DialogViewModelBase? CurrentDialog >>>>>>> public DialogScreenViewModel DialogScreen { get => _dialogScreen; set => this.RaiseAndSetIfChanged(ref _dialogScreen, value); } public DialogViewModelBase? CurrentDialog
<<<<<<< public static SmartTransaction ExtractSmartTransaction(this PSBT psbt, Height height, uint256 blockHash = null, int blockIndex = 0, Label label = null, DateTimeOffset? firstSeenIfMempoolTime = null, bool isReplacement = false) ======= public static SmartTransaction ExtractSmartTransaction(this PSBT psbt, Height height, uint256 blockHash = null, int blockIndex = 0, string label = "", DateTimeOffset firstSeen = default, bool isReplacement = false) >>>>>>> public static SmartTransaction ExtractSmartTransaction(this PSBT psbt, Height height, uint256 blockHash = null, int blockIndex = 0, Label label = null, DateTimeOffset firstSeen = default, bool isReplacement = false)
<<<<<<< #nullable enable using Avalonia.Threading; ======= >>>>>>> #nullable enable using Avalonia.Threading; <<<<<<< using System.Reactive.Linq; using System.Text; using System.Threading.Tasks; ======= >>>>>>> using System.Reactive.Linq; using System.Text; using System.Threading.Tasks; <<<<<<< public class MainViewModel : ViewModelBase, IScreen, IDialogHost { ======= public class MainViewModel : ViewModelBase, IScreen { >>>>>>> public class MainViewModel : ViewModelBase, IScreen, IDialogHost { <<<<<<< private DialogViewModelBase? _currentDialog; ======= private NavBarViewModel _navBar; >>>>>>> private DialogViewModelBase? _currentDialog; private NavBarViewModel _navBar; <<<<<<< Dispatcher.UIThread.Post(async () => { await Task.Delay(5000); Router.Navigate.Execute(new HomeViewModel(this)); }); } ======= NavBar = new NavBarViewModel(this, Router, global.WalletManager, global.UiConfig); } >>>>>>> NavBar = new NavBarViewModel(this, Router, global.WalletManager, global.UiConfig); } <<<<<<< public Network Network { get; } DialogViewModelBase? IDialogHost.CurrentDialog { get => _currentDialog; set => this.RaiseAndSetIfChanged(ref _currentDialog, value); } ======= public Network Network { get; } public NavBarViewModel NavBar { get => _navBar; set => this.RaiseAndSetIfChanged(ref _navBar, value); } >>>>>>> public Network Network { get; } DialogViewModelBase? IDialogHost.CurrentDialog { get => _currentDialog; set => this.RaiseAndSetIfChanged(ref _currentDialog, value); } public NavBarViewModel NavBar { get => _navBar; set => this.RaiseAndSetIfChanged(ref _navBar, value); }
<<<<<<< // Because we want to tolerate http:// and https:// in the host we also want to make sure it does not contradict the schame ======= // Because we want to tolerate http:// and https:// in the host we also want to make sure it doesn't contradict the scheme >>>>>>> // Because we want to tolerate http:// and https:// in the host we also want to make sure it does not contradict the scheme