conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
// OthersTab
//
this.OthersTab.Controls.Add(this.CountryCodeGroup);
this.OthersTab.Controls.Add(this.CountryCodeEnabledCheckbox);
this.OthersTab.Location = new System.Drawing.Point(4, 22);
this.OthersTab.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
this.OthersTab.Name = "OthersTab";
this.OthersTab.Size = new System.Drawing.Size(376, 497);
this.OthersTab.TabIndex = 3;
this.OthersTab.Text = "Others";
this.OthersTab.UseVisualStyleBackColor = true;
//
// CountryCodeGroup
//
this.CountryCodeGroup.Controls.Add(this.CountryCodeLabel);
this.CountryCodeGroup.Controls.Add(this.SaveCountryCodeButton);
this.CountryCodeGroup.Controls.Add(this.CountryCodeText);
this.CountryCodeGroup.Enabled = false;
this.CountryCodeGroup.Location = new System.Drawing.Point(8, 31);
this.CountryCodeGroup.Name = "CountryCodeGroup";
this.CountryCodeGroup.Size = new System.Drawing.Size(360, 100);
this.CountryCodeGroup.TabIndex = 1;
this.CountryCodeGroup.TabStop = false;
this.CountryCodeGroup.Text = "Country Code";
//
// CountryCodeLabel
//
this.CountryCodeLabel.Location = new System.Drawing.Point(15, 31);
this.CountryCodeLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.CountryCodeLabel.Name = "CountryCodeLabel";
this.CountryCodeLabel.Size = new System.Drawing.Size(94, 23);
this.CountryCodeLabel.TabIndex = 12;
this.CountryCodeLabel.Text = "Country Code";
this.CountryCodeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// SaveCountryCodeButton
//
this.SaveCountryCodeButton.Location = new System.Drawing.Point(9, 71);
this.SaveCountryCodeButton.Name = "SaveCountryCodeButton";
this.SaveCountryCodeButton.Size = new System.Drawing.Size(345, 23);
this.SaveCountryCodeButton.TabIndex = 2;
this.SaveCountryCodeButton.Text = "Save";
this.SaveCountryCodeButton.UseVisualStyleBackColor = true;
this.SaveCountryCodeButton.Click += new System.EventHandler(this.CountryCodeSaveButton_ClickListener);
//
// CountryCodeText
//
this.CountryCodeText.Location = new System.Drawing.Point(114, 34);
this.CountryCodeText.Name = "CountryCodeText";
this.CountryCodeText.Size = new System.Drawing.Size(240, 20);
this.CountryCodeText.TabIndex = 0;
//
// CountryCodeEnabledCheckbox
//
this.CountryCodeEnabledCheckbox.AutoSize = true;
this.CountryCodeEnabledCheckbox.Location = new System.Drawing.Point(10, 8);
this.CountryCodeEnabledCheckbox.Name = "CountryCodeEnabledCheckbox";
this.CountryCodeEnabledCheckbox.Size = new System.Drawing.Size(132, 17);
this.CountryCodeEnabledCheckbox.TabIndex = 0;
this.CountryCodeEnabledCheckbox.Text = "Country Code Enabled";
this.CountryCodeEnabledCheckbox.UseVisualStyleBackColor = true;
this.CountryCodeEnabledCheckbox.CheckedChanged += new System.EventHandler(this.CountryCodeEnabled_CheckedChanged);
//
=======
>>>>>>>
<<<<<<<
private System.Windows.Forms.GroupBox CountryCodeGroup;
private System.Windows.Forms.Label CountryCodeLabel;
private System.Windows.Forms.Button SaveCountryCodeButton;
private System.Windows.Forms.TextBox CountryCodeText;
private System.Windows.Forms.CheckBox CountryCodeEnabledCheckbox;
private System.Windows.Forms.CheckBox HandleExceptions;
private System.Windows.Forms.GroupBox ErrorAttachmentsBox;
private System.Windows.Forms.Label TextAttachmentLabel;
private System.Windows.Forms.TextBox TextAttachmentTextBox;
private System.Windows.Forms.Label FileAttachmentPathLabel;
private System.Windows.Forms.Label FileAttachmentLabel;
private System.Windows.Forms.Button SelectFileAttachmentButton;
=======
>>>>>>>
private System.Windows.Forms.CheckBox HandleExceptions;
private System.Windows.Forms.GroupBox ErrorAttachmentsBox;
private System.Windows.Forms.Label TextAttachmentLabel;
private System.Windows.Forms.TextBox TextAttachmentTextBox;
private System.Windows.Forms.Label FileAttachmentPathLabel;
private System.Windows.Forms.Label FileAttachmentLabel;
private System.Windows.Forms.Button SelectFileAttachmentButton; |
<<<<<<<
private static List<DataPoint> GetSampleDataForTraining()
{
return new List<DataPoint>()
{
new DataPoint(){ Features = new float[3] {0, 2, 1} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 3} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 4} , Label = true },
new DataPoint(){ Features = new float[3] {0, 2, 1} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 2} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 3} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 4} , Label = true },
new DataPoint(){ Features = new float[3] {1, 0, 0} , Label = true }
};
}
}
internal class DataPoint
{
public DataPoint()
{
}
[VectorType(3)]
public float[] Features { get; set; }
public bool Label { get; set; }
=======
[TestMethod]
public async Task CreateRunAsync_WithGitCommitHash_SetsGitCommitHash()
{
//Arrange
var sut = new MLOpsBuilder()
.UseSQLite()
.UseModelRepository(new Mock<IModelRepository>().Object)
.Build();
var gitCommitHash = "12323239329392";
//Act
var runId = await sut.LifeCycle.CreateRunAsync(Guid.NewGuid(), gitCommitHash);
//Assert
var run = sut.LifeCycle.GetRun(runId);
run.GitCommitHash.Should().Be(gitCommitHash);
}
[TestMethod]
public async Task CreateRunAsync_WithoutGitCommitHash_ShouldProvideEmptyGitCommitHash()
{
//Arrange
var sut = new MLOpsBuilder()
.UseSQLite()
.UseModelRepository(new Mock<IModelRepository>().Object)
.Build();
//Act
var runId = await sut.LifeCycle.CreateRunAsync(Guid.NewGuid());
//Assert
var run = sut.LifeCycle.GetRun(runId);
run.GitCommitHash.Should().Be(string.Empty);
}
>>>>>>>
[TestMethod]
public async Task CreateRunAsync_WithGitCommitHash_SetsGitCommitHash()
{
//Arrange
var sut = new MLOpsBuilder()
.UseSQLite()
.UseModelRepository(new Mock<IModelRepository>().Object)
.Build();
var gitCommitHash = "12323239329392";
//Act
var runId = await sut.LifeCycle.CreateRunAsync(Guid.NewGuid(), gitCommitHash);
//Assert
var run = sut.LifeCycle.GetRun(runId);
run.GitCommitHash.Should().Be(gitCommitHash);
}
[TestMethod]
public async Task CreateRunAsync_WithoutGitCommitHash_ShouldProvideEmptyGitCommitHash()
{
//Arrange
var sut = new MLOpsBuilder()
.UseSQLite()
.UseModelRepository(new Mock<IModelRepository>().Object)
.Build();
//Act
var runId = await sut.LifeCycle.CreateRunAsync(Guid.NewGuid());
//Assert
var run = sut.LifeCycle.GetRun(runId);
run.GitCommitHash.Should().Be(string.Empty);
}
private static List<DataPoint> GetSampleDataForTraining()
{
return new List<DataPoint>()
{
new DataPoint(){ Features = new float[3] {0, 2, 1} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 3} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 4} , Label = true },
new DataPoint(){ Features = new float[3] {0, 2, 1} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 2} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 3} , Label = false },
new DataPoint(){ Features = new float[3] {0, 2, 4} , Label = true },
new DataPoint(){ Features = new float[3] {1, 0, 0} , Label = true }
};
}
}
internal class DataPoint
{
public DataPoint()
{
}
[VectorType(3)]
public float[] Features { get; set; }
public bool Label { get; set; } |
<<<<<<<
/// Reads an exception file from the given file.
/// </summary>
/// <param name="file">The file that contains exception.</param>
/// <returns>An exception instance or null if the file doesn't contain an exception.</returns>
public virtual System.Exception InstanceReadExceptionFile(File file)
{
try
{
var exceptionString = file.ReadAllText();
// TODO: Implement deserialization of Exception.
return new System.Exception();
}
catch (System.Exception e)
{
AppCenterLog.Error(Crashes.LogTag, $"Encountered an unexpected error while reading an exception file: {file.Name}", e);
}
return null;
}
/// <summary>
/// Saves an error log and an exception on disk.
=======
/// Get the error storage directory, or creates it if it does not exist.
/// </summary>
/// <returns>The error storage directory.</returns>
public virtual Directory InstanceGetErrorStorageDirectory()
{
_crashesDirectory.Create();
return _crashesDirectory;
}
/// <summary>
/// Saves an error log on disk.
>>>>>>>
/// Reads an exception file from the given file.
/// </summary>
/// <param name="file">The file that contains exception.</param>
/// <returns>An exception instance or null if the file doesn't contain an exception.</returns>
public virtual System.Exception InstanceReadExceptionFile(File file)
{
try
{
var exceptionString = file.ReadAllText();
// TODO: Implement deserialization of Exception.
return new System.Exception();
}
catch (System.Exception e)
{
AppCenterLog.Error(Crashes.LogTag, $"Encountered an unexpected error while reading an exception file: {file.Name}", e);
}
return null;
}
/// <summary>
/// Saves an error log and an exception on disk.
/// Get the error storage directory, or creates it if it does not exist.
/// </summary>
/// <returns>The error storage directory.</returns>
public virtual Directory InstanceGetErrorStorageDirectory()
{
_crashesDirectory.Create();
return _crashesDirectory;
}
/// <summary>
/// Saves an error log on disk.
<<<<<<<
var errorLogString = LogSerializer.Serialize(errorLog);
var errorLogFileName = errorLog.Id + ErrorLogFileExtension;
lock (LockObject)
{
_crashesDirectory.Create();
}
AppCenterLog.Debug(Crashes.LogTag, "Saving uncaught exception.");
_crashesDirectory.CreateFile(errorLogFileName, errorLogString);
AppCenterLog.Debug(Crashes.LogTag, $"Saved error log in directory {ErrorStorageDirectoryName} with name {errorLogFileName}.");
// TODO: Property serialize Exception instance + error handling on exceptions.
var exceptionString = exception.ToString();
var exceptionFileName = errorLog.Id + ExceptionFileExtension;
_crashesDirectory.CreateFile(exceptionFileName, exceptionString);
AppCenterLog.Debug(Crashes.LogTag, $"Saved exception in directory {ErrorStorageDirectoryName} with name {exceptionFileName}.");
=======
InstanceGetErrorStorageDirectory().CreateFile(fileName, errorLogString);
>>>>>>>
var errorLogString = LogSerializer.Serialize(errorLog);
var errorLogFileName = errorLog.Id + ErrorLogFileExtension;
AppCenterLog.Debug(Crashes.LogTag, "Saving uncaught exception.");
InstanceGetErrorStorageDirectory().CreateFile(errorLogFileName, errorLogString);
AppCenterLog.Debug(Crashes.LogTag, $"Saved error log in directory {ErrorStorageDirectoryName} with name {errorLogFileName}.");
// TODO: Property serialize Exception instance + error handling on exceptions.
var exceptionString = exception.ToString();
var exceptionFileName = errorLog.Id + ExceptionFileExtension;
InstanceGetErrorStorageDirectory().CreateFile(exceptionFileName, exceptionString);
AppCenterLog.Debug(Crashes.LogTag, $"Saved exception in directory {ErrorStorageDirectoryName} with name {exceptionFileName}."); |
<<<<<<<
this.AddToPlaylistCommand = new ReactiveUI.Legacy.ReactiveCommand(this.WhenAnyValue(x => x.SelectedSongs, x => x != null && x.Any()));
=======
this.ApplyOrder(SortHelpers.GetOrderByTitle<T>, ref this.titleOrder);
this.AddToPlaylistCommand = this.WhenAnyValue(x => x.SelectedSongs, x => x != null && x.Any()).ToCommand();
>>>>>>>
this.ApplyOrder(SortHelpers.GetOrderByTitle<T>, ref this.titleOrder);
this.AddToPlaylistCommand = new ReactiveUI.Legacy.ReactiveCommand(this.WhenAnyValue(x => x.SelectedSongs, x => x != null && x.Any()));
<<<<<<<
public abstract ReactiveUI.Legacy.ReactiveCommand PlayNowCommand { get; }
=======
public ReactiveCommand OrderByDurationCommand { get; private set; }
public ReactiveCommand OrderByTitleCommand { get; private set; }
public abstract IReactiveCommand PlayNowCommand { get; }
>>>>>>>
public ReactiveCommand OrderByDurationCommand { get; private set; }
public ReactiveCommand OrderByTitleCommand { get; private set; }
public abstract ReactiveUI.Legacy.ReactiveCommand PlayNowCommand { get; } |
<<<<<<<
// OthersTab
//
this.OthersTab.Controls.Add(this.CountryCodeGroup);
this.OthersTab.Controls.Add(this.CountryCodeEnabledCheckbox);
this.OthersTab.Location = new System.Drawing.Point(4, 22);
this.OthersTab.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
this.OthersTab.Name = "OthersTab";
this.OthersTab.Size = new System.Drawing.Size(376, 497);
this.OthersTab.TabIndex = 3;
this.OthersTab.Text = "Others";
this.OthersTab.UseVisualStyleBackColor = true;
//
// CountryCodeGroup
//
this.CountryCodeGroup.Controls.Add(this.CountryCodeLabel);
this.CountryCodeGroup.Controls.Add(this.SaveCountryCodeButton);
this.CountryCodeGroup.Controls.Add(this.CountryCodeText);
this.CountryCodeGroup.Enabled = false;
this.CountryCodeGroup.Location = new System.Drawing.Point(8, 31);
this.CountryCodeGroup.Name = "CountryCodeGroup";
this.CountryCodeGroup.Size = new System.Drawing.Size(360, 100);
this.CountryCodeGroup.TabIndex = 1;
this.CountryCodeGroup.TabStop = false;
this.CountryCodeGroup.Text = "Country Code";
//
// CountryCodeLabel
//
this.CountryCodeLabel.Location = new System.Drawing.Point(15, 31);
this.CountryCodeLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.CountryCodeLabel.Name = "CountryCodeLabel";
this.CountryCodeLabel.Size = new System.Drawing.Size(94, 23);
this.CountryCodeLabel.TabIndex = 12;
this.CountryCodeLabel.Text = "Country Code";
this.CountryCodeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// SaveCountryCodeButton
//
this.SaveCountryCodeButton.Location = new System.Drawing.Point(9, 71);
this.SaveCountryCodeButton.Name = "SaveCountryCodeButton";
this.SaveCountryCodeButton.Size = new System.Drawing.Size(345, 23);
this.SaveCountryCodeButton.TabIndex = 2;
this.SaveCountryCodeButton.Text = "Save";
this.SaveCountryCodeButton.UseVisualStyleBackColor = true;
this.SaveCountryCodeButton.Click += new System.EventHandler(this.CountryCodeSaveButton_ClickListener);
//
// CountryCodeText
//
this.CountryCodeText.Location = new System.Drawing.Point(114, 34);
this.CountryCodeText.Name = "CountryCodeText";
this.CountryCodeText.Size = new System.Drawing.Size(240, 20);
this.CountryCodeText.TabIndex = 0;
//
// CountryCodeEnabledCheckbox
//
this.CountryCodeEnabledCheckbox.AutoSize = true;
this.CountryCodeEnabledCheckbox.Location = new System.Drawing.Point(10, 8);
this.CountryCodeEnabledCheckbox.Name = "CountryCodeEnabledCheckbox";
this.CountryCodeEnabledCheckbox.Size = new System.Drawing.Size(132, 17);
this.CountryCodeEnabledCheckbox.TabIndex = 0;
this.CountryCodeEnabledCheckbox.Text = "Country Code Enabled";
this.CountryCodeEnabledCheckbox.UseVisualStyleBackColor = true;
this.CountryCodeEnabledCheckbox.CheckedChanged += new System.EventHandler(this.CountryCodeEnabled_CheckedChanged);
//
=======
>>>>>>>
<<<<<<<
private System.Windows.Forms.GroupBox CountryCodeGroup;
private System.Windows.Forms.Label CountryCodeLabel;
private System.Windows.Forms.Button SaveCountryCodeButton;
private System.Windows.Forms.TextBox CountryCodeText;
private System.Windows.Forms.CheckBox CountryCodeEnabledCheckbox;
private System.Windows.Forms.CheckBox HandleExceptions;
private System.Windows.Forms.GroupBox ErrorAttachmentsBox;
private System.Windows.Forms.Label TextAttachmentLabel;
private System.Windows.Forms.TextBox TextAttachmentTextBox;
private System.Windows.Forms.Label FileAttachmentPathLabel;
private System.Windows.Forms.Label FileAttachmentLabel;
private System.Windows.Forms.Button SelectFileAttachmentButton;
=======
>>>>>>>
private System.Windows.Forms.CheckBox HandleExceptions;
private System.Windows.Forms.GroupBox ErrorAttachmentsBox;
private System.Windows.Forms.Label TextAttachmentLabel;
private System.Windows.Forms.TextBox TextAttachmentTextBox;
private System.Windows.Forms.Label FileAttachmentPathLabel;
private System.Windows.Forms.Label FileAttachmentLabel;
private System.Windows.Forms.Button SelectFileAttachmentButton; |
<<<<<<<
MSAnalytics.SetDelegate(new AnalyticsDelegate());
=======
MobileCenterLog.Assert(App.LogTag, "MobileCenter.Configured=" + MobileCenter.Configured);
>>>>>>>
MSAnalytics.SetDelegate(new AnalyticsDelegate());
MobileCenterLog.Assert(App.LogTag, "MobileCenter.Configured=" + MobileCenter.Configured); |
<<<<<<<
_storage.DeleteLogsAsync(ChannelName).RunNotAsync();
=======
_storage = new Mobile.Storage.Storage();
_storage.DeleteLogsAsync(ChannelName).Wait();
>>>>>>>
_storage = new Mobile.Storage.Storage();
_storage.DeleteLogsAsync(ChannelName).RunNotAsync(); |
<<<<<<<
/// Sets the app will close callback.
/// </summary>
/// <value>The app will close callback.</value>
public static WillExitAppCallback WillExitApp
{
set
{
SetWillExitAppCallback(value);
}
}
/// <summary>
=======
/// Sets the no release available callback.
/// </summary>
/// <value>The no release available callback.</value>
public static NoReleaseAvailableCallback NoReleaseAvailable
{
set
{
SetNoReleaseAvailable(value);
}
}
/// <summary>
>>>>>>>
/// Sets the app will close callback.
/// </summary>
/// <value>The app will close callback.</value>
public static WillExitAppCallback WillExitApp
{
set
{
SetWillExitAppCallback(value);
}
}
/// <summary>
/// Sets the no release available callback.
/// </summary>
/// <value>The no release available callback.</value>
public static NoReleaseAvailableCallback NoReleaseAvailable
{
set
{
SetNoReleaseAvailable(value);
}
}
/// <summary> |
<<<<<<<
// Before deleting logs, allow "InstanceGetLastSessionCrashReportAsync" to complete to avoid a race condition.
InstanceGetLastSessionCrashReportAsync().Wait();
=======
var tasks = new List<Task>();
>>>>>>>
// Before deleting logs, allow "InstanceGetLastSessionCrashReportAsync" to complete to avoid a race condition.
InstanceGetLastSessionCrashReportAsync().Wait();
var tasks = new List<Task>(); |
<<<<<<<
=======
TCs.Add(new TCDescribe { Title = "TwoButtonPopup", Class = typeof(TCTwoButtonPopup) });
TCs.Add(new TCDescribe { Title = "", Class = null }); // for bottom padding
>>>>>>>
TCs.Add(new TCDescribe { Title = "TwoButtonPopup", Class = typeof(TCTwoButtonPopup) }); |
<<<<<<<
using Moq;
=======
>>>>>>>
using Moq;
<<<<<<<
Task.Run(() => storage.PutLogAsync(StorageTestChannelName, new TestLog()));
Task.Run(() => storage.PutLogAsync(StorageTestChannelName, new TestLog()));
var result = storage.ShutdownAsync(TimeSpan.FromSeconds(100)).RunNotAsync();
=======
// Ignore warnings because we just want to "fire and forget"
#pragma warning disable 4014
storage.PutLogAsync(StorageTestChannelName, new TestLog());
storage.PutLogAsync(StorageTestChannelName, new TestLog());
#pragma warning restore 4014
var result = storage.Shutdown(TimeSpan.FromSeconds(100));
>>>>>>>
// Ignore warnings because we just want to "fire and forget"
#pragma warning disable 4014
storage.PutLogAsync(StorageTestChannelName, new TestLog());
storage.PutLogAsync(StorageTestChannelName, new TestLog());
#pragma warning restore 4014
var result = storage.ShutdownAsync(TimeSpan.FromSeconds(100)).RunNotAsync(); |
<<<<<<<
using System.Linq;
using System.Reactive.Linq;
=======
using System.Reactive.Linq;
>>>>>>>
using System.Linq;
using System.Reactive.Linq;
<<<<<<<
this.UpdateSilentlyAsync();
=======
this.SetupLager();
this.SetupMobileApi();
>>>>>>>
this.SetupLager();
this.SetupMobileApi();
this.UpdateSilentlyAsync();
<<<<<<<
private async Task UpdateSilentlyAsync()
{
var settings = this.kernel.Get<ViewSettings>();
#if DEBUG
string updateUrl = Path.Combine(Directory.GetCurrentDirectory(), @"..\..\..", "Releases");
updateUrl = Path.GetFullPath(updateUrl);
#else
string updateUrl = null;
switch (settings.UpdateChannel)
{
case UpdateChannel.Dev:
updateUrl = "http://espera.s3.amazonaws.com/Releases/Dev";
break;
case UpdateChannel.Stable:
updateUrl = "http://espera.s3.amazonaws.com/Releases/Stable";
break;
}
#endif
using (var updateManager = new UpdateManager(updateUrl, "Espera", FrameworkVersion.Net45))
{
this.Log().Info("Looking for application updates at {0}", updateUrl);
UpdateInfo updateInfo = await updateManager.CheckForUpdate()
.LoggedCatch(this, Observable.Return<UpdateInfo>(null), "Error while checking for updates: ");
if (updateInfo == null)
return;
List<ReleaseEntry> releases = updateInfo.ReleasesToApply.ToList();
if (releases.Any())
{
this.Log().Info("Found {0} updates.", releases.Count);
this.Log().Info("Downloading updates...");
await updateManager.DownloadReleases(releases);
this.Log().Info("Updates downloaded.");
this.Log().Info("Applying updates...");
await updateManager.ApplyReleases(updateInfo);
this.Log().Info("Updates applied.");
settings.IsUpdated = true;
}
else
{
this.Log().Info("No updates found.");
}
}
}
=======
private void SetupLager()
{
this.Log().Info("Initializing Lager settings storages...");
this.kernel.Get<CoreSettings>().InitializeAsync().Wait();
this.kernel.Get<ViewSettings>().InitializeAsync().Wait();
this.Log().Info("Settings storages initialized.");
}
private void SetupMobileApi()
{
var coreSettings = this.kernel.Get<CoreSettings>();
var library = this.kernel.Get<Library>();
this.Log().Info("Remote control is {0}", coreSettings.EnableRemoteControl ? "enabled" : "disabled");
this.Log().Info("Port ist set to {0}", coreSettings.Port);
coreSettings.WhenAnyValue(x => x.Port).DistinctUntilChanged()
.CombineLatest(coreSettings.WhenAnyValue(x => x.EnableRemoteControl), Tuple.Create)
.Where(x => x.Item2)
.Select(x => x.Item1)
.Subscribe(x =>
{
if (this.mobileApi != null)
{
this.mobileApi.Dispose();
}
this.mobileApi = new MobileApi(x, library);
this.mobileApi.SendBroadcastAsync();
this.mobileApi.StartClientDiscovery();
});
coreSettings.WhenAnyValue(x => x.EnableRemoteControl)
.Where(x => !x && this.mobileApi != null)
.Subscribe(x => this.mobileApi.Dispose());
}
>>>>>>>
private void SetupLager()
{
this.Log().Info("Initializing Lager settings storages...");
this.kernel.Get<CoreSettings>().InitializeAsync().Wait();
this.kernel.Get<ViewSettings>().InitializeAsync().Wait();
this.Log().Info("Settings storages initialized.");
}
private void SetupMobileApi()
{
var coreSettings = this.kernel.Get<CoreSettings>();
var library = this.kernel.Get<Library>();
this.Log().Info("Remote control is {0}", coreSettings.EnableRemoteControl ? "enabled" : "disabled");
this.Log().Info("Port ist set to {0}", coreSettings.Port);
coreSettings.WhenAnyValue(x => x.Port).DistinctUntilChanged()
.CombineLatest(coreSettings.WhenAnyValue(x => x.EnableRemoteControl), Tuple.Create)
.Where(x => x.Item2)
.Select(x => x.Item1)
.Subscribe(x =>
{
if (this.mobileApi != null)
{
this.mobileApi.Dispose();
}
this.mobileApi = new MobileApi(x, library);
this.mobileApi.SendBroadcastAsync();
this.mobileApi.StartClientDiscovery();
});
coreSettings.WhenAnyValue(x => x.EnableRemoteControl)
.Where(x => !x && this.mobileApi != null)
.Subscribe(x => this.mobileApi.Dispose());
}
private async Task UpdateSilentlyAsync()
{
var settings = this.kernel.Get<ViewSettings>();
#if DEBUG
string updateUrl = Path.Combine(Directory.GetCurrentDirectory(), @"..\..\..", "Releases");
updateUrl = Path.GetFullPath(updateUrl);
#else
string updateUrl = null;
switch (settings.UpdateChannel)
{
case UpdateChannel.Dev:
updateUrl = "http://espera.s3.amazonaws.com/Releases/Dev";
break;
case UpdateChannel.Stable:
updateUrl = "http://espera.s3.amazonaws.com/Releases/Stable";
break;
}
#endif
using (var updateManager = new UpdateManager(updateUrl, "Espera", FrameworkVersion.Net45))
{
this.Log().Info("Looking for application updates at {0}", updateUrl);
UpdateInfo updateInfo = await updateManager.CheckForUpdate()
.LoggedCatch(this, Observable.Return<UpdateInfo>(null), "Error while checking for updates: ");
if (updateInfo == null)
return;
List<ReleaseEntry> releases = updateInfo.ReleasesToApply.ToList();
if (releases.Any())
{
this.Log().Info("Found {0} updates.", releases.Count);
this.Log().Info("Downloading updates...");
await updateManager.DownloadReleases(releases);
this.Log().Info("Updates downloaded.");
this.Log().Info("Applying updates...");
await updateManager.ApplyReleases(updateInfo);
this.Log().Info("Updates applied.");
settings.IsUpdated = true;
}
else
{
this.Log().Info("No updates found.");
}
}
} |
<<<<<<<
using Smod2.Permissions;
=======
using Smod2.Piping;
>>>>>>>
using Smod2.Piping;
using Smod2.Permissions; |
<<<<<<<
bits.CopyTo(_bits);
mask.CopyTo(_mask);
=======
Bits = (BitArray) bits.Clone();
Mask = (BitArray) mask.Clone();
}
/// <inheritdoc />
public override void MarkFullyUnknown()
{
Mask.SetAll(false);
>>>>>>>
bits.CopyTo(_bits);
mask.CopyTo(_mask);
Bits = (BitArray) bits.Clone();
Mask = (BitArray) mask.Clone();
}
/// <inheritdoc />
public override void MarkFullyUnknown()
{
Mask.SetAll(false); |
<<<<<<<
=======
using XSharp.Compiler;
using static XSharp.Compiler.XSRegisters;
>>>>>>>
using XSharp.Compiler;
using static XSharp.Compiler.XSRegisters;
<<<<<<<
/*
* Sadly for x86 there is no way using SSE to convert a float to an Int64... in x64 we could use ConvertPD2DQAndTruncate with
* x64 register as a destination... so only in this case we need the legacy FPU!
*/
new CPUx86.x87.FloatLoad { DestinationReg = CPUx86.Registers.ESP, DestinationIsIndirect = true, Size = 32 };
new CPUx86.Sub { DestinationReg = CPUx86.Registers.ESP, SourceValue = 4 };
new CPUx86.x87.IntStoreWithTrunc { DestinationReg = CPUx86.Registers.ESP, DestinationIsIndirect = true, Size = 64 };
=======
XS.FPU.FloatLoad(ESP, destinationIsIndirect: true, size: RegisterSize.Int32);
XS.Sub(XSRegisters.ESP, 4);
XS.FPU.IntStoreWithTruncate(ESP, isIndirect: true, size: RegisterSize.Long64);
>>>>>>>
/*
* Sadly for x86 there is no way using SSE to convert a float to an Int64... in x64 we could use ConvertPD2DQAndTruncate with
* x64 register as a destination... so this one of the few cases in which we need the legacy FPU!
*/
XS.FPU.FloatLoad(ESP, destinationIsIndirect: true, size: RegisterSize.Int32);
XS.Sub(XSRegisters.ESP, 4);
XS.FPU.IntStoreWithTruncate(ESP, isIndirect: true, size: RegisterSize.Long64);
<<<<<<<
/*
* Sadly for x86 there is no way using SSE to convert a double to an Int64... in x64 we could use ConvertPD2DQAndTruncate with
* x64 register as a destination... so only in this case we need the legacy FPU!
*/
new CPUx86.x87.FloatLoad { DestinationReg = CPUx86.Registers.ESP, DestinationIsIndirect = true, Size = 64 };
new CPUx86.x87.IntStoreWithTrunc { DestinationReg = CPUx86.Registers.ESP, DestinationIsIndirect = true, Size = 64 };
}
=======
XS.FPU.FloatLoad(ESP, destinationIsIndirect: true, size: RegisterSize.Long64);
XS.FPU.IntStoreWithTruncate(ESP, isIndirect: true, size: RegisterSize.Long64);
}
>>>>>>>
/*
* Sadly for x86 there is no way using SSE to convert a double to an Int64... in x64 we could use ConvertPD2DQAndTruncate with
* x64 register as a destination... so only in this case we need the legacy FPU!
*/
XS.FPU.FloatLoad(ESP, destinationIsIndirect: true, size: RegisterSize.Long64);
XS.FPU.IntStoreWithTruncate(ESP, isIndirect: true, size: RegisterSize.Long64);
}
<<<<<<<
}
=======
}
>>>>>>>
} |
<<<<<<<
WriteError(new ErrorRecord(scriptRuleException, Strings.RuleErrorMessage, ErrorCategory.InvalidOperation, filePath));
continue;
=======
WriteError(new ErrorRecord(scriptRuleException, Strings.RuleError, ErrorCategory.InvalidOperation, filePath));
>>>>>>>
WriteError(new ErrorRecord(scriptRuleException, Strings.RuleErrorMessage, ErrorCategory.InvalidOperation, filePath));
<<<<<<<
=======
#region Run Command Rules
funcDefAsts = ast.FindAll(new Func<Ast, bool>((testAst) => (testAst is FunctionDefinitionAst)), true);
if (funcDefAsts != null)
{
foreach (FunctionDefinitionAst funcDefAst in funcDefAsts)
{
//Create command info object here
var sb = new StringBuilder();
sb.AppendLine(funcDefAst.Extent.Text);
sb.AppendFormat("Get-Command –CommandType Function –Name {0}", funcDefAst.Name);
var funcDefPS = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
funcDefPS.AddScript(sb.ToString());
try
{
var commandInfo = funcDefPS.Invoke<CommandInfo>();
foreach (CommandInfo cmdInfo in commandInfo)
{
cmdInfoTable.Add(new KeyValuePair<CommandInfo, IScriptExtent>(cmdInfo as CommandInfo, funcDefAst.Extent));
}
}
catch (ParseException)
{
WriteError(new ErrorRecord(new CommandNotFoundException(),
string.Format(CultureInfo.CurrentCulture, Strings.CommandInfoNotFound, funcDefAst.Name),
ErrorCategory.SyntaxError, funcDefAst));
}
}
}
if (ScriptAnalyzer.Instance.CommandRules != null)
{
foreach (ICommandRule commandRule in ScriptAnalyzer.Instance.CommandRules)
{
bool includeRegexMatch = false;
bool excludeRegexMatch = false;
foreach (Regex include in includeRegexList)
{
if (include.IsMatch(commandRule.GetName()))
{
includeRegexMatch = true;
break;
}
}
foreach (Regex exclude in excludeRegexList)
{
if (exclude.IsMatch(commandRule.GetName()))
{
excludeRegexMatch = true;
break;
}
}
if ((includeRule == null || includeRegexMatch) && (excludeRule == null || !excludeRegexMatch))
{
foreach (KeyValuePair<CommandInfo, IScriptExtent> commandInfo in cmdInfoTable)
{
WriteVerbose(string.Format(CultureInfo.CurrentCulture, Strings.VerboseRunningMessage, commandRule.GetName()));
// Ensure that any unhandled errors from Rules are converted to non-terminating errors
// We want the Engine to continue functioning even if one or more Rules throws an exception
try
{
diagnostics.AddRange(commandRule.AnalyzeCommand(commandInfo.Key, commandInfo.Value, fileName));
}
catch (Exception commandRuleException)
{
WriteError(new ErrorRecord(commandRuleException, Strings.RuleError, ErrorCategory.InvalidOperation, fileName));
}
}
}
}
}
#endregion
>>>>>>>
<<<<<<<
WriteError(new ErrorRecord(tokenRuleException, Strings.RuleErrorMessage, ErrorCategory.InvalidOperation, fileName));
continue;
=======
WriteError(new ErrorRecord(tokenRuleException, Strings.RuleError, ErrorCategory.InvalidOperation, fileName));
>>>>>>>
WriteError(new ErrorRecord(tokenRuleException, Strings.RuleErrorMessage, ErrorCategory.InvalidOperation, fileName));
<<<<<<<
WriteError(new ErrorRecord(dscResourceRuleException, Strings.RuleErrorMessage, ErrorCategory.InvalidOperation, filePath));
continue;
=======
WriteError(new ErrorRecord(dscResourceRuleException, Strings.RuleError, ErrorCategory.InvalidOperation, filePath));
>>>>>>>
WriteError(new ErrorRecord(dscResourceRuleException, Strings.RuleErrorMessage, ErrorCategory.InvalidOperation, filePath));
<<<<<<<
WriteError(new ErrorRecord(dscResourceRuleException, Strings.RuleErrorMessage, ErrorCategory.InvalidOperation, filePath));
continue;
=======
WriteError(new ErrorRecord(dscResourceRuleException, Strings.RuleError, ErrorCategory.InvalidOperation, filePath));
>>>>>>>
WriteError(new ErrorRecord(dscResourceRuleException, Strings.RuleErrorMessage, ErrorCategory.InvalidOperation, filePath)); |
<<<<<<<
AssignmentViewModel.LoadAssignmentsAsync ().ContinueOnUIThread (_ => {
if (AssignmentViewModel.ActiveAssignment != null) {
SetActiveAssignmentVisible (true);
} else {
SetActiveAssignmentVisible (false);
}
var adapter = new AssignmentsAdapter (this, Resource.Layout.AssignmentItemLayout, AssignmentViewModel.Assignments);
adapter.Activity = this;
adapter.AssignmentViewModel = AssignmentViewModel;
assignmentsListView.Adapter = adapter;
var activity = (AssignmentTabActivity)Parent;//ServiceContainer.Resolve<AssignmentTabActivity> ();
AssignmentTabActivity.AssignmentViewModel = AssignmentViewModel;
=======
AssignmentViewModel.LoadAssignmentsAsync ().ContinueWith (_ => {
RunOnUiThread (() => {
if (AssignmentViewModel.ActiveAssignment != null) {
SetActiveAssignmentVisible (true);
} else {
SetActiveAssignmentVisible (false);
}
var adapter = new AssignmentsAdapter (this, Resource.Layout.AssignmentItemLayout, AssignmentViewModel.Assignments);
adapter.AssignmentViewModel = AssignmentViewModel;
assignmentsListView.Adapter = adapter;
var activity = ServiceContainer.Resolve<AssignmentTabActivity> ();
activity.AssignmentViewModel = AssignmentViewModel;
});
>>>>>>>
AssignmentViewModel.LoadAssignmentsAsync ().ContinueWith (_ => {
if (AssignmentViewModel.ActiveAssignment != null) {
SetActiveAssignmentVisible (true);
} else {
SetActiveAssignmentVisible (false);
}
var adapter = new AssignmentsAdapter (this, Resource.Layout.AssignmentItemLayout, AssignmentViewModel.Assignments);
adapter.Activity = this;
adapter.AssignmentViewModel = AssignmentViewModel;
assignmentsListView.Adapter = adapter;
var activity = (AssignmentTabActivity)Parent;//ServiceContainer.Resolve<AssignmentTabActivity> ();
AssignmentTabActivity.AssignmentViewModel = AssignmentViewModel;
<<<<<<<
AssignmentViewModel.LoadAssignmentsAsync ().ContinueOnUIThread (_ => {
if (AssignmentViewModel.ActiveAssignment != null) {
SetActiveAssignmentVisible (true);
} else {
SetActiveAssignmentVisible (false);
}
var adapter = new AssignmentsAdapter (this, Resource.Layout.AssignmentItemLayout, AssignmentViewModel.Assignments);
adapter.Activity = this;
adapter.AssignmentViewModel = AssignmentViewModel;
assignmentsListView.Adapter = adapter;
=======
AssignmentViewModel.LoadAssignmentsAsync ().ContinueWith (_ => {
RunOnUiThread (() => {
if (AssignmentViewModel.ActiveAssignment != null) {
SetActiveAssignmentVisible (true);
} else {
SetActiveAssignmentVisible (false);
}
var adapter = new AssignmentsAdapter (this, Resource.Layout.AssignmentItemLayout, AssignmentViewModel.Assignments);
adapter.AssignmentViewModel = AssignmentViewModel;
assignmentsListView.Adapter = adapter;
});
>>>>>>>
AssignmentViewModel.LoadAssignmentsAsync ().ContinueWith (_ => {
RunOnUiThread (() => {
if (AssignmentViewModel.ActiveAssignment != null) {
SetActiveAssignmentVisible (true);
} else {
SetActiveAssignmentVisible (false);
}
var adapter = new AssignmentsAdapter (this, Resource.Layout.AssignmentItemLayout, AssignmentViewModel.Assignments);
adapter.AssignmentViewModel = AssignmentViewModel;
assignmentsListView.Adapter = adapter;
}); |
<<<<<<<
SetupDevice();
logarithmic = System.Convert.ToBoolean(ConfigSaver.GetAppSettings("logarithmic"));
SaveLogarithmic();
=======
_workerDispatcher.Invoke(SetupDevice);
>>>>>>>
_workerDispatcher.Invoke(SetupDevice);
logarithmic = System.Convert.ToBoolean(ConfigSaver.GetAppSettings("logarithmic"));
SaveLogarithmic(); |
<<<<<<<
IEnumerator Start()
{
while (true)
{
while (m_loadQueue.First == null)
yield return null;
m_currentHandle = m_loadQueue.First.Value;
m_loadQueue.RemoveFirst();
m_currentHandle.Start();
while (m_currentHandle != null && m_currentHandle.MoveNext())
{
yield return null;
}
}
}
public Handle LoadAsset(AddressableHLODController controller, string address, int priority, float distance)
=======
public Handle LoadAsset(AddressableController controller, string address, int priority, float distance)
>>>>>>>
public Handle LoadAsset(AddressableHLODController controller, string address, int priority, float distance) |
<<<<<<<
var parameterName =
elementAttribute?.ElementName ??
info.GetCustomAttribute<MessageParameterAttribute>()?.Name ??
info.ParameterType.GetCustomAttribute<MessageContractAttribute>()?.WrapperName ??
info.Name;
var parameterNs = elementAttribute?.Namespace;
var dataContractAttribute = info.ParameterType.GetCustomAttribute<DataContractAttribute>();
if (dataContractAttribute != null && dataContractAttribute.IsNamespaceSetExplicitly)
{
parameterNs = dataContractAttribute.Namespace;
}
return new SoapMethodParameterInfo(info, index, parameterName, parameterNs);
=======
var arrayAttribute = info.GetCustomAttribute<XmlArrayAttribute>();
var arrayItemAttribute = info.GetCustomAttribute<XmlArrayItemAttribute>();
var parameterName = elementAttribute?.ElementName
?? arrayAttribute?.ElementName
?? info.GetCustomAttribute<MessageParameterAttribute>()?.Name
?? info.ParameterType.GetCustomAttribute<MessageContractAttribute>()?.WrapperName
?? info.Name;
var arrayName = arrayAttribute?.ElementName;
var arrayItemName = arrayItemAttribute?.ElementName;
var parameterNs = elementAttribute?.Form == XmlSchemaForm.Unqualified
? string.Empty
: elementAttribute?.Namespace
?? arrayAttribute?.Namespace
?? contract.Namespace;
return new SoapMethodParameterInfo(info, index, parameterName, arrayName, arrayItemName, parameterNs);
>>>>>>>
var arrayAttribute = info.GetCustomAttribute<XmlArrayAttribute>();
var arrayItemAttribute = info.GetCustomAttribute<XmlArrayItemAttribute>();
var parameterName = elementAttribute?.ElementName
?? arrayAttribute?.ElementName
?? info.GetCustomAttribute<MessageParameterAttribute>()?.Name
?? info.ParameterType.GetCustomAttribute<MessageContractAttribute>()?.WrapperName
?? info.Name;
var arrayName = arrayAttribute?.ElementName;
var arrayItemName = arrayItemAttribute?.ElementName;
var parameterNs = elementAttribute?.Form == XmlSchemaForm.Unqualified
? string.Empty
: elementAttribute?.Namespace
?? arrayAttribute?.Namespace
?? contract.Namespace;
var dataContractAttribute = info.ParameterType.GetCustomAttribute<DataContractAttribute>();
if (dataContractAttribute != null && dataContractAttribute.IsNamespaceSetExplicitly)
{
parameterNs = dataContractAttribute.Namespace;
}
return new SoapMethodParameterInfo(info, index, parameterName, arrayName, arrayItemName, parameterNs); |
<<<<<<<
public static bool Exists(PCIDevice pciDevice)
{
return GetDevice((VendorID)pciDevice.VendorID, (DeviceID)pciDevice.DeviceID) != null;
}
public static bool Exists(VendorID aVendorID, DeviceID aDeviceID)
{
return GetDevice(aVendorID, aDeviceID) != null;
}
=======
/// <summary>
/// Get device.
/// </summary>
/// <param name="aVendorID">A vendor ID.</param>
/// <param name="aDeviceID">A device ID.</param>
/// <returns></returns>
>>>>>>>
public static bool Exists(PCIDevice pciDevice)
{
return GetDevice((VendorID)pciDevice.VendorID, (DeviceID)pciDevice.DeviceID) != null;
}
public static bool Exists(VendorID aVendorID, DeviceID aDeviceID)
{
return GetDevice(aVendorID, aDeviceID) != null;
}
/// <summary>
/// Get device.
/// </summary>
/// <param name="aVendorID">A vendor ID.</param>
/// <param name="aDeviceID">A device ID.</param>
/// <returns></returns> |
<<<<<<<
[DefaultValue(Operator.or)]
[ExcelConfig(Description = "Use ball operator between IV and CP ", Position = 634)]
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 63)]
public Operator UseBallOperator { get; set; }
=======
/*Favorite CP*/
[ExcelConfig(Description = "Set min CP for auto favorite pokemon", Position = 64)]
[DefaultValue(0)]
[Range(0, 9999)]
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 64)]
public float FavoriteMinCp { get; set; }
>>>>>>>
[DefaultValue(Operator.or)]
[ExcelConfig(Description = "Use ball operator between IV and CP ", Position = 634)]
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 63)]
public Operator UseBallOperator { get; set; }
/*Favorite CP*/
[ExcelConfig(Description = "Set min CP for auto favorite pokemon", Position = 64)]
[DefaultValue(0)]
[Range(0, 9999)]
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 64)]
public float FavoriteMinCp { get; set; } |
<<<<<<<
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 48)]
public int KeepMinCp{ get; set; }
=======
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 49)]
public int KeepMinCp = 1250;
>>>>>>>
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 49)]
public int KeepMinCp{ get; set; }
<<<<<<<
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 49)]
public float KeepMinIvPercentage{ get; set; }
=======
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 50)]
public float KeepMinIvPercentage = 90;
>>>>>>>
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 50)]
public float KeepMinIvPercentage{ get; set; }
<<<<<<<
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 50)]
public int KeepMinLvl{ get; set; }
=======
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 51)]
public int KeepMinLvl = 6;
>>>>>>>
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 51)]
public int KeepMinLvl{ get; set; }
<<<<<<<
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 51)]
public string KeepMinOperator{ get; set; }
=======
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 52)]
public string KeepMinOperator = "or";
>>>>>>>
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 52)]
public string KeepMinOperator{ get; set; } |
<<<<<<<
int TotalAmountOfPokebalsToKeep { get; }
int TotalAmountOfPotionsToKeep { get; }
=======
string SnipeLocationServer { get; }
int SnipeLocationServerPort { get; }
bool UseSnipeLocationServer { get; }
bool UseTransferIVForSnipe { get; }
int MinDelayBetweenSnipes { get; }
>>>>>>>
string SnipeLocationServer { get; }
int SnipeLocationServerPort { get; }
bool UseSnipeLocationServer { get; }
bool UseTransferIVForSnipe { get; }
int MinDelayBetweenSnipes { get; }
int TotalAmountOfPokebalsToKeep { get; }
int TotalAmountOfPotionsToKeep { get; } |
<<<<<<<
using System.Threading;
=======
using System.Runtime.Caching;
>>>>>>>
using System.Threading;
using System.Runtime.Caching;
<<<<<<<
CancellationTokenSource CancellationTokenSource { get; set; }
Queue<AuthConfig> Accounts { get; }
=======
MemoryCache Cache { get; set; }
>>>>>>>
CancellationTokenSource CancellationTokenSource { get; set; }
MemoryCache Cache { get; set; }
Queue<AuthConfig> Accounts { get; }
<<<<<<<
this.accounts = new Queue<AuthConfig>();
=======
this.Cache = new MemoryCache("Necrobot2");
>>>>>>>
this.Cache = new MemoryCache("Necrobot2");
this.accounts = new Queue<AuthConfig>(); |
<<<<<<<
else
{
Logging.Logger.Write($"Using ItemRecycleFilter for pokeballs, keeping {amountOfPokeballsToKeep}", Logging.LogLevel.Info, ConsoleColor.Yellow);
}
=======
>>>>>>>
else
{
Logging.Logger.Write("Using ItemRecycleFilter for pokeballs", Logging.LogLevel.Info, ConsoleColor.Yellow);
}
<<<<<<<
else
{
Logging.Logger.Write($"Using ItemRecycleFilter for potions, keeping {amountOfPotionsToKeep}", Logging.LogLevel.Info, ConsoleColor.Yellow);
}
=======
>>>>>>>
else
{
Logging.Logger.Write("Using ItemRecycleFilter for potions", Logging.LogLevel.Info, ConsoleColor.Yellow);
}
<<<<<<<
else
{
Logging.Logger.Write($"Using ItemRecycleFilter for revives, keeping {amountOfRevivesToKeep}", Logging.LogLevel.Info, ConsoleColor.Yellow);
}
=======
>>>>>>>
else
{
Logging.Logger.Write("Using ItemRecycleFilter for revives", Logging.LogLevel.Info, ConsoleColor.Yellow);
} |
<<<<<<<
public bool EvolveAllPokemonAboveIV => UserSettings.Default.EvolveAllPokemonAboveIV;
public float EvolveAboveIVValue => UserSettings.Default.EvolveAboveIVValue;
=======
public bool PrioritizeIVOverCP => UserSettings.Default.PrioritizeIVOverCP;
>>>>>>>
public bool EvolveAllPokemonAboveIV => UserSettings.Default.EvolveAllPokemonAboveIV;
public float EvolveAboveIVValue => UserSettings.Default.EvolveAboveIVValue;
public bool PrioritizeIVOverCP => UserSettings.Default.PrioritizeIVOverCP; |
<<<<<<<
public bool AutoUpdate = false;
public string TranslationLanguageCode = "en";
public double DefaultAltitude = 10;
public double DefaultLatitude = 52.379189;
public double DefaultLongitude = 4.899431;
public int DelayBetweenPokemonCatch = 2000;
public float EvolveAboveIvValue = 95;
public bool EvolveAllPokemonAboveIv = false;
public bool EvolveAllPokemonWithEnoughCandy = false;
public string GpxFile = "GPXPath.GPX";
public int KeepMinCp = 1000;
public int KeepMinDuplicatePokemon = 1;
public float KeepMinIvPercentage = 85;
public bool KeepPokemonsThatCanEvolve = true;
public int MaxTravelDistanceInMeters = 1000;
public bool PrioritizeIvOverCp = true;
public bool TransferDuplicatePokemon = true;
public bool UseEggIncubators = true;
public bool UseGpxPathing = false;
public bool UseLuckyEggsWhileEvolving = false;
public bool UsePokemonToNotCatchFilter = false;
public double WalkingSpeedInKilometerPerHour = 50;
public int AmountOfPokemonToDisplayOnStart = 10;
public bool RenameAboveIv = false;
public int WebSocketPort = 14251;
public bool DumpPokemonStats = false;
[JsonIgnore]
internal AuthSettings Auth = new AuthSettings();
public List<KeyValuePair<ItemId, int>> ItemRecycleFilter = new List<KeyValuePair<ItemId, int>>
{
new KeyValuePair<ItemId, int>(ItemId.ItemUnknown, 0),
new KeyValuePair<ItemId, int>(ItemId.ItemPokeBall, 25),
new KeyValuePair<ItemId, int>(ItemId.ItemGreatBall, 50),
new KeyValuePair<ItemId, int>(ItemId.ItemUltraBall, 75),
new KeyValuePair<ItemId, int>(ItemId.ItemMasterBall, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemPotion, 0),
new KeyValuePair<ItemId, int>(ItemId.ItemSuperPotion, 25),
new KeyValuePair<ItemId, int>(ItemId.ItemHyperPotion, 50),
new KeyValuePair<ItemId, int>(ItemId.ItemMaxPotion, 75),
new KeyValuePair<ItemId, int>(ItemId.ItemRevive, 25),
new KeyValuePair<ItemId, int>(ItemId.ItemMaxRevive, 50),
new KeyValuePair<ItemId, int>(ItemId.ItemLuckyEgg, 200),
new KeyValuePair<ItemId, int>(ItemId.ItemIncenseOrdinary, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemIncenseSpicy, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemIncenseCool, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemIncenseFloral, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemTroyDisk, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemXAttack, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemXDefense, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemXMiracle, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemRazzBerry, 50),
new KeyValuePair<ItemId, int>(ItemId.ItemBlukBerry, 10),
new KeyValuePair<ItemId, int>(ItemId.ItemNanabBerry, 10),
new KeyValuePair<ItemId, int>(ItemId.ItemWeparBerry, 30),
new KeyValuePair<ItemId, int>(ItemId.ItemPinapBerry, 30),
new KeyValuePair<ItemId, int>(ItemId.ItemSpecialCamera, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemIncubatorBasicUnlimited, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemIncubatorBasic, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemPokemonStorageUpgrade, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemItemStorageUpgrade, 100)
};
public List<PokemonId> PokemonsToIgnore = new List<PokemonId>
{
PokemonId.Zubat,
PokemonId.Pidgey,
PokemonId.Rattata
};
public List<PokemonId> PokemonsNotToTransfer = new List<PokemonId>
{
PokemonId.Dragonite,
PokemonId.Charizard,
PokemonId.Zapdos,
PokemonId.Snorlax,
PokemonId.Alakazam,
PokemonId.Mew,
PokemonId.Mewtwo
};
public List<PokemonId> PokemonsToEvolve = new List<PokemonId>
{
PokemonId.Zubat,
PokemonId.Pidgey,
PokemonId.Rattata
};
=======
>>>>>>> |
<<<<<<<
NotEnoughPokeballsToSnipe,
=======
DisplayHighestMOVE1Header,
DisplayHighestMOVE2Header
>>>>>>>
NotEnoughPokeballsToSnipe,
DisplayHighestMOVE1Header,
DisplayHighestMOVE2Header
<<<<<<<
new KeyValuePair<TranslationString, string>(Common.TranslationString.NotEnoughPokeballsToSnipe, "Not enough Pokeballs to start sniping! ({0}/{1})"),
=======
new KeyValuePair<TranslationString, string>(Common.TranslationString.DisplayHighestMOVE1Header, "MOVE1"),
new KeyValuePair<TranslationString, string>(Common.TranslationString.DisplayHighestMOVE2Header, "MOVE2"),
>>>>>>>
new KeyValuePair<TranslationString, string>(Common.TranslationString.NotEnoughPokeballsToSnipe, "Not enough Pokeballs to start sniping! ({0}/{1})"),
new KeyValuePair<TranslationString, string>(Common.TranslationString.DisplayHighestMOVE1Header, "MOVE1"),
new KeyValuePair<TranslationString, string>(Common.TranslationString.DisplayHighestMOVE2Header, "MOVE2"), |
<<<<<<<
private readonly IScriptEngine scriptEngine;
=======
readonly ILog log;
private readonly CombinedScriptEngine scriptEngine;
>>>>>>>
readonly ILog log;
private readonly IScriptEngine scriptEngine;
<<<<<<<
public DeployAzureServiceFabricAppCommand(IScriptEngine scriptEngine, ICertificateStore certificateStore, IVariables variables, ICommandLineRunner commandLineRunner)
=======
public DeployAzureServiceFabricAppCommand(ILog log, CombinedScriptEngine scriptEngine, ICertificateStore certificateStore, IVariables variables, ICommandLineRunner commandLineRunner)
>>>>>>>
public DeployAzureServiceFabricAppCommand(ILog log, IScriptEngine scriptEngine, ICertificateStore certificateStore, IVariables variables, ICommandLineRunner commandLineRunner) |
<<<<<<<
public PlanTerraformConvention(ILog log, ICalamariFileSystem fileSystem, string extraParameter = "") : base(log, fileSystem)
=======
public PlanTerraformConvention(ICalamariFileSystem fileSystem, ICommandLineRunner commandLineRunner, string extraParameter = "") : base(fileSystem)
>>>>>>>
public PlanTerraformConvention(ILog log, ICalamariFileSystem fileSystem, ICommandLineRunner commandLineRunner, string extraParameter = "") : base(log, fileSystem)
<<<<<<<
using (var cli = new TerraformCliExecutor(Log, fileSystem, deployment, environmentVariables))
=======
using (var cli = new TerraformCliExecutor(fileSystem, commandLineRunner, deployment, environmentVariables))
>>>>>>>
using (var cli = new TerraformCliExecutor(Log, fileSystem, commandLineRunner, deployment, environmentVariables)) |
<<<<<<<
var runner = new CommandLineRunner(new LogWrapper(), new CalamariVariables());
return new DockerImagePackageDownloader(new ScriptEngine(Enumerable.Empty<IScriptWrapper>()), CalamariPhysicalFileSystem.GetPhysicalFileSystem(), runner, new CalamariVariables());
=======
var runner = new CommandLineRunner(ConsoleLog.Instance, new CalamariVariables());
return new DockerImagePackageDownloader(new CombinedScriptEngine(Enumerable.Empty<IScriptWrapper>()), CalamariPhysicalFileSystem.GetPhysicalFileSystem(), runner, new CalamariVariables());
>>>>>>>
var runner = new CommandLineRunner(ConsoleLog.Instance, new CalamariVariables());
return new DockerImagePackageDownloader(new ScriptEngine(Enumerable.Empty<IScriptWrapper>()), CalamariPhysicalFileSystem.GetPhysicalFileSystem(), runner, new CalamariVariables()); |
<<<<<<<
var configurationTransformer = ConfigurationTransformer.FromVariables(variables, log);
var transformFileLocator = new TransformFileLocator(fileSystem, log);
var replacer = new ConfigurationVariablesReplacer(variables, log);
var jsonVariableReplacer = new StructuredConfigVariableReplacer(new JsonFormatVariableReplacer(fileSystem, log), new YamlFormatVariableReplacer(), log);
=======
var configurationTransformer = ConfigurationTransformer.FromVariables(variables);
var transformFileLocator = new TransformFileLocator(fileSystem);
var replacer = new ConfigurationVariablesReplacer(variables.GetFlag(SpecialVariables.Package.IgnoreVariableReplacementErrors));
var structuredConfigVariableReplacer = new StructuredConfigVariableReplacer(
new JsonFormatVariableReplacer(fileSystem),
new YamlFormatVariableReplacer());
var structuredConfigVariablesService = new StructuredConfigVariablesService(structuredConfigVariableReplacer, fileSystem, log);
>>>>>>>
var configurationTransformer = ConfigurationTransformer.FromVariables(variables, log);
var transformFileLocator = new TransformFileLocator(fileSystem, log);
var replacer = new ConfigurationVariablesReplacer(variables, log);
var structuredConfigVariableReplacer = new StructuredConfigVariableReplacer(new JsonFormatVariableReplacer(fileSystem, log), new YamlFormatVariableReplacer(), log);
var structuredConfigVariablesService = new StructuredConfigVariablesService(structuredConfigVariableReplacer, fileSystem, log); |
<<<<<<<
private static string[] GetSourceExtensions(RunningDeployment deployment, List<XmlConfigTransformDefinition> transformDefinitions)
{
var extensions = new HashSet<string>();
if (deployment.Variables.GetFlag(SpecialVariables.Package.AutomaticallyRunConfigurationTransformationFiles))
{
extensions.Add("*.config");
}
extensions.AddRange(transformDefinitions
.Where(transform => transform.Advanced)
.Select(transform => "*" + Path.GetExtension(transform.SourcePattern))
.Distinct());
return extensions.ToArray();
}
void LogFailedTransforms(IEnumerable<XmlConfigTransformDefinition> configTransform)
{
foreach (var transform in configTransform.Select(trans => trans.ToString()).Distinct())
{
Log.VerboseFormat("The transform pattern \"{0}\" was not performed due to a missing file or overlapping rule.", transform);
}
}
void ApplyTransformations(string sourceFile, XmlConfigTransformDefinition transformation, Dictionary<string, XmlConfigTransformDefinition> alreadyRun)
=======
void ApplyTransformations(string sourceFile, XmlConfigTransformDefinition transformation, ISet<string> alreadyRun)
>>>>>>>
void ApplyTransformations(string sourceFile, XmlConfigTransformDefinition transformation,
ISet<string> transformFilesApplied, ICollection<XmlConfigTransformDefinition> transformDefinitionsApplied)
<<<<<<<
private static string GetRelativePathToTransformFile(string sourceFile, string transformFile)
{
return transformFile
.Replace(Path.GetDirectoryName(sourceFile) ?? string.Empty, "")
.TrimStart(Path.DirectorySeparatorChar);
}
=======
>>>>>>> |
<<<<<<<
this.displayTimeoutWarning = Observable.Merge(this.LocalViewModel.TimeoutWarning, this.YoutubeViewModel.TimeoutWarning, this.DirectYoutubeViewModel.TimeoutWarning, this.SoundCloudViewModel.TimeoutWarning)
.SelectMany(x => new[] { true, false }.ToObservable())
.ToProperty(this, x => x.DisplayTimeoutWarning);
this.showPlaylistTimeout = this.WhenAnyValue(x => x.IsAdmin)
.CombineLatest(this.WhenAnyValue(x => x.SettingsViewModel.EnablePlaylistTimeout), (isAdmin, enableTimeout) => !isAdmin && enableTimeout)
.ToProperty(this, x => x.ShowPlaylistTimeout);
this.MuteCommand = ReactiveCommand.Create(this.WhenAnyValue(x => x.IsAdmin));
=======
this.MuteCommand = new ReactiveCommand(this.WhenAnyValue(x => x.IsAdmin));
>>>>>>>
this.MuteCommand = ReactiveCommand.Create(this.WhenAnyValue(x => x.IsAdmin));
<<<<<<<
public bool DisplayTimeoutWarning
{
get { return this.displayTimeoutWarning.Value; }
}
public ReactiveCommand<object> EditPlaylistNameCommand { get; private set; }
=======
public IReactiveCommand EditPlaylistNameCommand { get; private set; }
>>>>>>>
public ReactiveCommand<object> EditPlaylistNameCommand { get; private set; }
<<<<<<<
public TimeSpan RemainingPlaylistTimeout
{
get { return this.library.RemainingPlaylistTimeout; }
}
public ReactiveCommand<object> RemovePlaylistCommand { get; private set; }
=======
public IReactiveCommand RemovePlaylistCommand { get; private set; }
>>>>>>>
public ReactiveCommand<object> RemovePlaylistCommand { get; private set; }
<<<<<<<
public bool ShowPlaylistTimeout
{
get { return this.showPlaylistTimeout.Value; }
}
public ReactiveCommand<object> ShowSettingsCommand { get; private set; }
=======
public IReactiveCommand ShowSettingsCommand { get; private set; }
>>>>>>>
public ReactiveCommand<object> ShowSettingsCommand { get; private set; } |
<<<<<<<
using (var cli = new TerraformCliExecutor(fileSystem, deployment, environmentVariables))
=======
using (var cli = new TerraformCLIExecutor(fileSystem, commandLineRunner, deployment, environmentVariables))
>>>>>>>
using (var cli = new TerraformCliExecutor(fileSystem, commandLineRunner, deployment, environmentVariables)) |
<<<<<<<
var variables = new VariableDictionary(variablesFile);
var configurationTransformer = new ConfigurationTransformer(variables.GetFlag(SpecialVariables.Package.IgnoreConfigTransformationErrors));
=======
var substituter = new FileSubstituter();
var configurationTransformer = new ConfigurationTransformer();
var embeddedResources = new ExecutingAssemblyEmbeddedResources();
var iis = new InternetInformationServer();
var commandLineRunner = new CommandLineRunner( new SplitCommandOutput( new ConsoleCommandOutput(), new ServiceMessageCommandOutput(variables)));
>>>>>>>
var configurationTransformer = new ConfigurationTransformer(variables.GetFlag(SpecialVariables.Package.IgnoreConfigTransformationErrors));
var substituter = new FileSubstituter();
var embeddedResources = new ExecutingAssemblyEmbeddedResources();
var iis = new InternetInformationServer();
var commandLineRunner = new CommandLineRunner( new SplitCommandOutput( new ConsoleCommandOutput(), new ServiceMessageCommandOutput(variables))); |
<<<<<<<
=======
public event LogDelegate Warning;
private readonly bool suppressWarnings;
private string stdOutMode;
private readonly IndentedTextWriter stdOut;
private readonly IndentedTextWriter stdErr;
public VerboseTransformLogger(bool suppressWarnings = false)
{
this.suppressWarnings = suppressWarnings;
stdOut = new IndentedTextWriter(Console.Out, " ");
stdErr = new IndentedTextWriter(Console.Error, " ");
}
>>>>>>>
public event LogDelegate Warning;
readonly bool _suppressWarnings;
public VerboseTransformLogger(bool suppressWarnings = false)
{
_suppressWarnings = suppressWarnings;
}
<<<<<<<
Log.WarnFormat(message, messageArgs);
=======
if (Warning != null) { Warning(this, new ErrorDelegateArgs(string.Format(message, messageArgs))); }
EnsureStdOutMode(suppressWarnings ? "verbose" : "warning");
stdOut.WriteLine(message, messageArgs);
>>>>>>>
if (_suppressWarnings)
{
Log.Info(message, messageArgs);
}
else
{
Log.WarnFormat(message, messageArgs);
}
<<<<<<<
Log.WarnFormat("File {0}: ", file);
Log.WarnFormat(message, messageArgs);
=======
if (Warning != null) { Warning(this, new ErrorDelegateArgs(string.Format("{0}: {1}", file, string.Format(message, messageArgs)))); }
EnsureStdOutMode(suppressWarnings ? "verbose" : "warning");
stdOut.Write("File {0}: ", file);
stdOut.WriteLine(message, messageArgs);
>>>>>>>
if (_suppressWarnings)
{
Log.Info("File {0}: ", file);
Log.Info(message, messageArgs);
}
else
{
Log.WarnFormat("File {0}: ", file);
Log.WarnFormat(message, messageArgs);
}
<<<<<<<
Log.WarnFormat("File {0}, line {1}, position {2}: ", file, lineNumber, linePosition);
Log.WarnFormat(message, messageArgs);
=======
if (Warning != null) { Warning(this, new ErrorDelegateArgs(string.Format("{0}({1},{2}): {3}", file, lineNumber, linePosition, string.Format(message, messageArgs)))); }
EnsureStdOutMode(suppressWarnings ? "verbose" : "warning");
stdOut.Write("File {0}, line {1}, position {2}: ", file, lineNumber, linePosition);
stdOut.WriteLine(message, messageArgs);
>>>>>>>
if (_suppressWarnings)
{
Log.Info("File {0}, line {1}, position {2}: ", file, lineNumber, linePosition);
Log.Info(message, messageArgs);
}
else
{
Log.WarnFormat("File {0}, line {1}, position {2}: ", file, lineNumber, linePosition);
Log.WarnFormat(message, messageArgs);
}
<<<<<<<
=======
void EnsureStdOutMode(string mode)
{
if (stdOutMode != mode)
stdOut.WriteLine("##octopus[stdout-" + mode + "]");
stdOutMode = mode;
}
>>>>>>> |
<<<<<<<
var extractor = new GenericPackageExtractorFactory(log).CreateStandardGenericPackageExtractor();
=======
>>>>>>> |
<<<<<<<
public DeployAzureCloudServiceCommand(ILog log, CombinedScriptEngine scriptEngine, IVariables variables)
=======
public DeployAzureCloudServiceCommand(CombinedScriptEngine scriptEngine, IVariables variables, ICommandLineRunner commandLineRunner)
>>>>>>>
public DeployAzureCloudServiceCommand(ILog log, CombinedScriptEngine scriptEngine, IVariables variables, ICommandLineRunner commandLineRunner)
<<<<<<<
var commandLineRunner = new CommandLineRunner(new SplitCommandOutput(new ConsoleCommandOutput(), new ServiceMessageCommandOutput(variables)));
var azurePackageUploader = new AzurePackageUploader(log);
=======
var azurePackageUploader = new AzurePackageUploader();
>>>>>>>
var azurePackageUploader = new AzurePackageUploader(log); |
<<<<<<<
var embeddedResources = new ExecutingAssemblyEmbeddedResources();
=======
var iis = new InternetInformationServer();
>>>>>>>
var embeddedResources = new ExecutingAssemblyEmbeddedResources();
var iis = new InternetInformationServer();
<<<<<<<
new FeatureScriptConvention("AfterPreDeploy", fileSystem, embeddedResources, scriptEngine, commandLineRunner),
new DeletePackageFileConvention(),
new SubstituteInFilesConvention(),
=======
new SubstituteInFilesConvention(fileSystem, substituter),
>>>>>>>
new FeatureScriptConvention("AfterPreDeploy", fileSystem, embeddedResources, scriptEngine, commandLineRunner),
new SubstituteInFilesConvention(fileSystem, substituter),
<<<<<<<
new FeatureScriptConvention("AfterDeploy", fileSystem, embeddedResources, scriptEngine, commandLineRunner),
new LegacyIisWebSiteConvention(),
=======
new LegacyIisWebSiteConvention(fileSystem, iis),
>>>>>>>
new FeatureScriptConvention("AfterDeploy", fileSystem, embeddedResources, scriptEngine, commandLineRunner),
new LegacyIisWebSiteConvention(fileSystem, iis), |
<<<<<<<
const string StagingDirectory = "c:\\applications\\acme\\1.0.0";
ProxyLog logs;
=======
>>>>>>>
ProxyLog logs;
<<<<<<<
deployment = new RunningDeployment("C:\\packages", variables);
logs = new ProxyLog();
}
[TearDown]
public void TearDown()
{
logs.Dispose();
=======
deployment = new RunningDeployment(deployDirectory, variables);
>>>>>>>
deployment = new RunningDeployment(deployDirectory, variables);
logs = new ProxyLog();
}
[TearDown]
public void TearDown()
{
logs.Dispose();
<<<<<<<
configurationTransformer.Received().PerformTransform(webConfig, specificTransform, webConfig);
logs.AssertDoesNotContain("The transform pattern \"web.Foo.config => web.config\" was not performed due to a missing file or overlapping rule.");
=======
AssertTransformRun("foo.config", "foo.bar.config");
>>>>>>>
AssertTransformRun("foo.config", "foo.bar.config");
}
[Test]
public void ShouldLogErrorIfUnableToFindFile()
{
variables.Set(SpecialVariables.Package.AdditionalXmlConfigurationTransforms, "foo.missing.config => foo.config");
CreateConvention().Install(deployment);
logs.AssertContains("The transform pattern \"foo.missing.config => foo.config\" was not performed due to a missing file or overlapping rule.");
<<<<<<<
configurationTransformer.Received().PerformTransform(sourceFile, expectedAppliedTransform, sourceFile);
logs.AssertDoesNotContain("The transform pattern");
=======
AssertTransformRun(sourceFile, expectedAppliedTransform);
configurationTransformer.ReceivedWithAnyArgs(1).PerformTransform("", "", ""); // Only Called Once
>>>>>>>
AssertTransformRun(sourceFile, expectedAppliedTransform);
configurationTransformer.ReceivedWithAnyArgs(1).PerformTransform("", "", ""); // Only Called Once
<<<<<<<
configurationTransformer.DidNotReceive().PerformTransform(webConfig, specificTransform, webConfig);
logs.AssertContains("The transform pattern \"config\\*.Foo.config => web.config\" was not performed due to a missing file or overlapping rule.");
=======
AssertTransformRun("bar.blah", "foo.bar.blah");
AssertTransformRun("bar.blah", "xyz.bar.blah");
configurationTransformer.ReceivedWithAnyArgs(2).PerformTransform("", "", "");
>>>>>>>
AssertTransformRun("bar.blah", "foo.bar.blah");
AssertTransformRun("bar.blah", "xyz.bar.blah");
configurationTransformer.ReceivedWithAnyArgs(2).PerformTransform("", "", "");
<<<<<<<
return transformFile
.Replace(Path.GetDirectoryName(sourceFile) ?? string.Empty, "")
.TrimStart(Path.DirectorySeparatorChar);
=======
configurationTransformer.DidNotReceive().PerformTransform(BuildConfigPath(configFile), BuildConfigPath(transformFile), BuildConfigPath(configFile));
>>>>>>>
configurationTransformer.DidNotReceive().PerformTransform(BuildConfigPath(configFile), BuildConfigPath(transformFile), BuildConfigPath(configFile)); |
<<<<<<<
readonly ICalamariFileSystem fileSystem;
readonly RunningDeployment deployment;
readonly IVariables variables;
=======
private readonly ICalamariFileSystem fileSystem;
readonly ICommandLineRunner commandLineRunner;
private readonly RunningDeployment deployment;
>>>>>>>
readonly ICalamariFileSystem fileSystem;
readonly ICommandLineRunner commandLineRunner;
readonly RunningDeployment deployment;
readonly IVariables variables;
<<<<<<<
Dictionary<string, string> defaultEnvironmentVariables;
readonly string templateDirectory;
readonly string logPath;
public TerraformCliExecutor(ICalamariFileSystem fileSystem, RunningDeployment deployment,
Dictionary<string, string> environmentVariables)
=======
private Dictionary<string, string> defaultEnvironmentVariables;
private readonly string logPath;
readonly string crashLogPath;
public TerraformCLIExecutor(
ICalamariFileSystem fileSystem,
ICommandLineRunner commandLineRunner,
RunningDeployment deployment,
Dictionary<string, string> environmentVariables
)
>>>>>>>
Dictionary<string, string> defaultEnvironmentVariables;
readonly string templateDirectory;
readonly string logPath;
public TerraformCliExecutor(
ICalamariFileSystem fileSystem,
ICommandLineRunner commandLineRunner,
RunningDeployment deployment,
Dictionary<string, string> environmentVariables
)
<<<<<<<
var terraformExecutable = variables.Get(TerraformSpecialVariables.Action.Terraform.CustomTerraformExecutable) ??
$"terraform{(CalamariEnvironment.IsRunningOnWindows ? ".exe" : String.Empty)}";
var commandLineInvocation = new CommandLineInvocation(terraformExecutable,
arguments, templateDirectory, environmentVar);
var commandOutput = new CaptureOutput(output ?? new ConsoleCommandOutput());
var cmd = new CommandLineRunner(commandOutput);
=======
var captureOutput = new CaptureInvocationOutputSink();
var commandLineInvocation = new CommandLineInvocation(TerraformExecutable, arguments)
{
WorkingDirectory = TemplateDirectory,
EnvironmentVars = environmentVar,
OutputToLog = outputToCalamariConsole,
AdditionalInvocationOutputSink = captureOutput
};
>>>>>>>
var terraformExecutable = variables.Get(TerraformSpecialVariables.Action.Terraform.CustomTerraformExecutable) ??
$"terraform{(CalamariEnvironment.IsRunningOnWindows ? ".exe" : String.Empty)}";
var captureOutput = new CaptureInvocationOutputSink();
var commandLineInvocation = new CommandLineInvocation(terraformExecutable, arguments)
{
WorkingDirectory = templateDirectory,
EnvironmentVars = environmentVar,
OutputToLog = outputToCalamariConsole,
AdditionalInvocationOutputSink = captureOutput
};
<<<<<<<
var commandResult = cmd.Execute(commandLineInvocation);
result = String.Join("\n", commandOutput.Infos);
=======
var commandResult = commandLineRunner.Execute(commandLineInvocation);
result = String.Join("\n", captureOutput.Infos);
>>>>>>>
var commandResult = commandLineRunner.Execute(commandLineInvocation);
result = String.Join("\n", captureOutput.Infos);
<<<<<<<
$"init -no-color -get-plugins={allowPluginDownloads.ToString().ToLower()} {initParams}", out _).VerifySuccess();
=======
new[] {$"init -no-color -get-plugins={AllowPluginDownloads.ToString().ToLower()} {InitParams}"}, out _, true).VerifySuccess();
>>>>>>>
new[] {$"init -no-color -get-plugins={allowPluginDownloads.ToString().ToLower()} {initParams}"}, out _, true).VerifySuccess();
<<<<<<<
ExecuteCommandInternal("workspace list", out var results).VerifySuccess();
=======
ExecuteCommandInternal(new[] {"workspace list"}, out var results, true).VerifySuccess();
>>>>>>>
ExecuteCommandInternal(new[] {"workspace list"}, out var results, true).VerifySuccess();
<<<<<<<
ExecuteCommandInternal($"workspace select \"{workspace}\"", out _).VerifySuccess();
=======
ExecuteCommandInternal(new[] {$"workspace select \"{Workspace}\""}, out _, true).VerifySuccess();
>>>>>>>
ExecuteCommandInternal(new[] {$"workspace select \"{workspace}\""}, out _, true).VerifySuccess();
<<<<<<<
ExecuteCommandInternal($"workspace new \"{workspace}\"", out _).VerifySuccess();
=======
ExecuteCommandInternal(new[] {$"workspace new \"{Workspace}\""}, out _, true).VerifySuccess();
>>>>>>>
ExecuteCommandInternal(new[] {$"workspace new \"{workspace}\""}, out _, true).VerifySuccess();
<<<<<<<
readonly ICommandOutput decorated;
public CaptureOutput(ICommandOutput decorated)
{
this.decorated = decorated;
}
=======
>>>>>>> |
<<<<<<<
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Calamari.Commands.Support;
=======
using Calamari.Commands.Support;
>>>>>>>
using System.Collections.Generic;
using Calamari.Commands.Support;
<<<<<<<
Options.Add("variables=", "Path to a JSON file containing variables.", v => variablesFile = Path.GetFullPath(v));
Options.Add("base64Variables=", "JSON string containing variables.", v => base64Variables = v);
Options.Add("package=", "Path to the package to extract that contains the script.", v => packageFile = Path.GetFullPath(v));
Options.Add("script=", "Path to the script to execute. If --package is used, it can be a script inside the package.", v => scriptFile = Path.GetFullPath(v));
Options.Add("scriptParameters=", "Parameters to pass to the script.", v => scriptParameters = v);
Options.Add("sensitiveVariables=", "Password protected JSON file containing sensitive-variables.", v => sensitiveVariablesFile = v);
Options.Add("sensitiveVariablesPassword=", "Password used to decrypt sensitive-variables.", v => sensitiveVariablesPassword = v);
Options.Add("substituteVariables", "Perform variable substitution on the script body before executing it.", v => substituteVariables = true);
=======
Options.Add("package=", "Path to the package to extract that contains the package.", v => packageFile = Path.GetFullPath(v));
Options.Add("script=", $"Path to the script to execute. If --package is used, it can be a script inside the package.", v => scriptFileArg = v);
Options.Add("scriptParameters=", $"Parameters to pass to the script.", v => scriptParametersArg = v);
VariableDictionaryUtils.PopulateOptions(Options);
this.variables = variables;
this.scriptEngine = scriptEngine;
>>>>>>>
Options.Add("package=", "Path to the package to extract that contains the script.", v => packageFile = Path.GetFullPath(v));
Options.Add("script=", $"Path to the script to execute. If --package is used, it can be a script inside the package.", v => scriptFileArg = v);
Options.Add("scriptParameters=", $"Parameters to pass to the script.", v => scriptParametersArg = v);
VariableDictionaryUtils.PopulateOptions(Options);
this.variables = variables;
this.scriptEngine = scriptEngine;
<<<<<<<
ExtractPackage(variables);
GrabAdditionalPackages(variables, filesystem);
SubstituteVariablesInScript(variables);
return InvokeScript(variables);
=======
ValidateArguments();
var scriptFilePath = DetermineScriptFilePath(variables);
if (WasProvided(packageFile))
{
return ExecuteScriptFromPackage(scriptFilePath);
}
var scriptBody = variables.Get(SpecialVariables.Action.Script.ScriptBody);
if (WasProvided(scriptBody))
{
return ExecuteScriptFromVariables(scriptFilePath, scriptBody);
}
if (WasProvided(scriptFileArg))
{
// Fallback for old argument usage. Use the file path provided by the calamari arguments
// Variable substitution will not take place since we dont want to modify the file provided
return ExecuteScriptFromParameters();
}
throw new CommandException("No script details provided.\r\n" +
$"Pleave provide the script either via the `{SpecialVariables.Action.Script.ScriptBody}` variable, " +
"through a package provided via the `--package` argument or directly via the `--script` argument.");
>>>>>>>
ValidateArguments();
var scriptFilePath = DetermineScriptFilePath(variables);
GrabAdditionalPackages(variables, filesystem);
if (WasProvided(packageFile))
{
return ExecuteScriptFromPackage(scriptFilePath);
}
var scriptBody = variables.Get(SpecialVariables.Action.Script.ScriptBody);
if (WasProvided(scriptBody))
{
return ExecuteScriptFromVariables(scriptFilePath, scriptBody);
}
if (WasProvided(scriptFileArg))
{
// Fallback for old argument usage. Use the file path provided by the calamari arguments
// Variable substitution will not take place since we dont want to modify the file provided
return ExecuteScriptFromParameters();
}
throw new CommandException("No script details provided.\r\n" +
$"Pleave provide the script either via the `{SpecialVariables.Action.Script.ScriptBody}` variable, " +
"through a package provided via the `--package` argument or directly via the `--script` argument."); |
<<<<<<<
public TarGzipPackageExtractor(ILog log) : base(log)
{
}
public override string[] Extensions { get { return new[] { ".tgz", ".tar.gz", ".tar.Z" }; } }
=======
public override string[] Extensions => new[] {".tgz", ".tar.gz", ".tar.Z"};
>>>>>>>
public TarGzipPackageExtractor(ILog log) : base(log)
{
}
public override string[] Extensions => new[] {".tgz", ".tar.gz", ".tar.Z"}; |
<<<<<<<
public ApplyTerraformConvention(ILog log, ICalamariFileSystem fileSystem) : base(log, fileSystem)
=======
readonly ICommandLineRunner commandLineRunner;
public ApplyTerraformConvention(ICalamariFileSystem fileSystem, ICommandLineRunner commandLineRunner) : base(fileSystem)
>>>>>>>
readonly ICommandLineRunner commandLineRunner;
public ApplyTerraformConvention(ILog log, ICalamariFileSystem fileSystem, ICommandLineRunner commandLineRunner) : base(log, fileSystem)
<<<<<<<
using (var cli = new TerraformCliExecutor(Log, fileSystem, deployment, environmentVariables))
=======
using (var cli = new TerraformCliExecutor(fileSystem, commandLineRunner, deployment, environmentVariables))
>>>>>>>
using (var cli = new TerraformCliExecutor(Log, fileSystem, commandLineRunner, deployment, environmentVariables)) |
<<<<<<<
using (var cli = new TerraformCliExecutor(fileSystem, deployment, environmentVariables))
=======
using (var cli = new TerraformCLIExecutor(fileSystem, commandLineRunner, deployment, environmentVariables))
>>>>>>>
using (var cli = new TerraformCliExecutor(fileSystem, commandLineRunner, deployment, environmentVariables)) |
<<<<<<<
void ApplyTransformations(string sourceFile, XmlConfigTransformDefinition transformation,
ISet<string> transformFilesApplied, ICollection<XmlConfigTransformDefinition> transformDefinitionsApplied)
=======
void ApplyTransformations(string sourceFile, XmlConfigTransformDefinition transformation, ISet<Tuple<string, string>> alreadyRun)
>>>>>>>
void ApplyTransformations(string sourceFile, XmlConfigTransformDefinition transformation,
ISet<Tuple<string, string>> transformFilesApplied, ICollection<XmlConfigTransformDefinition> transformDefinitionsApplied)
<<<<<<<
if (transformFilesApplied.Contains(transformFile))
=======
var transformFiles = new Tuple<string, string>(transformFile, sourceFile);
if (alreadyRun.Contains(transformFiles))
>>>>>>>
var transformFiles = new Tuple<string, string>(transformFile, sourceFile);
if (transformFilesApplied.Contains(transformFiles))
<<<<<<<
transformFilesApplied.Add(transformFile);
transformDefinitionsApplied.Add(transformation);
=======
alreadyRun.Add(transformFiles);
>>>>>>>
transformFilesApplied.Add(transformFiles);
transformDefinitionsApplied.Add(transformation); |
<<<<<<<
Task<CustomerBasket> GetBasketAsync(string customerId);
Task<CustomerBasket> UpdateBasketAsync(CustomerBasket basket);
Task<bool> DeleteBasketAsync(string id);
=======
Task<CustomerBasket> GetBasket(string customerId);
Task<IEnumerable<string>> GetUsers();
Task<CustomerBasket> UpdateBasket(CustomerBasket basket);
Task<bool> DeleteBasket(string id);
>>>>>>>
Task<CustomerBasket> GetBasketAsync(string customerId);
Task<IEnumerable<string>> GetUsers();
Task<CustomerBasket> UpdateBasketAsync(CustomerBasket basket);
Task<bool> DeleteBasketAsync(string id); |
<<<<<<<
using System.Data.SqlClient;
using System.IO;
=======
using System.Data.Common;
>>>>>>>
using System.Data.SqlClient;
using System.IO;
using System.Data.Common; |
<<<<<<<
private readonly Mock<IBuyerRepository> _buyerRepositoryMock;
private readonly Mock<IOrderRepository> _orderRepositoryMock;
=======
private readonly Mock<IOrderRepository<Order>> _orderRepositoryMock;
>>>>>>>
private readonly Mock<IOrderRepository> _orderRepositoryMock;
<<<<<<<
_buyerRepositoryMock = new Mock<IBuyerRepository>();
_orderRepositoryMock = new Mock<IOrderRepository>();
=======
_orderRepositoryMock = new Mock<IOrderRepository<Order>>();
>>>>>>>
_orderRepositoryMock = new Mock<IOrderRepository>(); |
<<<<<<<
.AddJsonFile($"settings.json",optional:false)
.AddEnvironmentVariables();
=======
.AddJsonFile($"settings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"settings.{env.EnvironmentName}.json", optional: true);
builder.AddEnvironmentVariables();
>>>>>>>
.AddJsonFile($"settings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"settings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables(); |
<<<<<<<
if(outlinePolygons.Count == 0)
{
return;
}
OutlinePolygons = Clipper.CleanPolygons(outlinePolygons, avoidInset / 60);
if (!stayInside)
{
var boundary = outlinePolygons.GetBounds();
boundary.Inflate(avoidInset * 4000);
OutlinePolygons = new Polygons(outlinePolygons.Count+1);
OutlinePolygons.Add(new Polygon()
{
new IntPoint(boundary.minX, boundary.minY),
new IntPoint(boundary.maxX, boundary.minY),
new IntPoint(boundary.maxX, boundary.maxY),
new IntPoint(boundary.minX, boundary.maxY),
});
foreach(var polygon in outlinePolygons)
{
var reversedPolygon = new Polygon();
for (int i = 0; i < polygon.Count; i++)
{
reversedPolygon.Add(polygon[(polygon.Count - 1) - i]);
}
OutlinePolygons.Add(reversedPolygon);
}
}
BoundaryPolygons = OutlinePolygons.Offset(-avoidInset);
=======
InsetAmount = avoidInset;
if (!stayInside)
{
var reversedPolygons = new Polygons(outlinePolygons.Count);
//make a copy with reversed winding
foreach (var polygon in outlinePolygons)
{
var reversedPolygon = new Polygon();
reversedPolygons.Add(reversedPolygon);
for (int i = 0; i < polygon.Count; i++)
{
reversedPolygon.Add(polygon[((polygon.Count - 1) - i) % polygon.Count]);
}
}
outlinePolygons = reversedPolygons;
//outlinePolygons = new Polygons(outlinePolygons);
// now and a rect round all of them
var bounds = outlinePolygons.GetBounds();
IntPoint lowerLeft = new IntPoint(bounds.minX - avoidInset * 8, bounds.minY - avoidInset * 8);
IntPoint upperRight = new IntPoint(bounds.maxX + avoidInset * 8, bounds.maxY + avoidInset * 8);
outlinePolygons.Add(new Polygon()
{
new IntPoint(lowerLeft),
new IntPoint(lowerLeft.X, upperRight.Y),
new IntPoint(upperRight),
new IntPoint(upperRight.X, lowerLeft.Y),
});
}
OutlinePolygons = outlinePolygons;
>>>>>>>
if(outlinePolygons.Count == 0)
{
return;
}
OutlinePolygons = Clipper.CleanPolygons(outlinePolygons, avoidInset / 60);
InsetAmount = avoidInset;
if (!stayInside)
{
var boundary = outlinePolygons.GetBounds();
boundary.Inflate(avoidInset * 4000);
OutlinePolygons = new Polygons(outlinePolygons.Count+1);
OutlinePolygons.Add(new Polygon()
{
new IntPoint(boundary.minX, boundary.minY),
new IntPoint(boundary.maxX, boundary.minY),
new IntPoint(boundary.maxX, boundary.maxY),
new IntPoint(boundary.minX, boundary.maxY),
});
foreach(var polygon in outlinePolygons)
{
var reversedPolygon = new Polygon();
for (int i = 0; i < polygon.Count; i++)
{
reversedPolygon.Add(polygon[(polygon.Count - 1) - i]);
}
OutlinePolygons.Add(reversedPolygon);
}
}
BoundaryPolygons = OutlinePolygons.Offset(-avoidInset);
<<<<<<<
=======
BoundaryPolygons = outlinePolygons.Offset(stayInside ? -avoidInset : -2*avoidInset);
>>>>>>> |
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled;
<<<<<<<
return instance != null && instance.IsEnabled();
=======
#if PROTOTYPE
return instance != null && !instance.isProOnly && instance.IsEnabled();
#else
return instance != null && instance.enabled;
#endif
>>>>>>>
return instance != null && instance.enabled; |
<<<<<<<
using System.Linq;
=======
using UnityEditor.ProBuilder.Actions;
>>>>>>>
using System.Linq;
using UnityEditor.ProBuilder.Actions;
<<<<<<<
=======
using UnityEditor.ShortcutManagement;
using System.Reflection;
>>>>>>>
using UnityEditor.ShortcutManagement;
using System.Reflection;
<<<<<<<
s_UseUnityColors.value =
SettingsGUILayout.SettingsToggle("Use Unity Colors", s_UseUnityColors, searchContext);
=======
s_XRayView.value = SettingsGUILayout.SettingsToggle(k_XRaySetting, s_XRayView, searchContext);
s_UseUnityColors.value = SettingsGUILayout.SettingsToggle("Use Unity Colors", s_UseUnityColors, searchContext);
>>>>>>>
s_XRayView.value = SettingsGUILayout.SettingsToggle(k_XRaySetting, s_XRayView, searchContext);
s_UseUnityColors.value = SettingsGUILayout.SettingsToggle("Use Unity Colors", s_UseUnityColors, searchContext);
<<<<<<<
s_DepthTestHandles.value =
SettingsGUILayout.SettingsToggle("Depth Test", s_DepthTestHandles, searchContext);
s_VertexPointSize.value =
SettingsGUILayout.SettingsSlider("Vertex Size", s_VertexPointSize, 1f, 10f, searchContext);
s_EdgeLineSize.value =
SettingsGUILayout.SettingsSlider("Line Size", s_EdgeLineSize, 0f, 10f, searchContext);
s_WireframeLineSize.value =
SettingsGUILayout.SettingsSlider("Wireframe Size", s_WireframeLineSize, 0f, 10f, searchContext);
=======
s_VertexPointSize.value = SettingsGUILayout.SettingsSlider("Vertex Size", s_VertexPointSize, 1f, 10f, searchContext);
s_EdgeLineSize.value = SettingsGUILayout.SettingsSlider("Line Size", s_EdgeLineSize, 0f, 10f, searchContext);
s_WireframeLineSize.value = SettingsGUILayout.SettingsSlider("Wireframe Size", s_WireframeLineSize, 0f, 10f, searchContext);
>>>>>>>
s_VertexPointSize.value = SettingsGUILayout.SettingsSlider("Vertex Size", s_VertexPointSize, 1f, 10f, searchContext);
s_EdgeLineSize.value = SettingsGUILayout.SettingsSlider("Line Size", s_EdgeLineSize, 0f, 10f, searchContext);
s_WireframeLineSize.value = SettingsGUILayout.SettingsSlider("Wireframe Size", s_WireframeLineSize, 0f, 10f, searchContext);
<<<<<<<
static void Render(Dictionary<ProBuilderMesh, MeshHandle> handles, Material material, Color color,
bool depthTest = true)
{
Render(handles, material, color, depthTest ? CompareFunction.LessEqual : CompareFunction.Always, true);
}
static void Render(Dictionary<ProBuilderMesh, MeshHandle> handles, Material material, Color color,
CompareFunction func, bool zWrite)
=======
static void Render(Dictionary<ProBuilderMesh, MeshHandle> handles, Material material, Color color, CompareFunction func, bool zWrite = false)
>>>>>>>
static void Render(Dictionary<ProBuilderMesh, MeshHandle> handles, Material material, Color color, CompareFunction func, bool zWrite = false) |
<<<<<<<
using System.IO;
=======
using System;
using System.IO;
using UnityEngine;
>>>>>>>
using System.IO;
<<<<<<<
class ProBuilderize : TemporaryAssetTest
{
[Test]
public static void CubeSurvivesRoundTrip()
{
var pb = ShapeGenerator.CreateShape(ShapeType.Cube);
try
{
var dup = new GameObject().AddComponent<ProBuilderMesh>();
var importer = new MeshImporter(dup);
importer.Import(pb.gameObject);
dup.ToMesh();
dup.Refresh();
TestUtility.AssertAreEqual(pb.mesh, dup.mesh, message: pb.name);
}
catch
{
UnityEngine.Object.DestroyImmediate(pb.gameObject);
}
}
[Test]
public static void QuadsImportWithCorrectWinding()
{
var srcPath = TestUtility.TemporarySavedAssetsDirectory + "maya-cube-quads.fbx";
// do this song and dance because AssetDatabase.LoadAssetAtPath doesn't seem to work with models in the
// Package directories
File.Copy(TestUtility.TemplatesDirectory + "MeshImporter/maya-cube-quads.fbx", srcPath);
AssetDatabase.Refresh();
var source = AssetDatabase.LoadMainAssetAtPath(srcPath);
var meshImporter = (ModelImporter) AssetImporter.GetAtPath(srcPath);
meshImporter.globalScale = 100f;
meshImporter.SaveAndReimport();
Assert.IsNotNull(source);
var instance = (GameObject) UObject.Instantiate(source);
var result = new GameObject().AddComponent<ProBuilderMesh>();
var importer = new MeshImporter(result);
Assert.IsTrue(importer.Import(instance, new MeshImportSettings()
{
quads = true,
smoothing = false,
smoothingAngle = 1f
}), "Failed importing mesh");
result.Rebuild();
// Assert.IsNotNull doesn't work with UnityObject magic
Assert.IsFalse(result.mesh == null);
=======
class ProBuilderize : TemporaryAssetTest
{
[Test]
public static void CubeSurvivesRoundTrip()
{
var pb = ShapeGenerator.GenerateCube(Vector3.one);
try
{
var dup = new GameObject().AddComponent<ProBuilderMesh>();
var importer = new MeshImporter(dup);
importer.Import(pb.gameObject);
dup.ToMesh();
dup.Refresh();
TestUtility.AssertAreEqual(pb.mesh, dup.mesh, message: pb.name);
}
catch
{
UnityEngine.Object.DestroyImmediate(pb.gameObject);
}
}
[Test]
public static void QuadsImportWithCorrectWinding()
{
var srcPath = TestUtility.TemporarySavedAssetsDirectory + "maya-cube-quads.fbx";
// do this song and dance because AssetDatabase.LoadAssetAtPath doesn't seem to work with models in the
// Package directories
File.Copy(TestUtility.TemplatesDirectory + "MeshImporter/maya-cube-quads.fbx", srcPath);
AssetDatabase.Refresh();
var source = AssetDatabase.LoadMainAssetAtPath(srcPath);
var meshImporter = (ModelImporter)AssetImporter.GetAtPath(srcPath);
meshImporter.globalScale = 100f;
meshImporter.SaveAndReimport();
Assert.IsNotNull(source);
var instance = (GameObject)UObject.Instantiate(source);
var result = new GameObject().AddComponent<ProBuilderMesh>();
var importer = new MeshImporter(result);
Assert.IsTrue(importer.Import(instance, new MeshImportSettings()
{
quads = true,
smoothing = false,
smoothingAngle = 1f
}), "Failed importing mesh");
result.Rebuild();
// Assert.IsNotNull doesn't work with UnityObject magic
Assert.IsFalse(result.mesh == null);
>>>>>>>
class ProBuilderize : TemporaryAssetTest
{
[Test]
public static void CubeSurvivesRoundTrip()
{
var pb = ShapeGenerator.CreateShape(ShapeType.Cube);
try
{
var dup = new GameObject().AddComponent<ProBuilderMesh>();
var importer = new MeshImporter(dup);
importer.Import(pb.gameObject);
dup.ToMesh();
dup.Refresh();
TestUtility.AssertAreEqual(pb.mesh, dup.mesh, message: pb.name);
}
catch
{
UnityEngine.Object.DestroyImmediate(pb.gameObject);
}
}
[Test]
public static void QuadsImportWithCorrectWinding()
{
var srcPath = TestUtility.TemporarySavedAssetsDirectory + "maya-cube-quads.fbx";
// do this song and dance because AssetDatabase.LoadAssetAtPath doesn't seem to work with models in the
// Package directories
File.Copy(TestUtility.TemplatesDirectory + "MeshImporter/maya-cube-quads.fbx", srcPath);
AssetDatabase.Refresh();
var source = AssetDatabase.LoadMainAssetAtPath(srcPath);
var meshImporter = (ModelImporter)AssetImporter.GetAtPath(srcPath);
meshImporter.globalScale = 100f;
meshImporter.SaveAndReimport();
Assert.IsNotNull(source);
var instance = (GameObject)UObject.Instantiate(source);
var result = new GameObject().AddComponent<ProBuilderMesh>();
var importer = new MeshImporter(result);
Assert.IsTrue(importer.Import(instance, new MeshImportSettings()
{
quads = true,
smoothing = false,
smoothingAngle = 1f
}), "Failed importing mesh");
result.Rebuild();
// Assert.IsNotNull doesn't work with UnityObject magic
Assert.IsFalse(result.mesh == null); |
<<<<<<<
using UnityEditor.EditorTools;
=======
>>>>>>>
using UnityEditor.EditorTools;
<<<<<<<
#if UNITY_2020_2_OR_NEWER
using EditorToolManager = UnityEditor.EditorTools.EditorToolManager;
using ToolManager = UnityEditor.EditorTools.ToolManager;
#else
using EditorToolManager = UnityEditor.EditorTools.EditorToolContext;
using ToolManager = UnityEditor.EditorTools.EditorTools;
#endif
=======
>>>>>>>
#if UNITY_2020_2_OR_NEWER
using EditorToolManager = UnityEditor.EditorTools.EditorToolManager;
using ToolManager = UnityEditor.EditorTools.ToolManager;
#else
using EditorToolManager = UnityEditor.EditorTools.EditorToolContext;
using ToolManager = UnityEditor.EditorTools.EditorTools;
#endif
<<<<<<<
#if !SHORTCUT_MANAGER
bool m_IsRightMouseDown;
#endif
=======
static Dictionary<Type, VertexManipulationTool> s_EditorTools = new Dictionary<Type, VertexManipulationTool>();
>>>>>>>
<<<<<<<
m_CurrentEvent.Use();
}
}
#else
if (m_CurrentEvent.type == EventType.MouseDown && m_CurrentEvent.button == 1)
m_IsRightMouseDown = true;
=======
>>>>>>> |
<<<<<<<
m_OppositeCorner = ray.GetPoint(distance);
var diff = m_OppositeCorner - m_Origin;
m_HeightCorner = m_OppositeCorner;
if (m_Shape != null)
m_Shape.RotateBy(ToEularAngles(diff), true);
RebuildShape();
SceneView.RepaintAll();
=======
m_IsDragging = true;
Ray ray = HandleUtility.GUIPointToWorldRay(evt.mousePosition);
float distance;
if (m_Plane.Raycast(ray, out distance))
{
m_OppositeCorner = ray.GetPoint(distance);
m_HeightCorner = m_OppositeCorner;
RebuildShape();
SceneView.RepaintAll();
}
break;
>>>>>>>
m_IsDragging = true;
Ray ray = HandleUtility.GUIPointToWorldRay(evt.mousePosition);
float distance;
if (m_Plane.Raycast(ray, out distance))
{
m_OppositeCorner = ray.GetPoint(distance);
m_HeightCorner = m_OppositeCorner;
RebuildShape();
SceneView.RepaintAll();
}
break;
var diff = m_OppositeCorner - m_Origin;
if (m_Shape != null)
m_Shape.RotateBy(ToEularAngles(diff), true);
<<<<<<<
m_Bounds.size = new Vector3(fo, height, ri);
m_Rotation = Quaternion.identity;
=======
m_Bounds.size = new Vector3(fo, height, ri);
m_Rotation = Quaternion.identity;// Quaternion.LookRotation(m_Forward, m_Plane.normal);
>>>>>>>
m_Bounds.size = new Vector3(fo, height, ri);
m_Rotation = Quaternion.identity; |
<<<<<<<
static List<Edge> s_EdgeBuffer = new List<Edge>(32);
=======
static readonly List<int> s_IndexBuffer = new List<int>(16);
>>>>>>>
static readonly List<int> s_IndexBuffer = new List<int>(16);
static List<Edge> s_EdgeBuffer = new List<Edge>(32);
<<<<<<<
if (d == bestDistance)
{
s_EdgeBuffer.Add(new Edge(x, y));
}
else if (d < bestDistance)
=======
d *= distMultiplier;
if (d < bestDistance)
>>>>>>>
d *= distMultiplier;
if (d == bestDistance)
{
s_EdgeBuffer.Add(new Edge(x, y));
}
else if (d < bestDistance) |
<<<<<<<
using UnityEditor.ShortcutManagement;
#if !UNITY_2019_1_OR_NEWER
=======
>>>>>>>
using UnityEditor.ShortcutManagement; |
<<<<<<<
sb.AppendLine( "\t\t\t{");
sb.AppendLine( "\t\t\t\tEditorUtility.ShowNotification(instance.DoAction().notification);");
sb.AppendLine( "\t\t\t\tProBuilderAnalytics.SendActionEvent(instance, ProBuilderAnalytics.TriggerType.MenuOrShortcut);");
sb.AppendLine( "\t\t\t}");
=======
sb.AppendLine( "\t\t\t\tEditorUtility.ShowNotification(instance.PerformAction().notification);");
>>>>>>>
sb.AppendLine( "\t\t\t{");
sb.AppendLine( "\t\t\t\tEditorUtility.ShowNotification(instance.PerformAction().notification);");
sb.AppendLine( "\t\t\t\tProBuilderAnalytics.SendActionEvent(instance, ProBuilderAnalytics.TriggerType.MenuOrShortcut);");
sb.AppendLine( "\t\t\t}"); |
<<<<<<<
=======
// Read from DF:
public int posXBlock = 0;
public int posYBlock = 0;
public int posXTile = 0;
public int posYTile = 0;
public int posZ = 0;
bool posZDirty = true; // Set in GetViewInfo if z changes, and reset in HideMeshes after meshes hidden.
int map_x;
int map_y;
>>>>>>>
<<<<<<<
if (!connected) return;
UpdateView ();
=======
connectionState.network_client.suspend_game();
GetViewInfo();
//PositionCamera(); //turning this off right now to test camera movement.
>>>>>>>
if (!enabled) return;
UpdateView ();
<<<<<<<
// Update the region we're requesting
void UpdateRequestRegion()
{
int posX = (view.view_pos_x + (view.view_size_x / 2)) / 16;
int posY = (view.view_pos_y + (view.view_size_y / 2)) / 16;
int posZ = view.view_pos_z + 1;
DFConnection.Instance.SetRequestRegion(
new DFCoord(
posX - rangeX,
posY - rangeY,
posZ - rangeZdown
),
new DFCoord(
posX + rangeX,
posY + rangeY,
posZ + rangeZup
));
}
void UpdateBlocks()
=======
void GetBlockList()
{
netWatch.Reset();
netWatch.Start();
posXTile = (connectionState.net_view_info.view_pos_x + (connectionState.net_view_info.view_size_x / 2));
posYTile = (connectionState.net_view_info.view_pos_y + (connectionState.net_view_info.view_size_y / 2));
posXBlock = posXTile / 16;
posYBlock = posYTile / 16;
posZ = connectionState.net_view_info.view_pos_z + 1;
connectionState.net_block_request.min_x = posXBlock - rangeX;
connectionState.net_block_request.max_x = posXBlock + rangeX;
connectionState.net_block_request.min_y = posYBlock - rangeY;
connectionState.net_block_request.max_y = posYBlock + rangeY;
connectionState.net_block_request.min_z = posZ - rangeZdown;
connectionState.net_block_request.max_z = posZ + rangeZup;
connectionState.net_block_request.blocks_needed = blocksToGet;
connectionState.BlockListCall.execute(connectionState.net_block_request, out connectionState.net_block_list);
netWatch.Stop();
}
void UseBlockList()
>>>>>>>
// Update the region we're requesting
void UpdateRequestRegion()
{
DFConnection.Instance.SetRequestRegion(
new DFCoord(
posXBlock - rangeX,
posYBlock - rangeY,
posZ - rangeZdown
),
new DFCoord(
posXBlock + rangeX,
posYBlock + rangeY,
posZ + rangeZup
));
}
void UpdateBlocks()
<<<<<<<
=======
int lastLoadedLevel = 0;
void LazyLoadBlocks()
{
lastLoadedLevel--;
if (lastLoadedLevel < 0)
lastLoadedLevel = connectionState.net_view_info.view_pos_z + 1 - rangeZdown;
posXBlock = (connectionState.net_view_info.view_pos_x + (connectionState.net_view_info.view_size_x / 2)) / 16;
posYBlock = (connectionState.net_view_info.view_pos_y + (connectionState.net_view_info.view_size_y / 2)) / 16;
connectionState.net_block_request.min_x = posXBlock - rangeX;
connectionState.net_block_request.max_x = posXBlock + rangeX;
connectionState.net_block_request.min_y = posYBlock - rangeY;
connectionState.net_block_request.max_y = posYBlock + rangeY;
connectionState.net_block_request.min_z = lastLoadedLevel;
connectionState.net_block_request.max_z = lastLoadedLevel + 1;
connectionState.BlockListCall.execute(connectionState.net_block_request, out connectionState.net_block_list);
if ((connectionState.net_block_list.map_x != map_x) || (connectionState.net_block_list.map_y != map_y))
ClearMap();
map_x = connectionState.net_block_list.map_x;
map_y = connectionState.net_block_list.map_y;
for (int i = 0; i < connectionState.net_block_list.map_blocks.Count; i++)
{
CopyTiles(connectionState.net_block_list.map_blocks[i]);
}
UpdateMeshes();
}
>>>>>>>
<<<<<<<
=======
void GetUnitList()
{
// System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
// stopwatch.Start();
connectionState.UnitListCall.execute(null, out connectionState.net_unit_list);
// stopwatch.Stop();
// Debug.Log(connectionState.net_unit_list.creature_list.Count + " units gotten, took " + stopwatch.Elapsed.Milliseconds + " ms.");
}
void GetViewInfo()
{
if (connectionState.net_view_info == null) {
connectionState.ViewInfoCall.execute (null, out connectionState.net_view_info);
} else {
int oldZ = connectionState.net_view_info.view_pos_z;
connectionState.ViewInfoCall.execute (null, out connectionState.net_view_info);
if (oldZ != connectionState.net_view_info.view_pos_z) {
posZDirty = true;
}
}
}
void PositionCamera()
{
viewCamera.transform.parent.transform.position = MapBlock.DFtoUnityCoord(posXTile, posYTile, posZ);
viewCamera.viewWidth = connectionState.net_view_info.view_size_x;
viewCamera.viewHeight = connectionState.net_view_info.view_size_y;
}
void GetMapInfo()
{
connectionState.MapInfoCall.execute(null, out connectionState.net_map_info);
}
>>>>>>> |
<<<<<<<
private ushort VBERead(VBERegisterIndex index)
{
IO.VbeIndex.Word = (ushort)index;
return IO.VbeIndex.Word;
}
public bool Available()
{
if (VBERead(VBERegisterIndex.VBEDisplayID) == 0xB0C5)
{
return true;
}
return false;
}
public void VBEDisableDisplay()
=======
private void DisableDisplay()
>>>>>>>
private ushort VBERead(VBERegisterIndex index)
{
IO.VbeIndex.Word = (ushort)index;
return IO.VbeIndex.Word;
}
public bool Available()
{
if (VBERead(VBERegisterIndex.VBEDisplayID) == 0xB0C5)
{
return true;
}
return false;
}
private void DisableDisplay() |
<<<<<<<
public void InitSSE() { } // Plugged
=======
[PlugMethod(PlugRequired = true)]
>>>>>>>
[PlugMethod(PlugRequired = true)]
public void InitSSE() { } // Plugged
[PlugMethod(PlugRequired = true)] |
<<<<<<<
static bool runningOnWindows, runningOnX11, runningOnOSX, runningOnLinux, runningOnMono;
=======
static bool runningOnWindows, runningOnX11, runningOnMacOS, runningOnLinux;
>>>>>>>
static bool runningOnWindows, runningOnX11, runningOnMacOS, runningOnLinux, runningOnMono;
<<<<<<<
#region public static bool RunningOnX11
=======
#region internal static bool RunningOnX11
>>>>>>>
#region public static bool RunningOnX11 |
<<<<<<<
Assert.IsTrue(xNumber.Equals(42), "Int32.Equals on boxed int doesn't work!");
Assert.IsFalse(xNumber.Equals(5), "Int32.Equals on boxed int doesn't work!");
=======
object xAnotherNumber = 42;
Assert.IsTrue(xNumber.Equals(42), "Int32 Equals doesn't work!");
Assert.IsTrue(Object.Equals(xNumber, xAnotherNumber), "Object.Equals doesn't work!");
>>>>>>>
Assert.IsTrue(xNumber.Equals(42), "Int32.Equals on boxed int doesn't work!");
Assert.IsFalse(xNumber.Equals(5), "Int32.Equals on boxed int doesn't work!");
object xAnotherNumber = 42;
Assert.IsTrue(Object.Equals(xNumber, xAnotherNumber), "Object.Equals doesn't work!"); |
<<<<<<<
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using DotLiquid.Exceptions;
using DotLiquid.Util;
namespace DotLiquid
{
/// <summary>
/// Holds variables. Variables are only loaded "just in time"
/// and are not evaluated as part of the render stage
///
/// {{ monkey }}
/// {{ user.name }}
///
/// Variables can be combined with filters:
///
/// {{ user | link }}
/// </summary>
public class Variable : IRenderable
{
public static readonly string FilterParser = string.Format(R.Q(@"(?:{0}|(?:\s*(?!(?:{0}))(?:{1}|\S+)\s*)+)"), Liquid.FilterSeparator, Liquid.QuotedFragment);
public List<Filter> Filters { get; set; }
public string Name { get; set; }
private readonly string _markup;
public Variable(string markup)
{
_markup = markup;
Name = null;
Filters = new List<Filter>();
Match match = Regex.Match(markup, string.Format(R.Q(@"\s*({0})(.*)"), Liquid.QuotedAssignFragment));
if (match.Success)
{
Name = match.Groups[1].Value;
Match filterMatch = Regex.Match(match.Groups[2].Value, string.Format(R.Q(@"{0}\s*(.*)"), Liquid.FilterSeparator));
if (filterMatch.Success)
{
foreach (string f in R.Scan(filterMatch.Value, FilterParser))
{
Match filterNameMatch = Regex.Match(f, R.Q(@"\s*(\w+)"));
if (filterNameMatch.Success)
{
string filterName = filterNameMatch.Groups[1].Value;
List<string> filterArgs = R.Scan(f, string.Format(R.Q(@"(?:{0}|{1})\s*({2})"), Liquid.FilterArgumentSeparator, Liquid.ArgumentSeparator, Liquid.QuotedFragment));
Filters.Add(new Filter(filterName, filterArgs.ToArray()));
}
}
}
}
}
public void Render(Context context, TextWriter result)
{
object output = RenderInternal(context);
if (output is ILiquidizable)
output = null;
if (output != null)
{
var transformer = Template.GetValueTypeTransformer(output.GetType());
if(transformer != null)
output = transformer(output);
string outputString;
//treating Strings as IEnumerable, and was joining Chars in loop
if (output is string)
outputString = (string)output;
else if (output is IEnumerable)
#if NET35
outputString = string.Join(string.Empty, ((IEnumerable)output).Cast<object>().Select(o => o.ToString()).ToArray());
#else
outputString = string.Join(string.Empty, ((IEnumerable)output).Cast<object>());
#endif
else if (output is bool)
outputString = output.ToString().ToLower();
else
outputString = output.ToString();
result.Write(outputString);
}
}
private object RenderInternal(Context context)
{
if (Name == null)
return null;
object output = context[Name];
Filters.ToList().ForEach(filter =>
{
List<object> filterArgs = filter.Arguments.Select(a => context[a]).ToList();
try
{
filterArgs.Insert(0, output);
output = context.Invoke(filter.Name, filterArgs);
}
catch (FilterNotFoundException ex)
{
throw new FilterNotFoundException(string.Format(Liquid.ResourceManager.GetString("VariableFilterNotFoundException"), filter.Name, _markup.Trim()), ex);
}
});
if (output is IValueTypeConvertible)
output = ((IValueTypeConvertible) output).ConvertToValueType();
return output;
}
/// <summary>
/// Primarily intended for testing.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
internal object Render(Context context)
{
return RenderInternal(context);
}
public class Filter
{
public Filter(string name, string[] arguments)
{
Name = name;
Arguments = arguments;
}
public string Name { get; set; }
public string[] Arguments { get; set; }
}
}
}
=======
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using DotLiquid.Exceptions;
using DotLiquid.Util;
namespace DotLiquid
{
/// <summary>
/// Holds variables. Variables are only loaded "just in time"
/// and are not evaluated as part of the render stage
///
/// {{ monkey }}
/// {{ user.name }}
///
/// Variables can be combined with filters:
///
/// {{ user | link }}
/// </summary>
public class Variable : IRenderable
{
private static readonly Regex FilterParserRegex = R.B(R.Q(@"(?:{0}|(?:\s*(?!(?:{0}))(?:{1}|\S+)\s*)+)"), Liquid.FilterSeparator, Liquid.QuotedFragment);
private static readonly Regex FilterArgRegex = R.B(R.Q(@"(?:{0}|{1})\s*({2})"), Liquid.FilterArgumentSeparator, Liquid.ArgumentSeparator, Liquid.QuotedFragment);
private static readonly Regex QuotedAssignFragmentRegex = R.B(R.Q(@"\s*({0})(.*)"), Liquid.QuotedAssignFragment);
private static readonly Regex FilterSeparatorRegex = R.B(R.Q(@"{0}\s*(.*)"), Liquid.FilterSeparator);
private static readonly Regex FilterNameRegex = R.B(R.Q(@"\s*(\w+)"));
public List<Filter> Filters { get; set; }
public string Name { get; set; }
private readonly string _markup;
public Variable(string markup)
{
_markup = markup;
Name = null;
Filters = new List<Filter>();
Match match = QuotedAssignFragmentRegex.Match(markup);
if (match.Success)
{
Name = match.Groups[1].Value;
Match filterMatch = FilterSeparatorRegex.Match(match.Groups[2].Value);
if (filterMatch.Success)
{
foreach (string f in R.Scan(filterMatch.Value, FilterParserRegex))
{
Match filterNameMatch = FilterNameRegex.Match(f);
if (filterNameMatch.Success)
{
string filterName = filterNameMatch.Groups[1].Value;
List<string> filterArgs = R.Scan(f, FilterArgRegex);
Filters.Add(new Filter(filterName, filterArgs.ToArray()));
}
}
}
}
}
public void Render(Context context, TextWriter result)
{
object output = RenderInternal(context);
if (output is ILiquidizable)
output = null;
if (output != null)
{
var transformer = Template.GetValueTypeTransformer(output.GetType());
if(transformer != null)
output = transformer(output);
string outputString;
if (output is IEnumerable)
#if NET35
outputString = string.Join(string.Empty, ((IEnumerable)output).Cast<object>().Select(o => o.ToString()).ToArray());
#else
outputString = string.Join(string.Empty, ((IEnumerable)output).Cast<object>());
#endif
else if (output is bool)
outputString = output.ToString().ToLower();
else
outputString = output.ToString();
result.Write(outputString);
}
}
private object RenderInternal(Context context)
{
if (Name == null)
return null;
object output = context[Name];
Filters.ToList().ForEach(filter =>
{
List<object> filterArgs = filter.Arguments.Select(a => context[a]).ToList();
try
{
filterArgs.Insert(0, output);
output = context.Invoke(filter.Name, filterArgs);
}
catch (FilterNotFoundException ex)
{
throw new FilterNotFoundException(string.Format(Liquid.ResourceManager.GetString("VariableFilterNotFoundException"), filter.Name, _markup.Trim()), ex);
}
});
if (output is IValueTypeConvertible)
output = ((IValueTypeConvertible) output).ConvertToValueType();
return output;
}
/// <summary>
/// Primarily intended for testing.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
internal object Render(Context context)
{
return RenderInternal(context);
}
public class Filter
{
public Filter(string name, string[] arguments)
{
Name = name;
Arguments = arguments;
}
public string Name { get; set; }
public string[] Arguments { get; set; }
}
}
}
>>>>>>>
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using DotLiquid.Exceptions;
using DotLiquid.Util;
namespace DotLiquid
{
/// <summary>
/// Holds variables. Variables are only loaded "just in time"
/// and are not evaluated as part of the render stage
///
/// {{ monkey }}
/// {{ user.name }}
///
/// Variables can be combined with filters:
///
/// {{ user | link }}
/// </summary>
public class Variable : IRenderable
{
private static readonly Regex FilterParserRegex = R.B(R.Q(@"(?:{0}|(?:\s*(?!(?:{0}))(?:{1}|\S+)\s*)+)"), Liquid.FilterSeparator, Liquid.QuotedFragment);
private static readonly Regex FilterArgRegex = R.B(R.Q(@"(?:{0}|{1})\s*({2})"), Liquid.FilterArgumentSeparator, Liquid.ArgumentSeparator, Liquid.QuotedFragment);
private static readonly Regex QuotedAssignFragmentRegex = R.B(R.Q(@"\s*({0})(.*)"), Liquid.QuotedAssignFragment);
private static readonly Regex FilterSeparatorRegex = R.B(R.Q(@"{0}\s*(.*)"), Liquid.FilterSeparator);
private static readonly Regex FilterNameRegex = R.B(R.Q(@"\s*(\w+)"));
public List<Filter> Filters { get; set; }
public string Name { get; set; }
private readonly string _markup;
public Variable(string markup)
{
_markup = markup;
Name = null;
Filters = new List<Filter>();
Match match = QuotedAssignFragmentRegex.Match(markup);
if (match.Success)
{
Name = match.Groups[1].Value;
Match filterMatch = FilterSeparatorRegex.Match(match.Groups[2].Value);
if (filterMatch.Success)
{
foreach (string f in R.Scan(filterMatch.Value, FilterParserRegex))
{
Match filterNameMatch = FilterNameRegex.Match(f);
if (filterNameMatch.Success)
{
string filterName = filterNameMatch.Groups[1].Value;
List<string> filterArgs = R.Scan(f, FilterArgRegex);
Filters.Add(new Filter(filterName, filterArgs.ToArray()));
}
}
}
}
}
public void Render(Context context, TextWriter result)
{
object output = RenderInternal(context);
if (output is ILiquidizable)
output = null;
if (output != null)
{
var transformer = Template.GetValueTypeTransformer(output.GetType());
if(transformer != null)
output = transformer(output);
string outputString;
//treating Strings as IEnumerable, and was joining Chars in loop
if (output is string)
outputString = (string)output;
else if (output is IEnumerable)
#if NET35
outputString = string.Join(string.Empty, ((IEnumerable)output).Cast<object>().Select(o => o.ToString()).ToArray());
#else
outputString = string.Join(string.Empty, ((IEnumerable)output).Cast<object>());
#endif
else if (output is bool)
outputString = output.ToString().ToLower();
else
outputString = output.ToString();
result.Write(outputString);
}
}
private object RenderInternal(Context context)
{
if (Name == null)
return null;
object output = context[Name];
Filters.ToList().ForEach(filter =>
{
List<object> filterArgs = filter.Arguments.Select(a => context[a]).ToList();
try
{
filterArgs.Insert(0, output);
output = context.Invoke(filter.Name, filterArgs);
}
catch (FilterNotFoundException ex)
{
throw new FilterNotFoundException(string.Format(Liquid.ResourceManager.GetString("VariableFilterNotFoundException"), filter.Name, _markup.Trim()), ex);
}
});
if (output is IValueTypeConvertible)
output = ((IValueTypeConvertible) output).ConvertToValueType();
return output;
}
/// <summary>
/// Primarily intended for testing.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
internal object Render(Context context)
{
return RenderInternal(context);
}
public class Filter
{
public Filter(string name, string[] arguments)
{
Name = name;
Arguments = arguments;
}
public string Name { get; set; }
public string[] Arguments { get; set; }
}
}
} |
<<<<<<<
//while asset is being created, path can't be determined, which throws an exception when setting up the filters
if(string.IsNullOrEmpty(AssetDatabase.GetAssetPath(m_Profile)))
return;
#if UNITY_2019_1_OR_NEWER
Rect viewRect = new Rect( 18, 0, EditorGUIUtility.currentViewWidth-23, EditorGUIUtility.singleLineHeight );
#else
Rect viewRect = EditorGUILayout.GetControlRect( false );
#endif
=======
Rect viewRect = GUILayoutUtility.GetRect( EditorGUIUtility.currentViewWidth-23, 0 );
>>>>>>>
//while asset is being created, path can't be determined, which throws an exception when setting up the filters
if(string.IsNullOrEmpty(AssetDatabase.GetAssetPath(m_Profile)))
return;
Rect viewRect = GUILayoutUtility.GetRect( EditorGUIUtility.currentViewWidth-23, 0 ); |
<<<<<<<
Decimal,
=======
Image,
>>>>>>>
Decimal,
Image, |
<<<<<<<
Log(_options.Exchange.Name, _options.Exchange.Type);
channel.ExchangeDeclare(_options.Exchange.Name, _options.Exchange.Type, _options.Exchange.Durable,
_options.Exchange.AutoDelete);
}
=======
if (_options.Exchange?.Declare == true)
{
Log(_options.Exchange.Name, _options.Exchange.Type);
channel.ExchangeDeclare(_options.Exchange.Name, _options.Exchange.Type, _options.Exchange.Durable,
_options.Exchange.AutoDelete);
if (_options.DeadLetter?.Declare == true)
{
channel.ExchangeDeclare($"{_options.Exchange.Name}{_options.DeadLetter.Prefix}", ExchangeType.Fanout, _options.Exchange.Durable,
_options.Exchange.AutoDelete);
}
}
>>>>>>>
Log(_options.Exchange.Name, _options.Exchange.Type);
channel.ExchangeDeclare(_options.Exchange.Name, _options.Exchange.Type, _options.Exchange.Durable,
_options.Exchange.AutoDelete);
if (_options.DeadLetter?.Declare == true)
{
channel.ExchangeDeclare($"{_options.Exchange.Name}{_options.DeadLetter.Prefix}",
ExchangeType.Fanout, _options.Exchange.Durable,
_options.Exchange.AutoDelete);
}
} |
<<<<<<<
var properties = _channel.CreateBasicProperties();
properties.Persistent = _persistMessages;
=======
var properties = channel.CreateBasicProperties();
>>>>>>>
var properties = channel.CreateBasicProperties();
properties.Persistent = _persistMessages; |
<<<<<<<
#if !CF
=======
#if !READ_ONLY
#if !CF
>>>>>>>
#if !READ_ONLY
#if !CF
<<<<<<<
#endif
=======
#endif
>>>>>>>
#endif
<<<<<<<
return ReadModule (stream, "", parameters);
}
static ModuleDefinition ReadModule (Stream stream, string fileName, ReaderParameters parameters)
{
CheckStream (stream);
=======
Mixin.CheckStream (stream);
>>>>>>>
return ReadModule (stream, "", parameters);
}
static ModuleDefinition ReadModule (Stream stream, string fileName, ReaderParameters parameters)
{
Mixin.CheckStream (stream); |
<<<<<<<
#if !SILVERLIGHT && !CF && !NET_CORE
=======
#if !PCL
>>>>>>>
#if !PCL && !NET_CORE
<<<<<<<
#if !SILVERLIGHT && !CF && !NET_CORE
=======
#if !PCL
>>>>>>>
#if !PCL && !NET_CORE |
<<<<<<<
#if !SILVERLIGHT && !READ_ONLY && !NET_CORE
=======
>>>>>>> |
<<<<<<<
Interlocked.CompareExchange (ref assembly_resolver, new AssemblyResolver (), null);
=======
Interlocked.CompareExchange (ref assembly_resolver, new DefaultAssemblyResolver (), null);
#endif
>>>>>>>
Interlocked.CompareExchange (ref assembly_resolver, new AssemblyResolver (), null);
#endif
<<<<<<<
var stream = GetFileStream (fileName, FileMode.Open, FileAccess.Read, FileShare.Read) as Stream;
if (parameters.InMemory) {
var memory = new MemoryStream (stream.CanSeek ? (int) stream.Length : 0);
using (stream)
stream.CopyTo (memory);
memory.Position = 0;
stream = memory;
}
return ReadModule (stream, fileName, parameters);
=======
if (stream == null)
throw new ArgumentNullException ("stream");
>>>>>>>
if (stream == null)
throw new ArgumentNullException ("stream"); |
<<<<<<<
using (var module = ModuleDefinition.CreateModule ("foo", ModuleKind.Dll)) {
var method = module.Import (generic.GetMethod ("Method"));
Assert.AreEqual ("T Mono.Cecil.Tests.ImportCecilTests/Generic`1::Method(T)", method.FullName);
}
=======
var module = ModuleDefinition.CreateModule ("foo", ModuleKind.Dll);
var method = module.ImportReference (generic.GetMethod ("Method"));
Assert.AreEqual ("T Mono.Cecil.Tests.ImportCecilTests/Generic`1::Method(T)", method.FullName);
>>>>>>>
using (var module = ModuleDefinition.CreateModule ("foo", ModuleKind.Dll)) {
var method = module.ImportReference (generic.GetMethod ("Method"));
Assert.AreEqual ("T Mono.Cecil.Tests.ImportCecilTests/Generic`1::Method(T)", method.FullName);
} |
<<<<<<<
this.assembly_resolver = new AssemblyResolver ();
=======
>>>>>>>
<<<<<<<
this.fq_name = image.Stream.GetFullyQualifiedName ();
=======
this.characteristics = image.Characteristics;
this.fq_name = image.FileName;
>>>>>>>
this.characteristics = image.Characteristics;
this.fq_name = image.Stream.GetFullyQualifiedName ();
<<<<<<<
public void Dispose ()
{
if (Image != null)
Image.Dispose ();
if (SymbolReader != null)
SymbolReader.Dispose ();
}
public bool HasTypeReference (string fullName)
=======
public bool HasTypeReference (string fullName)
>>>>>>>
public void Dispose ()
{
if (Image != null)
Image.Dispose ();
if (SymbolReader != null)
SymbolReader.Dispose ();
}
public bool HasTypeReference (string fullName) |
<<<<<<<
public async Task TestAndAndOrParenthesized()
=======
public async Task TestOrAndEqualsParenthesized()
{
var testCode = @"public class Foo
{
public void Bar()
{
bool x = true || (false == true);
}
}";
await VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None);
}
[TestMethod]
public async Task TestAndAndEquals()
{
var testCode = @"public class Foo
{
public void Bar()
{
bool x = true && false == true;
}
}";
await VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None);
}
[TestMethod]
public async Task TesAndAndOrParenthesized()
>>>>>>>
public async Task TestOrAndEqualsParenthesized()
{
var testCode = @"public class Foo
{
public void Bar()
{
bool x = true || (false == true);
}
}";
await VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None);
}
[TestMethod]
public async Task TestAndAndEquals()
{
var testCode = @"public class Foo
{
public void Bar()
{
bool x = true && false == true;
}
}";
await VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None);
}
[TestMethod]
public async Task TestAndAndOrParenthesized() |
<<<<<<<
context.RegisterCodeFix(CodeAction.Create("Fix spacing", t => GetTransformedDocument(context.Document, diagnostic, t)), diagnostic);
=======
SyntaxToken token = root.FindToken(diagnostic.Location.SourceSpan.Start);
if (!token.IsKind(SyntaxKind.SemicolonToken))
continue;
context.RegisterCodeFix(CodeAction.Create("Fix spacing", t => GetTransformedDocumentAsync(context.Document, root, token)), diagnostic);
>>>>>>>
context.RegisterCodeFix(CodeAction.Create("Fix spacing", t => GetTransformedDocumentAsync(context.Document, diagnostic, t)), diagnostic);
<<<<<<<
private static async Task<Document> GetTransformedDocument(Document document, Diagnostic diagnostic, CancellationToken cancellationToken)
=======
private static Task<Document> GetTransformedDocumentAsync(Document document, SyntaxNode root, SyntaxToken token)
>>>>>>>
private static async Task<Document> GetTransformedDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) |
<<<<<<<
/// <summary>
/// Verifies that attribute list with multiple attributes for (generic) parameters will not produce diagnostics.
/// Regression test for #1882
/// </summary>
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
[Fact]
public async Task VerifyAttributeListForParametersAsync()
{
var testCode = @"using System;
internal class TestClass
{
internal T TestMethod<[Foo, Bar]T>([Bar, Foo] int value)
{
return default(T);
}
}
internal class FooAttribute : Attribute
{
}
internal class BarAttribute : Attribute
{
}
";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
}
=======
/// <summary>
/// Regression test for issue 1879 (SA1133CodeFixProvider does only half the work), https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1879
/// </summary>
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
[Fact]
public async Task TestFixAllAsync()
{
var testCode = @"
namespace Stylecop_rc1_bug_repro
{
class Foo
{
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo1{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo2{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo3 { get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo4{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo5{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo6{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo7{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo8{ get; set; }
}
}
public class CanBeNullAttribute : System.Attribute { }
public class UsedImplicitly : System.Attribute
{
public UsedImplicitly (ImplicitUseKindFlags flags) { }
}
public enum ImplicitUseKindFlags { Assign }
";
var fixedTestCode = @"
namespace Stylecop_rc1_bug_repro
{
class Foo
{
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo1{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo2{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo3 { get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo4{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo5{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo6{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo7{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo8{ get; set; }
}
}
public class CanBeNullAttribute : System.Attribute { }
public class UsedImplicitly : System.Attribute
{
public UsedImplicitly (ImplicitUseKindFlags flags) { }
}
public enum ImplicitUseKindFlags { Assign }
";
DiagnosticResult[] expected =
{
this.CSharpDiagnostic().WithLocation(6, 21),
this.CSharpDiagnostic().WithLocation(9, 21),
this.CSharpDiagnostic().WithLocation(12, 21),
this.CSharpDiagnostic().WithLocation(15, 21),
this.CSharpDiagnostic().WithLocation(18, 21),
this.CSharpDiagnostic().WithLocation(21, 21),
this.CSharpDiagnostic().WithLocation(24, 21),
this.CSharpDiagnostic().WithLocation(27, 21)
};
await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(fixedTestCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpFixAsync(testCode, fixedTestCode).ConfigureAwait(false);
await this.VerifyCSharpFixAllFixAsync(testCode, fixedTestCode, maxNumberOfIterations: 1).ConfigureAwait(false);
}
>>>>>>>
/// <summary>
/// Verifies that attribute list with multiple attributes for (generic) parameters will not produce diagnostics.
/// Regression test for #1882
/// </summary>
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
[Fact]
public async Task VerifyAttributeListForParametersAsync()
{
var testCode = @"using System;
internal class TestClass
{
internal T TestMethod<[Foo, Bar]T>([Bar, Foo] int value)
{
return default(T);
}
}
internal class FooAttribute : Attribute
{
}
internal class BarAttribute : Attribute
{
}
";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
}
/// <summary>
/// Regression test for issue 1879 (SA1133CodeFixProvider does only half the work), https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1879
/// </summary>
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
[Fact]
public async Task TestFixAllAsync()
{
var testCode = @"
namespace Stylecop_rc1_bug_repro
{
class Foo
{
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo1{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo2{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo3 { get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo4{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo5{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo6{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo7{ get; set; }
[CanBeNull, UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo8{ get; set; }
}
}
public class CanBeNullAttribute : System.Attribute { }
public class UsedImplicitly : System.Attribute
{
public UsedImplicitly (ImplicitUseKindFlags flags) { }
}
public enum ImplicitUseKindFlags { Assign }
";
var fixedTestCode = @"
namespace Stylecop_rc1_bug_repro
{
class Foo
{
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo1{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo2{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo3 { get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo4{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo5{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo6{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo7{ get; set; }
[CanBeNull]
[UsedImplicitly(ImplicitUseKindFlags.Assign)]
public string Foo8{ get; set; }
}
}
public class CanBeNullAttribute : System.Attribute { }
public class UsedImplicitly : System.Attribute
{
public UsedImplicitly (ImplicitUseKindFlags flags) { }
}
public enum ImplicitUseKindFlags { Assign }
";
DiagnosticResult[] expected =
{
this.CSharpDiagnostic().WithLocation(6, 21),
this.CSharpDiagnostic().WithLocation(9, 21),
this.CSharpDiagnostic().WithLocation(12, 21),
this.CSharpDiagnostic().WithLocation(15, 21),
this.CSharpDiagnostic().WithLocation(18, 21),
this.CSharpDiagnostic().WithLocation(21, 21),
this.CSharpDiagnostic().WithLocation(24, 21),
this.CSharpDiagnostic().WithLocation(27, 21)
};
await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(fixedTestCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpFixAsync(testCode, fixedTestCode).ConfigureAwait(false);
await this.VerifyCSharpFixAllFixAsync(testCode, fixedTestCode, maxNumberOfIterations: 1).ConfigureAwait(false);
} |
<<<<<<<
context.RegisterCodeFix(CodeAction.Create("Fix spacing", t => GetTransformedDocument(context.Document, root, trivia)), diagnostic);
=======
context.RegisterCodeFix(CodeAction.Create("Insert space", t => GetTransformedDocumentAsync(context.Document, root, trivia)), diagnostic);
>>>>>>>
context.RegisterCodeFix(CodeAction.Create("Fix spacing", t => GetTransformedDocumentAsync(context.Document, root, trivia)), diagnostic); |
<<<<<<<
SA1006PreprocessorKeywordsMustNotBePrecededBySpace.DiagnosticId,
=======
SA1002SemicolonsMustBeSpacedCorrectly.DiagnosticId,
>>>>>>>
SA1002SemicolonsMustBeSpacedCorrectly.DiagnosticId,
SA1006PreprocessorKeywordsMustNotBePrecededBySpace.DiagnosticId, |
<<<<<<<
public async Task TestClassWithDocumentation()
{
await this.TestTypeWithSummaryDocumentation("class");
}
[Fact]
public async Task TestStructWithDocumentation()
{
await this.TestTypeWithSummaryDocumentation("struct");
}
[Fact]
public async Task TestInterfaceWithDocumentation()
{
await this.TestTypeWithSummaryDocumentation("interface");
}
[Fact]
public async Task TestClassWithContentDocumentation()
{
await this.TestTypeWithContentDocumentation("class");
}
[Fact]
public async Task TestStructWithContentDocumentation()
{
await this.TestTypeWithContentDocumentation("struct");
}
[Fact]
public async Task TestInterfaceWithContentDocumentation()
{
await this.TestTypeWithContentDocumentation("interface");
}
[Fact]
public async Task TestClassWithInheritedDocumentation()
{
await this.TestTypeWithInheritedDocumentation("class");
}
[Fact]
public async Task TestStructWithInheritedDocumentation()
{
await this.TestTypeWithInheritedDocumentation("struct");
}
[Fact]
public async Task TestInterfaceWithInheritedDocumentation()
{
await this.TestTypeWithInheritedDocumentation("interface");
}
[Fact]
public async Task TestClassWithoutDocumentation()
{
await this.TestTypeWithoutDocumentation("class");
}
[Fact]
public async Task TestStructWithoutDocumentation()
{
await this.TestTypeWithoutDocumentation("struct");
}
[Fact]
public async Task TestInterfaceWithoutDocumentation()
{
await this.TestTypeWithoutDocumentation("interface");
}
[Fact]
public async Task TestClassNoDocumentation()
{
await this.TestTypeNoDocumentation("class");
}
[Fact]
public async Task TestStructNoDocumentation()
{
await this.TestTypeNoDocumentation("struct");
}
[Fact]
public async Task TestInterfaceNoDocumentation()
{
await this.TestTypeNoDocumentation("interface");
}
[Fact]
=======
>>>>>>> |
<<<<<<<
=======
public async Task TestEnumWithDocumentation()
{
await this.TestTypeWithDocumentation("enum").ConfigureAwait(false);
}
[Fact]
public async Task TestClassWithDocumentation()
{
await this.TestTypeWithDocumentation("class").ConfigureAwait(false);
}
[Fact]
public async Task TestStructWithDocumentation()
{
await this.TestTypeWithDocumentation("struct").ConfigureAwait(false);
}
[Fact]
public async Task TestInterfaceWithDocumentation()
{
await this.TestTypeWithDocumentation("interface").ConfigureAwait(false);
}
[Fact]
public async Task TestEnumWithInheritedDocumentation()
{
await this.TestTypeWithInheritedDocumentation("enum").ConfigureAwait(false);
}
[Fact]
public async Task TestClassWithInheritedDocumentation()
{
await this.TestTypeWithInheritedDocumentation("class").ConfigureAwait(false);
}
[Fact]
public async Task TestStructWithInheritedDocumentation()
{
await this.TestTypeWithInheritedDocumentation("struct").ConfigureAwait(false);
}
[Fact]
public async Task TestInterfaceWithInheritedDocumentation()
{
await this.TestTypeWithInheritedDocumentation("interface").ConfigureAwait(false);
}
[Fact]
public async Task TestEnumWithoutDocumentation()
{
await this.TestTypeWithoutDocumentation("enum").ConfigureAwait(false);
}
[Fact]
public async Task TestClassWithoutDocumentation()
{
await this.TestTypeWithoutDocumentation("class").ConfigureAwait(false);
}
[Fact]
public async Task TestStructWithoutDocumentation()
{
await this.TestTypeWithoutDocumentation("struct").ConfigureAwait(false);
}
[Fact]
public async Task TestInterfaceWithoutDocumentation()
{
await this.TestTypeWithoutDocumentation("interface").ConfigureAwait(false);
}
[Fact]
public async Task TestEnumNoDocumentation()
{
await this.TestTypeNoDocumentation("enum").ConfigureAwait(false);
}
[Fact]
public async Task TestClassNoDocumentation()
{
await this.TestTypeNoDocumentation("class").ConfigureAwait(false);
}
[Fact]
public async Task TestStructNoDocumentation()
{
await this.TestTypeNoDocumentation("struct").ConfigureAwait(false);
}
[Fact]
public async Task TestInterfaceNoDocumentation()
{
await this.TestTypeNoDocumentation("interface").ConfigureAwait(false);
}
[Fact]
>>>>>>>
<<<<<<<
public delegate
void TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None);
=======
public delegate
TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
public delegate
void TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
public delegate
void TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None);
=======
public delegate
TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
public delegate
void TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
public delegate
void TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None);
=======
public delegate
TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
public delegate
void TypeName();";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); |
<<<<<<<
DiagnosticResult[] expected =
{
new DiagnosticResult
{
Id = "CS0029",
Message = "Cannot implicitly convert type 'int' to 'string'",
Severity = DiagnosticSeverity.Error,
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 4, 28) }
}
};
await this.TestConstantMessage_Field_Pass("3", expected);
=======
await this.TestConstantMessage_Field_Pass("3").ConfigureAwait(false);
>>>>>>>
DiagnosticResult[] expected =
{
new DiagnosticResult
{
Id = "CS0029",
Message = "Cannot implicitly convert type 'int' to 'string'",
Severity = DiagnosticSeverity.Error,
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 4, 28) }
}
};
await this.TestConstantMessage_Field_Pass("3", expected).ConfigureAwait(false);
<<<<<<<
DiagnosticResult[] expected =
{
new DiagnosticResult
{
Id = "CS0029",
Message = "Cannot implicitly convert type 'int' to 'string'",
Severity = DiagnosticSeverity.Error,
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 6, 32) }
}
};
await this.TestConstantMessage_Local_Pass("3", expected);
=======
await this.TestConstantMessage_Local_Pass("3").ConfigureAwait(false);
>>>>>>>
DiagnosticResult[] expected =
{
new DiagnosticResult
{
Id = "CS0029",
Message = "Cannot implicitly convert type 'int' to 'string'",
Severity = DiagnosticSeverity.Error,
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 6, 32) }
}
};
await this.TestConstantMessage_Local_Pass("3", expected).ConfigureAwait(false);
<<<<<<<
DiagnosticResult[] expected =
{
new DiagnosticResult
{
Id = "CS1503",
Message = $"Argument {1 + this.InitialArguments.Count()}: cannot convert from 'int' to 'string'",
Severity = DiagnosticSeverity.Error,
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 6, 16 + this.MethodName.Length + this.InitialArguments.Sum(i => i.Length + ", ".Length)) }
}
};
await this.TestConstantMessage_Inline_Pass("3", expected);
=======
await this.TestConstantMessage_Inline_Pass("3").ConfigureAwait(false);
>>>>>>>
DiagnosticResult[] expected =
{
new DiagnosticResult
{
Id = "CS1503",
Message = $"Argument {1 + this.InitialArguments.Count()}: cannot convert from 'int' to 'string'",
Severity = DiagnosticSeverity.Error,
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 6, 16 + this.MethodName.Length + this.InitialArguments.Sum(i => i.Length + ", ".Length)) }
}
};
await this.TestConstantMessage_Inline_Pass("3", expected).ConfigureAwait(false);
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), expected, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), expected, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), expected, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), expected, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), expected, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(this.BuildTestCode(testCodeFormat), argument), expected, CancellationToken.None).ConfigureAwait(false); |
<<<<<<<
UpdateReplaceMap(replaceMap, token, t => t.WithLeadingTrivia().WithTrailingTrivia(trailingTrivia));
=======
nextToken = token.GetNextToken();
if (nextToken.IsKind(SyntaxKind.SemicolonToken))
{
// make the semicolon 'sticky'
replaceMap[token] = token.WithLeadingTrivia().WithTrailingTrivia();
replaceMap[nextToken] = nextToken.WithLeadingTrivia().WithTrailingTrivia(trailingTrivia.WithoutTrailingWhitespace());
}
else
{
replaceMap[token] = token.WithLeadingTrivia().WithTrailingTrivia(trailingTrivia);
}
>>>>>>>
nextToken = token.GetNextToken();
if (nextToken.IsKind(SyntaxKind.SemicolonToken))
{
// make the semicolon 'sticky'
UpdateReplaceMap(replaceMap, token, t => t.WithLeadingTrivia().WithTrailingTrivia());
UpdateReplaceMap(replaceMap, nextToken, t => t.WithLeadingTrivia().WithTrailingTrivia(trailingTrivia.WithoutTrailingWhitespace()));
}
else
{
UpdateReplaceMap(replaceMap, token, t => t.WithLeadingTrivia().WithTrailingTrivia(trailingTrivia));
}
<<<<<<<
UpdateReplaceMap(replaceMap, token, t => t.WithTrailingTrivia(t.TrailingTrivia.Insert(0, SyntaxFactory.Space)));
=======
// If the token is already present in the map and it has trailing trivia, then it has already been
// processed during an earlier step in the fix all process, so no additional processing is needed.
if (!replaceMap.ContainsKey(token) || (replaceMap[token].TrailingTrivia.Count == 0))
{
replaceMap[token] = token.WithTrailingTrivia(token.TrailingTrivia.Insert(0, SyntaxFactory.Space));
}
>>>>>>>
// If the token is already present in the map and it has trailing trivia, then it has already been
// processed during an earlier step in the fix all process, so no additional processing is needed.
if (!replaceMap.ContainsKey(token) || (replaceMap[token].TrailingTrivia.Count == 0))
{
UpdateReplaceMap(replaceMap, token, t => t.WithTrailingTrivia(t.TrailingTrivia.Insert(0, SyntaxFactory.Space)));
} |
<<<<<<<
yield return new[] { pair.Item1, pair.Item2 };
yield return new[] { pair.Item1, "System." + pair.Item2 };
yield return new[] { pair.Item1, "global::System." + pair.Item2 };
=======
await func(item.Item1, item.Item2).ConfigureAwait(false);
await func(item.Item1, "System." + item.Item2).ConfigureAwait(false);
await func(item.Item1, "global::System." + item.Item2).ConfigureAwait(false);
}
catch (Exception ex)
{
Assert.True(false, "Type failed: " + item.Item1 + Environment.NewLine + ex.Message);
>>>>>>>
yield return new[] { pair.Item1, pair.Item2 };
yield return new[] { pair.Item1, "System." + pair.Item2 };
yield return new[] { pair.Item1, "global::System." + pair.Item2 };
<<<<<<<
get
{
return ReferenceTypes.Concat(ValueTypes);
}
=======
await this.VerifyFixes(testSource, ReferenceTypes).ConfigureAwait(false);
>>>>>>>
get
{
return ReferenceTypes.Concat(ValueTypes);
}
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(testSource, predefined), EmptyDiagnosticResults, CancellationToken.None);
await this.VerifyCSharpDiagnosticAsync(string.Format(testSource, fullName), expected, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, predefined), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, fullName), expected, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(testSource, predefined), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testSource, fullName), expected, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
string testSource = @"namespace System {{
=======
await this.TestAllCases(this.TestDefaultDeclarationImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestDefaultDeclarationCodeFix()
{
string testSource = @"using System;
>>>>>>>
string testSource = @"namespace System {{
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyAllFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(testSource, fullName), expected, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, fullName), expected, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(testSource, fullName), expected, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(testSource, fullName), expected, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, fullName), expected, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(testSource, fullName), expected, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
string testSource = @"namespace System {{
=======
await this.TestAllCases(this.TestReturnTypeImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestReturnTypeCodeFix()
{
string testSource = @"using System;
>>>>>>>
string testSource = @"namespace System {{
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyAllFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
[Theory]
[MemberData(nameof(ValueTypes))]
public async Task TestPointerDeclarationCodeFix(string predefined, string fullName)
=======
[Fact]
public async Task TestPointerDeclaration()
{
await this.TestValueTypeCases(this.TestPointerDeclarationImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestPointerDeclarationCodeFix()
>>>>>>>
[Theory]
[MemberData(nameof(ValueTypes))]
public async Task TestPointerDeclarationCodeFix(string predefined, string fullName)
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyValueTypeFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestArgumentCodeFix(string predefined, string fullName)
=======
[Fact]
public async Task TestArgument()
{
await this.TestAllCases(this.TestArgumentImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestArgumentCodeFix()
>>>>>>>
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestArgumentCodeFix(string predefined, string fullName)
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyAllFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestIndexerCodeFix(string predefined, string fullName)
=======
[Fact]
public async Task TestIndexer()
{
await this.TestAllCases(this.TestIndexerImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestIndexerCodeFix()
>>>>>>>
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestIndexerCodeFix(string predefined, string fullName)
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyAllFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestGenericAndLambdaCodeFix(string predefined, string fullName)
=======
[Fact]
public async Task TestGenericAndLambda()
{
await this.TestAllCases(this.TestGenericAndLambdaImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestGenericAndLambdaCodeFix()
>>>>>>>
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestGenericAndLambdaCodeFix(string predefined, string fullName)
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyAllFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestArrayCodeFix(string predefined, string fullName)
=======
[Fact]
public async Task TestArray()
{
await this.TestAllCases(this.TestArrayImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestArrayCodeFix()
>>>>>>>
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestArrayCodeFix(string predefined, string fullName)
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyAllFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
[Theory]
[MemberData(nameof(ValueTypes))]
public async Task TestStackAllocArrayCodeFix(string predefined, string fullName)
=======
[Fact]
public async Task TestStackAllocArray()
{
await this.TestAllCases(this.TestStackAllocArrayImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestStackAllocArrayCodeFix()
>>>>>>>
[Theory]
[MemberData(nameof(ValueTypes))]
public async Task TestStackAllocArrayCodeFix(string predefined, string fullName)
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyValueTypeFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestImplicitCastCodeFix(string predefined, string fullName)
=======
[Fact]
public async Task TestImplicitCast()
{
await this.TestAllCases(this.TestImplicitCastImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestImplicitCastCodeFix()
>>>>>>>
[Theory]
[MemberData(nameof(AllTypes))]
public async Task TestImplicitCastCodeFix(string predefined, string fullName)
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testCode, fullName), string.Format(testCode, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyValueTypeFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testCode, fullName), string.Format(testCode, predefined), cancellationToken: CancellationToken.None);
<<<<<<<
[Theory]
[MemberData(nameof(ReferenceTypes))]
public async Task TestExplicitCastCodeFix(string predefined, string fullName)
=======
[Fact]
public async Task TestExplicitCast()
{
await this.TestReferenceTypeCases(this.TestExplicitCastImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestExplicitCastCodeFix()
>>>>>>>
[Theory]
[MemberData(nameof(ReferenceTypes))]
public async Task TestExplicitCastCodeFix(string predefined, string fullName)
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyValueTypeFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
string testSource = @"namespace System {{
=======
await this.TestValueTypeCases(this.TestNullableImpl).ConfigureAwait(false);
}
[Fact]
public async Task TestNullableCodeFix()
{
string testSource = @"using System;
>>>>>>>
string testSource = @"namespace System {{
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None);
=======
await this.VerifyValueTypeFixes(testSource).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testSource, fullName), string.Format(testSource, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false);
<<<<<<<
=======
foreach (var item in AllTypes)
{
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "System." + item.Item2), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
}
>>>>>>>
<<<<<<<
await this.VerifyCSharpFixAsync(string.Format(testCode, fullName), string.Format(testCode, predefined), cancellationToken: CancellationToken.None);
=======
DiagnosticResult expected = this.CSharpDiagnostic().WithLocation(8, 41);
foreach (var item in AllTypes)
{
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "System." + item.Item2), expected, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, item.Item1), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
}
>>>>>>>
await this.VerifyCSharpFixAsync(string.Format(testCode, fullName), string.Format(testCode, predefined), cancellationToken: CancellationToken.None).ConfigureAwait(false); |
<<<<<<<
using StyleCop.Analyzers.Helpers;
=======
using StyleCop.Analyzers.Helpers;
>>>>>>>
using StyleCop.Analyzers.Helpers;
<<<<<<<
internal const string CodeFixAction = "Action";
internal const string InsertBeforeTag = "InsertBefore";
internal const string RemoveBeforeTag = "RemoveBefore";
internal const string InsertAfterTag = "InsertAfter";
internal const string RemoveAfterTag = "RemoveAfter";
internal const string RemoveEndOfLineTag = "RemoveEndOfLine";
/// <summary>
/// Gets the descriptor for prefix unary expression that may not be followed by a comment.
/// </summary>
/// <value>
/// A diagnostic descriptor.
/// </value>
public static DiagnosticDescriptor DescriptorNotFollowedByComment { get; } =
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormatNotFollowedByComment, Category, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);
/// <summary>
/// Gets the descriptor indicating that an operator must be preceded by whitespace.
/// </summary>
/// <value>
/// A diagnostic descriptor.
/// </value>
public static DiagnosticDescriptor DescriptorPrecededByWhitespace { get; } =
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormatPrecededByWhitespace, Category, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);
/// <summary>
/// Gets the descriptor indicating that an operator must be preceded by whitespace.
/// </summary>
/// <value>
/// A diagnostic descriptor.
/// </value>
public static DiagnosticDescriptor DescriptorNotPrecededByWhitespace { get; } =
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormatNotPrecededByWhitespace, Category, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);
=======
private static readonly DiagnosticDescriptor Descriptor =
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.SpacingRules, DiagnosticSeverity.Warning, AnalyzerConstants.DisabledNoTests, Description, HelpLink);
>>>>>>>
internal const string CodeFixAction = "Action";
internal const string InsertBeforeTag = "InsertBefore";
internal const string RemoveBeforeTag = "RemoveBefore";
internal const string InsertAfterTag = "InsertAfter";
internal const string RemoveAfterTag = "RemoveAfter";
internal const string RemoveEndOfLineTag = "RemoveEndOfLine";
/// <summary>
/// Gets the descriptor for prefix unary expression that may not be followed by a comment.
/// </summary>
/// <value>
/// A diagnostic descriptor.
/// </value>
public static DiagnosticDescriptor DescriptorNotFollowedByComment { get; } =
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormatNotFollowedByComment, AnalyzerCategory.SpacingRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);
/// <summary>
/// Gets the descriptor indicating that an operator must be preceded by whitespace.
/// </summary>
/// <value>
/// A diagnostic descriptor.
/// </value>
public static DiagnosticDescriptor DescriptorPrecededByWhitespace { get; } =
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormatPrecededByWhitespace, AnalyzerCategory.SpacingRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);
/// <summary>
/// Gets the descriptor indicating that an operator must be preceded by whitespace.
/// </summary>
/// <value>
/// A diagnostic descriptor.
/// </value>
public static DiagnosticDescriptor DescriptorNotPrecededByWhitespace { get; } =
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormatNotPrecededByWhitespace, AnalyzerCategory.SpacingRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);
<<<<<<<
if (!allowAtEndOfLine && token.TrailingTrivia.Any(SyntaxKind.EndOfLineTrivia))
=======
bool followedBySpace = token.IsFollowedByWhitespace();
bool lastInLine = token.IsLastInLine();
if (!allowAtLineEnd && lastInLine)
>>>>>>>
if (!allowAtEndOfLine && token.TrailingTrivia.Any(SyntaxKind.EndOfLineTrivia)) |
<<<<<<<
var document = CreateDocument(oldSource, language);
=======
var document = this.CreateDocument(oldSource, language);
var analyzerDiagnostics = await GetSortedDiagnosticsFromDocumentsAsync(analyzers, new[] { document }, cancellationToken).ConfigureAwait(false);
>>>>>>>
var document = this.CreateDocument(oldSource, language); |
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), EmptyDiagnosticResults, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "class"), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "struct"), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "interface"), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), expected, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "class"), expected, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "struct"), expected, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "interface"), expected, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), expected, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), expected, CancellationToken.None);
=======
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "class"), expected, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "struct"), expected, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, "interface"), expected, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
await this.VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), expected, CancellationToken.None).ConfigureAwait(false);
<<<<<<<
}";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None);
=======
}}";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
>>>>>>>
}";
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); |
<<<<<<<
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.Diagnostics;
=======
>>>>>>>
using Microsoft.CodeAnalysis.CodeFixes;
<<<<<<<
var expectedDiagnostic = this.CSharpDiagnostic().WithLocation(1, 1).WithArguments("XML is invalid.");
await
this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None)
.ConfigureAwait(false);
var fixCode = @"// <copyright file=""Test0.cs"" company=""FooCorp"">
// Copyright (c) FooCorp. All rights reserved.
// </copyright>
namespace Foo
{
}
";
}
/// <summary>
/// Verifies that a file header with an invalid XML structure will produce the correct diagnostic message.
/// </summary>
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
[Fact]
public async Task TestMalformedHeaderAsync()
{
var testCode = @"// <copyright test0.cs company=""FooCorp"">
#define MYDEFINE
namespace Foo
{
}
";
var expectedDiagnostic = this.CSharpDiagnostic().WithLocation(1, 1).WithArguments("XML is invalid.");
=======
var expectedDiagnostic = this.CSharpDiagnostic(FileHeaderAnalyzers.SA1633DescriptorMalformed).WithLocation(1, 1);
>>>>>>>
var expectedDiagnostic = this.CSharpDiagnostic(FileHeaderAnalyzers.SA1633DescriptorMalformed).WithLocation(1, 1);
await
this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None)
.ConfigureAwait(false);
var fixCode = @"// <copyright file=""Test0.cs"" company=""FooCorp"">
// Copyright (c) FooCorp. All rights reserved.
// </copyright>
namespace Foo
{
}
";
await this.VerifyCSharpDiagnosticAsync(fixCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
await this.VerifyCSharpFixAsync(testCode, fixCode).ConfigureAwait(false);
}
/// <summary>
/// Verifies that a file header with an invalid XML structure will produce the correct diagnostic message.
/// </summary>
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
[Fact]
public async Task TestMalformedHeaderAsync()
{
var testCode = @"// <copyright test0.cs company=""FooCorp"">
#define MYDEFINE
namespace Foo
{
}
";
var expectedDiagnostic = this.CSharpDiagnostic(FileHeaderAnalyzers.SA1633DescriptorMalformed).WithLocation(1, 1); |
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }";
await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }";
await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }";
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }";
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }";
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }";
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }";
await this.TestNestedDeclarationAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }";
await this.TestNestedDeclarationAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }";
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }";
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }";
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }";
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }";
await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }";
await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }";
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }";
await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }";
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }";
await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }";
await this.TestNestedDeclarationAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }";
await this.TestNestedDeclarationAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }";
await this.TestNestedDeclarationWithAttributesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationWithAttributesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }";
await this.TestNestedDeclarationWithAttributesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false);
<<<<<<<
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }";
await this.TestNestedDeclarationWithDirectivesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false);
=======
await this.TestNestedDeclarationWithDirectivesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", warning: false).ConfigureAwait(false);
>>>>>>>
string baseTypeList = ": IInterface";
string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }";
await this.TestNestedDeclarationWithDirectivesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); |
<<<<<<<
using Cosmos.Debug.Kernel;
=======
using Point = Cosmos.System.Graphics.Point;
>>>>>>>
using Cosmos.Debug.Kernel;
using Point = Cosmos.System.Graphics.Point; |
<<<<<<<
short LimitChildrenCount { get; }
int CurrentConceptGroupId { get; }
int CurrentRootId { get; set; }
int CurrentHookId { get; set; }
int CurrentConceptId { get; }
=======
int CurrentConceptGroupId { get; }
int CurrentRootId { get; set; }
int CurrentHookId { get; set; }
int CurrentConceptId { get; }
int CurrentLearningMode { get; }
>>>>>>>
short LimitChildrenCount { get; }
int CurrentConceptGroupId { get; }
int CurrentRootId { get; set; }
int CurrentHookId { get; set; }
int CurrentConceptId { get; }
int CurrentLearningMode { get; } |
<<<<<<<
using Espera.Core;
using ReactiveUI;
using ReactiveUI.Legacy;
using Splat;
=======
>>>>>>>
using ReactiveUI.Legacy;
using Splat;
<<<<<<<
this.OpenPathCommand = new ReactiveUI.Legacy.ReactiveCommand();
this.OpenPathCommand.Subscribe(x =>
{
try
{
Process.Start(this.Path);
}
catch (Win32Exception ex)
{
this.Log().ErrorException(string.Format("Could not open YouTube link {0}", this.Path), ex);
}
});
=======
>>>>>>>
this.OpenPathCommand = new ReactiveUI.Legacy.ReactiveCommand();
this.OpenPathCommand.Subscribe(x =>
{
try
{
Process.Start(this.Path);
}
catch (Win32Exception ex)
{
this.Log().ErrorException(string.Format("Could not open YouTube link {0}", this.Path), ex);
}
});
<<<<<<<
public ReactiveUI.Legacy.ReactiveCommand OpenPathCommand { get; private set; }
=======
>>>>>>>
public ReactiveUI.Legacy.ReactiveCommand OpenPathCommand { get; private set; } |
<<<<<<<
//ensure sendingTime is later than OrigSendingTime, else fail validation and logout
var origSendingTime = msg.Header.GetDateTime(Fields.Tags.OrigSendingTime);
var sendingTime = msg.Header.GetDateTime(Fields.Tags.SendingTime);
=======
>>>>>>>
// Ensure sendingTime is later than OrigSendingTime, else reject and logout
<<<<<<<
return true;
=======
>>>>>>> |
<<<<<<<
internal class NameValueCollectionValueGetter : ValueGetter
{
private readonly NameValueCollection _target;
private readonly string _key;
internal NameValueCollectionValueGetter(NameValueCollection target, string key)
{
_target = target;
_key = key;
}
public override object GetValue()
{
return _target[_key];
}
}
=======
internal class DataRowValueGetter : ValueGetter
{
private readonly DataRow _target;
private readonly string _name;
public DataRowValueGetter(DataRow target, string name)
{
_target = target;
_name = name;
}
public override object GetValue()
{
if(_target.Table.Columns.Contains(_name))
{
return _target[_name];
}
return null;
}
}
>>>>>>>
internal class DataRowValueGetter : ValueGetter
{
private readonly DataRow _target;
private readonly string _name;
public DataRowValueGetter(DataRow target, string name)
{
_target = target;
_name = name;
}
public override object GetValue()
{
if(_target.Table.Columns.Contains(_name))
{
return _target[_name];
}
return null;
}
}
internal class NameValueCollectionValueGetter : ValueGetter
{
private readonly NameValueCollection _target;
private readonly string _key;
internal NameValueCollectionValueGetter(NameValueCollection target, string key)
{
_target = target;
_key = key;
}
public override object GetValue()
{
return _target[_key];
}
} |
<<<<<<<
public delegate Object Lambda<T>(T text);
public delegate Object Lambda();
=======
public delegate Object Lambda(string text, RenderContext context, RenderFunc render);
public delegate string RenderFunc(RenderContext context);
>>>>>>>
public delegate Object Lambda();
public delegate Object Lambda(string text, RenderContext context, RenderFunc render);
public delegate string RenderFunc(RenderContext context); |
<<<<<<<
using (socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))
{
socket.Blocking = Resp;
try
{
while (IsFlooding)
{
FloodCount++;
buf = System.Text.Encoding.ASCII.GetBytes(String.Concat(Data, (AllowRandom ? Functions.RandomString() : "")));
socket.SendTo(buf, SocketFlags.None, RHost);
if (Delay >= 0) System.Threading.Thread.Sleep(Delay + 1);
}
}
catch { }
}
=======
using (socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))
{
socket.NoDelay = true;
socket.Blocking = Resp;
try
{
while (IsFlooding)
{
FloodCount++;
buf = System.Text.Encoding.ASCII.GetBytes(String.Concat(Data, (AllowRandom ? Functions.RandomString() : null)));
socket.SendTo(buf, SocketFlags.None, RHost);
if (Delay >= 0) System.Threading.Thread.Sleep(Delay + 1);
}
}
catch { }
}
>>>>>>>
using (socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))
{
socket.NoDelay = true;
socket.Blocking = Resp;
try
{
while (IsFlooding)
{
FloodCount++;
buf = System.Text.Encoding.ASCII.GetBytes(String.Concat(Data, (AllowRandom ? Functions.RandomString() : "")));
socket.SendTo(buf, SocketFlags.None, RHost);
if (Delay >= 0) System.Threading.Thread.Sleep(Delay + 1);
}
}
catch { }
} |
<<<<<<<
other != null
&& this.ImplementationType.Equals(other.ImplementationType)
&& this.Target.Equals(other.Target);
=======
this.implementationType.Equals(other.implementationType)
&& this.target.Equals(other.target);
>>>>>>>
other != null
&& this.implementationType.Equals(other.implementationType)
&& this.target.Equals(other.target); |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.