conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
public class TDSMPermissions : Plugin
{
/*
* @Developers
*
* Plugins need to be in .NET 4.0
* Otherwise TDSM will be unable to load it.
*
* As of June 16, 1:15 AM, TDSM should now load Plugins Dynamically.
*/
=======
public class TDSMPermissions : BasePlugin
{
/*
* @Developers
*
* Plugins need to be in .NET 4.0
* Otherwise TDSM will be unable to load it.
*/
>>>>>>>
public class TDSMPermissions : BasePlugin
{
/*
* @Developers
*
* Plugins need to be in .NET 4.0
* Otherwise TDSM will be unable to load it.
*/
<<<<<<<
public override void Load()
{
Name = "TDSMPermissions";
Description = "Permissions for TDSM.";
Author = "Malkierian";
Version = "1";
TDSMBuild = 32;
=======
protected override void Initialized(object state)
{
Name = "TDSMPermissions";
Description = "Permissions for TDSM.";
Author = "Malkierian";
Version = "1";
TDSMBuild = 32;
>>>>>>>
protected override void Initialized(object state)
{
Name = "TDSMPermissions";
Description = "Permissions for TDSM.";
Author = "Malkierian";
Version = "1";
TDSMBuild = 32;
<<<<<<<
public override void Enable()
{
ProgramLog.Log(base.Name + " enabled.");
//Register Hooks
registerHook(Hooks.PLAYER_PRELOGIN);
registerHook(Hooks.PLUGINS_LOADED);
=======
protected override void Enabled()
{
ProgramLog.Log(base.Name + " enabled.");
//Register Hooks
//registerHook(Hooks.PLAYER_PRELOGIN);
>>>>>>>
protected override void Enabled()
{
ProgramLog.Log(base.Name + " enabled.");
//Register Hooks
//registerHook(Hooks.PLAYER_PRELOGIN);
registerHook(Hooks.PLUGINS_LOADED);
<<<<<<<
public override void Disable()
{
ProgramLog.Log(base.Name + " disabled.");
}
public override void onServerPluginsLoaded(Terraria_Server.Events.ServerPluginsLoaded Event)
{
LoadPerms();
}
=======
protected override void Disabled()
{
ProgramLog.Log(base.Name + " disabled.");
}
>>>>>>>
protected override void Disabled()
{
ProgramLog.Log(base.Name + " disabled.");
}
public override void onServerPluginsLoaded(Terraria_Server.Events.ServerPluginsLoaded Event)
{
LoadPerms();
} |
<<<<<<<
public const int BUILD = 11;
public const int CURRENT_RELEASE = 12;
private const String WORLDS = "Worlds";
private const String PLAYERS = "Players";
private const String PLUGINS = "Plugins";
private const String DATA = "Data";
=======
public static int build = 13;
//public static double revision = 3;
>>>>>>>
public const int BUILD = 13;
public const int CURRENT_RELEASE = 12;
private const String WORLDS = "Worlds";
private const String PLAYERS = "Players";
private const String PLUGINS = "Plugins";
private const String DATA = "Data"; |
<<<<<<<
public const int BUILD = 13;
public const int CURRENT_RELEASE = 12;
private const String WORLDS = "Worlds";
private const String PLAYERS = "Players";
private const String PLUGINS = "Plugins";
private const String DATA = "Data";
=======
public static int build = 14;
//public static double revision = 3;
>>>>>>>
public const int BUILD = 14;
public const int CURRENT_RELEASE = 12;
private const String WORLDS = "Worlds";
private const String PLAYERS = "Players";
private const String PLUGINS = "Plugins";
private const String DATA = "Data"; |
<<<<<<<
private static bool SetupPaths()
{
try
{
CreateDirectory(Statics.WorldPath);
CreateDirectory(Statics.PlayerPath);
CreateDirectory(Statics.PluginPath);
CreateDirectory(Statics.DataPath);
}
catch (Exception exception)
{
Program.tConsole.WriteLine(exception.ToString());
Program.tConsole.WriteLine("Press any key to continue...");
Console.ReadKey(true);
return false;
}
CreateFile(Statics.DataPath + Path.DirectorySeparatorChar + "whitelist.txt");
CreateFile(Statics.DataPath + Path.DirectorySeparatorChar + "banlist.txt");
CreateFile(Statics.DataPath + Path.DirectorySeparatorChar + "oplist.txt");
CreateFile(Statics.DataPath + Path.DirectorySeparatorChar + "server.log");
return true;
}
private static void CreateDirectory(string dirPath)
{
if (!Directory.Exists(dirPath))
{
Directory.CreateDirectory(dirPath);
}
}
private static bool CreateFile(string filePath)
{
if (!File.Exists(filePath))
{
try
{
File.Create(filePath).Close();
}
catch (Exception exception)
{
Program.tConsole.WriteLine(exception.ToString());
Program.tConsole.WriteLine("Press any key to continue...");
Console.ReadKey(true);
return false;
}
}
return true;
}
private static void SetupProperties()
{
properties = new ServerProperties("server.properties");
properties.Load();
properties.pushData();
properties.Save();
}
public static void printData(string dataText, bool console = false)
{
if (Platform.Type != Platform.PlatformType.UNKNOWN)
{
if (console == false)
{
tConsole.WriteLine(dataText);
}
else
{
Console.WriteLine(dataText);
}
}
else
{
for (int i_ = 0; i_ < preserve; i_++)
{
Console.Write("\b");
}
Console.Write(dataText);
preserve = dataText.Length;
}
}
private static void Updater()
=======
//public static void Updater()
//{
// if (server == null)
// {
// Program.tConsole.WriteLine("Issue in updater thread!");
// return;
// }
// Stopwatch stopwatch = new Stopwatch();
// double num6 = 16.666666666666668;
// stopwatch.Start();
// double num7 = 0.0;
// if (Server.rand == null)
// {
// Server.rand = new Random((int)DateTime.Now.Ticks);
// }
// while (Statics.IsActive)
// {
// double num8 = (double)stopwatch.ElapsedMilliseconds + num7;
// if (num8 >= num6)
// {
// num7 = num8 - num6;
// stopwatch.Reset();
// stopwatch.Start();
// server.Update();
// float num9 = (float)stopwatch.ElapsedMilliseconds;
// if ((double)num9 < num6)
// {
// int num10 = (int)(num6 - (double)num9) - 1;
// if (num10 > 1)
// {
// Thread.Sleep(num10);
// }
// }
// }
// }
//}
public static void Updater()
>>>>>>>
private static bool SetupPaths()
{
try
{
CreateDirectory(Statics.WorldPath);
CreateDirectory(Statics.PlayerPath);
CreateDirectory(Statics.PluginPath);
CreateDirectory(Statics.DataPath);
}
catch (Exception exception)
{
Program.tConsole.WriteLine(exception.ToString());
Program.tConsole.WriteLine("Press any key to continue...");
Console.ReadKey(true);
return false;
}
CreateFile(Statics.DataPath + Path.DirectorySeparatorChar + "whitelist.txt");
CreateFile(Statics.DataPath + Path.DirectorySeparatorChar + "banlist.txt");
CreateFile(Statics.DataPath + Path.DirectorySeparatorChar + "oplist.txt");
CreateFile(Statics.DataPath + Path.DirectorySeparatorChar + "server.log");
return true;
}
private static void CreateDirectory(string dirPath)
{
if (!Directory.Exists(dirPath))
{
Directory.CreateDirectory(dirPath);
}
}
private static bool CreateFile(string filePath)
{
if (!File.Exists(filePath))
{
try
{
File.Create(filePath).Close();
}
catch (Exception exception)
{
Program.tConsole.WriteLine(exception.ToString());
Program.tConsole.WriteLine("Press any key to continue...");
Console.ReadKey(true);
return false;
}
}
return true;
}
private static void SetupProperties()
{
properties = new ServerProperties("server.properties");
properties.Load();
properties.pushData();
properties.Save();
}
public static void printData(string dataText, bool console = false)
{
if (Platform.Type != Platform.PlatformType.UNKNOWN)
{
if (console == false)
{
tConsole.WriteLine(dataText);
}
else
{
Console.WriteLine(dataText);
}
}
else
{
for (int i_ = 0; i_ < preserve; i_++)
{
Console.Write("\b");
}
Console.Write(dataText);
preserve = dataText.Length;
}
}
public static void Updater() |
<<<<<<<
using System.Net;
=======
using Terraria_Server.Networking;
>>>>>>>
using System.Net;
using Terraria_Server.Networking; |
<<<<<<<
if (this.type == ProjectileType.POWDER_VILE && (Main.npc[k].type == 47 || Main.npc[k].type == 57))
=======
if (this.type == 11 && (Main.npcs[i].Type == 47 || Main.npcs[i].Type == 57))
>>>>>>>
if (this.type == ProjectileType.POWDER_VILE && (Main.npcs[i].Type == 47 || Main.npcs[i].Type == 57))
<<<<<<<
if (this.type == ProjectileType.BALL_SAND_DROP && Main.npc[k].type == 69)
=======
if (this.type == 31 && Main.npcs[i].Type == 69)
>>>>>>>
if (this.type == ProjectileType.BALL_SAND_DROP && Main.npcs[i].Type == 69) |
<<<<<<<
using Terraria_Server.Misc;
=======
using Terraria_Server.Events;
using Terraria_Server.Plugin;
>>>>>>>
using Terraria_Server.Events;
using Terraria_Server.Plugin;
using Terraria_Server.Misc; |
<<<<<<<
for (int k = 0; k < Main.maxSectionsY; k++)
{
Netplay.slots[i].tileSection[j, k] = false;
}
=======
Netplay.serverSock[i].tileSection[j, k] = false;
>>>>>>>
Netplay.slots[i].tileSection[j, k] = false; |
<<<<<<<
}
for (int n = 0; n < 1000; n++)
{
NPC nPC = (NPC)Main.npcs[n].Clone();
if (nPC.Active && nPC.townNPC)
=======
try
>>>>>>>
}
for (int n = 0; n < 1000; n++)
{
NPC nPC = (NPC)Main.npcs[n].Clone();
if (nPC.Active && nPC.townNPC)
try |
<<<<<<<
if (AdornmentLayer.Selector.Selections.Any())
AdornmentLayer.DrawAdornments();
AdornmentLayer.Selector.IsReversing = false;
=======
if (adornmentLayer.Selector.Selections.Any())
adornmentLayer.DrawAdornments();
>>>>>>>
if (AdornmentLayer.Selector.Selections.Any())
AdornmentLayer.DrawAdornments(); |
<<<<<<<
if (AdornmentLayer.Selector.Selections.Any())
AdornmentLayer.DrawAdornments();
AdornmentLayer.Selector.IsReversing = false;
=======
if (adornmentLayer.Selector.Selections.Any())
adornmentLayer.DrawAdornments();
>>>>>>>
if (AdornmentLayer.Selector.Selections.Any())
AdornmentLayer.DrawAdornments(); |
<<<<<<<
/// <summary>
///Load terrain, saved changes and resets
///the light for an empty chunk
/// </summary>
/// <param name="chunk">The chunk to generate and load for</param>
=======
>>>>>>>
/// <summary>
///Load terrain, saved changes and resets
///the light for an empty chunk
/// </summary>
/// <param name="chunk">The chunk to generate and load for</param>
<<<<<<<
/// <summary>
///Saves the chunk and destroys the game object
/// </summary>
/// <param name="pos">Position of the chunk to destroy</param>
=======
/// <summary>
/// This is the code that generates the chunk.
/// If using a different TerrainGen, override this class and call it here.
/// </summary>
/// <param name="chunk"></param>
protected virtual void GenerateChunk (Chunk chunk)
{
var terrainGen = new TerrainGen();
terrainGen.ChunkGen(chunk);
}
//Saves the chunk and destroys the game object
>>>>>>>
/// <summary>
/// This is the code that generates the chunk.
/// If using a different TerrainGen, override this class and call it here.
/// </summary>
/// <param name="chunk"></param>
protected virtual void GenerateChunk (Chunk chunk)
{
var terrainGen = new TerrainGen();
terrainGen.ChunkGen(chunk);
}
/// <summary>
/// Saves the chunk and destroys the game object
/// </summary>
/// <param name="pos">Position of the chunk to destroy</param> |
<<<<<<<
public void WhenRetentionTimeIsSetOldFilesAreDeleted()
{
LogEvent e1 = Some.InformationEvent(DateTime.Today.AddDays(-5)),
e2 = Some.InformationEvent(e1.Timestamp.AddDays(2)),
e3 = Some.InformationEvent(e2.Timestamp.AddDays(5));
TestRollingEventSequence(
(pf, wt) => wt.File(pf, retainedFileTimeLimit: TimeSpan.FromDays(1), rollingInterval: RollingInterval.Day),
new[] {e1, e2, e3},
files =>
{
Assert.Equal(3, files.Count);
Assert.True(!System.IO.File.Exists(files[0]));
Assert.True(!System.IO.File.Exists(files[1]));
Assert.True(System.IO.File.Exists(files[2]));
});
}
[Fact]
public void WhenRetentionCountAndTimeIsSetOldFilesAreDeletedByTime()
{
LogEvent e1 = Some.InformationEvent(DateTime.Today.AddDays(-5)),
e2 = Some.InformationEvent(e1.Timestamp.AddDays(2)),
e3 = Some.InformationEvent(e2.Timestamp.AddDays(5));
TestRollingEventSequence(
(pf, wt) => wt.File(pf, retainedFileCountLimit: 2, retainedFileTimeLimit: TimeSpan.FromDays(1), rollingInterval: RollingInterval.Day),
new[] {e1, e2, e3},
files =>
{
Assert.Equal(3, files.Count);
Assert.True(!System.IO.File.Exists(files[0]));
Assert.True(!System.IO.File.Exists(files[1]));
Assert.True(System.IO.File.Exists(files[2]));
});
}
[Fact]
public void WhenRetentionCountAndTimeIsSetOldFilesAreDeletedByCount()
{
LogEvent e1 = Some.InformationEvent(DateTime.Today.AddDays(-5)),
e2 = Some.InformationEvent(e1.Timestamp.AddDays(2)),
e3 = Some.InformationEvent(e2.Timestamp.AddDays(5));
TestRollingEventSequence(
(pf, wt) => wt.File(pf, retainedFileCountLimit: 2, retainedFileTimeLimit: TimeSpan.FromDays(10), rollingInterval: RollingInterval.Day),
new[] {e1, e2, e3},
files =>
{
Assert.Equal(3, files.Count);
Assert.True(!System.IO.File.Exists(files[0]));
Assert.True(System.IO.File.Exists(files[1]));
Assert.True(System.IO.File.Exists(files[2]));
});
}
[Fact]
=======
public void WhenRetentionCountAndArchivingHookIsSetOldFilesAreCopiedAndOriginalDeleted()
{
const string archiveDirectory = "OldLogs";
LogEvent e1 = Some.InformationEvent(),
e2 = Some.InformationEvent(e1.Timestamp.AddDays(1)),
e3 = Some.InformationEvent(e2.Timestamp.AddDays(5));
TestRollingEventSequence(
(pf, wt) => wt.File(pf, retainedFileCountLimit: 2, rollingInterval: RollingInterval.Day, hooks: new ArchiveOldLogsHook(archiveDirectory)),
new[] {e1, e2, e3},
files =>
{
Assert.Equal(3, files.Count);
Assert.True(!System.IO.File.Exists(files[0]));
Assert.True(System.IO.File.Exists(files[1]));
Assert.True(System.IO.File.Exists(files[2]));
Assert.True(System.IO.File.Exists(ArchiveOldLogsHook.AddTopDirectory(files[0], archiveDirectory)));
});
}
[Fact]
>>>>>>>
public void WhenRetentionTimeIsSetOldFilesAreDeleted()
{
LogEvent e1 = Some.InformationEvent(DateTime.Today.AddDays(-5)),
e2 = Some.InformationEvent(e1.Timestamp.AddDays(2)),
e3 = Some.InformationEvent(e2.Timestamp.AddDays(5));
TestRollingEventSequence(
(pf, wt) => wt.File(pf, retainedFileTimeLimit: TimeSpan.FromDays(1), rollingInterval: RollingInterval.Day),
new[] {e1, e2, e3},
files =>
{
Assert.Equal(3, files.Count);
Assert.True(!System.IO.File.Exists(files[0]));
Assert.True(!System.IO.File.Exists(files[1]));
Assert.True(System.IO.File.Exists(files[2]));
});
}
[Fact]
public void WhenRetentionCountAndTimeIsSetOldFilesAreDeletedByTime()
{
LogEvent e1 = Some.InformationEvent(DateTime.Today.AddDays(-5)),
e2 = Some.InformationEvent(e1.Timestamp.AddDays(2)),
e3 = Some.InformationEvent(e2.Timestamp.AddDays(5));
TestRollingEventSequence(
(pf, wt) => wt.File(pf, retainedFileCountLimit: 2, retainedFileTimeLimit: TimeSpan.FromDays(1), rollingInterval: RollingInterval.Day),
new[] {e1, e2, e3},
files =>
{
Assert.Equal(3, files.Count);
Assert.True(!System.IO.File.Exists(files[0]));
Assert.True(!System.IO.File.Exists(files[1]));
Assert.True(System.IO.File.Exists(files[2]));
});
}
[Fact]
public void WhenRetentionCountAndTimeIsSetOldFilesAreDeletedByCount()
{
LogEvent e1 = Some.InformationEvent(DateTime.Today.AddDays(-5)),
e2 = Some.InformationEvent(e1.Timestamp.AddDays(2)),
e3 = Some.InformationEvent(e2.Timestamp.AddDays(5));
TestRollingEventSequence(
(pf, wt) => wt.File(pf, retainedFileCountLimit: 2, retainedFileTimeLimit: TimeSpan.FromDays(10), rollingInterval: RollingInterval.Day),
new[] {e1, e2, e3},
files =>
{
Assert.Equal(3, files.Count);
Assert.True(!System.IO.File.Exists(files[0]));
Assert.True(System.IO.File.Exists(files[1]));
Assert.True(System.IO.File.Exists(files[2]));
});
}
[Fact]
public void WhenRetentionCountAndArchivingHookIsSetOldFilesAreCopiedAndOriginalDeleted()
{
const string archiveDirectory = "OldLogs";
LogEvent e1 = Some.InformationEvent(),
e2 = Some.InformationEvent(e1.Timestamp.AddDays(1)),
e3 = Some.InformationEvent(e2.Timestamp.AddDays(5));
TestRollingEventSequence(
(pf, wt) => wt.File(pf, retainedFileCountLimit: 2, rollingInterval: RollingInterval.Day, hooks: new ArchiveOldLogsHook(archiveDirectory)),
new[] {e1, e2, e3},
files =>
{
Assert.Equal(3, files.Count);
Assert.True(!System.IO.File.Exists(files[0]));
Assert.True(System.IO.File.Exists(files[1]));
Assert.True(System.IO.File.Exists(files[2]));
Assert.True(System.IO.File.Exists(ArchiveOldLogsHook.AddTopDirectory(files[0], archiveDirectory)));
});
}
[Fact] |
<<<<<<<
public static string FullNameCSharp(this TypeReference type)
{
return type.FullName.Replace('/', '.');
}
=======
internal static bool IsType(this TypeReference reference, TypeReference type)
{
return string.Equals(reference.FullName, type.FullName, StringComparison.Ordinal);
}
>>>>>>>
internal static bool IsType(this TypeReference reference, TypeReference type)
{
return string.Equals(reference.FullName, type.FullName, StringComparison.Ordinal);
}
public static string FullNameCSharp(this TypeReference type)
{
return type.FullName.Replace('/', '.');
} |
<<<<<<<
using System.Linq;
using System.Net.Http;
using Modix.Modules;
using Modix.Services.DocsMaster;
=======
>>>>>>>
using System.Net.Http;
using Modix.Services.DocsMaster;
<<<<<<<
using (var context = _provider.GetService<ModixContext>())
=======
using (var context = _scope.ServiceProvider.GetService<ModixContext>())
>>>>>>>
using (var context = _scope.ServiceProvider.GetService<ModixContext>())
<<<<<<<
_map.AddSingleton<IAnimalService, AnimalService>();
_map.AddTransient<DocsMasterRetrievalService>();
=======
>>>>>>>
_map.AddTransient<DocsMasterRetrievalService>(); |
<<<<<<<
private readonly Dictionary<DomainId, ContentGraphType> contentTypes = new Dictionary<DomainId, ContentGraphType>();
=======
private static readonly IDocumentExecuter Executor = new DocumentExecuter();
private readonly Dictionary<Guid, ContentGraphType> contentTypes = new Dictionary<Guid, ContentGraphType>();
>>>>>>>
private static readonly IDocumentExecuter Executor = new DocumentExecuter();
private readonly Dictionary<DomainId, ContentGraphType> contentTypes = new Dictionary<DomainId, ContentGraphType>();
<<<<<<<
private readonly IObjectGraphType assetType;
=======
private readonly IGraphType assetType;
>>>>>>>
private readonly IObjectGraphType assetType;
<<<<<<<
public IObjectGraphType GetContentType(DomainId schemaId)
=======
public IGraphType GetContentType(Guid schemaId)
>>>>>>>
public IGraphType GetContentType(DomainId schemaId) |
<<<<<<<
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using Modix.Data.Models;
using Serilog;
using Microsoft.Extensions.DependencyInjection;
using Modix.Services.Quote;
using Modix.Utilities;
using Serilog.Events;
using Modix.Data;
using Modix.Services.Cat;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
namespace Modix
{
public sealed class ModixBot
{
private readonly CommandService _commands = new CommandService(new CommandServiceConfig
{
LogLevel = LogSeverity.Debug
});
private DiscordSocketClient _client;
private readonly IServiceCollection _map = new ServiceCollection();
private readonly ModixBotHooks _hooks = new ModixBotHooks();
private ModixConfig _config = new ModixConfig();
public ModixBot()
{
LoadConfig();
var loggerConfig = new LoggerConfiguration()
.MinimumLevel.Verbose()
.WriteTo.LiterateConsole()
.WriteTo.RollingFile(@"logs\{Date}", restrictedToMinimumLevel: LogEventLevel.Debug);
if (!string.IsNullOrWhiteSpace(_config.WebhookToken))
{
loggerConfig.WriteTo.DiscordWebhookSink(_config.WebhookId, _config.WebhookToken, LogEventLevel.Error);
}
Log.Logger = loggerConfig.CreateLogger();
_map.AddLogging(bldr => bldr.AddSerilog(Log.Logger, true));
}
public async Task Run()
{
_client = new DiscordSocketClient(config: new DiscordSocketConfig
{
LogLevel = LogSeverity.Debug,
});
await Install(); // Setting up DependencyMap
_map.AddDbContext<ModixContext>(options =>
{
options.UseNpgsql(_config.PostgreConnectionString);
});
var provider = _map.BuildServiceProvider();
var loggerFactory = provider.GetService<ILoggerFactory>();
using (var context = provider.GetService<ModixContext>())
{
context.Database.Migrate();
}
await _client.LoginAsync(TokenType.Bot, _config.DiscordToken);
await _client.StartAsync();
await Task.Delay(-1);
}
public void LoadConfig()
{
_config = new ModixConfig
{
DiscordToken = Environment.GetEnvironmentVariable("Token"),
ReplToken = Environment.GetEnvironmentVariable("ReplToken"),
StackoverflowToken = Environment.GetEnvironmentVariable("StackoverflowToken"),
PostgreConnectionString = Environment.GetEnvironmentVariable("MODIX_DB_CONNECTION"),
};
var id = Environment.GetEnvironmentVariable("log_webhook_id");
if (string.IsNullOrWhiteSpace(id))
{
_config.WebhookId = ulong.Parse(id);
_config.WebhookToken = Environment.GetEnvironmentVariable("log_webhook_token");
}
}
public async Task HandleCommand(SocketMessage messageParam)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
var message = messageParam as SocketUserMessage;
if (message == null) return;
int argPos = 0;
if (!(message.HasCharPrefix('!', ref argPos) || message.HasMentionPrefix(_client.CurrentUser, ref argPos)))
return;
var context = new CommandContext(_client, message);
var result = await _commands.ExecuteAsync(context, argPos, _map.BuildServiceProvider());
if (!result.IsSuccess)
{
Log.Error($"{result.Error}: {result.ErrorReason}");
}
stopwatch.Stop();
Log.Information($"Took {stopwatch.ElapsedMilliseconds}ms to process: {message}");
}
public async Task Install()
{
_map.AddSingleton(_client);
_map.AddSingleton(_config);
_map.AddSingleton<ICatService, CatService>();
_map.AddScoped<IQuoteService, QuoteService>();
_client.MessageReceived += HandleCommand;
_client.MessageReceived += _hooks.HandleMessage;
_client.ReactionAdded += _hooks.HandleAddReaction;
_client.ReactionRemoved += _hooks.HandleRemoveReaction;
_client.Log += _hooks.HandleLog;
_commands.Log += _hooks.HandleLog;
await _commands.AddModulesAsync(Assembly.GetEntryAssembly());
}
}
}
=======
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using Modix.Data.Models;
using Serilog;
using Microsoft.Extensions.DependencyInjection;
using Modix.Services.Quote;
using Modix.Utilities;
using Serilog.Events;
using Modix.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Modix.Services.AutoCodePaste;
namespace Modix
{
public sealed class ModixBot
{
private readonly CommandService _commands = new CommandService(new CommandServiceConfig
{
LogLevel = LogSeverity.Debug
});
private DiscordSocketClient _client;
private readonly IServiceCollection _map = new ServiceCollection();
private readonly ModixBotHooks _hooks = new ModixBotHooks();
private ModixConfig _config = new ModixConfig();
public ModixBot()
{
LoadConfig();
var loggerConfig = new LoggerConfiguration()
.MinimumLevel.Verbose()
.WriteTo.LiterateConsole()
.WriteTo.RollingFile(@"logs\{Date}", restrictedToMinimumLevel: LogEventLevel.Debug);
if (!string.IsNullOrWhiteSpace(_config.WebhookToken))
{
loggerConfig.WriteTo.DiscordWebhookSink(_config.WebhookId, _config.WebhookToken, LogEventLevel.Error);
}
Log.Logger = loggerConfig.CreateLogger();
_map.AddLogging(bldr => bldr.AddSerilog(Log.Logger, true));
}
public async Task Run()
{
_client = new DiscordSocketClient(config: new DiscordSocketConfig
{
LogLevel = LogSeverity.Debug,
});
await Install(); // Setting up DependencyMap
_map.AddDbContext<ModixContext>(options =>
{
options.UseNpgsql(_config.PostgreConnectionString);
});
var provider = _map.BuildServiceProvider();
var loggerFactory = provider.GetService<ILoggerFactory>();
using (var context = provider.GetService<ModixContext>())
{
context.Database.Migrate();
}
await _client.LoginAsync(TokenType.Bot, _config.DiscordToken);
await _client.StartAsync();
await Task.Delay(-1);
}
public void LoadConfig()
{
_config = new ModixConfig
{
DiscordToken = Environment.GetEnvironmentVariable("Token"),
ReplToken = Environment.GetEnvironmentVariable("ReplToken"),
StackoverflowToken = Environment.GetEnvironmentVariable("StackoverflowToken"),
PostgreConnectionString = Environment.GetEnvironmentVariable("MODIX_DB_CONNECTION"),
};
var id = Environment.GetEnvironmentVariable("log_webhook_id");
if (!string.IsNullOrWhiteSpace(id))
{
_config.WebhookId = ulong.Parse(id);
_config.WebhookToken = Environment.GetEnvironmentVariable("log_webhook_token");
}
}
public async Task HandleCommand(SocketMessage messageParam)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
var message = messageParam as SocketUserMessage;
if (message == null) return;
int argPos = 0;
if (!(message.HasCharPrefix('!', ref argPos) || message.HasMentionPrefix(_client.CurrentUser, ref argPos)))
return;
var context = new CommandContext(_client, message);
var result = await _commands.ExecuteAsync(context, argPos, _map.BuildServiceProvider());
if (!result.IsSuccess)
{
Log.Error($"{result.Error}: {result.ErrorReason}");
}
stopwatch.Stop();
Log.Information($"Took {stopwatch.ElapsedMilliseconds}ms to process: {message}");
}
public async Task Install()
{
_map.AddSingleton(_client);
_map.AddSingleton(_config);
_map.AddScoped<IQuoteService, QuoteService>();
_map.AddSingleton<CodePasteService>();
_client.MessageReceived += HandleCommand;
_client.MessageReceived += _hooks.HandleMessage;
_client.ReactionAdded += _hooks.HandleAddReaction;
_client.ReactionRemoved += _hooks.HandleRemoveReaction;
_client.Log += _hooks.HandleLog;
_commands.Log += _hooks.HandleLog;
await _commands.AddModulesAsync(Assembly.GetEntryAssembly());
}
}
}
>>>>>>>
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using Modix.Data.Models;
using Serilog;
using Microsoft.Extensions.DependencyInjection;
using Modix.Services.Quote;
using Modix.Utilities;
using Serilog.Events;
using Modix.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Modix.Services.AutoCodePaste;
namespace Modix
{
public sealed class ModixBot
{
private readonly CommandService _commands = new CommandService(new CommandServiceConfig
{
LogLevel = LogSeverity.Debug
});
private DiscordSocketClient _client;
private readonly IServiceCollection _map = new ServiceCollection();
private readonly ModixBotHooks _hooks = new ModixBotHooks();
private ModixConfig _config = new ModixConfig();
public ModixBot()
{
LoadConfig();
var loggerConfig = new LoggerConfiguration()
.MinimumLevel.Verbose()
.WriteTo.LiterateConsole()
.WriteTo.RollingFile(@"logs\{Date}", restrictedToMinimumLevel: LogEventLevel.Debug);
if (!string.IsNullOrWhiteSpace(_config.WebhookToken))
{
loggerConfig.WriteTo.DiscordWebhookSink(_config.WebhookId, _config.WebhookToken, LogEventLevel.Error);
}
Log.Logger = loggerConfig.CreateLogger();
_map.AddLogging(bldr => bldr.AddSerilog(Log.Logger, true));
}
public async Task Run()
{
_client = new DiscordSocketClient(config: new DiscordSocketConfig
{
LogLevel = LogSeverity.Debug,
});
await Install(); // Setting up DependencyMap
_map.AddDbContext<ModixContext>(options =>
{
options.UseNpgsql(_config.PostgreConnectionString);
});
var provider = _map.BuildServiceProvider();
var loggerFactory = provider.GetService<ILoggerFactory>();
using (var context = provider.GetService<ModixContext>())
{
context.Database.Migrate();
}
await _client.LoginAsync(TokenType.Bot, _config.DiscordToken);
await _client.StartAsync();
await Task.Delay(-1);
}
public void LoadConfig()
{
_config = new ModixConfig
{
DiscordToken = Environment.GetEnvironmentVariable("Token"),
ReplToken = Environment.GetEnvironmentVariable("ReplToken"),
StackoverflowToken = Environment.GetEnvironmentVariable("StackoverflowToken"),
PostgreConnectionString = Environment.GetEnvironmentVariable("MODIX_DB_CONNECTION"),
};
var id = Environment.GetEnvironmentVariable("log_webhook_id");
if (!string.IsNullOrWhiteSpace(id))
{
_config.WebhookId = ulong.Parse(id);
_config.WebhookToken = Environment.GetEnvironmentVariable("log_webhook_token");
}
}
public async Task HandleCommand(SocketMessage messageParam)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
var message = messageParam as SocketUserMessage;
if (message == null) return;
int argPos = 0;
if (!(message.HasCharPrefix('!', ref argPos) || message.HasMentionPrefix(_client.CurrentUser, ref argPos)))
return;
var context = new CommandContext(_client, message);
var result = await _commands.ExecuteAsync(context, argPos, _map.BuildServiceProvider());
if (!result.IsSuccess)
{
Log.Error($"{result.Error}: {result.ErrorReason}");
}
stopwatch.Stop();
Log.Information($"Took {stopwatch.ElapsedMilliseconds}ms to process: {message}");
}
public async Task Install()
{
_map.AddSingleton(_client);
_map.AddSingleton(_config);
_map.AddScoped<IQuoteService, QuoteService>();
_map.AddSingleton<CodePasteService>();
_map.AddSingleton<ICatService, CatService>();
_client.MessageReceived += HandleCommand;
_client.MessageReceived += _hooks.HandleMessage;
_client.ReactionAdded += _hooks.HandleAddReaction;
_client.ReactionRemoved += _hooks.HandleRemoveReaction;
_client.Log += _hooks.HandleLog;
_commands.Log += _hooks.HandleLog;
await _commands.AddModulesAsync(Assembly.GetEntryAssembly());
}
}
} |
<<<<<<<
public AppPatterns Update(DomainId id, string name, string pattern, string? message = null)
=======
public AppPatterns Update(Guid id, string? name = null, string? pattern = null, string? message = null)
>>>>>>>
public AppPatterns Update(DomainId id, string? name = null, string? pattern = null, string? message = null) |
<<<<<<<
using System;
=======
using System;
using System.IO;
>>>>>>>
using System;
using System.IO;
<<<<<<<
await Receive(socket, async (result, buffer) =>
=======
await Receive(socket, async (result, serializedInvocationDescriptor) =>
>>>>>>>
await Receive(socket, async (result, serializedInvocationDescriptor) =>
<<<<<<<
var buffer = new byte[1024 * 4];
while (socket.State == WebSocketState.Open)
=======
while (socket.State == WebSocketState.Open)
>>>>>>>
while (socket.State == WebSocketState.Open)
<<<<<<<
handleMessage(result, buffer);
=======
handleMessage(result, serializedInvocationDescriptor);
>>>>>>>
handleMessage(result, serializedInvocationDescriptor); |
<<<<<<<
// If the atomospheric drag is too large them we will be unlikely to be able to control our attitude. Move the the parachute control step
if (mainBody.DragAccel(vesselState.CoM, vesselState.velocityVesselOrbit, vesselState.massDrag / vesselState.mass).magnitude > 1)
{
if (ParachutesDeployable())
{
ControlParachutes();
}
}
=======
>>>>>>>
// If the atomospheric drag is too large them we will be unlikely to be able to control our attitude. Move the the parachute control step
if (mainBody.DragAccel(vesselState.CoM, vesselState.velocityVesselOrbit, vesselState.massDrag / vesselState.mass).magnitude > 1)
{
if (ParachutesDeployable())
{
ControlParachutes();
}
}
<<<<<<<
// If the atmospheric drag is has started to act on the vessel then we are in a position to start considering when to deploy the parachutes.
if (mainBody.DragAccel(vesselState.CoM, vesselState.velocityVesselOrbit, vesselState.massDrag / vesselState.mass).magnitude > 0.10)
{
if(ParachutesDeployable() && !parachuteControlAbandoned)
{
ControlParachutes();
}
}
=======
>>>>>>>
// If the atmospheric drag is has started to act on the vessel then we are in a position to start considering when to deploy the parachutes.
if (mainBody.DragAccel(vesselState.CoM, vesselState.velocityVesselOrbit, vesselState.massDrag / vesselState.mass).magnitude > 0.10)
{
if(ParachutesDeployable() && !parachuteControlAbandoned)
{
ControlParachutes();
}
}
<<<<<<<
public void FixedUpdateParachuteControl()
{
// Are there any deployable parachutes? If not then there is no point in us being here. Lets switch to cruising to the deceleration burn instead.
if (!ParachutesDeployable())
{
predictor.runErrorSimulations = false;
parachutePlan.ClearData();
landStep = LandStep.FINAL_DESCENT;
return;
}
else
{
predictor.runErrorSimulations = true;
}
// Firstly - do we have a parchute plan? If not then we had better get one quick!
if (null == parachutePlan)
{
parachutePlan = new ParachutePlan(this);
}
// Is there an error prediction available? If so add that into the mix
if (this.ErrorPredictionReady)
{
if (parachutePlan.AddResult(errorPrediction))
{
// The parachute plan has told us to give up.
predictor.runErrorSimulations = false;
parachutePlan.ClearData();
landStep = LandStep.FINAL_DESCENT;
return;
}
}
// Has the Landing prediction been updated? If so then we can use the result to refine our parachute plan.
if (this.PredictionReady)
{
if (parachutePlan.AddResult(prediction))
{
// The parachute plan has told us to give up.
predictor.runErrorSimulations = false;
parachutePlan.ClearData();
landStep = LandStep.FINAL_DESCENT;
return;
}
}
// Update the status to make it look like something interesting is going on under the covers!
status = "Targeting by timing parachute deployment. Multipler:" + parachutePlan.GetMultiplier().ToString("F4");
}
public void ControlParachutes()
{
// Firstly - do we have a parchute plan? If not then we had better get one quick!
if (null == parachutePlan)
{
parachutePlan = new ParachutePlan(this);
}
// Are there any deployable parachutes? If not then there is no point in us being here. Lets switch to cruising to the deceleration burn instead.
if (!ParachutesDeployable())
{
predictor.runErrorSimulations = false;
parachutePlan.ClearData();
return;
}
else
{
predictor.runErrorSimulations = true;
}
// Is there an error prediction available? If so add that into the mix
if (this.ErrorPredictionReady)
{
if (parachutePlan.AddResult(errorPrediction))
{
// The parachute plan has told us to give up. Clear the data and start again
parachutePlan.ClearData();
return;
}
}
// Has the Landing prediction been updated? If so then we can use the result to refine our parachute plan.
if (this.PredictionReady)
{
if (parachutePlan.AddResult(prediction))
{
// The parachute plan has told us to give up. Clear the data and start again
parachutePlan.ClearData();
return;
}
}
// Update the status to make it look like something interesting is going on under the covers!
status = "Targeting by timing parachute deployment. Multipler:" + parachutePlan.GetMultiplier().ToString("F4");
}
=======
>>>>>>>
public void ControlParachutes()
{
// Firstly - do we have a parchute plan? If not then we had better get one quick!
if (null == parachutePlan)
{
parachutePlan = new ParachutePlan(this);
}
// Are there any deployable parachutes? If not then there is no point in us being here. Lets switch to cruising to the deceleration burn instead.
if (!ParachutesDeployable())
{
predictor.runErrorSimulations = false;
parachutePlan.ClearData();
return;
}
else
{
predictor.runErrorSimulations = true;
}
// Is there an error prediction available? If so add that into the mix
if (this.ErrorPredictionReady)
{
if (parachutePlan.AddResult(errorPrediction))
{
// The parachute plan has told us to give up. Clear the data and start again
parachutePlan.ClearData();
return;
}
}
// Has the Landing prediction been updated? If so then we can use the result to refine our parachute plan.
if (this.PredictionReady)
{
if (parachutePlan.AddResult(prediction))
{
// The parachute plan has told us to give up. Clear the data and start again
parachutePlan.ClearData();
return;
}
}
// Update the status to make it look like something interesting is going on under the covers!
status = "Targeting by timing parachute deployment. Multipler:" + parachutePlan.GetMultiplier().ToString("F4");
} |
<<<<<<<
=======
extern alias Legacy;
>>>>>>>
<<<<<<<
public NuGetPackageManager(ISourceRepositoryProvider sourceRepositoryProvider, Configuration.ISettings settings, string packagesFolderPath)
=======
public NuGetPackageManager(
ISourceRepositoryProvider sourceRepositoryProvider,
ISettings settings,
string packagesFolderPath)
>>>>>>>
public NuGetPackageManager(
ISourceRepositoryProvider sourceRepositoryProvider,
Configuration.ISettings settings,
string packagesFolderPath)
<<<<<<<
public NuGetPackageManager(ISourceRepositoryProvider sourceRepositoryProvider, Configuration.ISettings settings, ISolutionManager solutionManager)
=======
public NuGetPackageManager(
ISourceRepositoryProvider sourceRepositoryProvider,
ISettings settings,
ISolutionManager solutionManager,
IDeleteOnRestartManager deleteOnRestartManager)
>>>>>>>
public NuGetPackageManager(
ISourceRepositoryProvider sourceRepositoryProvider,
Configuration.ISettings settings,
ISolutionManager solutionManager,
IDeleteOnRestartManager deleteOnRestartManager)
<<<<<<<
nuGetProjectContext.Log(NuGet.ProjectManagement.MessageLevel.Info, Strings.AttemptingToGatherDependencyInfoForMultiplePackages, projectName, targetFramework);
var allSources = new List<SourceRepository>(primarySources);
var primarySourcesSet = new HashSet<string>(primarySources.Select(s => s.PackageSource.Source));
foreach (var secondarySource in secondarySources)
{
if (!primarySourcesSet.Contains(secondarySource.PackageSource.Source))
{
allSources.Add(secondarySource);
}
}
// Unless the packageIdentity was explicitly asked for we should remove any potential downgrades
var allowDowngrades = packageIdentity != null;
var gatherContext = new GatherContext()
{
InstalledPackages = oldListOfInstalledPackages.ToList(),
PrimaryTargetIds = primaryTargetIds.ToList(),
PrimaryTargets = primaryTargets.ToList(),
TargetFramework = targetFramework,
PrimarySources = primarySources.ToList(),
AllSources = allSources.ToList(),
PackagesFolderSource = PackagesFolderSourceRepository,
ResolutionContext = resolutionContext,
AllowDowngrades = allowDowngrades
};
var availablePackageDependencyInfoWithSourceSet = await ResolverGather.GatherAsync(gatherContext, token);
=======
nuGetProjectContext.Log(MessageLevel.Info, Strings.AttemptingToGatherDependencyInfoForMultiplePackages, projectName, targetFramework);
var allSources = new List<SourceRepository>(primarySources);
var primarySourcesSet = new HashSet<string>(primarySources.Select(s => s.PackageSource.Source));
foreach (var secondarySource in secondarySources)
{
if (!primarySourcesSet.Contains(secondarySource.PackageSource.Source))
{
allSources.Add(secondarySource);
}
}
// Unless the packageIdentity was explicitly asked for we should remove any potential downgrades
var allowDowngrades = packageIdentity != null;
var gatherContext = new GatherContext()
{
InstalledPackages = oldListOfInstalledPackages.ToList(),
PrimaryTargetIds = primaryTargetIds.ToList(),
PrimaryTargets = primaryTargets.ToList(),
TargetFramework = targetFramework,
PrimarySources = primarySources.ToList(),
AllSources = allSources.ToList(),
PackagesFolderSource = PackagesFolderSourceRepository,
ResolutionContext = resolutionContext,
AllowDowngrades = allowDowngrades
};
var availablePackageDependencyInfoWithSourceSet = await ResolverGather.GatherAsync(gatherContext, token);
>>>>>>>
nuGetProjectContext.Log(NuGet.ProjectManagement.MessageLevel.Info, Strings.AttemptingToGatherDependencyInfoForMultiplePackages, projectName, targetFramework);
var allSources = new List<SourceRepository>(primarySources);
var primarySourcesSet = new HashSet<string>(primarySources.Select(s => s.PackageSource.Source));
foreach (var secondarySource in secondarySources)
{
if (!primarySourcesSet.Contains(secondarySource.PackageSource.Source))
{
allSources.Add(secondarySource);
}
}
// Unless the packageIdentity was explicitly asked for we should remove any potential downgrades
var allowDowngrades = packageIdentity != null;
var gatherContext = new GatherContext()
{
InstalledPackages = oldListOfInstalledPackages.ToList(),
PrimaryTargetIds = primaryTargetIds.ToList(),
PrimaryTargets = primaryTargets.ToList(),
TargetFramework = targetFramework,
PrimarySources = primarySources.ToList(),
AllSources = allSources.ToList(),
PackagesFolderSource = PackagesFolderSourceRepository,
ResolutionContext = resolutionContext,
AllowDowngrades = allowDowngrades
};
var availablePackageDependencyInfoWithSourceSet = await ResolverGather.GatherAsync(gatherContext, token);
<<<<<<<
// if we have been asked for exact versions of packages then we should also force the uninstall/install of those packages (this corresponds to a -Reinstall)
bool force = PrunePackageTree.IsExactVersion(resolutionContext.VersionConstraints);
var installedPackagesInDependencyOrder = await GetInstalledPackagesInDependencyOrder(nuGetProject, token);
nuGetProjectActions = GetProjectActionsForUpdate(newListOfInstalledPackages, installedPackagesInDependencyOrder, prunedAvailablePackages, nuGetProjectContext, force);
=======
// if we have been asked for exact versions of packages then we should also force the uninstall/install of those packages (this corresponds to a -Reinstall)
bool force = PrunePackageTree.IsExactVersion(resolutionContext.VersionConstraints);
var installedPackagesInDependencyOrder = await GetInstalledPackagesInDependencyOrder(nuGetProject, token);
nuGetProjectActions = GetProjectActionsForUpdate(newListOfInstalledPackages, installedPackagesInDependencyOrder, prunedAvailablePackages, nuGetProjectContext, force);
>>>>>>>
// if we have been asked for exact versions of packages then we should also force the uninstall/install of those packages (this corresponds to a -Reinstall)
bool force = PrunePackageTree.IsExactVersion(resolutionContext.VersionConstraints);
var installedPackagesInDependencyOrder = await GetInstalledPackagesInDependencyOrder(nuGetProject, token);
nuGetProjectActions = GetProjectActionsForUpdate(newListOfInstalledPackages, installedPackagesInDependencyOrder, prunedAvailablePackages, nuGetProjectContext, force);
<<<<<<<
nuGetProjectContext.Log(NuGet.ProjectManagement.MessageLevel.Info, Strings.ResolvingActionsToInstallOrUpdateMultiplePackages);
=======
nuGetProjectContext.Log(MessageLevel.Info, Strings.ResolvingActionsToInstallOrUpdateMultiplePackages);
>>>>>>>
nuGetProjectContext.Log(NuGet.ProjectManagement.MessageLevel.Info, Strings.ResolvingActionsToInstallOrUpdateMultiplePackages);
<<<<<<<
if (nuGetProjectAction.NuGetProjectActionType == NuGetProjectActionType.Install)
{
nuGetProjectContext.Log(
ProjectManagement.MessageLevel.Info,
Strings.SuccessfullyInstalled,
nuGetProjectAction.PackageIdentity,
nuGetProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
else
{
// uninstall
nuGetProjectContext.Log(
ProjectManagement.MessageLevel.Info,
Strings.SuccessfullyUninstalled,
nuGetProjectAction.PackageIdentity,
nuGetProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
=======
if (nuGetProjectAction.NuGetProjectActionType == NuGetProjectActionType.Install)
{
nuGetProjectContext.Log(
MessageLevel.Info,
Strings.SuccessfullyInstalled,
nuGetProjectAction.PackageIdentity,
nuGetProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
else
{
// uninstall
nuGetProjectContext.Log(
MessageLevel.Info,
Strings.SuccessfullyUninstalled,
nuGetProjectAction.PackageIdentity,
nuGetProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
>>>>>>>
if (nuGetProjectAction.NuGetProjectActionType == NuGetProjectActionType.Install)
{
nuGetProjectContext.Log(
ProjectManagement.MessageLevel.Info,
Strings.SuccessfullyInstalled,
nuGetProjectAction.PackageIdentity,
nuGetProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
else
{
// uninstall
nuGetProjectContext.Log(
ProjectManagement.MessageLevel.Info,
Strings.SuccessfullyUninstalled,
nuGetProjectAction.PackageIdentity,
nuGetProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
<<<<<<<
if (action.NuGetProjectActionType == NuGetProjectActionType.Install)
{
nuGetProjectContext.Log(
ProjectManagement.MessageLevel.Info,
Strings.SuccessfullyInstalled,
identityString,
buildIntegratedProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
else
{
// uninstall
nuGetProjectContext.Log(
ProjectManagement.MessageLevel.Info,
Strings.SuccessfullyUninstalled,
identityString,
buildIntegratedProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
}
// Run init.ps1 scripts
var sortedPackages = BuildIntegratedProjectUtility.GetOrderedProjectDependencies(buildIntegratedProject);
var addedPackages = new HashSet<PackageIdentity>(
BuildIntegratedRestoreUtility.GetAddedPackages(projectAction.OriginalLockFile, restoreResult.LockFile),
PackageIdentity.Comparer);
// Find all dependencies in sorted order, then using the order run init.ps1 for only the new packages.
foreach (var package in sortedPackages)
{
if (addedPackages.Contains(package))
{
var packagePath = BuildIntegratedProjectUtility.GetPackagePathFromGlobalSource(package, Settings);
await buildIntegratedProject.ExecuteInitScriptAsync(package, nuGetProjectContext, false);
}
=======
if (action.NuGetProjectActionType == NuGetProjectActionType.Install)
{
nuGetProjectContext.Log(
MessageLevel.Info,
Strings.SuccessfullyInstalled,
identityString,
buildIntegratedProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
else
{
// uninstall
nuGetProjectContext.Log(
MessageLevel.Info,
Strings.SuccessfullyUninstalled,
identityString,
buildIntegratedProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
>>>>>>>
if (action.NuGetProjectActionType == NuGetProjectActionType.Install)
{
nuGetProjectContext.Log(
ProjectManagement.MessageLevel.Info,
Strings.SuccessfullyInstalled,
identityString,
buildIntegratedProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
else
{
// uninstall
nuGetProjectContext.Log(
ProjectManagement.MessageLevel.Info,
Strings.SuccessfullyUninstalled,
identityString,
buildIntegratedProject.GetMetadata<string>(NuGetProjectMetadataKeys.Name));
}
}
// Run init.ps1 scripts
var sortedPackages = BuildIntegratedProjectUtility.GetOrderedProjectDependencies(buildIntegratedProject);
var addedPackages = new HashSet<PackageIdentity>(
BuildIntegratedRestoreUtility.GetAddedPackages(projectAction.OriginalLockFile, restoreResult.LockFile),
PackageIdentity.Comparer);
// Find all dependencies in sorted order, then using the order run init.ps1 for only the new packages.
foreach (var package in sortedPackages)
{
if (addedPackages.Contains(package))
{
var packagePath = BuildIntegratedProjectUtility.GetPackagePathFromGlobalSource(package, Settings);
await buildIntegratedProject.ExecuteInitScriptAsync(package, nuGetProjectContext, false);
} |
<<<<<<<
public Task<IChangePlanResult> ChangePlanAsync(string userId, NamedId<DomainId> appId, string? planId)
=======
public Task<IChangePlanResult> ChangePlanAsync(string userId, NamedId<Guid> appId, string? planId, string? referer)
>>>>>>>
public Task<IChangePlanResult> ChangePlanAsync(string userId, NamedId<DomainId> appId, string? planId, string? referer) |
<<<<<<<
// No-op all project closures are up to date and all packages exist on disk.
if (await DependencyGraphRestoreUtility.IsRestoreRequiredAsync(
SolutionManager,
=======
var isRestoreRequired = await DependencyGraphRestoreUtility.IsRestoreRequiredAsync(
projects,
>>>>>>>
var isRestoreRequired = await DependencyGraphRestoreUtility.IsRestoreRequiredAsync(
SolutionManager,
<<<<<<<
cacheContext,
_dependencyGraphProjectCacheHash))
=======
referenceContext);
// No-op all project closures are up to date and all packages exist on disk.
if (isRestoreRequired)
>>>>>>>
cacheContext,
_dependencyGraphProjectCacheHash))
// No-op all project closures are up to date and all packages exist on disk.
if (isRestoreRequired)
<<<<<<<
var providerCache = new RestoreCommandProvidersCache();
Action<SourceCacheContext> cacheModifier = (cache) => { };
await DependencyGraphRestoreUtility.RestoreAsync(
SolutionManager,
cacheContext,
providerCache,
cacheModifier,
=======
var restoreSummaries = await DependencyGraphRestoreUtility.RestoreAsync(
projects,
>>>>>>>
var providerCache = new RestoreCommandProvidersCache();
Action<SourceCacheContext> cacheModifier = (cache) => { };
await DependencyGraphRestoreUtility.RestoreAsync(
SolutionManager,
cacheContext,
providerCache,
cacheModifier,
<<<<<<<
cacheContext.Logger,
Token);
=======
referenceContext);
_packageCount += restoreSummaries.Select(summary => summary.InstallCount).Sum();
var isRestoreFailed = restoreSummaries.Any(summary => summary.Success == false);
if (isRestoreFailed)
{
_status = NuGetOperationStatus.Failed;
}
>>>>>>>
cacheContext.Logger,
Token);
_packageCount += restoreSummaries.Select(summary => summary.InstallCount).Sum();
var isRestoreFailed = restoreSummaries.Any(summary => summary.Success == false);
if (isRestoreFailed)
{
_status = NuGetOperationStatus.Failed;
} |
<<<<<<<
public static string GetHash(RestoreRequest request)
{
if(request.Project.RestoreMetadata.ProjectStyle == ProjectStyle.DotnetCliTool)
{
var uniqueName = request.DependencyGraphSpec.Restore.First();
var dgSpec = request.DependencyGraphSpec.WithProjectClosure(uniqueName);
dgSpec.GetProjectSpec(uniqueName).RestoreMetadata.ProjectPath = null;
dgSpec.GetProjectSpec(uniqueName).FilePath = null;
return dgSpec.GetHash();
}
return request.DependencyGraphSpec.GetHash();
}
=======
private void ReplayWarningsAndErrors()
{
var logMessages = _request.ExistingLockFile?.LogMessages ?? Enumerable.Empty<IAssetsLogMessage>();
foreach (var logMessage in logMessages)
{
var restoreLogMessage = new RestoreLogMessage(logMessage.Level, logMessage.Code, logMessage.Message)
{
ProjectPath = logMessage.ProjectPath,
WarningLevel = logMessage.WarningLevel,
FilePath = logMessage.FilePath,
LibraryId = logMessage.LibraryId,
TargetGraphs = logMessage.TargetGraphs,
StartLineNumber = logMessage.StartLineNumber,
StartColumnNumber = logMessage.StartColumnNumber,
EndLineNumber = logMessage.EndLineNumber,
EndColumnNumber = logMessage.EndColumnNumber
};
_request.Log.LogAsync(restoreLogMessage);
}
}
>>>>>>>
public static string GetHash(RestoreRequest request)
{
if(request.Project.RestoreMetadata.ProjectStyle == ProjectStyle.DotnetCliTool)
{
var uniqueName = request.DependencyGraphSpec.Restore.First();
var dgSpec = request.DependencyGraphSpec.WithProjectClosure(uniqueName);
dgSpec.GetProjectSpec(uniqueName).RestoreMetadata.ProjectPath = null;
dgSpec.GetProjectSpec(uniqueName).FilePath = null;
return dgSpec.GetHash();
}
return request.DependencyGraphSpec.GetHash();
}
private void ReplayWarningsAndErrors()
{
var logMessages = _request.ExistingLockFile?.LogMessages ?? Enumerable.Empty<IAssetsLogMessage>();
foreach (var logMessage in logMessages)
{
var restoreLogMessage = new RestoreLogMessage(logMessage.Level, logMessage.Code, logMessage.Message)
{
ProjectPath = logMessage.ProjectPath,
WarningLevel = logMessage.WarningLevel,
FilePath = logMessage.FilePath,
LibraryId = logMessage.LibraryId,
TargetGraphs = logMessage.TargetGraphs,
StartLineNumber = logMessage.StartLineNumber,
StartColumnNumber = logMessage.StartColumnNumber,
EndLineNumber = logMessage.EndLineNumber,
EndColumnNumber = logMessage.EndColumnNumber
};
_request.Log.LogAsync(restoreLogMessage);
}
} |
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
new ResolutionContext(DependencyBehavior.Highest, false, true, VersionConstraints.None),
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
=======
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
new ResolutionContext(DependencyBehavior.Highest, false, true, VersionConstraints.None),
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
>>>>>>>
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
new ResolutionContext(DependencyBehavior.Highest, false, true, VersionConstraints.None),
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
<<<<<<<
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
new ResolutionContext(DependencyBehavior.Highest, false, true, VersionConstraints.None),
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
=======
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
new ResolutionContext(DependencyBehavior.Highest, false, true, VersionConstraints.None),
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
>>>>>>>
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
new ResolutionContext(DependencyBehavior.Highest, false, true, VersionConstraints.None),
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
<<<<<<<
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
resolutionContext,
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
=======
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
resolutionContext,
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
>>>>>>>
var packageActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
resolutionContext,
new TestNuGetProjectContext(),
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var nuGetProjectActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
resolutionContext,
testNuGetProjectContext,
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
=======
var nuGetProjectActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
resolutionContext,
testNuGetProjectContext,
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
>>>>>>>
var nuGetProjectActions = (await nuGetPackageManager.PreviewUpdatePackagesAsync(
msBuildNuGetProject,
resolutionContext,
testNuGetProjectContext,
sourceRepositoryProvider.GetRepositories(),
sourceRepositoryProvider.GetRepositories(),
token)).ToList();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
new ResolutionContext(DependencyBehavior.Lowest, true, false, VersionConstraints.None),
new TestNuGetProjectContext(),
=======
new ResolutionContext(DependencyBehavior.Lowest, true, false, VersionConstraints.None),
new TestNuGetProjectContext(),
>>>>>>>
new ResolutionContext(DependencyBehavior.Lowest, true, false, VersionConstraints.None),
new TestNuGetProjectContext(),
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
<<<<<<<
var testSettings = new Configuration.NullSettings();
=======
var testSettings = new NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager();
>>>>>>>
var testSettings = new Configuration.NullSettings();
var deleteOnRestartManager = new TestDeleteOnRestartManager(); |
<<<<<<<
=======
using Autofac;
using SmartStore.Services.Customers;
using SmartStore.Core;
using SmartStore.Core.Domain.Customers;
>>>>>>>
using SmartStore.Services.Customers;
using SmartStore.Core;
using SmartStore.Core.Domain.Customers;
<<<<<<<
if (task.Enabled)
{
task.NextRunUtc = now.AddSeconds(task.Seconds);
}
=======
if (task.Enabled)
{
task.NextRunUtc = _scheduledTaskService.GetNextSchedule(task);
}
>>>>>>>
if (task.Enabled)
{
task.NextRunUtc = _scheduledTaskService.GetNextSchedule(task);
} |
<<<<<<<
using SmartStore.Web.Framework.Plugins;
=======
using SmartStore.Web.Models.ShoppingCart;
>>>>>>>
using SmartStore.Web.Framework.Plugins;
using SmartStore.Web.Models.ShoppingCart;
<<<<<<<
// codehint: sm-add (determine brand image of shipping method)
var plugin = PluginManager.ReferencedPlugins.Where(p => p.SystemName == shippingOption.ShippingRateComputationMethodSystemName).FirstOrDefault();
if (plugin != null && plugin.BrandImageFileName.HasValue())
{
soModel.BrandUrl = "~/Plugins/{0}/Content/{1}".FormatInvariant(plugin.SystemName, plugin.BrandImageFileName);
}
//adjust rate
Discount appliedDiscount = null;
var shippingTotal = _orderTotalCalculationService.AdjustShippingRate(
=======
foreach (var shippingOption in getShippingOptionResponse.ShippingOptions)
{
var soModel = new CheckoutShippingMethodModel.ShippingMethodModel()
{
Name = shippingOption.Name,
Description = shippingOption.Description,
ShippingRateComputationMethodSystemName = shippingOption.ShippingRateComputationMethodSystemName,
};
// codehint: sm-add (determine brand image of shipping method)
var plugin = PluginManager.ReferencedPlugins.Where(p => p.SystemName == shippingOption.ShippingRateComputationMethodSystemName).FirstOrDefault();
if (plugin != null && plugin.BrandImageFileName.HasValue())
{
soModel.BrandUrl = "~/Plugins/{0}/{1}".FormatInvariant(plugin.SystemName, plugin.BrandImageFileName);
}
//adjust rate
Discount appliedDiscount = null;
var shippingTotal = _orderTotalCalculationService.AdjustShippingRate(
>>>>>>>
// codehint: sm-add (determine brand image of shipping method)
var plugin = PluginManager.ReferencedPlugins.Where(p => p.SystemName == shippingOption.ShippingRateComputationMethodSystemName).FirstOrDefault();
if (plugin != null && plugin.BrandImageFileName.HasValue())
{
soModel.BrandUrl = "~/Plugins/{0}/Content/{1}".FormatInvariant(plugin.SystemName, plugin.BrandImageFileName);
}
foreach (var shippingOption in getShippingOptionResponse.ShippingOptions)
{
var soModel = new CheckoutShippingMethodModel.ShippingMethodModel()
{
Name = shippingOption.Name,
Description = shippingOption.Description,
ShippingRateComputationMethodSystemName = shippingOption.ShippingRateComputationMethodSystemName,
};
// codehint: sm-add (determine brand image of shipping method)
var plugin = PluginManager.ReferencedPlugins.Where(p => p.SystemName == shippingOption.ShippingRateComputationMethodSystemName).FirstOrDefault();
if (plugin != null && plugin.BrandImageFileName.HasValue())
{
soModel.BrandUrl = "~/Plugins/{0}/{1}".FormatInvariant(plugin.SystemName, plugin.BrandImageFileName);
}
//adjust rate
Discount appliedDiscount = null;
var shippingTotal = _orderTotalCalculationService.AdjustShippingRate( |
<<<<<<<
=======
using StackExchange.Profiling;
using System.Threading.Tasks;
using SmartStore.Services.Events;
// codehint: end sm-add
>>>>>>>
using StackExchange.Profiling;
using System.Threading.Tasks;
using SmartStore.Services.Events;
// codehint: end sm-add
<<<<<<<
alreadyProcessedCategoryIds.Add(category.Id);
category = _categoryService.GetCategoryById(category.ParentCategoryId);
=======
var parentId = category.ParentCategoryId;
if (mappedCategories == null)
{
category = _categoryService.GetCategoryById(parentId);
}
else
{
category = mappedCategories.ContainsKey(parentId) ? mappedCategories[parentId] : _categoryService.GetCategoryById(parentId);
}
>>>>>>>
var parentId = category.ParentCategoryId;
if (mappedCategories == null)
{
category = _categoryService.GetCategoryById(parentId);
}
else
{
category = mappedCategories.ContainsKey(parentId) ? mappedCategories[parentId] : _categoryService.GetCategoryById(parentId);
}
<<<<<<<
model.Id = product.Id;
model.Name = product.GetLocalized(x => x.Name);
=======
model.Id = productVariant.Id;
model.Name = productVariant.GetLocalized(x => x.Name).NullEmpty() ?? productVariant.Product.GetLocalized(x => x.Name);
>>>>>>>
model.Id = product.Id;
model.Name = product.GetLocalized(x => x.Name); |
<<<<<<<
using SmartStore.Core.Data;
using SmartStore.Core.Domain.Security;
=======
using SmartStore.Core.Domain.Customers;
>>>>>>>
using SmartStore.Core.Domain.Customers;
using SmartStore.Core.Data;
using SmartStore.Core.Domain.Security;
<<<<<<<
using SmartStore.Core.Logging;
using SmartStore.Services.Customers;
=======
using SmartStore.Core.Logging;
using SmartStore.Services.Customers;
using SmartStore.Services.Localization;
>>>>>>>
using SmartStore.Core.Logging;
using SmartStore.Services.Customers;
<<<<<<<
#endregion
=======
>>>>>>> |
<<<<<<<
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using AmazonPay;
using AmazonPay.StandardPaymentRequests;
using Autofac;
using Newtonsoft.Json.Linq;
=======
using Autofac;
using OffAmazonPaymentsService;
using SmartStore.AmazonPay.Api;
using SmartStore.AmazonPay.Extensions;
>>>>>>>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using AmazonPay;
using AmazonPay.StandardPaymentRequests;
using Autofac;
using Newtonsoft.Json.Linq;
<<<<<<<
using SmartStore.Core.Domain.Discounts;
=======
using SmartStore.Core.Domain.Directory;
>>>>>>>
using SmartStore.Core.Domain.Discounts;
<<<<<<<
using SmartStore.Web;
=======
using SmartStore.Services.Tasks;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using System.Xml.Serialization;
>>>>>>>
using SmartStore.Web;
<<<<<<<
public partial class AmazonPayService : IAmazonPayService
=======
public class AmazonPayService : IAmazonPayService
>>>>>>>
public partial class AmazonPayService : IAmazonPayService
<<<<<<<
private readonly ICountryService _countryService;
private readonly IStateProvinceService _stateProvinceService;
private readonly IAddressService _addressService;
=======
private readonly IPriceFormatter _priceFormatter;
private readonly OrderSettings _orderSettings;
>>>>>>>
private readonly ICountryService _countryService;
private readonly IStateProvinceService _stateProvinceService;
private readonly IAddressService _addressService;
<<<<<<<
RewardPointsSettings rewardPointsSettings,
Lazy<ExternalAuthenticationSettings> externalAuthenticationSettings)
=======
IOrderService orderService,
IRepository<Order> orderRepository,
IOrderProcessingService orderProcessingService,
IScheduleTaskService scheduleTaskService,
IWorkflowMessageService workflowMessageService)
>>>>>>>
Lazy<ExternalAuthenticationSettings> externalAuthenticationSettings)
<<<<<<<
_countryService = countryService;
_stateProvinceService = stateProvinceService;
_addressService = addressService;
=======
_priceFormatter = priceFormatter;
_orderSettings = orderSettings;
>>>>>>>
_countryService = countryService;
_stateProvinceService = stateProvinceService;
_addressService = addressService;
<<<<<<<
if (_rewardPointsSettings.Enabled && !model.IsRecurring)
{
int rewardPointsBalance = customer.GetRewardPointsBalance();
decimal rewardPointsAmountBase = _orderTotalCalculationService.ConvertRewardPointsToAmount(rewardPointsBalance);
decimal rewardPointsAmount = _currencyService.ConvertFromPrimaryStoreCurrency(rewardPointsAmountBase, currency);
if (rewardPointsAmount > decimal.Zero)
{
model.DisplayRewardPoints = true;
model.RewardPointsAmount = _priceFormatter.FormatPrice(rewardPointsAmount, true, false);
model.RewardPointsBalance = rewardPointsBalance;
}
}
_genericAttributeService.SaveAttribute(customer, SystemCustomerAttributeNames.SelectedPaymentMethod, AmazonPayPlugin.SystemName, store.Id);
=======
_genericAttributeService.SaveAttribute<string>(customer, SystemCustomerAttributeNames.SelectedPaymentMethod, AmazonPayCore.SystemName, store.Id);
>>>>>>>
_genericAttributeService.SaveAttribute(customer, SystemCustomerAttributeNames.SelectedPaymentMethod, AmazonPayPlugin.SystemName, store.Id);
<<<<<<<
if (customer.BillingAddress != null)
{
model.BillingAddress.PrepareModel(customer.BillingAddress, false, _addressSettings);
}
=======
}
}
catch (OffAmazonPaymentsServiceException exc)
{
LogAmazonError(exc, notify: true);
}
catch (Exception exc)
{
LogError(exc, notify: true);
}
return model;
}
private string GetAuthorizationState(AmazonPayClient client, string authorizationId)
{
try
{
if (authorizationId.HasValue())
{
AmazonPayApiData data;
if (_api.GetAuthorizationDetails(client, authorizationId, out data) != null)
return data.State;
>>>>>>>
if (customer.BillingAddress != null)
{
model.BillingAddress.PrepareModel(customer.BillingAddress, false, _addressSettings);
} |
<<<<<<<
using System.Collections.Generic;
using SmartStore.Core;
=======
using System;
using System.Collections.Generic;
using SmartStore.Core;
>>>>>>>
using System;
using System.Collections.Generic;
using SmartStore.Core;
<<<<<<<
TopCategories = topCategories ?? new List<ISearchHit>();
TopManufacturers = topManufacturers ?? new List<ISearchHit>();
=======
_hitsFactory = hitsFactory ?? (() => new List<Product>());
_totalHitsCount = totalHitsCount;
>>>>>>>
_hitsFactory = hitsFactory ?? (() => new List<Product>());
_totalHitsCount = totalHitsCount;
TopCategories = topCategories ?? new List<ISearchHit>();
TopManufacturers = topManufacturers ?? new List<ISearchHit>(); |
<<<<<<<
=======
using SmartStore.Collections;
using SmartStore.Web.Framework.Filters;
using SmartStore.Web.Framework.Security;
>>>>>>>
using SmartStore.Web.Framework.Filters;
using SmartStore.Web.Framework.Security; |
<<<<<<<
=======
using SmartStore.Web.Framework.Filters;
using SmartStore.Web.Framework.Security;
>>>>>>>
using SmartStore.Web.Framework.Security; |
<<<<<<<
if (productBundleItem != null)
model.ThumbDimensions = _mediaSettings.BundledProductPictureSize;
else if (isAssociatedProduct)
model.ThumbDimensions = _mediaSettings.AssociatedProductPictureSize;
model.DeliveryTime = _deliveryTimeService.GetDeliveryTimeById(product.DeliveryTimeId.GetValueOrDefault());
=======
model.ThumbDimensions = _mediaSettings.AssociatedProductPictureSize;
var deliveryTime = _deliveryTimeService.GetDeliveryTimeById(product.DeliveryTimeId.GetValueOrDefault());
if (deliveryTime != null) {
model.DeliveryTimeName = deliveryTime.GetLocalized(x => x.Name);
model.DeliveryTimeHexValue = deliveryTime.ColorHexValue;
}
>>>>>>>
if (productBundleItem != null)
model.ThumbDimensions = _mediaSettings.BundledProductPictureSize;
else if (isAssociatedProduct)
model.ThumbDimensions = _mediaSettings.AssociatedProductPictureSize;
var deliveryTime = _deliveryTimeService.GetDeliveryTimeById(product.DeliveryTimeId.GetValueOrDefault());
if (deliveryTime != null) {
model.DeliveryTimeName = deliveryTime.GetLocalized(x => x.Name);
model.DeliveryTimeHexValue = deliveryTime.ColorHexValue;
} |
<<<<<<<
RouteName = "Category",
ImageUrl = category.PictureId != null ? _pictureService.GetPictureUrl((int)category.PictureId) : ""
=======
BadgeText = category.GetLocalized(x => x.BadgeText),
BadgeStyle = (BadgeStyle)category.BadgeStyle,
RouteName = "Category"
>>>>>>>
RouteName = "Category",
ImageUrl = category.PictureId != null ? _pictureService.GetPictureUrl((int)category.PictureId) : ""
BadgeText = category.GetLocalized(x => x.BadgeText),
BadgeStyle = (BadgeStyle)category.BadgeStyle,
RouteName = "Category" |
<<<<<<<
services.AddTransientAs<MigrationPath>()
.As<IMigrationPath>();
services.AddTransientAs<AddPatterns>()
.As<IMigration>();
services.AddTransientAs<ConvertEventStore>()
=======
services.AddSingletonAs<CreateBlogCommandMiddleware>()
.As<ICommandMiddleware>();
services.AddTransientAs<Migration01_FromCqrs>()
>>>>>>>
services.AddSingletonAs<CreateBlogCommandMiddleware>()
.As<ICommandMiddleware>();
services.AddTransientAs<MigrationPath>()
.As<IMigrationPath>();
services.AddTransientAs<ConvertEventStore>()
.As<IMigration>();
services.AddTransientAs<AddPatterns>() |
<<<<<<<
public async override Task<List<BreachedEntry>> CheckDatabase(bool expireEntries, bool oldEntriesOnly, bool ignoreDeleted, bool ignoreExpired, IProgress<ProgressItem> progressIndicator)
=======
public async override Task<List<BreachedEntry>> CheckGroup(PwGroup group, bool expireEntries, bool oldEntriesOnly, bool ignoreDeleted, IProgress<ProgressItem> progressIndicator)
>>>>>>>
public async override Task<List<BreachedEntry>> CheckGroup(PwGroup group, bool expireEntries, bool oldEntriesOnly, bool ignoreDeleted, bool ignoreExpired, IProgress<ProgressItem> progressIndicator)
<<<<<<<
var entries = passwordDatabase.RootGroup.GetEntries(true).Where(e => (!ignoreDeleted || !e.IsDeleted(pluginHost)) && (!ignoreExpired || !e.Expires));
=======
var entries = group.GetEntries(true).Where(e => !ignoreDeleted || !e.IsDeleted(pluginHost));
>>>>>>>
var entries = group.GetEntries(true).Where(e => (!ignoreDeleted || !e.IsDeleted(pluginHost)) && (!ignoreExpired || !e.Expires));
<<<<<<<
Dictionary<string, bool> cache = new Dictionary<string, bool>();
=======
>>>>>>>
Dictionary<string, bool> cache = new Dictionary<string, bool>(); |
<<<<<<<
using System.Diagnostics;
using System.Collections;
=======
using BreadPlayer.Models;
using BreadPlayer.SettingsViews;
using BreadPlayer.SettingsViews.ViewModels;
>>>>>>>
using BreadPlayer.Models;
using BreadPlayer.SettingsViews;
using BreadPlayer.SettingsViews.ViewModels;
using System.Diagnostics;
using System.Collections; |
<<<<<<<
using System.Globalization;
=======
using System.Text.RegularExpressions;
>>>>>>>
using System.Text.RegularExpressions;
using System.Globalization; |
<<<<<<<
=======
private readonly object _sendingQueueSyncRoot = new object();
private readonly List<HistoryItem> _sendingQueue = new List<HistoryItem>();
private static Timer _sendingTimer;
private static void StartSendingTimer()
{
//Helpers.Execute.ShowDebugMessage("MTProtoService.StartSendingTimer");
_sendingTimer.Change(TimeSpan.FromSeconds(Constants.ResendMessageInterval), TimeSpan.FromSeconds(Constants.ResendMessageInterval));
}
private static void StopSendingTimer()
{
//Helpers.Execute.ShowDebugMessage("MTProtoService.StoptSendingTimer");
_sendingTimer.Change(Timeout.Infinite, Timeout.Infinite);
}
private static void CheckSendingMessages(object state)
{
#if DEBUG
if (Debugger.IsAttached) return;
#endif
var service = (MTProtoService) state;
service.ProcessQueue();
}
private void GetDialogsAsyncInternal(TLMessagesGetDialogs message, Action<TLMessagesDialogsBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)
{
SendAsyncInternal("messages.getDialogs", int.MaxValue, message, callback, fastCallback, faultCallback);
}
>>>>>>>
private void GetDialogsAsyncInternal(TLMessagesGetDialogs message, Action<TLMessagesDialogsBase> callback, Action fastCallback, Action<TLRPCError> faultCallback)
{
SendAsyncInternal("messages.getDialogs", int.MaxValue, message, callback, fastCallback, faultCallback);
} |
<<<<<<<
var title = AppResources.ProxySettingsShareTitle;
var link = new Uri(MeUrlPrefixConverter.Convert($"socks?{string.Join("&", builder)}"));
=======
var title = Strings.Resources.ProxySettingsShareTitle;
var link = new Uri(UsernameToLinkConverter.Convert($"socks?{string.Join("&", builder)}"));
>>>>>>>
var title = Strings.Resources.ProxySettingsShareTitle;
var link = new Uri(MeUrlPrefixConverter.Convert($"socks?{string.Join("&", builder)}")); |
<<<<<<<
=======
to.Write(0x2EC0533F);
>>>>>>>
<<<<<<<
to.WriteString(Title ?? string.Empty);
to.WriteString(Address ?? string.Empty);
to.WriteString(Provider ?? string.Empty);
to.WriteString(VenueId ?? string.Empty);
=======
to.Write(Title);
to.Write(Address);
to.Write(Provider);
to.Write(VenueId);
to.Write(VenueType);
>>>>>>>
to.WriteString(Title ?? string.Empty);
to.WriteString(Address ?? string.Empty);
to.WriteString(Provider ?? string.Empty);
to.WriteString(VenueId ?? string.Empty);
to.WriteString(VenueType ?? string.Empty); |
<<<<<<<
private static IJsonValue CreateValue(double v)
=======
[Fact]
public async Task Should_add_error_if_unique_constraint_failed()
{
var sut = Field(new NumberFieldProperties { IsUnique = true });
await sut.ValidateAsync(CreateValue(12.5), errors, ValidationTestExtensions.References(Guid.NewGuid()));
errors.Should().BeEquivalentTo(
new[] { "Another content with the same value exists." });
}
private static JValue CreateValue(object v)
>>>>>>>
[Fact]
public async Task Should_add_error_if_unique_constraint_failed()
{
var sut = Field(new NumberFieldProperties { IsUnique = true });
await sut.ValidateAsync(CreateValue(12.5), errors, ValidationTestExtensions.References(Guid.NewGuid()));
errors.Should().BeEquivalentTo(
new[] { "Another content with the same value exists." });
}
private static IJsonValue CreateValue(double v) |
<<<<<<<
using Squidex.Infrastructure;
=======
using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands;
>>>>>>>
using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands;
<<<<<<<
private static readonly IReadOnlyList<IEnrichedAssetEntity> EmptyAssets = new List<IEnrichedAssetEntity>();
private static readonly IReadOnlyList<IContentEntity> EmptyContents = new List<IContentEntity>();
=======
private static readonly List<IEnrichedAssetEntity> EmptyAssets = new List<IEnrichedAssetEntity>();
private static readonly List<IEnrichedContentEntity> EmptyContents = new List<IEnrichedContentEntity>();
>>>>>>>
private static readonly List<IEnrichedAssetEntity> EmptyAssets = new List<IEnrichedAssetEntity>();
private static readonly List<IEnrichedContentEntity> EmptyContents = new List<IEnrichedContentEntity>();
<<<<<<<
return dataLoaderContextAccessor.Context.GetOrAddBatchLoader<DomainId, IEnrichedAssetEntity>("Assets",
=======
return dataLoaderContextAccessor.Context.GetOrAddBatchLoader<Guid, IEnrichedAssetEntity>(nameof(GetAssetsLoader),
>>>>>>>
return dataLoaderContextAccessor.Context.GetOrAddBatchLoader<DomainId, IEnrichedAssetEntity>(nameof(GetAssetsLoader),
<<<<<<<
private static ICollection<DomainId>? ParseIds(IJsonValue value)
=======
private static async Task<IReadOnlyList<T>> LoadManyAsync<TKey, T>(IDataLoader<TKey, T> dataLoader, ICollection<TKey> keys) where T : class
{
var contents = await Task.WhenAll(keys.Select(x => dataLoader.LoadAsync(x).GetResultAsync()));
return contents.NotNull().ToList();
}
private static ICollection<Guid>? ParseIds(IJsonValue value)
>>>>>>>
private static async Task<IReadOnlyList<T>> LoadManyAsync<TKey, T>(IDataLoader<TKey, T> dataLoader, ICollection<TKey> keys) where T : class
{
var contents = await Task.WhenAll(keys.Select(x => dataLoader.LoadAsync(x).GetResultAsync()));
return contents.NotNull().ToList();
}
private static ICollection<DomainId>? ParseIds(IJsonValue value) |
<<<<<<<
private readonly NamedId<DomainId> appId = NamedId.Of(DomainId.NewGuid(), "my-app");
=======
private readonly IUrlGenerator urlGenerator = A.Fake<IUrlGenerator>();
>>>>>>>
private readonly NamedId<DomainId> appId = NamedId.Of(DomainId.NewGuid(), "my-app");
private readonly IUrlGenerator urlGenerator = A.Fake<IUrlGenerator>();
<<<<<<<
var schemaId1 = NamedId.Of(DomainId.NewGuid(), "my-schema1");
var schemaId2 = NamedId.Of(DomainId.NewGuid(), "my-schema2");
=======
var me = new RefToken(RefTokenType.Subject, "123");
var appId = Guid.NewGuid();
>>>>>>>
var me = new RefToken(RefTokenType.Subject, "123");
var schemaId1 = NamedId.Of(DomainId.NewGuid(), "my-schema1");
var schemaId2 = NamedId.Of(DomainId.NewGuid(), "my-schema2");
<<<<<<<
await sut.RestoreEventAsync(ContentEvent(new ContentCreated
=======
var context = new RestoreContext(appId, new UserMapping(me), A.Fake<IBackupReader>());
await sut.RestoreEventAsync(Envelope.Create(new ContentCreated
>>>>>>>
await sut.RestoreEventAsync(ContentEvent(new ContentCreated |
<<<<<<<
ToggleMuteCommand = new RelayCommand<bool>(ToggleMuteExecute);
=======
ToggleMuteCommand = new RelayCommand(ToggleMuteExecute);
SetAdminsCommand = new RelayCommand(SetAdminsExecute);
>>>>>>>
ToggleMuteCommand = new RelayCommand(ToggleMuteExecute); |
<<<<<<<
var json = new Dictionary<DomainId, JsonAppPattern>(value.Count);
=======
var json = new Dictionary<Guid, AppPattern>(value.Count);
>>>>>>>
var json = new Dictionary<DomainId, AppPattern>(value.Count);
<<<<<<<
var json = serializer.Deserialize<Dictionary<DomainId, JsonAppPattern>>(reader)!;
=======
var json = serializer.Deserialize<Dictionary<Guid, AppPattern>>(reader)!;
>>>>>>>
var json = serializer.Deserialize<Dictionary<DomainId, AppPattern>>(reader)!; |
<<<<<<<
public MyEventConsumerGrain(
EventConsumerFactory eventConsumerFactory,
IStore<string> store,
IEventStore eventStore,
IEventDataFormatter eventDataFormatter,
IGrainIdentity identity,
IGrainRuntime runtime,
ISemanticLog log)
: base(eventConsumerFactory, store, eventStore, eventDataFormatter, identity, runtime, log)
=======
public MyEventConsumerGrain(IStore<string> store, IEventStore eventStore, IEventDataFormatter eventDataFormatter, ISemanticLog log)
: base(store, eventStore, eventDataFormatter, log)
>>>>>>>
public MyEventConsumerGrain(
EventConsumerFactory eventConsumerFactory,
IStore<string> store,
IEventStore eventStore,
IEventDataFormatter eventDataFormatter,
ISemanticLog log)
: base(eventConsumerFactory, store, eventStore, eventDataFormatter, log)
<<<<<<<
A.CallTo(() => store.WithSnapshots(A<Type>.Ignored, consumerName, A<Func<EventConsumerState, Task>>.Ignored))
.Invokes(new Action<Type, string, Func<EventConsumerState, Task>>((t, key, a) => apply = a))
=======
A.CallTo(() => store.WithSnapshots(typeof(EventConsumerGrain), consumerName, A<Func<EventConsumerState, Task>>.Ignored))
.Invokes(new Action<Type, string, Func<EventConsumerState, Task>>((type, key, a) => apply = a))
>>>>>>>
A.CallTo(() => store.WithSnapshots(A<Type>.Ignored, consumerName, A<Func<EventConsumerState, Task>>.Ignored))
.Invokes(new Action<Type, string, Func<EventConsumerState, Task>>((t, key, a) => apply = a))
<<<<<<<
sut = new MyEventConsumerGrain(
x => eventConsumer,
store,
eventStore,
formatter,
A.Fake<IGrainIdentity>(),
A.Fake<IGrainRuntime>(),
log);
=======
sut = new MyEventConsumerGrain(store, eventStore, formatter, log);
sutSubscriber = sut;
>>>>>>>
sut = new MyEventConsumerGrain(
x => eventConsumer,
store,
eventStore,
formatter,
log);
<<<<<<<
await sut.OnActivateAsync();
await sut.ActivateAsync();
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
sut.Dispose();
>>>>>>>
await sut.OnActivateAsync(consumerName);
await sut.ActivateAsync();
<<<<<<<
await sut.OnActivateAsync();
await sut.ActivateAsync();
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
sut.Dispose();
>>>>>>>
await sut.OnActivateAsync(consumerName);
await sut.ActivateAsync();
<<<<<<<
await sut.OnActivateAsync();
await sut.ActivateAsync();
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
sut.Dispose();
>>>>>>>
await sut.OnActivateAsync(consumerName);
await sut.ActivateAsync();
<<<<<<<
await sut.OnActivateAsync();
await sut.ActivateAsync();
await sut.StopAsync();
await sut.StopAsync();
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
sut.Stop();
sut.Stop();
sut.Dispose();
>>>>>>>
await sut.OnActivateAsync(consumerName);
await sut.ActivateAsync();
await sut.StopAsync();
await sut.StopAsync();
<<<<<<<
await sut.OnActivateAsync();
await sut.ActivateAsync();
await sut.StopAsync();
await sut.ResetAsync();
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
sut.Stop();
sut.Reset();
sut.Dispose();
>>>>>>>
await sut.OnActivateAsync(consumerName);
await sut.ActivateAsync();
await sut.StopAsync();
await sut.ResetAsync();
<<<<<<<
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
>>>>>>>
<<<<<<<
await sut.OnActivateAsync();
await sut.ActivateAsync();
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
>>>>>>>
await sut.OnActivateAsync(consumerName);
await sut.ActivateAsync();
<<<<<<<
await sut.OnActivateAsync();
await sut.ActivateAsync();
await sut.ActivateAsync();
A.CallTo(() => eventSubscription.WakeUp())
.MustHaveHappened();
}
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
>>>>>>>
await sut.OnActivateAsync(consumerName);
await sut.ActivateAsync();
await sut.ActivateAsync();
A.CallTo(() => eventSubscription.WakeUp())
.MustHaveHappened();
}
<<<<<<<
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
>>>>>>>
<<<<<<<
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
>>>>>>>
<<<<<<<
=======
sut.ActivateAsync(consumerName).Wait();
sut.Activate(eventConsumer);
>>>>>>> |
<<<<<<<
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
=======
using Telegram.Api.TL.Messages;
using Windows.UI.Notifications;
>>>>>>>
using Telegram.Api.TL.Messages;
using Windows.UI.Notifications;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation; |
<<<<<<<
public async Task<LuceneDirectory> CreateDirectoryAsync(DomainId schemaId)
=======
public async Task<LuceneDirectory> CreateDirectoryAsync(Guid ownerId)
>>>>>>>
public async Task<LuceneDirectory> CreateDirectoryAsync(DomainId ownerId) |
<<<<<<<
to.WriteInt32((Int32)Flags);
to.WriteInt32(Id);
to.WriteString(About ?? string.Empty);
if (HasParticipantsCount) to.WriteInt32(ParticipantsCount.Value);
if (HasAdminsCount) to.WriteInt32(AdminsCount.Value);
if (HasKickedCount) to.WriteInt32(KickedCount.Value);
if (HasBannedCount) to.WriteInt32(BannedCount.Value);
to.WriteInt32(ReadInboxMaxId);
to.WriteInt32(ReadOutboxMaxId);
to.WriteInt32(UnreadCount);
=======
to.Write(0x17F45FCF);
to.Write((Int32)Flags);
to.Write(Id);
to.Write(About);
if (HasParticipantsCount) to.Write(ParticipantsCount.Value);
if (HasAdminsCount) to.Write(AdminsCount.Value);
if (HasKickedCount) to.Write(KickedCount.Value);
if (HasBannedCount) to.Write(BannedCount.Value);
to.Write(ReadInboxMaxId);
to.Write(ReadOutboxMaxId);
to.Write(UnreadCount);
>>>>>>>
to.WriteInt32((Int32)Flags);
to.WriteInt32(Id);
to.WriteString(About ?? string.Empty);
if (HasParticipantsCount) to.WriteInt32(ParticipantsCount.Value);
if (HasAdminsCount) to.WriteInt32(AdminsCount.Value);
if (HasKickedCount) to.WriteInt32(KickedCount.Value);
if (HasBannedCount) to.WriteInt32(BannedCount.Value);
to.WriteInt32(ReadInboxMaxId);
to.WriteInt32(ReadOutboxMaxId);
to.WriteInt32(UnreadCount);
<<<<<<<
if (HasMigratedFromChatId) to.WriteInt32(MigratedFromChatId.Value);
if (HasMigratedFromMaxId) to.WriteInt32(MigratedFromMaxId.Value);
if (HasPinnedMsgId) to.WriteInt32(PinnedMsgId.Value);
=======
if (HasMigratedFromChatId) to.Write(MigratedFromChatId.Value);
if (HasMigratedFromMaxId) to.Write(MigratedFromMaxId.Value);
if (HasPinnedMsgId) to.Write(PinnedMsgId.Value);
if (HasStickerSet) to.WriteObject(StickerSet);
>>>>>>>
if (HasMigratedFromChatId) to.WriteInt32(MigratedFromChatId.Value);
if (HasMigratedFromMaxId) to.WriteInt32(MigratedFromMaxId.Value);
if (HasPinnedMsgId) to.WriteInt32(PinnedMsgId.Value);
if (HasStickerSet) to.WriteObject(StickerSet); |
<<<<<<<
if (container.EditingMessageFileId is int fileId)
{
ProtoService.Send(new CancelUploadFile(fileId));
}
SetText(null, false);
//Aggregator.Publish(new EditMessageEventArgs(container.PreviousMessage, container.PreviousMessage.Message));
=======
var chat = _chat;
if (chat != null)
{
ShowDraftMessage(chat);
}
else
{
SetText(null, false);
}
>>>>>>>
if (container.EditingMessageFileId is int fileId)
{
ProtoService.Send(new CancelUploadFile(fileId));
}
var chat = _chat;
if (chat != null)
{
ShowDraftMessage(chat);
}
else
{
SetText(null, false);
} |
<<<<<<<
=======
using Squidex.Domain.Apps.Entities.Schemas.Commands;
>>>>>>>
<<<<<<<
if (httpContextAccessor.HttpContext == null)
{
return next(context);
}
=======
>>>>>>>
if (httpContextAccessor.HttpContext == null)
{
return next(context);
}
<<<<<<<
return schemaFeature.SchemaId;
=======
return feature.SchemaId;
>>>>>>>
return feature.SchemaId; |
<<<<<<<
string message;
while ((message = this.listener.NextQueueDownMessage (Identifier)) != null) {
if (!message.Equals (CurrentRevision))
SyncDownBase ();
}
=======
>>>>>>> |
<<<<<<<
JToken jToken = getUpdatedJsonArrayValue((JToken)JObject.Parse(strObj), propNames, scrubRule.UpdateValue, scrubRule.Type);
=======
JToken jToken = GetUpdatedJsonArrayValue((JToken)JObject.Parse(strObj), propNames, scrubRule.UpdateValue);
>>>>>>>
JToken jToken = GetUpdatedJsonArrayValue((JToken)JObject.Parse(strObj), propNames, scrubRule.UpdateValue, scrubRule.Type);
<<<<<<<
public JToken getUpdatedJsonArrayValue(JToken token, List<string> propNames, string overwritevalue, RuleType? ruleType)
=======
public JToken GetUpdatedJsonArrayValue(JToken token, List<string> propNames, string overwritevalue)
>>>>>>>
public JToken GetUpdatedJsonArrayValue(JToken token, List<string> propNames, string overwritevalue, RuleType? ruleType)
<<<<<<<
jArray[k] = getUpdatedJsonArrayValue(jArray[k], propNames.GetRange(1, propNames.Count - 1), overwritevalue, ruleType);
=======
jArray[k] = GetUpdatedJsonArrayValue(jArray[k], propNames.GetRange(1, propNames.Count - 1), overwritevalue);
>>>>>>>
jArray[k] = GetUpdatedJsonArrayValue(jArray[k], propNames.GetRange(1, propNames.Count - 1), overwritevalue, ruleType);
<<<<<<<
jObj[currentProperty] = getUpdatedJsonArrayValue((JToken)jObj[currentProperty], propNames.GetRange(1, propNames.Count - 1), overwritevalue, ruleType);
=======
jObj[currentProperty] = GetUpdatedJsonArrayValue((JToken)jObj[currentProperty], propNames.GetRange(1, propNames.Count - 1), overwritevalue);
>>>>>>>
jObj[currentProperty] = GetUpdatedJsonArrayValue((JToken)jObj[currentProperty], propNames.GetRange(1, propNames.Count - 1), overwritevalue, ruleType); |
<<<<<<<
public enum RuleType { SingleValue, NullValue, Shuffle, PartialMaskFromLeft, PartialMaskFromRight };//Can add random rule type later if required.
=======
>>>>>>> |
<<<<<<<
// PCodex
instance.Patch(typeof(CodexCache), "CollectEntries", null,
PatchMethod(nameof(CollectEntries_Postfix)));
instance.Patch(typeof(CodexCache), "CollectSubEntries", null,
PatchMethod(nameof(CollectSubEntries_Postfix)));
=======
// PLocalization
var locale = Localization.GetLocale();
if (locale != null)
PLocalization.LocalizeAll(locale);
>>>>>>>
// PCodex
instance.Patch(typeof(CodexCache), "CollectEntries", null,
PatchMethod(nameof(CollectEntries_Postfix)));
instance.Patch(typeof(CodexCache), "CollectSubEntries", null,
PatchMethod(nameof(CollectSubEntries_Postfix)));
// PLocalization
var locale = Localization.GetLocale();
if (locale != null)
PLocalization.LocalizeAll(locale); |
<<<<<<<
public int iRoadTexture = 0;
public Texture2D[] roadTextures;
=======
public Texture2D[] textures;
public float[] roadOffsets;
public float[] roadWidths;
Texture2D customRoadTexure;
GameObject createdRoad;
>>>>>>>
public int iRoadTexture = 0;
public Texture2D[] roadTextures;
public float[] roadOffsets;
public float[] roadWidths;
Texture2D customRoadTexure;
GameObject createdRoad; |
<<<<<<<
RunTests(tests, project.RunnerCommand, project.RunId, project.OutputDir);
=======
if (!tests.Any())
{
Console.WriteLine("Could not find any suitable tests.");
}
else
{
RunTests(tests, project.RunnerCommand, project.RunName, project.OutputDir);
}
>>>>>>>
if (!tests.Any())
{
Console.WriteLine("Could not find any suitable tests.");
}
else
{
RunTests(tests, project.RunnerCommand, project.RunId, project.OutputDir);
} |
<<<<<<<
=======
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
>>>>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
<<<<<<<
private static readonly ProcDomain _loggerDomain = ProcDomain.CreateDomain(nameof(Logger), typeof(Logger), runElevated: true);
=======
static readonly ProviderInfo[] RequiredProviders = new ProviderInfo[]
{
new KernelProviderInfo()
{
Keywords = (ulong)KernelTraceEventParser.Keywords.Process | (ulong)KernelTraceEventParser.Keywords.Profile,
StackKeywords = (ulong)KernelTraceEventParser.Keywords.Profile
},
new UserProviderInfo()
{
ProviderGuid = BenchmarkEventSourceGuid,
Level = TraceEventLevel.Verbose,
Keywords = ulong.MaxValue,
},
new UserProviderInfo()
{
ProviderGuid = ClrTraceEventParser.ProviderGuid,
Level = TraceEventLevel.Informational,
Keywords =
(
(ulong)ClrTraceEventParser.Keywords.Jit |
(ulong)ClrTraceEventParser.Keywords.JittedMethodILToNativeMap |
(ulong)ClrTraceEventParser.Keywords.Loader |
(ulong)ClrTraceEventParser.Keywords.Exception |
(ulong)ClrTraceEventParser.Keywords.GC
),
}
};
public static ProcDomain _loggerDomain = ProcDomain.CreateDomain("Logger", ".\\xunit.performance.logger.exe", runElevated: true);
>>>>>>>
static readonly ProviderInfo[] RequiredProviders = new ProviderInfo[]
{
new KernelProviderInfo()
{
Keywords = (ulong)KernelTraceEventParser.Keywords.Process | (ulong)KernelTraceEventParser.Keywords.Profile,
StackKeywords = (ulong)KernelTraceEventParser.Keywords.Profile
},
new UserProviderInfo()
{
ProviderGuid = BenchmarkEventSourceGuid,
Level = TraceEventLevel.Verbose,
Keywords = ulong.MaxValue,
},
new UserProviderInfo()
{
ProviderGuid = ClrTraceEventParser.ProviderGuid,
Level = TraceEventLevel.Informational,
Keywords =
(
(ulong)ClrTraceEventParser.Keywords.Jit |
(ulong)ClrTraceEventParser.Keywords.JittedMethodILToNativeMap |
(ulong)ClrTraceEventParser.Keywords.Loader |
(ulong)ClrTraceEventParser.Keywords.Exception |
(ulong)ClrTraceEventParser.Keywords.GC
),
}
};
private static readonly ProcDomain _loggerDomain = ProcDomain.CreateDomain(nameof(Logger), typeof(Logger), runElevated: true); |
<<<<<<<
return eventStore.QueryAsync(async storedEvent =>
=======
await eventStore.GetEventsAsync(async storedEvent =>
>>>>>>>
await eventStore.QueryAsync(async storedEvent =>
<<<<<<<
return eventStore.QueryAsync(async storedEvent =>
=======
await eventStore.GetEventsAsync(async storedEvent =>
>>>>>>>
await eventStore.QueryAsync(async storedEvent =>
<<<<<<<
await snapshotContentStore.ClearAsync();
await eventStore.QueryAsync(async storedEvent =>
=======
await eventStore.GetEventsAsync(async storedEvent =>
>>>>>>>
await eventStore.QueryAsync(async storedEvent => |
<<<<<<<
public string MemberId;
public string MemberName;
}
public class CreateChannelResponseMessage : MessageBase
{
public string ChannelId;
public string MemberId;
public bool Created;
public string Error;
=======
public bool isInviteOnly = true;
>>>>>>>
public string MemberId;
public string MemberName;
public bool isInviteOnly = true;
}
public class CreateChannelResponseMessage : MessageBase
{
public string ChannelId;
public string MemberId;
public bool Created;
public string Error; |
<<<<<<<
=======
// <summary>
// A singleton class for communicating with Azure Blob Storage.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
using System.Text.RegularExpressions;
>>>>>>>
// <summary>
// A singleton class for communicating with Azure Blob Storage.
// </summary> |
<<<<<<<
#if NET
if (newClientOptions.RequestHeaderEncoding != null)
{
handler.RequestHeaderEncodingSelector = (_, _) => newClientOptions.RequestHeaderEncoding;
}
#endif
=======
#if NET
if (newClientOptions.EnableMultipleHttp2Connections.HasValue)
{
handler.EnableMultipleHttp2Connections = newClientOptions.EnableMultipleHttp2Connections.Value;
}
#endif
>>>>>>>
#if NET
if (newClientOptions.EnableMultipleHttp2Connections.HasValue)
{
handler.EnableMultipleHttp2Connections = newClientOptions.EnableMultipleHttp2Connections.Value;
}
if (newClientOptions.RequestHeaderEncoding != null)
{
handler.RequestHeaderEncodingSelector = (_, _) => newClientOptions.RequestHeaderEncoding;
}
#endif |
<<<<<<<
PropagateActivityContext = true,
#if NET
RequestHeaderEncoding = Encoding.Latin1,
#endif
=======
ActivityContextHeaders = ActivityContextHeaders.CorrelationContext,
>>>>>>>
ActivityContextHeaders = ActivityContextHeaders.CorrelationContext,
#if NET
RequestHeaderEncoding = Encoding.Latin1,
#endif |
<<<<<<<
[TestCase('a', "'a'")]
[TestCase('h', "'h'")]
[TestCase('z', "'z'")]
public static void FormatValue_CharTest(char c, string expected)
{
Assert.That(MsgUtils.FormatValue(c), Is.EqualTo(expected));
}
#endregion
=======
[TestCase(null, null, "[null, null]")]
[TestCase(null, "Second", "[null, \"Second\"]")]
[TestCase("First", null, "[\"First\", null]")]
[TestCase("First", "Second", "[\"First\", \"Second\"]")]
[TestCase(123, 'h', "[123, 'h']")]
public static void FormatValue_KeyValuePairTest(object key, object value, string expectedResult)
{
string s = MsgUtils.FormatValue(new KeyValuePair<object, object>(key, value));
Assert.That(s, Is.EqualTo(expectedResult));
}
#endregion
>>>>>>>
[TestCase('a', "'a'")]
[TestCase('h', "'h'")]
[TestCase('z', "'z'")]
public static void FormatValue_CharTest(char c, string expected)
{
Assert.That(MsgUtils.FormatValue(c), Is.EqualTo(expected));
}
[TestCase(null, null, "[null, null]")]
[TestCase(null, "Second", "[null, \"Second\"]")]
[TestCase("First", null, "[\"First\", null]")]
[TestCase("First", "Second", "[\"First\", \"Second\"]")]
[TestCase(123, 'h', "[123, 'h']")]
public static void FormatValue_KeyValuePairTest(object key, object value, string expectedResult)
{
string s = MsgUtils.FormatValue(new KeyValuePair<object, object>(key, value));
Assert.That(s, Is.EqualTo(expectedResult));
}
#endregion |
<<<<<<<
#if !NETSTANDARD1_3 && !NETSTANDARD1_6
=======
>>>>>>>
#if !NETSTANDARD1_3 && !NETSTANDARD1_6
<<<<<<<
}
=======
}
#endif
>>>>>>>
}
#endif |
<<<<<<<
#region Build Tests
=======
#region Build Tests
public static TestSuite MakeSuite(string name)
{
return new TestSuite(name);
}
>>>>>>>
#region Build Tests
public static TestSuite MakeSuite(string name)
{
return new TestSuite(name);
}
<<<<<<<
#if !NETSTANDARD1_3 && !NETSTANDARD1_6 && !NETCOREAPP1_1
public static ITestResult RunAsTestCase(Action action)
{
var method = action.Method;
var testMethod = MakeTestCase(method.DeclaringType, method.Name);
return RunTest(testMethod);
}
#endif
=======
>>>>>>>
#if !NETSTANDARD1_3 && !NETSTANDARD1_6 && !NETCOREAPP1_1
public static ITestResult RunAsTestCase(Action action)
{
var method = action.Method;
var testMethod = MakeTestCase(method.DeclaringType, method.Name);
return RunTest(testMethod);
}
#endif |
<<<<<<<
Actions = new List<ITestAction>();
=======
State = WorkItemState.Ready;
>>>>>>>
State = WorkItemState.Ready;
<<<<<<<
/// The name of the work item - defaults to the Test name.
/// </summary>
public virtual string Name
{
get { return Test.Name; }
}
/// <summary>
=======
/// Filter used to include or exclude child tests
/// </summary>
public ITestFilter Filter { get; private set; }
/// <summary>
>>>>>>>
/// The name of the work item - defaults to the Test name.
/// </summary>
public virtual string Name
{
get { return Test.Name; }
}
/// <summary>
/// Filter used to include or exclude child tests
/// </summary>
public ITestFilter Filter { get; private set; }
/// <summary> |
<<<<<<<
[Test]
public void MethodWithArrayArguments([Values(
(object)new object[] { 1, "text", null },
(object)new object[0],
(object)new object[] { 1, new int[] { 2, 3 }, 4 })] object o)
{
}
[Test]
public void TestNameIntrospectsArrayValues()
{
TestSuite suite = TestBuilder.MakeParameterizedMethodSuite(
GetType(), "MethodWithArrayArguments");
Assert.That(suite.TestCaseCount, Is.EqualTo(3));
Assert.Multiple(() =>
{
Assert.That(suite.Tests[0].Name, Is.EqualTo(@"MethodWithArrayArguments([ 1, ""text"", null ])"));
Assert.That(suite.Tests[1].Name, Is.EqualTo(@"MethodWithArrayArguments([])"));
Assert.That(suite.Tests[2].Name, Is.EqualTo(@"MethodWithArrayArguments([ 1, [ 2, 3 ], 4 ])"));
});
}
=======
[Test]
public void SupportsNullableDecimal([Values(null)] decimal? x)
{
Assert.That(x.HasValue, Is.False);
}
[Test]
public void SupportsNullableDateTime([Values(null)] DateTime? dt)
{
Assert.That(dt.HasValue, Is.False);
}
[Test]
public void SupportsNullableTimeSpan([Values(null)] TimeSpan? dt)
{
Assert.That(dt.HasValue, Is.False);
}
[Test]
public void NullableSimpleFormalParametersWithArgument([Values(1)] int? a)
{
Assert.AreEqual(1, a);
}
[Test]
public void NullableSimpleFormalParametersWithNullArgument([Values(null)] int? a)
{
Assert.IsNull(a);
}
>>>>>>>
[Test]
public void SupportsNullableDecimal([Values(null)] decimal? x)
{
Assert.That(x.HasValue, Is.False);
}
[Test]
public void SupportsNullableDateTime([Values(null)] DateTime? dt)
{
Assert.That(dt.HasValue, Is.False);
}
[Test]
public void SupportsNullableTimeSpan([Values(null)] TimeSpan? dt)
{
Assert.That(dt.HasValue, Is.False);
}
[Test]
public void NullableSimpleFormalParametersWithArgument([Values(1)] int? a)
{
Assert.AreEqual(1, a);
}
[Test]
public void NullableSimpleFormalParametersWithNullArgument([Values(null)] int? a)
{
Assert.IsNull(a);
}
[Test]
public void MethodWithArrayArguments([Values(
(object)new object[] { 1, "text", null },
(object)new object[0],
(object)new object[] { 1, new int[] { 2, 3 }, 4 })] object o)
{
}
[Test]
public void TestNameIntrospectsArrayValues()
{
TestSuite suite = TestBuilder.MakeParameterizedMethodSuite(
GetType(), "MethodWithArrayArguments");
Assert.That(suite.TestCaseCount, Is.EqualTo(3));
Assert.Multiple(() =>
{
Assert.That(suite.Tests[0].Name, Is.EqualTo(@"MethodWithArrayArguments([ 1, ""text"", null ])"));
Assert.That(suite.Tests[1].Name, Is.EqualTo(@"MethodWithArrayArguments([])"));
Assert.That(suite.Tests[2].Name, Is.EqualTo(@"MethodWithArrayArguments([ 1, [ 2, 3 ], 4 ])"));
});
} |
<<<<<<<
=======
internal readonly string FullName ;
>>>>>>>
<<<<<<<
this._fullName = fullName;
this._inputParametrs = inputParametrs;
this._outputParametrs = outputParametrs;
=======
this.FullName = fullName;
>>>>>>>
this._fullName = fullName;
this._inputParametrs = inputParametrs;
this._outputParametrs = outputParametrs;
<<<<<<<
var f = new NodeSearchElement(this.Name, this.Description, new List<string>(), this._fullName, this._inputParametrs, this._outputParametrs);
=======
var f = new NodeSearchElement(this.Name, this.Description, new List<string>(), this.FullName);
>>>>>>>
var f = new NodeSearchElement(this.Name, this.Description, new List<string>(), this._fullName, this._inputParametrs, this._outputParametrs); |
<<<<<<<
=======
public DelegateCommand ReportABugCommand { get; set; }
public DelegateCommand GoToWikiCommand { get; set; }
public DelegateCommand GoToSourceCodeCommand { get; set; }
public DelegateCommand<object> ExitCommand { get; set; }
public DelegateCommand CleanupCommand { get; set; }
public DelegateCommand SelectAllCommand { get; set; }
public DelegateCommand ShowSaveImageDialogAndSaveResultCommand { get; set; }
public DelegateCommand ShowOpenDialogAndOpenResultCommand { get; set; }
public DelegateCommand ShowSaveDialogIfNeededAndSaveResultCommand { get; set; }
public DelegateCommand ShowSaveDialogAndSaveResultCommand { get; set; }
public DelegateCommand ShowNewFunctionDialogCommand { get; set; }
public DelegateCommand<object> OpenCommand { get; set; }
public DelegateCommand SaveCommand { get; set; }
public DelegateCommand<object> SaveAsCommand { get; set; }
public DelegateCommand ClearCommand { get; set; }
public DelegateCommand HomeCommand { get; set; }
public DelegateCommand LayoutAllCommand { get; set; }
public DelegateCommand NewHomeWorkspaceCommand { get; set; }
public DelegateCommand<object> CopyCommand { get; set; }
public DelegateCommand<object> PasteCommand { get; set; }
public DelegateCommand ToggleConsoleShowingCommand { get; set; }
public DelegateCommand CancelRunCommand { get; set; }
public DelegateCommand<object> SaveImageCommand { get; set; }
public DelegateCommand ClearLogCommand { get; set; }
public DelegateCommand<object> RunExpressionCommand { get; set; }
public DelegateCommand ShowPackageManagerCommand { get; set; }
public DelegateCommand<object> GoToWorkspaceCommand { get; set; }
public DelegateCommand<object> DisplayFunctionCommand { get; set; }
public DelegateCommand<object> SetConnectorTypeCommand { get; set; }
public DelegateCommand<object> CreateNodeCommand { get; set; }
public DelegateCommand<object> CreateConnectionCommand { get; set; }
public DelegateCommand<object> AddNoteCommand { get; set; }
public DelegateCommand<object> DeleteCommand { get; set; }
public DelegateCommand<object> SelectNeighborsCommand { get; set; }
public DelegateCommand<object> AddToSelectionCommand { get; set; }
public DelegateCommand<string> AlignSelectedCommand { get; set; }
public DelegateCommand PostUIActivationCommand { get; set; }
public DelegateCommand RefactorCustomNodeCommand { get; set; }
public DelegateCommand ShowHideConnectorsCommand { get; set; }
public DelegateCommand ToggleFullscreenWatchShowingCommand { get; set; }
public DelegateCommand ToggleCanNavigateBackgroundCommand { get; set; }
public DelegateCommand GoHomeCommand { get; set; }
>>>>>>>
<<<<<<<
//DynamoSelection.Instance.Selection.CollectionChanged += new NotifyCollectionChangedEventHandler(Selection_CollectionChanged);
=======
DynamoSelection.Instance.Selection.CollectionChanged += new NotifyCollectionChangedEventHandler(Selection_CollectionChanged);
#region Initialize Commands
GoToWikiCommand = new DelegateCommand(GoToWiki, CanGoToWiki);
ReportABugCommand = new DelegateCommand(ReportABug, CanReportABug);
GoToSourceCodeCommand = new DelegateCommand(GoToSourceCode, CanGoToSourceCode);
CleanupCommand = new DelegateCommand(Cleanup, CanCleanup);
ExitCommand = new DelegateCommand<object>(Exit, CanExit);
NewHomeWorkspaceCommand = new DelegateCommand(MakeNewHomeWorkspace, CanMakeNewHomeWorkspace);
ShowSaveImageDialogAndSaveResultCommand = new DelegateCommand(ShowSaveImageDialogAndSaveResult, CanShowSaveImageDialogAndSaveResult);
ShowOpenDialogAndOpenResultCommand = new DelegateCommand(ShowOpenDialogAndOpenResult, CanShowOpenDialogAndOpenResultCommand);
ShowSaveDialogIfNeededAndSaveResultCommand = new DelegateCommand(ShowSaveDialogIfNeededAndSaveResult, CanShowSaveDialogIfNeededAndSaveResultCommand);
ShowSaveDialogAndSaveResultCommand = new DelegateCommand(ShowSaveDialogAndSaveResult, CanShowSaveDialogAndSaveResultCommand);
ShowNewFunctionDialogCommand = new DelegateCommand(ShowNewFunctionDialogAndMakeFunction, CanShowNewFunctionDialogCommand);
SaveCommand = new DelegateCommand(Save, CanSave);
SelectAllCommand = new DelegateCommand(SelectAll, CanSelectAll);
OpenCommand = new DelegateCommand<object>(Open, CanOpen);
AlignSelectedCommand = new DelegateCommand<string>(AlignSelected, CanAlignSelected);
SaveAsCommand = new DelegateCommand<object>(SaveAs, CanSaveAs);
ClearCommand = new DelegateCommand(Clear, CanClear);
HomeCommand = new DelegateCommand(Home, CanGoHome);
LayoutAllCommand = new DelegateCommand(LayoutAll, CanLayoutAll);
CopyCommand = new DelegateCommand<object>(Copy, CanCopy);
PasteCommand = new DelegateCommand<object>(Paste, CanPaste);
ToggleConsoleShowingCommand = new DelegateCommand(ToggleConsoleShowing, CanToggleConsoleShowing);
CancelRunCommand = new DelegateCommand(CancelRun, CanCancelRun);
SaveImageCommand = new DelegateCommand<object>(SaveImage, CanSaveImage);
ClearLogCommand = new DelegateCommand(ClearLog, CanClearLog);
RunExpressionCommand = new DelegateCommand<object>(RunExpression,CanRunExpression);
ShowPackageManagerCommand = new DelegateCommand(ShowPackageManager,CanShowPackageManager);
GoToWorkspaceCommand = new DelegateCommand<object>(GoToWorkspace, CanGoToWorkspace);
DisplayFunctionCommand = new DelegateCommand<object>(DisplayFunction, CanDisplayFunction);
SetConnectorTypeCommand = new DelegateCommand<object>(SetConnectorType, CanSetConnectorType);
CreateNodeCommand = new DelegateCommand<object>(CreateNode, CanCreateNode);
CreateConnectionCommand = new DelegateCommand<object>(CreateConnection, CanCreateConnection);
AddNoteCommand = new DelegateCommand<object>(AddNote, CanAddNote);
DeleteCommand = new DelegateCommand<object>(Delete, CanDelete);
SelectNeighborsCommand = new DelegateCommand<object>(SelectNeighbors, CanSelectNeighbors);
AddToSelectionCommand = new DelegateCommand<object>(AddToSelection, CanAddToSelection);
PostUIActivationCommand = new DelegateCommand(PostUIActivation, CanDoPostUIActivation);
RefactorCustomNodeCommand = new DelegateCommand(RefactorCustomNode, CanRefactorCustomNode);
ShowHideConnectorsCommand = new DelegateCommand(ShowConnectors, CanShowConnectors);
ToggleFullscreenWatchShowingCommand = new DelegateCommand(ToggleFullscreenWatchShowing, CanToggleFullscreenWatchShowing);
ToggleCanNavigateBackgroundCommand = new DelegateCommand(ToggleCanNavigateBackground, CanToggleCanNavigateBackground);
GoHomeCommand = new DelegateCommand(GoHomeView, CanGoHomeView);
#endregion
}
void Selection_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
CopyCommand.RaiseCanExecuteChanged();
PasteCommand.RaiseCanExecuteChanged();
>>>>>>>
<<<<<<<
internal bool CanSave()
=======
private void AlignSelected(string param)
{
this.CurrentSpaceViewModel.AlignSelectedCommand.Execute(param);
}
private bool CanAlignSelected(string param)
{
return true;
}
private void SelectAll()
{
this.CurrentSpaceViewModel.SelectAllCommand.Execute();
}
private bool CanSelectAll()
{
return this.CurrentSpaceViewModel.SelectAllCommand.CanExecute();
}
private bool CanSave()
{
return true;
}
private void ReportABug()
{
Process.Start("https://github.com/ikeough/Dynamo/issues?state=open");
}
private bool CanReportABug()
{
return true;
}
private void MakeNewHomeWorkspace()
{
// if the workspace is unsaved, prompt to save
// otherwise overwrite the home workspace with new workspace
if (!this.Model.HomeSpace.HasUnsavedChanges || AskUserToSaveWorkspaceOrCancel(this.Model.HomeSpace))
{
this.Model.CurrentSpace = this.Model.HomeSpace;
ClearCommand.Execute();
}
}
private bool CanMakeNewHomeWorkspace()
{
return true;
}
private void Open(object parameters)
{
string xmlPath = parameters as string;
if (!string.IsNullOrEmpty(xmlPath))
{
IsUILocked = true;
if (!OpenDefinition(xmlPath))
{
//MessageBox.Show("Workbench could not be opened.");
Log("Workbench could not be opened.");
if (DynamoCommands.WriteToLogCmd.CanExecute(null))
{
DynamoCommands.WriteToLogCmd.Execute("Workbench could not be opened.");
DynamoCommands.WriteToLogCmd.Execute(xmlPath);
}
}
IsUILocked = false;
}
//clear the clipboard to avoid copying between dyns
dynSettings.Controller.ClipBoard.Clear();
}
private bool CanOpen(object parameters)
{
return true;
}
private void ShowSaveImageDialogAndSaveResult()
{
FileDialog _fileDialog = null;
if (_fileDialog == null)
{
_fileDialog = new SaveFileDialog()
{
AddExtension = true,
DefaultExt = ".png",
FileName = "Capture.png",
Filter = "PNG Image|*.png",
Title = "Save your Workbench to an Image",
};
}
// if you've got the current space path, use it as the inital dir
if (!string.IsNullOrEmpty(_model.CurrentSpace.FilePath))
{
var fi = new FileInfo(_model.CurrentSpace.FilePath);
_fileDialog.InitialDirectory = fi.DirectoryName;
}
if (_fileDialog.ShowDialog() == DialogResult.OK)
{
if (SaveImageCommand.CanExecute(_fileDialog.FileName))
SaveImageCommand.Execute(_fileDialog.FileName);
}
}
private bool CanShowSaveImageDialogAndSaveResult()
{
return true;
}
private void ShowOpenDialogAndOpenResult()
{
if ( this.Model.HomeSpace.HasUnsavedChanges && !AskUserToSaveWorkspaceOrCancel(this.Model.HomeSpace))
{
return;
}
FileDialog _fileDialog = null;
if (_fileDialog == null)
{
_fileDialog = new OpenFileDialog()
{
Filter = "Dynamo Definitions (*.dyn; *.dyf)|*.dyn;*.dyf|All files (*.*)|*.*",
Title = "Open Dynamo Definition..."
};
}
// if you've got the current space path, use it as the inital dir
if (!string.IsNullOrEmpty(_model.CurrentSpace.FilePath))
{
var fi = new FileInfo(_model.CurrentSpace.FilePath);
_fileDialog.InitialDirectory = fi.DirectoryName;
}
else // use the samples directory, if it exists
{
Assembly dynamoAssembly = Assembly.GetExecutingAssembly();
string location = Path.GetDirectoryName(dynamoAssembly.Location);
string path = Path.Combine(location, "samples");
if (Directory.Exists(path))
{
_fileDialog.InitialDirectory = path;
}
}
if (_fileDialog.ShowDialog() == DialogResult.OK)
{
if (OpenCommand.CanExecute(_fileDialog.FileName))
OpenCommand.Execute(_fileDialog.FileName);
}
}
private bool CanShowOpenDialogAndOpenResultCommand()
{
return true;
}
private void ShowSaveDialogIfNeededAndSaveResult()
{
if (_model.CurrentSpace.FilePath != null)
{
if(SaveCommand.CanExecute())
SaveCommand.Execute();
}
else
{
if(ShowSaveDialogAndSaveResultCommand.CanExecute())
ShowSaveDialogAndSaveResultCommand.Execute();
}
}
private bool CanShowSaveDialogIfNeededAndSaveResultCommand()
>>>>>>>
internal bool CanSave()
<<<<<<<
=======
public void Cleanup()
{
this.Model.OnCleanup(null);
DynamoLogger.Instance.FinishLogging();
}
private bool CanCleanup()
{
return true;
}
private void Exit(object allowCancel)
{
bool allowCancelBool = true;
if (allowCancel != null)
{
allowCancelBool = (bool)allowCancel;
}
if (!AskUserToSaveWorkspacesOrCancel(allowCancelBool))
return;
this.Cleanup();
exitInvoked = true;
dynSettings.Bench.Close();
}
>>>>>>> |
<<<<<<<
=======
>>>>>>>
<<<<<<<
protected VariableInputNode(WorkspaceModel workspace) : base()
=======
protected VariableInputNode(WorkspaceModel workspace) : base(workspace)
>>>>>>>
protected VariableInputNode() |
<<<<<<<
private readonly Size highlightSize = new Size(8, 8);
private readonly Color4 defaultLineColor = new Color4(new Color3(0, 0, 0));
private readonly Color4 defaultPointColor = new Color4(new Color3(0, 0, 0));
private readonly Color4 highlightColor = new Color4(new Color3(1.0f, 0.0f, 0.0f));
=======
private static readonly Color4 defaultLineColor = new Color4(new Color3(0, 0, 0));
private static readonly Color4 defaultPointColor = new Color4(new Color3(0, 0, 0));
private static readonly Color4 defaultDeadColor = new Color4(new Color3(0.7f,0.7f,0.7f));
private static readonly float defaultDeadAlphaScale = 0.2f;
>>>>>>>
private readonly Size highlightSize = new Size(8, 8);
private readonly Color4 highlightColor = new Color4(new Color3(1.0f, 0.0f, 0.0f));
private static readonly Color4 defaultLineColor = new Color4(new Color3(0, 0, 0));
private static readonly Color4 defaultPointColor = new Color4(new Color3(0, 0, 0));
private static readonly Color4 defaultDeadColor = new Color4(new Color3(0.7f,0.7f,0.7f));
private static readonly float defaultDeadAlphaScale = 0.2f; |
<<<<<<<
A.CallTo(() => appImageStore.UploadAsync(appId.Id, stream, A<CancellationToken>._))
=======
A.CallTo(() => appImageStore.UploadAsync(appId, A<Stream>._, A<CancellationToken>._))
>>>>>>>
A.CallTo(() => appImageStore.UploadAsync(appId.Id, A<Stream>._, A<CancellationToken>._)) |
<<<<<<<
=======
public override Value Evaluate(FSharpList<Value> args)
{
FSharpList<Value> unsorted = null;
if (args[0].IsList)
{
unsorted = ((Value.List)args[0]).Item;
}
else
{
//promote the single item to a list
unsorted = FSharpList<Value>.Empty;
unsorted = FSharpList<Value>.Cons(args[0], unsorted);
}
try
{
var sorted = unsorted.Select(Utils.ToComparable).ToList();
sorted.Sort();
var vals = sorted.Select(x => Utils.ToValue(x as dynamic)).Cast<Value>();
return Value.NewList(vals.ToFSharpList());
}
catch (ArgumentException e)
{
throw e; //TODO: Better error message
}
}
protected override AssociativeNode BuildAstNode(IAstBuilder builder, List<AssociativeNode> inputs)
{
return builder.Build(this, inputs);
}
>>>>>>>
public override Value Evaluate(FSharpList<Value> args)
{
FSharpList<Value> unsorted = null;
if (args[0].IsList)
{
unsorted = ((Value.List)args[0]).Item;
}
else
{
//promote the single item to a list
unsorted = FSharpList<Value>.Empty;
unsorted = FSharpList<Value>.Cons(args[0], unsorted);
}
try
{
var sorted = unsorted.Select(Utils.ToComparable).ToList();
sorted.Sort();
var vals = sorted.Select(x => Utils.ToValue(x as dynamic)).Cast<Value>();
return Value.NewList(vals.ToFSharpList());
}
catch (ArgumentException e)
{
throw e; //TODO: Better error message
}
}
<<<<<<<
public LessThan() : base(FScheme.LT, "<") { }
=======
public LessThan() : base("<") { }
// might be moved back to Comparision
protected override AssociativeNode BuildAstNode(IAstBuilder builder, List<AssociativeNode> inputs)
{
return builder.Build(this, inputs);
}
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.CompareTo(y) < 0 ? 1 : 0);
}
>>>>>>>
public LessThan() : base("<") { }
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.CompareTo(y) < 0 ? 1 : 0);
}
<<<<<<<
public LessThanEquals() : base(FScheme.LTE, "≤") { }
=======
public LessThanEquals() : base("≤") { }
// might be moved back to Comparision
protected override AssociativeNode BuildAstNode(IAstBuilder builder, List<AssociativeNode> inputs)
{
return builder.Build(this, inputs);
}
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.CompareTo(y) <= 0 ? 1 : 0);
}
>>>>>>>
public LessThanEquals() : base("≤") { }
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.CompareTo(y) <= 0 ? 1 : 0);
}
<<<<<<<
public GreaterThan() : base(FScheme.GT, ">") { }
=======
public GreaterThan() : base(">"){}
protected override AssociativeNode BuildAstNode(IAstBuilder builder, List<AssociativeNode> inputs)
{
return builder.Build(this, inputs);
}
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.CompareTo(y) > 0 ? 1 : 0);
}
>>>>>>>
public GreaterThan() : base(">"){}
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.CompareTo(y) > 0 ? 1 : 0);
}
<<<<<<<
public GreaterThanEquals() : base(FScheme.GTE, "≥") { }
=======
public GreaterThanEquals() : base("≥") { }
protected override AssociativeNode BuildAstNode(IAstBuilder builder, List<AssociativeNode> inputs)
{
return builder.Build(this, inputs);
}
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.CompareTo(y) >= 0 ? 1 : 0);
}
>>>>>>>
public GreaterThanEquals() : base("≥") { }
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.CompareTo(y) >= 0 ? 1 : 0);
}
<<<<<<<
public Equal() : base(FSharpFunc<FSharpList<Value>, Value>.FromConverter(FScheme.EQ), "=") { }
=======
public Equal() : base("=") { }
protected override AssociativeNode BuildAstNode(IAstBuilder builder, List<AssociativeNode> inputs)
{
return builder.Build(this, inputs);
}
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.GetType() == y.GetType() && x.CompareTo(y) == 0 ? 1 : 0);
}
>>>>>>>
public Equal() : base("=") { }
public override Value Evaluate(FSharpList<Value> args)
{
var x = Utils.ToComparable(args[0]);
var y = Utils.ToComparable(args[1]);
return Value.NewNumber(x.GetType() == y.GetType() && x.CompareTo(y) == 0 ? 1 : 0);
} |
<<<<<<<
XmlNodeList elNodes = xmlDoc.GetElementsByTagName(/*NXLT*/"Elements");
if (elNodes == null || (elNodes.Count == 0))
elNodes = xmlDoc.GetElementsByTagName(/*NXLT*/"dynElements");
=======
XmlNodeList elNodes = xmlDoc.GetElementsByTagName("Elements");
if (elNodes.Count == 0)
elNodes = xmlDoc.GetElementsByTagName("dynElements");
>>>>>>>
XmlNodeList elNodes = xmlDoc.GetElementsByTagName(/*NXLT*/"Elements");
if (elNodes.Count == 0)
elNodes = xmlDoc.GetElementsByTagName(/*NXLT*/"dynElements");
<<<<<<<
string typeName = elNode.Attributes[/*NXLT*/"type"].Value;
typeName = Dynamo.Nodes.Utilities.PreprocessTypeName(typeName);
System.Type type = Dynamo.Nodes.Utilities.ResolveType(dynamoModel, typeName);
=======
string typeName = elNode.Attributes["type"].Value;
typeName = Nodes.Utilities.PreprocessTypeName(typeName);
>>>>>>>
string typeName = elNode.Attributes[/*NXLT*/"type"].Value;
typeName = Nodes.Utilities.PreprocessTypeName(typeName);
<<<<<<<
throw new ArgumentException(/*NXLT*/"Argument cannot be empty", /*NXLT*/"originalPath");
if (!System.IO.File.Exists(originalPath))
throw new System.IO.FileNotFoundException(/*NXLT*/"File not found", originalPath);
=======
throw new ArgumentException("Argument cannot be empty", "originalPath");
if (!File.Exists(originalPath))
throw new FileNotFoundException("File not found", originalPath);
>>>>>>>
throw new ArgumentException(/*NXLT*/"Argument cannot be empty", /*NXLT*/"originalPath");
if (!File.Exists(originalPath))
throw new FileNotFoundException(/*NXLT*/"File not found", originalPath);
<<<<<<<
/// Call this method to convert a DSFunction/DSVarArgFunction element into
/// an equivalent dummy node to indicate that a function node cannot be
/// resolved during load time. This method retains the number of input
/// ports based on the function signature that comes with the XmlElement
/// that represent the function node.
/// </summary>
/// <param name="element">XmlElement representing the original DSFunction
/// node which has failed function resolution. This XmlElement must be of
/// type "DSFunction" or "DSVarArgFunction" otherwise an exception will be
/// thrown.</param>
/// <returns>Returns a new XmlElement representing the dummy node.</returns>
///
public static XmlElement CreateUnresolvedFunctionNode(XmlElement element)
{
if (element == null)
throw new ArgumentNullException(/*NXLT*/"element");
if (element.Name.Equals(/*NXLT*/"Dynamo.Nodes.DSFunction") == false)
{
if (element.Name.Equals(/*NXLT*/"Dynamo.Nodes.DSVarArgFunction") == false)
{
var message = /*NXLT*/"Only DSFunction/DSVarArgFunction should be here.";
throw new ArgumentException(message);
}
}
var type = element.Attributes["type"].Value;
if (type.Equals(/*NXLT*/"Dynamo.Nodes.DSFunction") == false)
{
if (type.Equals("Dynamo.Nodes.DSVarArgFunction") == false)
{
var message = /*NXLT*/"Only DSFunction/DSVarArgFunction should be here.";
throw new ArgumentException(message);
}
}
var nicknameAttrib = element.Attributes["nickname"];
if (nicknameAttrib == null)
throw new ArgumentException(/*NXLT*/"'nickname' attribute missing.");
var nickname = nicknameAttrib.Value;
if (string.IsNullOrEmpty(nickname))
throw new ArgumentException(/*NXLT*/"'nickname' attribute missing.");
// Determine the number of input and output count (always 1).
int inportCount = DetermineFunctionInputCount(element);
var assembly = DetermineAssemblyName(element);
// Create an XmlElement representation of the new dummy node.
var dummy = CreateDummyNode(element, inportCount, 1);
dummy.SetAttribute(/*NXLT*/"legacyNodeName", nickname);
dummy.SetAttribute(/*NXLT*/"legacyAssembly", assembly);
dummy.SetAttribute(/*NXLT*/"nodeNature", /*NXLT*/"Unresolved");
return dummy;
}
/// <summary>
=======
>>>>>>>
<<<<<<<
private static int DetermineFunctionInputCount(XmlElement element)
{
int additionalPort = 0;
// "DSVarArgFunction" is a "VariableInputNode", therefore it will
// have "inputcount" as one of the attributes. If such attribute
// does not exist, throw an ArgumentException.
if (element.Name.Equals(/*NXLT*/"Dynamo.Nodes.DSVarArgFunction"))
{
var inputCountAttrib = element.Attributes["inputcount"];
if (inputCountAttrib == null)
{
throw new ArgumentException(string.Format(
/*NXLT*/"Function inputs cannot be determined ({0}).",
element.GetAttribute("nickname")));
}
return Convert.ToInt32(inputCountAttrib.Value);
}
var signature = string.Empty;
var signatureAttrib = element.Attributes["function"];
if (signatureAttrib != null)
signature = signatureAttrib.Value;
else if (element.ChildNodes.Count > 0)
{
// We have an old file format with "FunctionItem" child element.
var childElement = element.ChildNodes[0] as XmlElement;
signature = string.Format("{0}@{1}",
childElement.GetAttribute(/*NXLT*/"DisplayName"),
childElement.GetAttribute(/*NXLT*/"Parameters").Replace(';', ','));
// We need one more port for instance methods/properties.
switch (childElement.GetAttribute(/*NXLT*/"Type"))
{
case /*NXLT*/"InstanceMethod":
case /*NXLT*/"InstanceProperty":
additionalPort = 1; // For taking the instance itself.
break;
}
}
if (string.IsNullOrEmpty(signature))
{
var message = /*NXLT*/"Function signature cannot be determined.";
throw new ArgumentException(message);
}
int atSignIndex = signature.IndexOf('@');
if (atSignIndex >= 0) // An '@' sign found, there's param information.
{
signature = signature.Substring(atSignIndex + 1); // Skip past '@'.
var parts = signature.Split(new char[] { ',' });
return ((parts != null) ? parts.Length : 1) + additionalPort;
}
return additionalPort + 1; // At least one.
}
private static string DetermineAssemblyName(XmlElement element)
{
var assemblyName = string.Empty;
var assemblyAttrib = element.Attributes[/*NXLT*/"assembly"];
if (assemblyAttrib != null)
assemblyName = assemblyAttrib.Value;
else if (element.ChildNodes.Count > 0)
{
// We have an old file format with "FunctionItem" child element.
var childElement = element.ChildNodes[0] as XmlElement;
var funcItemAsmAttrib = childElement.Attributes[/*NXLT*/"Assembly"];
if (funcItemAsmAttrib != null)
assemblyName = funcItemAsmAttrib.Value;
}
if (string.IsNullOrEmpty(assemblyName))
return string.Empty;
try { return Path.GetFileName(assemblyName); }
catch (Exception) { return string.Empty; }
}
=======
>>>>>>> |
<<<<<<<
core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kConversionNotPossible, Resources.kConvertNonConvertibleTypes);
=======
core.RuntimeStatus.LogWarning(Runtime.WarningID.kConversionNotPossible, ProtoCore.StringConstants.kConvertNonConvertibleTypes);
>>>>>>>
core.RuntimeStatus.LogWarning(Runtime.WarningID.kConversionNotPossible, Resources.kConvertNonConvertibleTypes);
<<<<<<<
string errorMessage = String.Format(Resources.kConvertArrayToNonArray, core.TypeSystem.GetType(targetType.UID));
core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kConversionNotPossible, errorMessage);
=======
string errorMessage = String.Format(ProtoCore.StringConstants.kConvertArrayToNonArray, core.TypeSystem.GetType(targetType.UID));
core.RuntimeStatus.LogWarning(Runtime.WarningID.kConversionNotPossible, errorMessage);
>>>>>>>
string errorMessage = String.Format(Resources.kConvertArrayToNonArray, core.TypeSystem.GetType(targetType.UID));
core.RuntimeStatus.LogWarning(Runtime.WarningID.kConversionNotPossible, errorMessage);
<<<<<<<
core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kTypeMismatch, Resources.kFailToConverToFunction);
=======
core.RuntimeStatus.LogWarning(Runtime.WarningID.kTypeMismatch, ProtoCore.StringConstants.kFailToConverToFunction);
>>>>>>>
core.RuntimeStatus.LogWarning(Runtime.WarningID.kTypeMismatch, Resources.kFailToConverToFunction);
<<<<<<<
core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kTypeMismatch, Resources.kFailToConverToNull);
=======
core.RuntimeStatus.LogWarning(Runtime.WarningID.kTypeMismatch, ProtoCore.StringConstants.kFailToConverToNull);
>>>>>>>
core.RuntimeStatus.LogWarning(Runtime.WarningID.kTypeMismatch, Resources.kFailToConverToNull);
<<<<<<<
core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kTypeMismatch, Resources.kFailToConverToPointer);
=======
core.RuntimeStatus.LogWarning(Runtime.WarningID.kTypeMismatch, ProtoCore.StringConstants.kFailToConverToPointer);
>>>>>>>
core.RuntimeStatus.LogWarning(Runtime.WarningID.kTypeMismatch, Resources.kFailToConverToPointer); |
<<<<<<<
nodeUI.PresentationGrid.Children.Add(backgroundRect);
nodeUI.PresentationGrid.Children.Add(View);
nodeUI.PresentationGrid.Visibility = Visibility.Visible;
=======
public DynamoViewModel ViewModel { get; set; }
public IVisualizationManager VisualizationManager { get; private set; }
#endregion
#region constructors
public Watch3D(WorkspaceModel workspace) : base(workspace)
{
InPortData.Add(new PortData("", "Incoming geometry objects."));
OutPortData.Add(new PortData("", "Watch contents, passed through"));
>>>>>>>
nodeUI.PresentationGrid.Children.Add(backgroundRect);
nodeUI.PresentationGrid.Children.Add(View);
nodeUI.PresentationGrid.Visibility = Visibility.Visible;
<<<<<<<
protected override bool ShouldDisplayPreviewCore()
{
return false; // Previews are not shown for this node type.
}
=======
>>>>>>> |
<<<<<<<
=======
public new string Category
{
get
{
var infos = Workspace.DynamoModel.CustomNodeManager.NodeInfos;
return infos.ContainsKey(Definition.FunctionId)
? infos[Definition.FunctionId].Category
: "Custom Nodes";
}
}
/// <summary>
/// </summary>
public new CustomNodeController Controller
{
get { return base.Controller as CustomNodeController; }
}
>>>>>>>
//TODO(Steve): Remove if possible
public new string Category
{
get
{
var infos = Workspace.DynamoModel.CustomNodeManager.NodeInfos;
return infos.ContainsKey(Definition.FunctionId)
? infos[Definition.FunctionId].Category
: "Custom Nodes";
}
}
<<<<<<<
protected override bool UpdateValueCore(string name, string value)
{
if (name == "InputSymbol")
{
InputSymbol = value;
return true; // UpdateValueCore handled.
}
return base.UpdateValueCore(name, value);
}
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
protected override bool UpdateValueCore(string name, string value)
{
if (name == "Symbol")
{
Symbol = value;
return true; // UpdateValueCore handled.
}
return base.UpdateValueCore(name, value);
}
=======
>>>>>>> |
<<<<<<<
RuntimeData.WarningID.kInvalidArguments,
Resources.kInvalidArguments);
=======
Runtime.WarningID.kInvalidArguments,
StringConstants.kInvalidArguments);
>>>>>>>
Runtime.WarningID.kInvalidArguments,
Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, ProtoCore.StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
string message = String.Format(Resources.kFileNotFound, path);
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kFileNotExist, message);
=======
string message = String.Format(ProtoCore.StringConstants.kFileNotFound, path);
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kFileNotExist, message);
>>>>>>>
string message = String.Format(Resources.kFileNotFound, path);
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kFileNotExist, message);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kIndexOutOfRange, Resources.kIndexOutOfRange);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kIndexOutOfRange, StringConstants.kIndexOutOfRange);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kIndexOutOfRange, Resources.kIndexOutOfRange);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments);
<<<<<<<
runtime.runtime.Core.RuntimeStatus.LogWarning(RuntimeData.WarningID.kInvalidArguments, Resources.kInvalidArguments);
=======
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, StringConstants.kInvalidArguments);
>>>>>>>
runtime.runtime.Core.RuntimeStatus.LogWarning(Runtime.WarningID.kInvalidArguments, Resources.kInvalidArguments); |
<<<<<<<
using Dynamo.Models;
using Dynamo.Nodes;
=======
using Dynamo.UI.Controls;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Rendering;
>>>>>>>
using Dynamo.Models;
using Dynamo.Nodes;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Rendering;
<<<<<<<
=======
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Media;
>>>>>>>
using System.Text.RegularExpressions; |
<<<<<<<
dynNode el = dynSettings.Controller.DynamoViewModel.CreateNodeInstance(t, nickname, guid);
// note - this is because the connectors fail to be created if there's not added
// to the canvas
ws.Nodes.Add(el);
el.WorkSpace = ws;
var node = el;
//MVVM : do not set visibility explicitly
//nodeUI.Visibility = Visibility.Visible;
//dynSettings.Bench.WorkBench.Children.Add(nodeUI);
//Canvas.SetLeft(nodeUI, x);
//Canvas.SetTop(nodeUI, y);
node.X = x;
node.Y = y;
=======
var el = controller.CreateInstanceAndAddNodeToWorkspace(t, nickname, guid, x, y, ws, Visibility.Hidden);
>>>>>>>
dynNode el = dynSettings.Controller.DynamoViewModel.CreateNodeInstance(t, nickname, guid);
// note - this is because the connectors fail to be created if there's not added
// to the canvas
ws.Nodes.Add(el);
el.WorkSpace = ws;
var node = el;
node.X = x;
node.Y = y;
<<<<<<<
private void nodeWorkspaceWasLoaded(
FunctionDefinition def,
Dictionary<Guid, HashSet<FunctionDefinition>> children,
Dictionary<Guid, HashSet<Guid>> parents,
DynamoController controller )
{
//If there were some workspaces that depended on this node...
if (children.ContainsKey(def.FunctionId))
{
//For each workspace...
foreach (FunctionDefinition child in children[def.FunctionId])
{
//Nodes the workspace depends on
HashSet<Guid> allParents = parents[child.FunctionId];
//Remove this workspace, since it's now loaded.
allParents.Remove(def.FunctionId);
//If everything the node depends on has been loaded...
if (!allParents.Any())
{
var expression = CompileFunction(def);
controller.FSchemeEnvironment.DefineSymbol(def.FunctionId.ToString(), expression);
nodeWorkspaceWasLoaded(child, children, parents, controller);
}
}
}
}
/// <summary>
/// Save a function. This includes writing to a file and compiling the
/// function and saving it to the FSchemeEnvironment
/// </summary>
/// <param name="definition">The definition to saveo</param>
/// <param name="bool">Whether to write the function to file</param>
/// <returns>Whether the operation was successful</returns>
public void SaveFunction(FunctionDefinition definition, bool writeDefinition = true)
{
if (definition == null)
return;
// Get the internal nodes for the function
dynWorkspace functionWorkspace = definition.Workspace;
// If asked to, write the definition to file
if (writeDefinition)
{
string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string pluginsPath = Path.Combine(directory, "definitions");
try
{
if (!Directory.Exists(pluginsPath))
Directory.CreateDirectory(pluginsPath);
string path = Path.Combine(pluginsPath, FormatFileName(functionWorkspace.Name) + ".dyf");
dynWorkspace.GetXmlDocFromWorkspace(functionWorkspace, false);
//SearchViewModel.Add(definition.Workspace);
}
catch
{
//dynSettings.Controller.DynamoViewModel.Log("Error saving:" + e.GetType());
//dynSettings.Controller.DynamoViewModel.Log(e);
}
}
}
=======
>>>>>>> |
<<<<<<<
=======
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
>>>>>>>
<<<<<<<
#region events
public event NodeHelpEventHandler RequestShowNodeHelp;
public virtual void OnRequestShowNodeHelp(Object sender, NodeHelpEventArgs e)
{
if (RequestShowNodeHelp != null)
{
RequestShowNodeHelp(this, e);
}
}
=======
#region commands
public DelegateCommand DeleteCommand { get; set; }
public DelegateCommand<string> SetLacingTypeCommand { get; set; }
public DelegateCommand<object> SetStateCommand { get; set; }
public DelegateCommand SelectCommand { get; set; }
public DelegateCommand RenameCommand { get; set; }
public DelegateCommand ShowHelpCommand { get; set; }
public DelegateCommand ViewCustomNodeWorkspaceCommand { get; set; }
public DelegateCommand<object> SetLayoutCommand { get; set; }
public DelegateCommand<dynNodeView> SetupCustomUIElementsCommand { get; set; }
public DelegateCommand ValidateConnectionsCommand { get; set; }
public DelegateCommand ToggleIsVisibleCommand { get; set; }
public DelegateCommand ToggleIsUpstreamVisibleCommand { get; set; }
>>>>>>>
#region events
public event NodeHelpEventHandler RequestShowNodeHelp;
public virtual void OnRequestShowNodeHelp(Object sender, NodeHelpEventArgs e)
{
if (RequestShowNodeHelp != null)
{
RequestShowNodeHelp(this, e);
}
}
public event EventHandler RequestShowNodeRename;
public virtual void OnRequestShowNodeRename(Object sender, EventArgs e)
{
if (RequestShowNodeRename != null)
{
RequestShowNodeRename(this, e);
}
}
<<<<<<<
=======
DeleteCommand = new DelegateCommand(DeleteNodeAndItsConnectors, CanDeleteNode);
SetLacingTypeCommand = new DelegateCommand<string>(new Action<string>(SetLacingType), CanSetLacingType);
SetStateCommand = new DelegateCommand<object>(SetState, CanSetState);
SelectCommand = new DelegateCommand(Select, CanSelect);
ShowHelpCommand = new DelegateCommand(ShowHelp, CanShowHelp);
RenameCommand = new DelegateCommand(ShowRename, CanShowRename);
ViewCustomNodeWorkspaceCommand = new DelegateCommand(ViewCustomNodeWorkspace, CanViewCustomNodeWorkspace);
SetLayoutCommand = new DelegateCommand<object>(SetLayout, CanSetLayout);
SetupCustomUIElementsCommand = new DelegateCommand<dynNodeView>(SetupCustomUIElements, CanSetupCustomUIElements);
ValidateConnectionsCommand = new DelegateCommand(ValidateConnections, CanValidateConnections);
ToggleIsVisibleCommand = new DelegateCommand(ToggleIsVisible, CanVisibilityBeToggled);
ToggleIsUpstreamVisibleCommand = new DelegateCommand(ToggleIsUpstreamVisible, CanUpstreamVisibilityBeToggled);
>>>>>>> |
<<<<<<<
/// <summary>
/// Extract the Revit GeometryObject's from a Revit Element
/// </summary>
/// <returns></returns>
internal IEnumerable<Autodesk.Revit.DB.GeometryObject> InternalGeometry(bool useSymbolGeometry = false)
=======
[SupressImportIntoVM]
public IEnumerable<Autodesk.Revit.DB.GeometryObject> InternalGeometry()
>>>>>>>
/// <summary>
/// Extract the Revit GeometryObject's from a Revit Element
/// </summary>
/// <returns></returns>
internal IEnumerable<Autodesk.Revit.DB.GeometryObject> InternalGeometry(bool useSymbolGeometry = false)
<<<<<<<
/// <summary>
/// Collects the concrete GeometryObject's in a GeometryElement, which is a recursive collection of GeometryObject's.
/// </summary>
/// <param name="geometryElement">The Geometry collection</param>
/// <param name="useSymbolGeometry">When encountering a GeometryInstance, use GetSymbolGeometry() which obtains usable Reference objects</param>
/// <returns></returns>
private static IEnumerable<GeometryObject> CollectConcreteGeometry(GeometryElement geometryElement, bool useSymbolGeometry = false)
=======
private static IEnumerable<GeometryObject> CollectConcreteGeometry(GeometryElement geometryElement)
>>>>>>>
/// <summary>
/// Collects the concrete GeometryObject's in a GeometryElement, which is a recursive collection of GeometryObject's.
/// </summary>
/// <param name="geometryElement">The Geometry collection</param>
/// <param name="useSymbolGeometry">When encountering a GeometryInstance, use GetSymbolGeometry() which obtains usable Reference objects</param>
/// <returns></returns>
private static IEnumerable<GeometryObject> CollectConcreteGeometry(GeometryElement geometryElement, bool useSymbolGeometry = false)
<<<<<<<
var instanceGeom = useSymbolGeometry ? geomInstance.GetSymbolGeometry() : geomInstance.GetInstanceGeometry();
instanceGeometryObjects.AddRange( CollectConcreteGeometry(instanceGeom) );
=======
var instanceGeom = geomInstance.GetInstanceGeometry();
instanceGeometryObjects.AddRange(CollectConcreteGeometry(instanceGeom));
>>>>>>>
var instanceGeom = useSymbolGeometry ? geomInstance.GetSymbolGeometry() : geomInstance.GetInstanceGeometry();
instanceGeometryObjects.AddRange( CollectConcreteGeometry(instanceGeom) );
<<<<<<<
/// <summary>
/// A generic method extract all GeometryObject's of the supplied type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
private IEnumerable<T> InternalGeometry<T>(bool useSymbolGeometry = false) where T : GeometryObject
{
return this.InternalGeometry(useSymbolGeometry).OfType<T>();
}
/// <summary>
/// The Solids in this Element
/// </summary>
=======
>>>>>>>
/// <summary>
/// A generic method extract all GeometryObject's of the supplied type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
private IEnumerable<T> InternalGeometry<T>(bool useSymbolGeometry = false) where T : GeometryObject
{
return this.InternalGeometry(useSymbolGeometry).OfType<T>();
}
/// <summary>
/// The Solids in this Element
/// </summary> |
<<<<<<<
protected DynamoModel Model;
=======
private DynamoShapeManager.Preloader preloader;
>>>>>>>
protected DynamoModel Model;
private DynamoShapeManager.Preloader preloader;
<<<<<<<
DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance);
this.Model = DynamoModel.Start(
=======
var model = DynamoModel.Start(
>>>>>>>
this.Model = DynamoModel.Start( |
<<<<<<<
// This event is raised only, when we can't go down, to next member.
// I.e. we are now at the last member button and we have to move to next member group.
private void MemberGroupsKeyDown(object sender, KeyEventArgs e)
{
var memberInFocus = (Keyboard.FocusedElement as ListBoxItem).Content;
var merberGroups = (sender as ListBox).Items;
int numberOfFocusedMemberGroup = 0;
// Find out to which memberGroup focused member belong.
for (int i = 0; i < merberGroups.Count; i++)
{
var memberGroup = merberGroups[i];
if (memberGroup is SearchMemberGroup)
{
bool memberGroupFound = false;
foreach (var member in (memberGroup as SearchMemberGroup).Members)
if (member.Equals(memberInFocus))
{
memberGroupFound = true;
break;
}
if (memberGroupFound)
{
numberOfFocusedMemberGroup = i;
break;
}
}
}
int nextFocusedMemberGroupNumber = numberOfFocusedMemberGroup;
// If user presses down, then we need to set focus to the next member group.
// Otherwise to previous.
if (e.Key == Key.Down)
nextFocusedMemberGroupNumber++;
if (e.Key == Key.Up)
nextFocusedMemberGroupNumber--;
// This case is raised, when we move out of list of member groups.
// I.e. to class buttons list or to another category.
// TODO: Create this functionality later.
if (nextFocusedMemberGroupNumber < 0 || nextFocusedMemberGroupNumber > merberGroups.Count - 1) return;
var nextFocusedMemberGroup = (sender as ListBox).ItemContainerGenerator.
ContainerFromIndex(nextFocusedMemberGroupNumber) as ListBoxItem;
var nextFocusedMembers = WPF.FindChild<ListBox>(nextFocusedMemberGroup, "MembersListBox");
// Focus can be set to first as well as to last member.
// If we move down, then to first one.
// If we move up, then to last one.
if (e.Key == Key.Down)
(nextFocusedMembers.ItemContainerGenerator.ContainerFromIndex(0) as ListBoxItem).Focus();
if (e.Key == Key.Up)
(nextFocusedMembers.ItemContainerGenerator.ContainerFromIndex(nextFocusedMembers.Items.Count - 1) as ListBoxItem).Focus();
e.Handled = true;
}
=======
private void OnListBoxItemMouseEnter(object sender, MouseEventArgs e)
{
ListBoxItem fromSender = sender as ListBoxItem;
libraryToolTipPopup.PlacementTarget = fromSender;
libraryToolTipPopup.SetDataContext(fromSender.DataContext);
}
private void OnPopupMouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
{
libraryToolTipPopup.SetDataContext(null);
}
>>>>>>>
private void OnListBoxItemMouseEnter(object sender, MouseEventArgs e)
{
ListBoxItem fromSender = sender as ListBoxItem;
libraryToolTipPopup.PlacementTarget = fromSender;
libraryToolTipPopup.SetDataContext(fromSender.DataContext);
}
private void OnPopupMouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
{
libraryToolTipPopup.SetDataContext(null);
}
// This event is raised only, when we can't go down, to next member.
// I.e. we are now at the last member button and we have to move to next member group.
private void MemberGroupsKeyDown(object sender, KeyEventArgs e)
{
var memberInFocus = (Keyboard.FocusedElement as ListBoxItem).Content;
var merberGroups = (sender as ListBox).Items;
int numberOfFocusedMemberGroup = 0;
// Find out to which memberGroup focused member belong.
for (int i = 0; i < merberGroups.Count; i++)
{
var memberGroup = merberGroups[i];
if (memberGroup is SearchMemberGroup)
{
bool memberGroupFound = false;
foreach (var member in (memberGroup as SearchMemberGroup).Members)
if (member.Equals(memberInFocus))
{
memberGroupFound = true;
break;
}
if (memberGroupFound)
{
numberOfFocusedMemberGroup = i;
break;
}
}
}
int nextFocusedMemberGroupNumber = numberOfFocusedMemberGroup;
// If user presses down, then we need to set focus to the next member group.
// Otherwise to previous.
if (e.Key == Key.Down)
nextFocusedMemberGroupNumber++;
if (e.Key == Key.Up)
nextFocusedMemberGroupNumber--;
// This case is raised, when we move out of list of member groups.
// I.e. to class buttons list or to another category.
// TODO: Create this functionality later.
if (nextFocusedMemberGroupNumber < 0 || nextFocusedMemberGroupNumber > merberGroups.Count - 1) return;
var nextFocusedMemberGroup = (sender as ListBox).ItemContainerGenerator.
ContainerFromIndex(nextFocusedMemberGroupNumber) as ListBoxItem;
var nextFocusedMembers = WPF.FindChild<ListBox>(nextFocusedMemberGroup, "MembersListBox");
// Focus can be set to first as well as to last member.
// If we move down, then to first one.
// If we move up, then to last one.
if (e.Key == Key.Down)
(nextFocusedMembers.ItemContainerGenerator.ContainerFromIndex(0) as ListBoxItem).Focus();
if (e.Key == Key.Up)
(nextFocusedMembers.ItemContainerGenerator.ContainerFromIndex(nextFocusedMembers.Items.Count - 1) as ListBoxItem).Focus();
e.Handled = true;
} |
<<<<<<<
A.CallTo(() => appProvider.GetSchemaAsync(appId.Id, A<DomainId>._, false))
=======
A.CallTo(() => appProvider.GetSchemaAsync(appId.Id, A<Guid>._, false, false))
>>>>>>>
A.CallTo(() => appProvider.GetSchemaAsync(appId.Id, A<DomainId>._, false, false)) |
<<<<<<<
/// Formats user text by :
/// 1.Removing whitespaces form the front and back (whitespaces -> space, tab or enter)
/// 2.Removes unnecessary semi colons
/// 3.Adds a semicolon at the end if needed
=======
/// Formats user text by :
/// 1.Removes unnecessary semi colons
/// 2. Removing whitespaces form the front and back (whitespaces -> space, tab or enter)
/// 3.Adds a semicolon at the end if needed
>>>>>>>
/// Formats user text by :
/// 1.Removing whitespaces form the front and back (whitespaces -> space, tab or enter)
/// 2.Removes unnecessary semi colons
/// 3.Adds a semicolon at the end if needed
<<<<<<<
previewVariable = null;
=======
>>>>>>> |
<<<<<<<
=======
using System.Xml;
using System.Xml.Serialization;
using Autodesk.Revit.UI.Events;
using Dynamo.NUnit.Tests;
>>>>>>>
using Autodesk.Revit.UI.Events; |
<<<<<<<
get { return _isCurrentSpace; }
set
{
_isCurrentSpace = value;
RaisePropertyChanged(/*NXLT*/"IsCurrentSpace");
}
=======
RegisterConnector(obj);
var handler = ConnectorAdded;
if (handler != null) handler(obj);
>>>>>>>
RegisterConnector(obj);
var handler = ConnectorAdded;
if (handler != null) handler(obj);
<<<<<<<
get { return _category; }
set
{
_category = value;
RaisePropertyChanged(/*NXLT*/"Category");
}
=======
connector.Deleted += () => OnConnectorDeleted(connector);
>>>>>>>
connector.Deleted += () => OnConnectorDeleted(connector);
<<<<<<<
_lastSaved = value;
RaisePropertyChanged(/*NXLT*/"LastSaved");
=======
lastSaved = value;
RaisePropertyChanged("LastSaved");
>>>>>>>
lastSaved = value;
RaisePropertyChanged(/*NXLT*/"LastSaved");
<<<<<<<
_author = value;
RaisePropertyChanged(/*NXLT*/"Author");
=======
author = value;
RaisePropertyChanged("Author");
>>>>>>>
author = value;
RaisePropertyChanged(/*NXLT*/"Author");
<<<<<<<
_description = value;
RaisePropertyChanged(/*NXLT*/"Description");
=======
hasUnsavedChanges = value;
RaisePropertyChanged("HasUnsavedChanges");
>>>>>>>
hasUnsavedChanges = value;
RaisePropertyChanged(/*NXLT*/"HasUnsavedChanges");
<<<<<<<
_hasUnsavedChanges = value;
RaisePropertyChanged(/*NXLT*/"HasUnsavedChanges");
=======
return nodes.SelectMany(
node => node.OutPorts.SelectMany(port => port.Connectors))
.Distinct();
>>>>>>>
return nodes.SelectMany(
node => node.OutPorts.SelectMany(port => port.Connectors))
.Distinct();
<<<<<<<
_fileName = value;
RaisePropertyChanged(/*NXLT*/"FileName");
=======
fileName = value;
RaisePropertyChanged("FileName");
>>>>>>>
fileName = value;
RaisePropertyChanged(/*NXLT*/"FileName");
<<<<<<<
_name = value;
RaisePropertyChanged(/*NXLT*/"Name");
=======
name = value;
RaisePropertyChanged("Name");
>>>>>>>
name = value;
RaisePropertyChanged(/*NXLT*/"Name");
<<<<<<<
_x = value;
RaisePropertyChanged(/*NXLT*/"X");
=======
x = value;
RaisePropertyChanged("X");
>>>>>>>
x = value;
RaisePropertyChanged(/*NXLT*/"X");
<<<<<<<
_y = value;
RaisePropertyChanged(/*NXLT*/"Y");
=======
y = value;
RaisePropertyChanged("Y");
>>>>>>>
y = value;
RaisePropertyChanged(/*NXLT*/"Y");
<<<<<<<
_zoom = value;
RaisePropertyChanged(/*NXLT*/"Zoom");
=======
zoom = value;
RaisePropertyChanged("Zoom");
>>>>>>>
zoom = value;
RaisePropertyChanged(/*NXLT*/"Zoom");
<<<<<<<
_height = value;
RaisePropertyChanged(/*NXLT*/"Height");
=======
height = value;
RaisePropertyChanged("Height");
>>>>>>>
height = value;
RaisePropertyChanged(/*NXLT*/"Height");
<<<<<<<
_width = value;
RaisePropertyChanged(/*NXLT*/"Width");
=======
width = value;
RaisePropertyChanged("Width");
>>>>>>>
width = value;
RaisePropertyChanged(/*NXLT*/"Width");
<<<<<<<
/// <summary>
/// This does not belong here, period. It is here simply because there is
/// currently no better place to put it. A DYN file is loaded by DynamoModel,
/// subsequently populating WorkspaceModel, along the way, the trace data
/// gets preloaded with the file. The best place for this cached data is in
/// the EngineController (or even LiveRunner), but the engine gets reset in
/// a rather nondeterministic way (for example, when Revit idle thread
/// decides it is time to execute a pre-scheduled engine reset). And it gets
/// done more than once during file open. So that's out. The second best
/// place to store this information is then the WorkspaceModel, where file
/// loading is SUPPOSED TO BE done. As of now we let DynamoModel sets the
/// loaded data (since it deals with loading DYN file), but in near future,
/// the file loading mechanism will be completely moved into WorkspaceModel,
/// that's the time we removed this property setter below.
/// </summary>
private IEnumerable<KeyValuePair<Guid, List<string>>> preloadedTraceData = null;
internal IEnumerable<KeyValuePair<Guid, List<string>>> PreloadedTraceData
{
get
{
return preloadedTraceData;
}
set
{
if (value != null && (preloadedTraceData != null))
{
var message = /*NXLT*/"PreloadedTraceData cannot be set twice";
throw new InvalidOperationException(message);
}
preloadedTraceData = value;
}
}
=======
>>>>>>>
<<<<<<<
DynamoModel.Logger.Log(/*NXLT*/"Saving " + newPath + "...");
=======
Log("Saving " + newPath + "...");
>>>>>>>
Log("Saving " + newPath + "...");
<<<<<<<
if (centerNote)
{
var args = new ModelEventArgs(noteModel, true);
OnRequestNodeCentered(this, args);
}
noteModel.Text = /*NXLT*/"New Note";
if (!string.IsNullOrEmpty(text))
noteModel.Text = text;
Notes.Add(noteModel);
=======
AddNote(noteModel, centerNote);
>>>>>>>
AddNote(noteModel, centerNote);
<<<<<<<
var message = /*NXLT*/"Workspace should have been saved before this";
=======
const string message = "Workspace should have been saved before this";
>>>>>>>
const string message = "Workspace should have been saved before this";
<<<<<<<
/*NXLT*/"ModelBase.HandleModelEvent call not handled.\n\n" +
/*NXLT*/"Model type: {0}\n" +
/*NXLT*/"Model GUID: {1}\n" +
/*NXLT*/"Event name: {2}",
type, modelGuid.ToString(), eventName);
=======
"ModelBase.HandleModelEvent call not handled.\n\n" +
"Model type: {0}\n" +
"Model GUID: {1}\n" +
"Event name: {2}",
type, modelGuid, eventName);
>>>>>>>
"ModelBase.HandleModelEvent call not handled.\n\n" +
"Model type: {0}\n" +
"Model GUID: {1}\n" +
"Event name: {2}",
type, modelGuid, eventName);
<<<<<<<
/*NXLT*/"ModelBase.UpdateValue call not handled.\n\n" +
/*NXLT*/"Model type: {0}\n" +
/*NXLT*/"Model GUID: {1}\n" +
/*NXLT*/"Property name: {2}\n" +
/*NXLT*/"Property value: {3}",
type, modelGuid.ToString(), name, value);
=======
"ModelBase.UpdateValue call not handled.\n\n" +
"Model type: {0}\n" +
"Model GUID: {1}\n" +
"Property name: {2}\n" +
"Property value: {3}",
type, modelGuid, propertyName, value);
>>>>>>>
"ModelBase.UpdateValue call not handled.\n\n" +
"Model type: {0}\n" +
"Model GUID: {1}\n" +
"Property name: {2}\n" +
"Property value: {3}",
type, modelGuid, propertyName, value);
<<<<<<<
/*NXLT*/"Unhandled type: {0}", model.GetType().ToString()));
=======
"Unhandled type: {0}", model.GetType()));
>>>>>>>
"Unhandled type: {0}", model.GetType()));
<<<<<<<
if (typeName.Equals(/*NXLT*/"Dynamo.Nodes.DSFunction") ||
typeName.Equals(/*NXLT*/"Dynamo.Nodes.DSVarArgFunction"))
=======
/*
if (typeName.Equals("Dynamo.Nodes.DSFunction") ||
typeName.Equals("Dynamo.Nodes.DSVarArgFunction"))
>>>>>>>
/*
if (typeName.Equals("Dynamo.Nodes.DSFunction") ||
typeName.Equals("Dynamo.Nodes.DSVarArgFunction"))
<<<<<<<
throw new ArgumentException(string.Format(
/*NXLT*/"Unhandled model type: {0}", helper.ReadString("type")));
=======
throw new ArgumentException(
string.Format("Unhandled model type: {0}", helper.ReadString("type", modelData.Name)));
>>>>>>>
throw new ArgumentException(
string.Format("Unhandled model type: {0}", helper.ReadString("type", modelData.Name)));
<<<<<<<
string outData = String.Empty;
Action getString = (() =>
{
// Create the xml document to write to.
var document = new XmlDocument();
document.CreateXmlDeclaration("1.0", null, null);
document.AppendChild(document.CreateElement("Workspace"));
//This is only used for computing relative offsets, it's not actually created
string virtualFileName = String.Join(Path.GetTempPath(), /*NXLT*/"DynamoTemp.dyn");
Utils.SetDocumentXmlPath(document, virtualFileName);
if (!PopulateXmlDocument(document))
return;
=======
// Create the xml document to write to.
var document = new XmlDocument();
document.CreateXmlDeclaration("1.0", null, null);
document.AppendChild(document.CreateElement("Workspace"));
>>>>>>>
// Create the xml document to write to.
var document = new XmlDocument();
document.CreateXmlDeclaration("1.0", null, null);
document.AppendChild(document.CreateElement("Workspace")); |
<<<<<<<
[NodeCategory(BuiltinNodeCategories.ANALYZE_STRUCTURE)]
public class dynDynamicRelaxationStep: dynNodeWithOneOutput
=======
[NodeCategory(BuiltinNodeCategories.SIMULATION)]
[IsInteractive(true)]
public class dynDynamicRelaxationStep : dynParticleSystemBase
>>>>>>>
[NodeCategory(BuiltinNodeCategories.ANALYZE_STRUCTURE)]
[IsInteractive(true)]
public class dynDynamicRelaxationStep: dynNodeWithOneOutput
<<<<<<<
[NodeCategory(BuiltinNodeCategories.ANALYZE_STRUCTURE)]
public class dynXYZsFromPS: dynNodeWithOneOutput
=======
[NodeCategory(BuiltinNodeCategories.REVIT)]
public class dynXYZsFromPS : dynParticleSystemBase
>>>>>>>
[NodeCategory(BuiltinNodeCategories.ANALYZE_STRUCTURE)]
public class dynXYZsFromPS: dynNodeWithOneOutput
<<<<<<<
[NodeCategory(BuiltinNodeCategories.ANALYZE_STRUCTURE)]
public class dynCurvesFromPS: dynNodeWithOneOutput
=======
[NodeCategory(BuiltinNodeCategories.REVIT)]
public class dynCurvesFromPS : dynParticleSystemBase
>>>>>>>
[NodeCategory(BuiltinNodeCategories.ANALYZE_STRUCTURE)]
public class dynCurvesFromPS: dynNodeWithOneOutput |
<<<<<<<
[Test]
[Category("UnitTests")]
public void File_open_with_all_nodes_Frozen()
{
string openPath = Path.Combine(TestDirectory, @"core\FreezeNodes\TestFrozenStateAllNodes.dyn");
RunModel(openPath);
//check the upstream node is explicitly frozen
var inputNode1 = CurrentDynamoModel.CurrentWorkspace.NodeFromWorkspace<DoubleInput>("13bd151a-f5b6-4af7-ac20-a7121cc0d830");
Assert.AreEqual(true, inputNode1.IsFrozen);
var inputNode2 = CurrentDynamoModel.CurrentWorkspace.NodeFromWorkspace<DoubleInput>("9c75fe7e-976b-4d9b-a7ff-e5dfb4e50a4b");
Assert.AreEqual(true, inputNode2.IsFrozen);
//because the upstream node is frozen, the downstream node should be in frozen state
var add = CurrentDynamoModel.CurrentWorkspace.NodeFromWorkspace<DSFunction>("44f77917-ce7a-404f-bf70-6972c9276c02");
Assert.AreEqual(true, add.IsFrozen);
//check the value on Add Node
AssertPreviewValue(add.GUID.ToString(), null);
//now change the property on inputnode1 and inputnode2.
inputNode1.IsFrozen = false;
inputNode2.IsFrozen = false;
//now all the nodes are in unfreeze state
Assert.AreEqual(false, inputNode1.IsFrozen);
Assert.AreEqual(false, inputNode2.IsFrozen);
Assert.AreEqual(false, add.IsFrozen);
//check the value on Add Node
AssertPreviewValue(add.GUID.ToString(), 8);
}
=======
[Test]
[Category("UnitTests")]
public void Check_ConnectingFrozenStartNodeUpdatesEndNodeState()
{
CreateAndConnectNodes();
CurrentDynamoModel.ClearCurrentWorkspace();
// check if after clearing end node is still able to be updated
// by adding a frozen input connector
CreateAndConnectNodes();
}
private void CreateAndConnectNodes()
{
var model = CurrentDynamoModel;
//create a number
var numberNode = new DoubleInput();
model.ExecuteCommand(new DynamoModel.CreateNodeCommand(numberNode, 0, 0, true, false));
//add a watch node
var watchNode = new Watch();
model.ExecuteCommand(new DynamoModel.CreateNodeCommand(watchNode, 0, 0, true, false));
Assert.AreEqual(model.CurrentWorkspace.Nodes.Count(), 2);
numberNode.IsFrozen = true;
Assert.IsTrue(numberNode.isFrozenExplicitly);
Assert.IsFalse(watchNode.IsFrozen);
model.ExecuteCommand(new DynamoModel.MakeConnectionCommand(numberNode.GUID, 0, PortType.Output, DynCmd.MakeConnectionCommand.Mode.Begin));
model.ExecuteCommand(new DynamoModel.MakeConnectionCommand(watchNode.GUID, 0, PortType.Input, DynCmd.MakeConnectionCommand.Mode.End));
Assert.AreEqual(model.CurrentWorkspace.Connectors.Count(), 1);
// check if watch node freeze state is updated
var msg = "End node freeze state has not been updated";
Assert.IsTrue(watchNode.IsFrozen, msg);
Assert.IsFalse(watchNode.isFrozenExplicitly, msg);
}
>>>>>>>
[Test]
[Category("UnitTests")]
public void File_open_with_all_nodes_Frozen()
{
string openPath = Path.Combine(TestDirectory, @"core\FreezeNodes\TestFrozenStateAllNodes.dyn");
RunModel(openPath);
//check the upstream node is explicitly frozen
var inputNode1 = CurrentDynamoModel.CurrentWorkspace.NodeFromWorkspace<DoubleInput>("13bd151a-f5b6-4af7-ac20-a7121cc0d830");
Assert.AreEqual(true, inputNode1.IsFrozen);
var inputNode2 = CurrentDynamoModel.CurrentWorkspace.NodeFromWorkspace<DoubleInput>("9c75fe7e-976b-4d9b-a7ff-e5dfb4e50a4b");
Assert.AreEqual(true, inputNode2.IsFrozen);
//because the upstream node is frozen, the downstream node should be in frozen state
var add = CurrentDynamoModel.CurrentWorkspace.NodeFromWorkspace<DSFunction>("44f77917-ce7a-404f-bf70-6972c9276c02");
Assert.AreEqual(true, add.IsFrozen);
//check the value on Add Node
AssertPreviewValue(add.GUID.ToString(), null);
//now change the property on inputnode1 and inputnode2.
inputNode1.IsFrozen = false;
inputNode2.IsFrozen = false;
//now all the nodes are in unfreeze state
Assert.AreEqual(false, inputNode1.IsFrozen);
Assert.AreEqual(false, inputNode2.IsFrozen);
Assert.AreEqual(false, add.IsFrozen);
//check the value on Add Node
AssertPreviewValue(add.GUID.ToString(), 8);
}
[Test]
[Category("UnitTests")]
public void Check_ConnectingFrozenStartNodeUpdatesEndNodeState()
{
CreateAndConnectNodes();
CurrentDynamoModel.ClearCurrentWorkspace();
// check if after clearing end node is still able to be updated
// by adding a frozen input connector
CreateAndConnectNodes();
}
private void CreateAndConnectNodes()
{
var model = CurrentDynamoModel;
//create a number
var numberNode = new DoubleInput();
model.ExecuteCommand(new DynamoModel.CreateNodeCommand(numberNode, 0, 0, true, false));
//add a watch node
var watchNode = new Watch();
model.ExecuteCommand(new DynamoModel.CreateNodeCommand(watchNode, 0, 0, true, false));
Assert.AreEqual(model.CurrentWorkspace.Nodes.Count(), 2);
numberNode.IsFrozen = true;
Assert.IsTrue(numberNode.isFrozenExplicitly);
Assert.IsFalse(watchNode.IsFrozen);
model.ExecuteCommand(new DynamoModel.MakeConnectionCommand(numberNode.GUID, 0, PortType.Output, DynCmd.MakeConnectionCommand.Mode.Begin));
model.ExecuteCommand(new DynamoModel.MakeConnectionCommand(watchNode.GUID, 0, PortType.Input, DynCmd.MakeConnectionCommand.Mode.End));
Assert.AreEqual(model.CurrentWorkspace.Connectors.Count(), 1);
// check if watch node freeze state is updated
var msg = "End node freeze state has not been updated";
Assert.IsTrue(watchNode.IsFrozen, msg);
Assert.IsFalse(watchNode.isFrozenExplicitly, msg);
} |
<<<<<<<
=======
using Microsoft.Practices.Prism.ViewModel;
>>>>>>> |
<<<<<<<
private Dictionary<Guid, string> backupFilesDict = new Dictionary<Guid, string>();
=======
>>>>>>>
private Dictionary<Guid, string> backupFilesDict = new Dictionary<Guid, string>();
<<<<<<<
DynamoModel.OnRequestDispatcherBeginInvoke(() =>
{
// tempDict stores the list of backup files and their corresponding workspaces IDs
// when the last auto-save operation happens. Now the IDs will be used to know
// whether some workspaces have already been backed up. If so, those workspaces won't be
// backed up again.
var tempDict = new Dictionary<Guid,string>(backupFilesDict);
backupFilesDict.Clear();
PreferenceSettings.BackupFiles.Clear();
=======
OnRequestDispatcherBeginInvoke(() =>
{
>>>>>>>
OnRequestDispatcherBeginInvoke(() =>
{
// tempDict stores the list of backup files and their corresponding workspaces IDs
// when the last auto-save operation happens. Now the IDs will be used to know
// whether some workspaces have already been backed up. If so, those workspaces won't be
// backed up again.
var tempDict = new Dictionary<Guid,string>(backupFilesDict);
backupFilesDict.Clear();
PreferenceSettings.BackupFiles.Clear(); |
<<<<<<<
protected override void GetLibrariesToPreload(List<string> libraries)
{
libraries.Add("DSCoreNodes.dll");
libraries.Add("FunctionObject.ds");
base.GetLibrariesToPreload(libraries);
}
string TestFolder { get { return GetTestDirectory(); } }
=======
string TestFolder { get { return TestDirectory; } }
>>>>>>>
protected override void GetLibrariesToPreload(List<string> libraries)
{
libraries.Add("DSCoreNodes.dll");
libraries.Add("FunctionObject.ds");
base.GetLibrariesToPreload(libraries);
}
string TestFolder { get { return TestDirectory; } } |
<<<<<<<
ProtoCore.DSASM.Executable exe = MirrorTarget.exe;
nodesMarkedDirty = MirrorTarget.UpdateDependencyGraph(
graphNode.exprUID, ProtoCore.DSASM.Constants.kInvalidIndex, false, graphNode, exe.instrStreamList[outerBlock].dependencyGraph, outerBlock);
=======
ProtoCore.DSASM.Executable exe = MirrorTarget.rmem.Executable;
List<AssociativeGraph.GraphNode> reachableGraphNodes = AssociativeEngine.Utils.UpdateDependencyGraph(
graphNode, MirrorTarget, graphNode.exprUID, ProtoCore.DSASM.Constants.kInvalidIndex, false, core.Options.ExecuteSSA, outerBlock);
>>>>>>>
ProtoCore.DSASM.Executable exe = MirrorTarget.exe;
List<AssociativeGraph.GraphNode> reachableGraphNodes = AssociativeEngine.Utils.UpdateDependencyGraph(
graphNode, MirrorTarget, graphNode.exprUID, ProtoCore.DSASM.Constants.kInvalidIndex, false, core.Options.ExecuteSSA, outerBlock); |
<<<<<<<
public void CanSelectNodeAndTheRestAreDeslected()
{
Assert.Inconclusive("Test not valid after move of selection handling logic to view.");
//var model = ViewModel.Model;
//int numNodes = 100;
//// create 100 nodes, and select them as you go
//for (int i = 0; i < numNodes; i++)
//{
// var sumData = new Dictionary<string, object>();
// sumData.Add("name", "Add");
// //DynamoCommands.CommandQueue.Enqueue(Tuple.Create<object, object>(DynamoCommands.CreateNodeCommand, sumData));
// //DynamoCommands.ProcessCommandQueue();
// model.CurrentWorkspace.AddNode(sumData);
// Assert.AreEqual(i + 1, controller.DynamoViewModel.CurrentWorkspace.Nodes.Count);
// DynamoSelection.Instance.Selection.Add();
// controller.OnRequestSelect(null, new ModelEventArgs( controller.DynamoViewModel.Model.Nodes[i], null) );
// Assert.AreEqual(1, DynamoSelection.Instance.Selection.Count);
//}
}
[Test]
=======
>>>>>>>
<<<<<<<
var w = (Watch)ViewModel.Model.Nodes[3];
Assert.AreEqual(4.0, w.CachedValue.Data);
=======
var w = (Watch)Controller.DynamoViewModel.Model.Nodes[3];
Assert.AreEqual(4.0, w.CachedValue);
>>>>>>>
var w = (Watch)ViewModel.Model.Nodes[3];
Assert.AreEqual(4.0, w.CachedValue); |
<<<<<<<
using Point = System.Windows.Point;
=======
using Microsoft.Practices.Prism.Commands;
using Brush = System.Windows.Media.Brush;
>>>>>>>
using Point = System.Windows.Point;
using Brush = System.Windows.Media.Brush; |
<<<<<<<
if (NodeModel.State != ElementState.Error)
=======
if (NodeModel.State != ElementState.ERROR)
>>>>>>>
if (NodeModel.State != ElementState.Error)
<<<<<<<
InfoBubbleDataPacket data = new InfoBubbleDataPacket(style, GetTopLeft(), GetBotRight(), content, connectingDirection);
var vm = dynSettings.Controller.DynamoViewModel;
if (vm.CurrentSpaceViewModel.Previews.Contains(this.PreviewBubble))
this.PreviewBubble.UpdateContentCommand.Execute(data);
=======
InfoBubbleDataPacket data = new InfoBubbleDataPacket(style, topLeft, botRight, content, connectingDirection);
this.PreviewBubble.UpdateContentCommand.Execute(data);
>>>>>>>
InfoBubbleDataPacket data = new InfoBubbleDataPacket(style, GetTopLeft(), GetBotRight(), content, connectingDirection);
this.PreviewBubble.UpdateContentCommand.Execute(data); |