conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
IProcessManager processManager = null, ITaskManager taskManager = null, NPath nodeJsExecutablePath = null, NPath octorunScript = null)
=======
string authorizationNote = null,
string fingerprint = null,
IProcessManager processManager = null, ITaskManager taskManager = null, NPath? nodeJsExecutablePath = null, NPath? octorunScript = null)
>>>>>>>
IProcessManager processManager = null, ITaskManager taskManager = null, NPath? nodeJsExecutablePath = null, NPath? octorunScript = null)
<<<<<<<
var loginTask = new OctorunTask(taskManager.Token, nodeJsExecutablePath, octorunScript,
=======
if (!nodeJsExecutablePath.HasValue)
{
throw new InvalidOperationException("nodeJsExecutablePath must be set");
}
if (!octorunScript.HasValue)
{
throw new InvalidOperationException("octorunScript must be set");
}
ApplicationAuthorization auth;
var loginTask = new OctorunTask(taskManager.Token, nodeJsExecutablePath.Value, octorunScript.Value,
>>>>>>>
if (!nodeJsExecutablePath.HasValue)
{
throw new InvalidOperationException("nodeJsExecutablePath must be set");
}
if (!octorunScript.HasValue)
{
throw new InvalidOperationException("octorunScript must be set");
}
var loginTask = new OctorunTask(taskManager.Token, nodeJsExecutablePath.Value, octorunScript.Value,
<<<<<<<
var loginTask = new OctorunTask(taskManager.Token, nodeJsExecutablePath, octorunScript,
=======
ApplicationAuthorization auth;
var loginTask = new OctorunTask(taskManager.Token, nodeJsExecutablePath.Value, octorunScript.Value,
>>>>>>>
var loginTask = new OctorunTask(taskManager.Token, nodeJsExecutablePath.Value, octorunScript.Value, |
<<<<<<<
private const float SpinnerAnimationDuration = 4f;
private const string FetchActionTitle = "Fetch Changes";
private const string FetchButtonText = "Fetch";
private const string FetchFailureDescription = "Could not fetch changes";
private const string PullButton = "Pull";
private const string PullButtonCount = "Pull (<b>{0}</b>)";
private const string PushButton = "Push";
private const string PushButtonCount = "Push (<b>{0}</b>)";
private const string PullConfirmTitle = "Pull Changes?";
private const string PullConfirmDescription = "Would you like to pull changes from remote '{0}'?";
private const string PullConfirmYes = "Pull";
private const string PullConfirmCancel = "Cancel";
private const string PushConfirmTitle = "Push Changes?";
private const string PushConfirmDescription = "Would you like to push changes to remote '{0}'?";
private const string PushConfirmYes = "Push";
private const string PushConfirmCancel = "Cancel";
private const string PublishButton = "Publish";
[NonSerialized] private bool currentBranchAndRemoteHasUpdate;
[NonSerialized] private bool currentTrackingStatusHasUpdate;
=======
>>>>>>>
private const string FetchActionTitle = "Fetch Changes";
private const string FetchButtonText = "Fetch";
private const string FetchFailureDescription = "Could not fetch changes";
private const string PullButton = "Pull";
private const string PullButtonCount = "Pull (<b>{0}</b>)";
private const string PushButton = "Push";
private const string PushButtonCount = "Push (<b>{0}</b>)";
private const string PullConfirmTitle = "Pull Changes?";
private const string PullConfirmDescription = "Would you like to pull changes from remote '{0}'?";
private const string PullConfirmYes = "Pull";
private const string PullConfirmCancel = "Cancel";
private const string PushConfirmTitle = "Push Changes?";
private const string PushConfirmDescription = "Would you like to push changes to remote '{0}'?";
private const string PushConfirmYes = "Push";
private const string PushConfirmCancel = "Cancel";
private const string PublishButton = "Publish";
[NonSerialized] private bool currentBranchAndRemoteHasUpdate;
[NonSerialized] private bool currentTrackingStatusHasUpdate; |
<<<<<<<
repositoryManager.OnCurrentBranchUpdated += configBranch => {
logger?.Trace("OnCurrentBranchUpdated");
listener.OnCurrentBranchUpdated(configBranch);
managerEvents?.OnCurrentBranchUpdated.Set();
};
repositoryManager.OnCurrentRemoteUpdated += configRemote => {
logger?.Trace("OnCurrentRemoteUpdated");
listener.OnCurrentRemoteUpdated(configRemote);
managerEvents?.OnCurrentRemoteUpdated.Set();
=======
repositoryManager.OnStatusUpdated += status => {
logger?.Debug("OnStatusUpdated: {0}", status);
listener.OnStatusUpdated(status);
managerEvents?.OnStatusUpdated.Set();
};
repositoryManager.OnLocksUpdated += locks => {
var lockArray = locks.ToArray();
logger?.Trace("OnLocksUpdated Count:{0}", lockArray.Length);
listener.OnLocksUpdated(lockArray);
managerEvents?.OnLocksUpdated.Set();
};
repositoryManager.OnCurrentBranchAndRemoteUpdated += (configBranch, configRemote) => {
logger?.Trace("OnCurrentBranchAndRemoteUpdated");
listener.OnCurrentBranchAndRemoteUpdated(configBranch, configRemote);
managerEvents?.OnCurrentBranchAndRemoteUpdated.Set();
>>>>>>>
repositoryManager.OnCurrentBranchAndRemoteUpdated += (configBranch, configRemote) => {
logger?.Trace("OnCurrentBranchAndRemoteUpdated");
listener.OnCurrentBranchAndRemoteUpdated(configBranch, configRemote);
managerEvents?.OnCurrentBranchAndRemoteUpdated.Set(); |
<<<<<<<
private const string NoUserOrEmailError = "Name and Email must be configured in Settings";
=======
[SerializeField] private UserSettingsView userSettingsView = new UserSettingsView();
[SerializeField] private GitPathView gitPathView = new GitPathView();
>>>>>>>
private const string NoUserOrEmailError = "Name and Email must be configured in Settings";
[SerializeField] private UserSettingsView userSettingsView = new UserSettingsView();
[SerializeField] private GitPathView gitPathView = new GitPathView();
<<<<<<<
[SerializeField] private bool isUserDataPresent = true;
[NonSerialized] private string errorMessage;
[NonSerialized] private bool userDataHasChanged;
public override void InitializeView(IView parent)
{
base.InitializeView(parent);
if (!string.IsNullOrEmpty(Environment.GitExecutablePath))
{
CheckForUser();
}
}
public override void OnEnable()
{
base.OnEnable();
userDataHasChanged = Environment.GitExecutablePath != null;
}
=======
>>>>>>>
[NonSerialized] private string errorMessage;
[NonSerialized] private bool userDataHasChanged;
public override void InitializeView(IView parent)
{
base.InitializeView(parent);
if (!string.IsNullOrEmpty(Environment.GitExecutablePath))
{
CheckForUser();
}
}
public override void OnEnable()
{
base.OnEnable();
userDataHasChanged = Environment.GitExecutablePath != null;
}
<<<<<<<
EditorGUI.BeginDisabledGroup(isBusy || !isUserDataPresent);
=======
EditorGUI.BeginDisabledGroup(IsBusy);
>>>>>>>
EditorGUI.BeginDisabledGroup(IsBusy || !isUserDataPresent); |
<<<<<<<
protected override void InitializeEnvironment()
=======
protected override string GetAssetsPath()
>>>>>>>
protected override string GetAssetsPath()
<<<<<<<
private Task SetupUserTracking()
{
var usagePath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)
.ToNPath().Combine(ApplicationInfo.ApplicationName, "github-unity-usage.json");
string userTrackingId;
if (!UserSettings.Exists("UserTrackingId"))
{
userTrackingId = Guid.NewGuid().ToString();
UserSettings.Set("UserTrackingId", userTrackingId);
}
else
{
userTrackingId = UserSettings.Get("UserTrackingId");
}
UsageTracker = new UsageTracker(usagePath, userTrackingId);
UsageTracker.Enabled = UserSettings.Get("UserTrackingEnabled", true);
if (ApplicationCache.Instance.FirstRun)
{
return UsageTracker.IncrementLaunchCount();
}
return CompletedTask.Default;
}
public override IEnvironment Environment
{
get
{
// if this is called while still null, it's because Unity wants
// to render something and we need to load icons, and that runs
// before EntryPoint. Do an early initialization
if (environment == null)
InitializeEnvironment();
return environment;
}
set { environment = value; }
}
=======
>>>>>>>
private Task SetupUserTracking()
{
var usagePath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)
.ToNPath().Combine(ApplicationInfo.ApplicationName, "github-unity-usage.json");
string userTrackingId;
if (!UserSettings.Exists("UserTrackingId"))
{
userTrackingId = Guid.NewGuid().ToString();
UserSettings.Set("UserTrackingId", userTrackingId);
}
else
{
userTrackingId = UserSettings.Get("UserTrackingId");
}
UsageTracker = new UsageTracker(usagePath, userTrackingId);
UsageTracker.Enabled = UserSettings.Get("UserTrackingEnabled", true);
if (ApplicationCache.Instance.FirstRun)
{
return UsageTracker.IncrementLaunchCount();
}
return CompletedTask.Default;
} |
<<<<<<<
=======
public void UpdateConfigData()
{
UpdateConfigData(false);
}
private void LoadGitUser()
{
GitClient.GetConfigUserAndEmail()
.Then((success, user) => {
Logger.Trace("OnGitUserLoaded: {0}", user);
OnGitUserLoaded?.Invoke(user);
}).Start();
}
>>>>>>>
public void UpdateConfigData()
{
UpdateConfigData(false);
} |
<<<<<<<
gitExecHasChanged = true;
=======
metricsHasChanged = true;
>>>>>>>
metricsHasChanged = true;
gitExecHasChanged = true;
<<<<<<<
=======
string gitExecPath = null;
string gitExecParentPath = null;
string extension = null;
if (Environment != null)
{
extension = Environment.ExecutableExtension;
if (Environment.IsWindows)
{
extension = extension.TrimStart('.');
}
if (Environment.GitExecutablePath != null)
{
gitExecPath = Environment.GitExecutablePath.ToString();
gitExecParentPath = Environment.GitExecutablePath.Parent.ToString();
}
if (gitExecParentPath == null)
{
gitExecParentPath = Environment.GitInstallPath;
}
}
>>>>>>>
<<<<<<<
GUILayout.BeginHorizontal();
{
newGitExec = EditorGUILayout.TextField(PathToGit, newGitExec);
if (GUILayout.Button(BrowseButton, EditorStyles.miniButton, GUILayout.Width(25)))
{
GUI.FocusControl(null);
var newValue = EditorUtility.OpenFilePanel(GitInstallBrowseTitle,
gitExecParent,
gitExecExtension);
=======
EditorGUI.BeginChangeCheck();
{
//TODO: Verify necessary value for a non Windows OS
Styles.PathField(ref gitExecPath,
() => EditorUtility.OpenFilePanel(GitInstallBrowseTitle,
gitExecParentPath,
extension), ValidateGitInstall);
}
if (EditorGUI.EndChangeCheck())
{
Logger.Trace("Setting GitExecPath: " + gitExecPath);
>>>>>>>
GUILayout.BeginHorizontal();
{
newGitExec = EditorGUILayout.TextField(PathToGit, newGitExec);
if (GUILayout.Button(BrowseButton, EditorStyles.miniButton, GUILayout.Width(25)))
{
GUI.FocusControl(null);
var newValue = EditorUtility.OpenFilePanel(GitInstallBrowseTitle,
gitExecParent,
gitExecExtension);
<<<<<<<
GUI.FocusControl(null);
var task = new ProcessTask<NPath>(Manager.CancellationToken, new FirstLineIsPathOutputProcessor())
=======
GUI.FocusControl(null);
isBusy = true;
new ProcessTask<NPath>(Manager.CancellationToken, new FirstLineIsPathOutputProcessor())
>>>>>>>
GUI.FocusControl(null);
isBusy = true;
new ProcessTask<NPath>(Manager.CancellationToken, new FirstLineIsPathOutputProcessor())
<<<<<<<
gitExecHasChanged = true;
=======
>>>>>>>
gitExecHasChanged = true; |
<<<<<<<
private const string BadNotificationDelayError = "A delay of {0} is shorter than the default delay and thus would get pre-empted.";
private const string InitializeTitle = "Initialize";
private const string HistoryTitle = "History";
private const string ChangesTitle = "Changes";
private const string BranchesTitle = "Branches";
private const string LocksTitle = "Locks";
private const string SettingsTitle = "Settings";
private const string DefaultRepoUrl = "No remote configured";
private const string Window_RepoUrlTooltip = "Url of the {0} remote";
private const string Window_RepoNoUrlTooltip = "Add a remote in the Settings tab";
private const string Window_RepoBranchTooltip = "Active branch";
private const float SpinnerAnimationDuration = 4f;
=======
>>>>>>>
private const string LocksTitle = "Locks";
<<<<<<<
[SerializeField] private LocksView locksView = new LocksView();
[SerializeField] private string repoRemote;
[SerializeField] private string repoBranch;
[SerializeField] private string repoUrl;
[SerializeField] private GUIContent repoBranchContent;
[SerializeField] private GUIContent repoUrlContent;
=======
[SerializeField] private bool hasRemote;
[SerializeField] private string currentRemoteName;
[SerializeField] private string currentBranch;
[SerializeField] private string currentRemoteUrl;
[SerializeField] private int statusAhead;
[SerializeField] private int statusBehind;
[SerializeField] private bool hasItemsToCommit;
[SerializeField] private GUIContent currentBranchContent;
[SerializeField] private GUIContent currentRemoteUrlContent;
>>>>>>>
[SerializeField] private LocksView locksView = new LocksView();
[SerializeField] private bool hasRemote;
[SerializeField] private string currentRemoteName;
[SerializeField] private string currentBranch;
[SerializeField] private string currentRemoteUrl;
[SerializeField] private int statusAhead;
[SerializeField] private int statusBehind;
[SerializeField] private bool hasItemsToCommit;
[SerializeField] private GUIContent currentBranchContent;
[SerializeField] private GUIContent currentRemoteUrlContent;
<<<<<<<
changeTab = TabButton(SubTab.Changes, ChangesTitle, changeTab);
changeTab = TabButton(SubTab.History, HistoryTitle, changeTab);
changeTab = TabButton(SubTab.Branches, BranchesTitle, changeTab);
changeTab = TabButton(SubTab.Locks, LocksTitle, changeTab);
=======
changeTab = TabButton(SubTab.Changes, Localization.ChangesTitle, changeTab);
changeTab = TabButton(SubTab.History, Localization.HistoryTitle, changeTab);
changeTab = TabButton(SubTab.Branches, Localization.BranchesTitle, changeTab);
>>>>>>>
changeTab = TabButton(SubTab.Changes, Localization.ChangesTitle, changeTab);
changeTab = TabButton(SubTab.History, Localization.HistoryTitle, changeTab);
changeTab = TabButton(SubTab.Branches, Localization.BranchesTitle, changeTab);
changeTab = TabButton(SubTab.Locks, LocksTitle, changeTab); |
<<<<<<<
public TaskBase(CancellationToken token)
: this()
=======
protected TaskBase(CancellationToken token)
>>>>>>>
protected TaskBase(CancellationToken token)
: this()
<<<<<<<
public TaskBase(Task task)
: this()
=======
protected TaskBase(Task task)
>>>>>>>
protected TaskBase(Task task)
: this() |
<<<<<<<
class Window : BaseWindow, IUIProgress
=======
class Window : BaseWindow, ICanRenderEmpty
>>>>>>>
class Window : BaseWindow, IUIProgress, ICanRenderEmpty
<<<<<<<
public override void DoneRefreshing()
=======
public override void OnUI()
>>>>>>>
public override void DoneRefreshing()
<<<<<<<
private void DoActiveViewGUI()
{
var rect = GUILayoutUtility.GetLastRect();
// GUI for the active tab
if (ActiveView != null)
{
ActiveView.OnGUI();
}
if (IsBusy && activeTab != SubTab.Settings && Event.current.type == EventType.Repaint)
{
if (timeSinceLastRotation < 0)
{
timeSinceLastRotation = EditorApplication.timeSinceStartup;
}
else
{
var elapsedTime = (float)(EditorApplication.timeSinceStartup - timeSinceLastRotation);
if (spinner == null)
spinner = new Spinner();
spinner.Start(elapsedTime);
spinner.Rotate(elapsedTime);
spinner.Render();
rect = new Rect(0f, rect.y + rect.height, Position.width, Position.height - (rect.height + rect.y));
rect = spinner.Layout(rect);
rect.y += rect.height + 30;
rect.height = 20;
if (!String.IsNullOrEmpty(appManagerProgressMessage))
EditorGUI.ProgressBar(rect, appManagerProgressValue, appManagerProgressMessage);
}
}
}
=======
public override void DoEmptyGUI()
{
GUILayout.BeginVertical();
GUILayout.FlexibleSpace();
GUILayout.BeginHorizontal();
{
GUILayout.FlexibleSpace();
GUILayout.Label(Styles.EmptyStateInit, GUILayout.MaxWidth(265), GUILayout.MaxHeight(136));
GUILayout.FlexibleSpace();
}
GUILayout.EndHorizontal();
GUILayout.FlexibleSpace();
GUILayout.EndVertical();
}
>>>>>>>
private void DoActiveViewGUI()
{
var rect = GUILayoutUtility.GetLastRect();
// GUI for the active tab
if (ActiveView != null)
{
ActiveView.OnGUI();
}
if (IsBusy && activeTab != SubTab.Settings && Event.current.type == EventType.Repaint)
{
if (timeSinceLastRotation < 0)
{
timeSinceLastRotation = EditorApplication.timeSinceStartup;
}
else
{
var elapsedTime = (float)(EditorApplication.timeSinceStartup - timeSinceLastRotation);
if (spinner == null)
spinner = new Spinner();
spinner.Start(elapsedTime);
spinner.Rotate(elapsedTime);
spinner.Render();
rect = new Rect(0f, rect.y + rect.height, Position.width, Position.height - (rect.height + rect.y));
rect = spinner.Layout(rect);
rect.y += rect.height + 30;
rect.height = 20;
if (!String.IsNullOrEmpty(appManagerProgressMessage))
EditorGUI.ProgressBar(rect, appManagerProgressValue, appManagerProgressMessage);
}
}
}
public override void DoEmptyGUI()
{
GUILayout.BeginVertical();
GUILayout.FlexibleSpace();
GUILayout.BeginHorizontal();
{
GUILayout.FlexibleSpace();
GUILayout.Label(Styles.EmptyStateInit, GUILayout.MaxWidth(265), GUILayout.MaxHeight(136));
GUILayout.FlexibleSpace();
}
GUILayout.EndHorizontal();
GUILayout.FlexibleSpace();
GUILayout.EndVertical();
} |
<<<<<<<
Logging.LogAdapter = new MultipleLogAdapter(
new FileLogAdapter($"..\\{DateTime.UtcNow:yyyyMMddHHmmss}-unit-tests.log")
, new ConsoleLogAdapter()
=======
LogHelper.LogAdapter = new MultipleLogAdapter(
new FileLogAdapter($"..\\{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}-unit-tests.log")
//, new ConsoleLogAdapter()
>>>>>>>
LogHelper.LogAdapter = new MultipleLogAdapter(
new FileLogAdapter($"..\\{DateTime.UtcNow:yyyyMMddHHmmss}-unit-tests.log")
, new ConsoleLogAdapter() |
<<<<<<<
if (ProgressRenderer != null)
ProgressRenderer.DoProgressGUI();
GUILayout.EndVertical();
GUILayout.EndHorizontal();
=======
EditorGUI.BeginDisabledGroup(isBusy);
>>>>>>>
EditorGUI.BeginDisabledGroup(isBusy);
if (ProgressRenderer != null)
ProgressRenderer.DoProgressGUI();
<<<<<<<
DoCommitGUI();
=======
OnCommitDetailsAreaGUI();
EditorGUI.EndDisabledGroup();
>>>>>>>
DoCommitGUI();
EditorGUI.EndDisabledGroup(); |
<<<<<<<
private const string GitInstallBrowseTitle = "Select git binary";
private const string GitInstallPickInvalidTitle = "Invalid Git install";
private const string GitInstallPickInvalidMessage = "The selected file is not a valid Git install. {0}";
private const string GitInstallPickInvalidOK = "OK";
private const string GitInstallFindButton = "Find install";
=======
private const string GitConfigTitle = "Git Configuration";
private const string GitConfigNameLabel = "Name";
private const string GitConfigEmailLabel = "Email";
private const string GitConfigUserSave = "Save User";
>>>>>>>
<<<<<<<
userSettingsView.OnEnable();
=======
gitPathView.OnEnable();
>>>>>>>
gitPathView.OnEnable();
userSettingsView.OnEnable();
<<<<<<<
userSettingsView.OnDisable();
=======
gitPathView.OnDisable();
>>>>>>>
gitPathView.OnDisable();
userSettingsView.OnDisable();
<<<<<<<
userSettingsView.OnDataUpdate();
=======
if (gitPathView != null)
{
gitPathView.OnDataUpdate();
}
>>>>>>>
userSettingsView.OnDataUpdate();
gitPathView.OnDataUpdate();
<<<<<<<
userSettingsView.OnRepositoryChanged(oldRepository);
=======
gitPathView.OnRepositoryChanged(oldRepository);
>>>>>>>
gitPathView.OnRepositoryChanged(oldRepository);
userSettingsView.OnRepositoryChanged(oldRepository);
<<<<<<<
userSettingsView.Refresh();
=======
gitPathView.Refresh();
>>>>>>>
gitPathView.Refresh();
userSettingsView.Refresh();
<<<<<<<
=======
{
if ((cachedUser == null || String.IsNullOrEmpty(cachedUser.Name)) && GitClient != null)
{
var user = new User();
GitClient.GetConfig("user.name", GitConfigSource.User)
.Then((success, value) => user.Name = value).Then(
GitClient.GetConfig("user.email", GitConfigSource.User)
.Then((success, value) => user.Email = value))
.FinallyInUI((success, ex) =>
{
if (success && !String.IsNullOrEmpty(user.Name))
{
cachedUser = user;
userDataHasChanged = true;
Redraw();
}
})
.Start();
}
if (userDataHasChanged)
{
newGitName = gitName = cachedUser.Name;
newGitEmail = gitEmail = cachedUser.Email;
userDataHasChanged = false;
}
>>>>>>>
<<<<<<<
private void OnInstallPathGUI()
{
string gitExecPath = null;
string gitExecParentPath = null;
string extension = null;
if (Environment != null)
{
extension = Environment.ExecutableExtension;
if (Environment.IsWindows)
{
extension = extension.TrimStart('.');
}
if (Environment.GitExecutablePath != null)
{
gitExecPath = Environment.GitExecutablePath.ToString();
gitExecParentPath = Environment.GitExecutablePath.Parent.ToString();
}
if (gitExecParentPath == null)
{
gitExecParentPath = Environment.GitInstallPath;
}
}
// Install path
GUILayout.Label(GitInstallTitle, EditorStyles.boldLabel);
EditorGUI.BeginDisabledGroup(IsBusy || gitExecPath == null);
{
// Install path field
EditorGUI.BeginChangeCheck();
{
//TODO: Verify necessary value for a non Windows OS
Styles.PathField(ref gitExecPath,
() => EditorUtility.OpenFilePanel(GitInstallBrowseTitle,
gitExecParentPath,
extension), ValidateGitInstall);
}
if (EditorGUI.EndChangeCheck())
{
Logger.Trace("Setting GitExecPath: " + gitExecPath);
Manager.SystemSettings.Set(Constants.GitInstallPathKey, gitExecPath);
Environment.GitExecutablePath = gitExecPath.ToNPath();
}
GUILayout.Space(EditorGUIUtility.standardVerticalSpacing);
GUILayout.BeginHorizontal();
{
// Find button - for attempting to locate a new install
if (GUILayout.Button(GitInstallFindButton, GUILayout.ExpandWidth(false)))
{
GUI.FocusControl(null);
isBusy = true;
new ProcessTask<NPath>(Manager.CancellationToken, new FirstLineIsPathOutputProcessor())
.Configure(Manager.ProcessManager, Environment.IsWindows ? "where" : "which", "git")
.FinallyInUI((success, ex, path) =>
{
if (success)
{
Logger.Trace("FindGit Path:{0}", path);
}
else
{
if (ex != null)
{
Logger.Error(ex, "FindGit Error Path:{0}", path);
}
else
{
Logger.Error("FindGit Failed Path:{0}", path);
}
}
if (success)
{
Manager.SystemSettings.Set(Constants.GitInstallPathKey, path);
Environment.GitExecutablePath = path;
}
isBusy = false;
}).Start();
}
}
GUILayout.EndHorizontal();
}
EditorGUI.EndDisabledGroup();
}
=======
>>>>>>>
<<<<<<<
public override bool IsBusy
{
get { return isBusy || userSettingsView.IsBusy; }
}
=======
>>>>>>>
public override bool IsBusy
{
get { return isBusy || userSettingsView.IsBusy || gitPathView.IsBusy; }
} |
<<<<<<<
public static IFileSystem FileSystem { get { return ApplicationManager.FileSystem; } }
public static IUsageTracker UsageTracker { get { return ApplicationManager.UsageTracker; } }
=======
>>>>>>>
public static IUsageTracker UsageTracker { get { return ApplicationManager.UsageTracker; } } |
<<<<<<<
[SerializeField] private Vector2 treeScroll;
=======
[SerializeField] private Vector2 scroll;
[SerializeField] private CacheUpdateEvent lastCurrentBranchChangedEvent;
[SerializeField] private CacheUpdateEvent lastStatusEntriesChangedEvent;
[SerializeField] private CacheUpdateEvent lastLocksChangedEvent;
>>>>>>>
[SerializeField] private Vector2 treeScroll;
<<<<<<<
=======
[SerializeField] private HashSet<string> gitLocks;
>>>>>>>
[SerializeField] private HashSet<string> gitLocks; |
<<<<<<<
#if ENABLE_BROADMODE
if (Event.current.type == EventType.Repaint && EvaluateBroadMode())
{
Refresh();
}
#endif
}
public override bool IsBusy
{
get { return isBusy; }
}
#if ENABLE_BROADMODE
public void OnBroadGUI()
{
GUILayout.BeginHorizontal();
{
GUILayout.BeginVertical(
GUILayout.MinWidth(Styles.BroadModeBranchesMinWidth),
GUILayout.MaxWidth(Mathf.Max(Styles.BroadModeBranchesMinWidth, Position.width * Styles.BroadModeBranchesRatio))
);
{
((Window)Parent).BranchesTab.OnEmbeddedGUI();
}
GUILayout.EndVertical();
GUILayout.BeginVertical();
{
OnEmbeddedGUI();
}
GUILayout.EndVertical();
}
GUILayout.EndHorizontal();
=======
>>>>>>>
}
public override bool IsBusy
{
get { return isBusy; } |
<<<<<<<
DateTimeOffset dt;
if (!DateTimeOffset.TryParseExact(firstRunAtString, Constants.Iso8601Format,
CultureInfo.InvariantCulture, DateTimeStyles.None, out dt))
{
dt = DateTimeOffset.Now;
}
FirstRunAt = dt;
=======
firstRunAtValue = DateTimeOffset.ParseExact(firstRunAtString, Constants.Iso8601Formats, CultureInfo.InvariantCulture, DateTimeStyles.None);
>>>>>>>
DateTimeOffset dt;
if (!DateTimeOffset.TryParseExact(firstRunAtString, Constants.Iso8601Formats,
CultureInfo.InvariantCulture, DateTimeStyles.None, out dt))
{
dt = DateTimeOffset.Now;
}
FirstRunAt = dt; |
<<<<<<<
[Location("cache/branches.yaml", LocationAttribute.Location.LibraryFolder)]
sealed class BranchCache : ManagedCacheBase<BranchCache>, IBranchCache
{
[SerializeField] private string lastUpdatedAtString = DateTimeOffset.MinValue.ToString();
[SerializeField] private string lastVerifiedAtString = DateTimeOffset.MinValue.ToString();
[SerializeField] private List<GitBranch> localBranches = new List<GitBranch>();
[SerializeField] private List<GitBranch> remoteBranches = new List<GitBranch>();
public void UpdateData(List<GitBranch> localBranchUpdate, List<GitBranch> remoteBranchUpdate)
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Processing Update: {0}", now);
var localBranchesIsNull = localBranches == null;
var localBranchUpdateIsNull = localBranchUpdate == null;
if (localBranchesIsNull != localBranchUpdateIsNull ||
!localBranchesIsNull && !localBranches.SequenceEqual(localBranchUpdate))
{
localBranches = localBranchUpdate;
isUpdated = true;
}
var remoteBranchesIsNull = remoteBranches == null;
var remoteBranchUpdateIsNull = remoteBranchUpdate == null;
if (remoteBranchesIsNull != remoteBranchUpdateIsNull ||
!remoteBranchesIsNull && !remoteBranches.SequenceEqual(remoteBranchUpdate))
{
remoteBranches = remoteBranchUpdate;
isUpdated = true;
}
SaveData(now, isUpdated);
}
public List<GitBranch> LocalBranches {
get { return localBranches; }
}
public List<GitBranch> RemoteBranches
{
get { return remoteBranches; }
}
public void UpdateData()
{
SaveData(DateTimeOffset.Now, false);
}
protected override void OnResetData()
{
localBranches = new List<GitBranch>();
remoteBranches = new List<GitBranch>();
}
public override string LastUpdatedAtString
{
get { return lastUpdatedAtString; }
protected set { lastUpdatedAtString = value; }
}
public override string LastVerifiedAtString
{
get { return lastVerifiedAtString; }
protected set { lastVerifiedAtString = value; }
}
}
[Location("views/branches.yaml", LocationAttribute.Location.LibraryFolder)]
sealed class Favorites : ScriptObjectSingleton<Favorites>
{
[SerializeField] private List<string> favoriteBranches;
public void SetFavorite(string branchName)
{
if (FavoriteBranches.Contains(branchName))
{
return;
}
FavoriteBranches.Add(branchName);
Save(true);
}
public void UnsetFavorite(string branchName)
{
if (!FavoriteBranches.Contains(branchName))
{
return;
}
FavoriteBranches.Remove(branchName);
Save(true);
}
public void ToggleFavorite(string branchName)
{
if (FavoriteBranches.Contains(branchName))
{
FavoriteBranches.Remove(branchName);
}
else
{
FavoriteBranches.Add(branchName);
}
Save(true);
}
public bool IsFavorite(string branchName)
{
return FavoriteBranches.Contains(branchName);
}
public List<string> FavoriteBranches
{
get
{
if (favoriteBranches == null)
{
FavoriteBranches = new List<string>();
}
return favoriteBranches;
}
set
{
favoriteBranches = value;
Save(true);
}
}
}
[Location("cache/repoinfo.yaml", LocationAttribute.Location.LibraryFolder)]
sealed class RepositoryInfoCache : ManagedCacheBase<RepositoryInfoCache>, IRepositoryInfoCache
{
public static readonly ConfigBranch DefaultConfigBranch = new ConfigBranch();
public static readonly ConfigRemote DefaultConfigRemote = new ConfigRemote();
public static readonly GitRemote DefaultGitRemote = new GitRemote();
public static readonly GitBranch DefaultGitBranch = new GitBranch();
[SerializeField] private string lastUpdatedAtString = DateTimeOffset.MinValue.ToString();
[SerializeField] private string lastVerifiedAtString = DateTimeOffset.MinValue.ToString();
[SerializeField] private ConfigBranch gitConfigBranch;
[SerializeField] private ConfigRemote gitConfigRemote;
[SerializeField] private GitRemote gitRemote;
[SerializeField] private GitBranch gitBranch;
protected override void OnResetData()
{
gitConfigBranch = DefaultConfigBranch;
gitConfigRemote = DefaultConfigRemote;
}
public override string LastUpdatedAtString
{
get { return lastUpdatedAtString; }
protected set { lastUpdatedAtString = value; }
}
public override string LastVerifiedAtString
{
get { return lastVerifiedAtString; }
protected set { lastVerifiedAtString = value; }
}
public ConfigRemote? CurrentConfigRemote
{
get
{
ValidateData();
return gitConfigRemote.Equals(DefaultConfigRemote) ? (ConfigRemote?) null : gitConfigRemote;
}
set
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Updating: {0} gitConfigRemote:{1}", now, value);
if (!Nullable.Equals(gitConfigRemote, value))
{
gitConfigRemote = value ?? DefaultConfigRemote;
isUpdated = true;
}
SaveData(now, isUpdated);
}
}
public ConfigBranch? CurentConfigBranch
{
get
{
ValidateData();
return gitConfigBranch.Equals(DefaultConfigBranch) ? (ConfigBranch?) null : gitConfigBranch;
}
set
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Updating: {0} gitConfigBranch:{1}", now, value);
if (!Nullable.Equals(gitConfigBranch, value))
{
gitConfigBranch = value ?? DefaultConfigBranch;
isUpdated = true;
}
SaveData(now, isUpdated);
}
}
public GitRemote? CurrentGitRemote
{
get
{
ValidateData();
return gitRemote.Equals(DefaultGitRemote) ? (GitRemote?) null : gitRemote;
}
set
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Updating: {0} gitRemote:{1}", now, value);
if (!Nullable.Equals(gitRemote, value))
{
gitRemote = value ?? DefaultGitRemote;
isUpdated = true;
}
SaveData(now, isUpdated);
}
}
public GitBranch? CurentGitBranch
{
get
{
ValidateData();
return gitBranch.Equals(DefaultGitBranch) ? (GitBranch?)null : gitBranch;
}
set
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Updating: {0} gitBranch:{1}", now, value);
if (!Nullable.Equals(gitBranch, value))
{
gitBranch = value ?? DefaultGitBranch;
isUpdated = true;
}
SaveData(now, isUpdated);
}
}
}
=======
>>>>>>>
[Location("cache/branches.yaml", LocationAttribute.Location.LibraryFolder)]
sealed class BranchCache : ManagedCacheBase<BranchCache>, IBranchCache
{
[SerializeField] private string lastUpdatedAtString = DateTimeOffset.MinValue.ToString();
[SerializeField] private string lastVerifiedAtString = DateTimeOffset.MinValue.ToString();
[SerializeField] private List<GitBranch> localBranches = new List<GitBranch>();
[SerializeField] private List<GitBranch> remoteBranches = new List<GitBranch>();
public void UpdateData(List<GitBranch> localBranchUpdate, List<GitBranch> remoteBranchUpdate)
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Processing Update: {0}", now);
var localBranchesIsNull = localBranches == null;
var localBranchUpdateIsNull = localBranchUpdate == null;
if (localBranchesIsNull != localBranchUpdateIsNull ||
!localBranchesIsNull && !localBranches.SequenceEqual(localBranchUpdate))
{
localBranches = localBranchUpdate;
isUpdated = true;
}
var remoteBranchesIsNull = remoteBranches == null;
var remoteBranchUpdateIsNull = remoteBranchUpdate == null;
if (remoteBranchesIsNull != remoteBranchUpdateIsNull ||
!remoteBranchesIsNull && !remoteBranches.SequenceEqual(remoteBranchUpdate))
{
remoteBranches = remoteBranchUpdate;
isUpdated = true;
}
SaveData(now, isUpdated);
}
public List<GitBranch> LocalBranches {
get { return localBranches; }
}
public List<GitBranch> RemoteBranches
{
get { return remoteBranches; }
}
public void UpdateData()
{
SaveData(DateTimeOffset.Now, false);
}
protected override void OnResetData()
{
localBranches = new List<GitBranch>();
remoteBranches = new List<GitBranch>();
}
public override string LastUpdatedAtString
{
get { return lastUpdatedAtString; }
protected set { lastUpdatedAtString = value; }
}
public override string LastVerifiedAtString
{
get { return lastVerifiedAtString; }
protected set { lastVerifiedAtString = value; }
}
}
[Location("cache/repoinfo.yaml", LocationAttribute.Location.LibraryFolder)]
sealed class RepositoryInfoCache : ManagedCacheBase<RepositoryInfoCache>, IRepositoryInfoCache
{
public static readonly ConfigBranch DefaultConfigBranch = new ConfigBranch();
public static readonly ConfigRemote DefaultConfigRemote = new ConfigRemote();
public static readonly GitRemote DefaultGitRemote = new GitRemote();
public static readonly GitBranch DefaultGitBranch = new GitBranch();
[SerializeField] private string lastUpdatedAtString = DateTimeOffset.MinValue.ToString();
[SerializeField] private string lastVerifiedAtString = DateTimeOffset.MinValue.ToString();
[SerializeField] private ConfigBranch gitConfigBranch;
[SerializeField] private ConfigRemote gitConfigRemote;
[SerializeField] private GitRemote gitRemote;
[SerializeField] private GitBranch gitBranch;
protected override void OnResetData()
{
gitConfigBranch = DefaultConfigBranch;
gitConfigRemote = DefaultConfigRemote;
}
public override string LastUpdatedAtString
{
get { return lastUpdatedAtString; }
protected set { lastUpdatedAtString = value; }
}
public override string LastVerifiedAtString
{
get { return lastVerifiedAtString; }
protected set { lastVerifiedAtString = value; }
}
public ConfigRemote? CurrentConfigRemote
{
get
{
ValidateData();
return gitConfigRemote.Equals(DefaultConfigRemote) ? (ConfigRemote?) null : gitConfigRemote;
}
set
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Updating: {0} gitConfigRemote:{1}", now, value);
if (!Nullable.Equals(gitConfigRemote, value))
{
gitConfigRemote = value ?? DefaultConfigRemote;
isUpdated = true;
}
SaveData(now, isUpdated);
}
}
public ConfigBranch? CurentConfigBranch
{
get
{
ValidateData();
return gitConfigBranch.Equals(DefaultConfigBranch) ? (ConfigBranch?) null : gitConfigBranch;
}
set
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Updating: {0} gitConfigBranch:{1}", now, value);
if (!Nullable.Equals(gitConfigBranch, value))
{
gitConfigBranch = value ?? DefaultConfigBranch;
isUpdated = true;
}
SaveData(now, isUpdated);
}
}
public GitRemote? CurrentGitRemote
{
get
{
ValidateData();
return gitRemote.Equals(DefaultGitRemote) ? (GitRemote?) null : gitRemote;
}
set
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Updating: {0} gitRemote:{1}", now, value);
if (!Nullable.Equals(gitRemote, value))
{
gitRemote = value ?? DefaultGitRemote;
isUpdated = true;
}
SaveData(now, isUpdated);
}
}
public GitBranch? CurentGitBranch
{
get
{
ValidateData();
return gitBranch.Equals(DefaultGitBranch) ? (GitBranch?)null : gitBranch;
}
set
{
var now = DateTimeOffset.Now;
var isUpdated = false;
Logger.Trace("Updating: {0} gitBranch:{1}", now, value);
if (!Nullable.Equals(gitBranch, value))
{
gitBranch = value ?? DefaultGitBranch;
isUpdated = true;
}
SaveData(now, isUpdated);
}
}
} |
<<<<<<<
Repository.User.Name = newGitName;
Repository.User.Email = newGitEmail;
=======
Repository.User.Name = gitName = newGitName;
>>>>>>>
Repository.User.Name = gitName = newGitName;
Repository.User.Email = newGitEmail;
<<<<<<<
if (cachedUser == null)
{
cachedUser = new User();
}
cachedUser.Name = newGitName;
cachedUser.Email = newGitEmail;
=======
gitName = newGitName;
>>>>>>>
if (cachedUser == null)
{
cachedUser = new User();
}
cachedUser.Name = newGitName;
cachedUser.Email = newGitEmail;
<<<<<<<
=======
.Then(
GitClient.SetConfig("user.email", newGitEmail, GitConfigSource.User)
.Then((success, value) =>
{
if (success)
{
if (Repository != null)
{
Repository.User.Email = gitEmail = newGitEmail;
}
else
{
gitEmail = newGitEmail;
}
userDataHasChanged = true;
}
}))
.FinallyInUI((_, __) =>
{
isBusy = false;
Redraw();
Finish(true);
})
>>>>>>> |
<<<<<<<
[SerializeField] private CacheUpdateEvent lastStatusChangedEvent;
[SerializeField] private ChangesTree treeChanges;
[SerializeField] private List<GitStatusEntry> gitStatusEntries;
=======
[SerializeField] private CacheUpdateEvent lastStatusEntriesChangedEvent;
[SerializeField] private ChangesetTreeView tree = new ChangesetTreeView();
public override void InitializeView(IView parent)
{
base.InitializeView(parent);
tree.InitializeView(this);
}
>>>>>>>
[SerializeField] private CacheUpdateEvent lastStatusEntriesChangedEvent;
[SerializeField] private ChangesTree treeChanges;
[SerializeField] private List<GitStatusEntry> gitStatusEntries;
<<<<<<<
Repository.CheckCurrentBranchChangedEvent(lastCurrentBranchChangedEvent);
Repository.CheckStatusChangedEvent(lastStatusChangedEvent);
=======
Repository.CheckCurrentBranchChangedEvent(lastCurrentBranchChangedEvent);
Repository.CheckStatusEntriesChangedEvent(lastStatusEntriesChangedEvent);
>>>>>>>
Repository.CheckCurrentBranchChangedEvent(lastCurrentBranchChangedEvent);
Repository.CheckStatusEntriesChangedEvent(lastStatusEntriesChangedEvent);
<<<<<<<
private void OnTreeGUI(Rect rect)
{
var initialRect = rect;
if (treeChanges.FolderStyle == null)
{
treeChanges.FolderStyle = Styles.Foldout;
treeChanges.TreeNodeStyle = Styles.TreeNode;
treeChanges.ActiveTreeNodeStyle = Styles.TreeNodeActive;
}
rect = treeChanges.Render(rect, scroll,
node => { },
node => {
},
node => {
});
if (treeChanges.RequiresRepaint)
Redraw();
GUILayout.Space(rect.y - initialRect.y);
}
private void RepositoryOnStatusChanged(CacheUpdateEvent cacheUpdateEvent)
=======
private void RepositoryOnStatusEntriesChanged(CacheUpdateEvent cacheUpdateEvent)
>>>>>>>
private void OnTreeGUI(Rect rect)
{
var initialRect = rect;
if (treeChanges.FolderStyle == null)
{
treeChanges.FolderStyle = Styles.Foldout;
treeChanges.TreeNodeStyle = Styles.TreeNode;
treeChanges.ActiveTreeNodeStyle = Styles.TreeNodeActive;
}
rect = treeChanges.Render(rect, scroll,
node => { },
node => {
},
node => {
});
if (treeChanges.RequiresRepaint)
Redraw();
GUILayout.Space(rect.y - initialRect.y);
}
private void RepositoryOnStatusEntriesChanged(CacheUpdateEvent cacheUpdateEvent)
<<<<<<<
currentStatusHasUpdate = false;
gitStatusEntries = Repository.CurrentChanges;
BuildTree();
}
}
private void BuildTree()
{
if (treeChanges == null)
{
treeChanges = new ChangesTree();
treeChanges.Title = "Changes";
treeChanges.DisplayRootNode = false;
treeChanges.IsCheckable = true;
treeChanges.PathSeparator = Environment.FileSystem.DirectorySeparatorChar.ToString();
UpdateTreeIcons();
}
TreeLoader.Load(treeChanges, gitStatusEntries.Where(x => x.Status != GitFileStatus.Ignored).Select(entry => new GitStatusEntryTreeData(entry)).Cast<ITreeData>());
Redraw();
}
private void UpdateTreeIcons()
{
if (treeChanges != null)
{
treeChanges.UpdateIcons(Styles.ActiveBranchIcon, Styles.BranchIcon, Styles.FolderIcon, Styles.GlobeIcon);
=======
currentStatusEntriesHasUpdate = false;
var entries = Repository.CurrentChanges;
tree.UpdateEntries(entries.Where(x => x.Status != GitFileStatus.Ignored).ToList());
>>>>>>>
currentStatusEntriesHasUpdate = false;
gitStatusEntries = Repository.CurrentChanges;
BuildTree();
}
}
private void BuildTree()
{
if (treeChanges == null)
{
treeChanges = new ChangesTree();
treeChanges.Title = "Changes";
treeChanges.DisplayRootNode = false;
treeChanges.IsCheckable = true;
treeChanges.PathSeparator = Environment.FileSystem.DirectorySeparatorChar.ToString();
UpdateTreeIcons();
}
TreeLoader.Load(treeChanges, gitStatusEntries.Where(x => x.Status != GitFileStatus.Ignored).Select(entry => new GitStatusEntryTreeData(entry)).Cast<ITreeData>());
Redraw();
}
private void UpdateTreeIcons()
{
if (treeChanges != null)
{
treeChanges.UpdateIcons(Styles.ActiveBranchIcon, Styles.BranchIcon, Styles.FolderIcon, Styles.GlobeIcon); |
<<<<<<<
=======
Logger.Warning("Unable to get current user");
isBusy = false;
>>>>>>>
Logger.Warning("Unable to get current user");
isBusy = false;
<<<<<<<
Client.GetOrganizations(organizations => {
=======
Logger.Trace("GetOrganizations");
Client.GetOrganizations(organizations => {
if (organizations == null)
{
Logger.Warning("Unable to get list of organizations");
isBusy = false;
return;
}
Logger.Trace("Loaded {0} organizations", organizations.Count);
>>>>>>>
Client.GetOrganizations(organizations => {
Logger.Trace("Loaded {0} organizations", organizations.Count);
<<<<<<<
owners = new[] { username }.Union(organizationLogins).ToArray();
=======
owners = owners.Union(organizationLogins).ToArray();
isBusy = false;
>>>>>>>
owners = new[] { username }.Union(organizationLogins).ToArray();
isBusy = false; |
<<<<<<<
// Set window title
if (smallLogo == null)
{
smallLogo = Styles.SmallLogo;
titleContent = new GUIContent(Title, smallLogo);
}
=======
>>>>>>> |
<<<<<<<
public RepositoryManager CreateRepositoryManager(IPlatform platform, ITaskRunner taskRunner, IUsageTracker usageTracker, NPath repositoryRoot,
CancellationToken cancellationToken)
=======
public RepositoryManager CreateRepositoryManager(IPlatform platform, ITaskManager taskManager,
IGitClient gitClient, NPath repositoryRoot)
>>>>>>>
public RepositoryManager CreateRepositoryManager(IPlatform platform, ITaskManager taskManager, IUsageTracker usageTracker,
IGitClient gitClient, NPath repositoryRoot)
<<<<<<<
return new RepositoryManager(platform, taskRunner, usageTracker, gitConfig, repositoryWatcher,
repositoryProcessRunner, repositoryPathConfiguration, cancellationToken);
=======
return new RepositoryManager(platform, taskManager, gitConfig, repositoryWatcher,
gitClient, repositoryPathConfiguration, taskManager.Token);
>>>>>>>
return new RepositoryManager(platform, taskManager, usageTracker, gitConfig, repositoryWatcher,
gitClient, repositoryPathConfiguration, taskManager.Token);
<<<<<<<
private readonly ITaskRunner taskRunner;
private readonly IUsageTracker usageTracker;
private readonly IRepository repository;
=======
private readonly ITaskManager taskManager;
private IRepository repository;
>>>>>>>
private readonly ITaskManager taskManager;
private readonly IUsageTracker usageTracker;
private IRepository repository;
<<<<<<<
public RepositoryManager(IPlatform platform, ITaskRunner taskRunner, IUsageTracker usageTracker, IGitConfig gitConfig,
IRepositoryWatcher repositoryWatcher, IRepositoryProcessRunner repositoryProcessRunner,
=======
public RepositoryManager(IPlatform platform, ITaskManager taskManager, IGitConfig gitConfig,
IRepositoryWatcher repositoryWatcher, IGitClient gitClient,
>>>>>>>
public RepositoryManager(IPlatform platform, ITaskManager taskManager, IUsageTracker usageTracker, IGitConfig gitConfig,
IRepositoryWatcher repositoryWatcher, IGitClient gitClient,
<<<<<<<
this.taskRunner = taskRunner;
this.usageTracker = usageTracker;
=======
this.taskManager = taskManager;
>>>>>>>
this.taskManager = taskManager;
this.usageTracker = usageTracker; |
<<<<<<<
event Action<string> OnActiveBranchChanged;
event Action<ConfigRemote?> OnActiveRemoteChanged;
event Action<string> OnHeadChanged;
=======
event Action OnActiveBranchChanged;
event Action OnActiveRemoteChanged;
event Action OnRemoteBranchListChanged;
event Action OnLocalBranchListChanged;
event Action<GitStatus> OnStatusUpdated;
event Action OnHeadChanged;
>>>>>>>
event Action<string> OnActiveBranchChanged;
event Action<ConfigRemote?> OnActiveRemoteChanged;
<<<<<<<
public event Action<string> OnActiveBranchChanged;
public event Action<ConfigRemote?> OnActiveRemoteChanged;
public event Action<string> OnHeadChanged;
=======
public event Action OnActiveBranchChanged;
public event Action OnActiveRemoteChanged;
public event Action OnRemoteBranchListChanged;
public event Action OnLocalBranchListChanged;
public event Action<GitStatus> OnStatusUpdated;
public event Action OnHeadChanged;
>>>>>>>
public event Action<string> OnActiveBranchChanged;
public event Action<ConfigRemote?> OnActiveRemoteChanged;
public event Action OnHeadChanged;
<<<<<<<
SetupConfig(repositoryPaths);
SetupWatcher();
const int debounceTimeout = 0;
this.repositoryUpdateCallback = debounceTimeout == 0 ?
OnRepositoryUpdatedHandler
: TaskExtensions.Debounce(OnRepositoryUpdatedHandler, debounceTimeout);
=======
config = gitConfig;
watcher = repositoryWatcher;
watcher.HeadChanged += Watcher_OnHeadChanged;
watcher.IndexChanged += Watcher_OnIndexChanged;
watcher.ConfigChanged += Watcher_OnConfigChanged;
watcher.LocalBranchChanged += Watcher_OnLocalBranchChanged;
watcher.LocalBranchCreated += Watcher_OnLocalBranchCreated;
watcher.LocalBranchDeleted += Watcher_OnLocalBranchDeleted;
watcher.RepositoryChanged += Watcher_OnRepositoryChanged;
watcher.RemoteBranchCreated += Watcher_OnRemoteBranchCreated;
watcher.RemoteBranchDeleted += Watcher_OnRemoteBranchDeleted;
var remote = config.GetRemote("origin");
if (!remote.HasValue)
remote = config.GetRemotes()
.Where(x => HostAddress.Create(new UriString(x.Url).ToRepositoryUri()).IsGitHubDotCom())
.FirstOrDefault();
UriString cloneUrl = "";
if (remote.Value.Url != null)
{
cloneUrl = new UriString(remote.Value.Url).ToRepositoryUrl();
}
repository = new Repository(gitClient, this, repositoryPaths.RepositoryPath.FileName, cloneUrl,
repositoryPaths.RepositoryPath);
>>>>>>>
SetupConfig(repositoryPaths);
SetupWatcher();
<<<<<<<
Logger.Trace($"HeadChanged {contents}");
=======
Logger.Trace("Watcher_OnHeadChanged");
>>>>>>>
Logger.Trace("Watcher_OnHeadChanged");
<<<<<<<
OnHeadChanged?.Invoke(head);
OnRepositoryUpdatedHandler();
=======
OnHeadChanged?.Invoke();
UpdateGitStatus();
>>>>>>>
OnHeadChanged?.Invoke();
UpdateGitStatus();
<<<<<<<
OnActiveBranchChanged?.Invoke(name);
OnRepositoryUpdatedHandler();
=======
OnActiveBranchChanged?.Invoke();
UpdateGitStatus();
>>>>>>>
OnActiveBranchChanged?.Invoke(name);
UpdateGitStatus(); |
<<<<<<<
public class BranchesTree: Tree
{
[NonSerialized] public Texture2D ActiveNodeIcon;
[NonSerialized] public Texture2D BranchIcon;
[NonSerialized] public Texture2D FolderIcon;
[NonSerialized] public Texture2D RemoteIcon;
[SerializeField] public bool IsRemote;
protected override Texture2D GetNodeIcon(TreeNode node)
{
Texture2D nodeIcon;
if (node.IsActive)
{
nodeIcon = ActiveNodeIcon;
}
else if (node.IsFolder)
{
nodeIcon = IsRemote && node.Level == 1
? RemoteIcon
: FolderIcon;
}
else
{
nodeIcon = BranchIcon;
}
return nodeIcon;
}
}
[Serializable]
=======
>>>>>>> |
<<<<<<<
public abstract class Tree
=======
public class TreeNodeDictionary : SerializableDictionary<string, TreeNode> { }
[Serializable]
public class Tree
>>>>>>>
public class TreeNodeDictionary : SerializableDictionary<string, TreeNode> { }
[Serializable]
public abstract class Tree
<<<<<<<
SetNodeIcon(node);
=======
if (hideChildren)
{
if (level <= hideChildrenBelowLevel)
{
hideChildren = false;
}
else
{
node.IsHidden = true;
}
}
ResetNodeIcons(node);
node.Load();
>>>>>>>
if (hideChildren)
{
if (level <= hideChildrenBelowLevel)
{
hideChildren = false;
}
else
{
node.IsHidden = true;
}
}
SetNodeIcon(node); |
<<<<<<<
IEnumerable<string> GetDirectories(string path);
=======
IEnumerable<string> GetDirectories(string path);
IEnumerable<string> GetDirectories(string path, string pattern, SearchOption searchOption);
>>>>>>>
IEnumerable<string> GetDirectories(string path);
IEnumerable<string> GetDirectories(string path, string pattern, SearchOption searchOption);
<<<<<<<
string GetRandomFileName();
void CreateDirectory(string path);
string ReadAllText(string path);
void DeleteAllFiles(string path);
=======
string ChangeExtension(string path, string extension);
string GetFileNameWithoutExtension(string fileName);
IEnumerable<string> GetFiles(string path, string pattern, SearchOption searchOption);
void WriteAllBytes(string path, byte[] bytes);
void CreateDirectory(string toString);
void FileCopy(string sourceFileName, string destFileName, bool overwrite);
void FileDelete(string path);
void DirectoryDelete(string path, bool recursive);
void FileMove(string sourceFileName, string s);
void DirectoryMove(string toString, string s);
string GetCurrentDirectory();
void WriteAllText(string path, string contents);
string ReadAllText(string path);
void WriteAllLines(string path, string[] contents);
string[] ReadAllLines(string path);
IEnumerable<string> GetDirectories(string path, string pattern);
char DirectorySeparatorChar { get; }
>>>>>>>
string GetRandomFileName();
void DeleteAllFiles(string path);
string ChangeExtension(string path, string extension);
string GetFileNameWithoutExtension(string fileName);
IEnumerable<string> GetFiles(string path, string pattern, SearchOption searchOption);
void WriteAllBytes(string path, byte[] bytes);
void CreateDirectory(string path);
void FileCopy(string sourceFileName, string destFileName, bool overwrite);
void FileDelete(string path);
void DirectoryDelete(string path, bool recursive);
void FileMove(string sourceFileName, string s);
void DirectoryMove(string toString, string s);
string GetCurrentDirectory();
void WriteAllText(string path, string contents);
string ReadAllText(string path);
void WriteAllLines(string path, string[] contents);
string[] ReadAllLines(string path);
IEnumerable<string> GetDirectories(string path, string pattern);
char DirectorySeparatorChar { get; } |
<<<<<<<
=======
repositoryManagerListener.Received().OnStatusUpdate(Args.GitStatus);
repositoryManagerListener.DidNotReceive().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.DidNotReceive().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
>>>>>>>
<<<<<<<
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.Received().OnStatusUpdated(Args.GitStatus);
=======
repositoryManagerListener.Received().OnStatusUpdate(Args.GitStatus);
repositoryManagerListener.DidNotReceive().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.DidNotReceive().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
repositoryManagerListener.ReceivedWithAnyArgs().OnIsBusyChanged(Args.Bool);
>>>>>>>
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.Received().OnStatusUpdated(Args.GitStatus);
<<<<<<<
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
=======
repositoryManagerListener.DidNotReceive().OnStatusUpdate(Args.GitStatus);
repositoryManagerListener.DidNotReceive().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.DidNotReceive().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.Received(1).OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
repositoryManagerListener.ReceivedWithAnyArgs().OnIsBusyChanged(Args.Bool);
>>>>>>>
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
<<<<<<<
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
=======
repositoryManagerListener.DidNotReceive().OnStatusUpdate(Args.GitStatus);
repositoryManagerListener.DidNotReceive().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.DidNotReceive().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.Received(1).OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
repositoryManagerListener.Received(2).OnIsBusyChanged(Args.Bool);
>>>>>>>
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
<<<<<<<
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
=======
repositoryManagerListener.DidNotReceive().OnStatusUpdate(Args.GitStatus);
repositoryManagerListener.Received().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.Received().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.Received().OnRemoteBranchListChanged();
repositoryManagerListener.ReceivedWithAnyArgs().OnIsBusyChanged(Args.Bool);
>>>>>>>
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
<<<<<<<
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
=======
repositoryManagerListener.DidNotReceive().OnStatusUpdate(Args.GitStatus);
repositoryManagerListener.Received().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.Received().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
repositoryManagerListener.ReceivedWithAnyArgs().OnIsBusyChanged(Args.Bool);
>>>>>>>
repositoryManagerListener.Received().OnIsBusyChanged(Args.Bool);
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
<<<<<<<
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
=======
repositoryManagerListener.DidNotReceive().OnStatusUpdate(Args.GitStatus);
repositoryManagerListener.Received().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.Received().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.Received().OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
>>>>>>>
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
<<<<<<<
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
=======
repositoryManagerListener.DidNotReceive().OnStatusUpdate(Args.GitStatus);
repositoryManagerListener.Received().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.Received().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
>>>>>>>
repositoryManagerListener.DidNotReceive().OnStatusUpdated(Args.GitStatus);
<<<<<<<
=======
repositoryManagerListener.Received().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.Received().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.Received().OnRemoteBranchListChanged();
>>>>>>>
<<<<<<<
=======
repositoryManagerListener.Received().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.Received().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
>>>>>>>
<<<<<<<
=======
repositoryManagerListener.DidNotReceive().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.DidNotReceive().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.DidNotReceive().OnRemoteBranchListChanged();
>>>>>>>
<<<<<<<
=======
repositoryManagerListener.DidNotReceive().OnActiveBranchChanged(Arg.Any<ConfigBranch?>());
repositoryManagerListener.DidNotReceive().OnActiveRemoteChanged(Arg.Any<ConfigRemote?>());
repositoryManagerListener.DidNotReceive().OnLocalBranchListChanged();
repositoryManagerListener.Received(2).OnRemoteBranchListChanged();
>>>>>>> |
<<<<<<<
repositoryManager = initRepositoryManager;
repositoryManager.OnCurrentBranchUpdated += RepositoryManager_OnCurrentBranchUpdated;
repositoryManager.OnCurrentRemoteUpdated += RepositoryManager_OnCurrentRemoteUpdated;
repositoryManager.OnRepositoryUpdated += RepositoryManager_OnRepositoryUpdated;
=======
repositoryManager.OnCurrentBranchAndRemoteUpdated += RepositoryManager_OnCurrentBranchAndRemoteUpdated;
repositoryManager.OnStatusUpdated += status => CurrentStatus = status;
repositoryManager.OnLocksUpdated += locks => CurrentLocks = locks;
>>>>>>>
repositoryManager = initRepositoryManager;
repositoryManager.OnCurrentBranchAndRemoteUpdated += RepositoryManager_OnCurrentBranchAndRemoteUpdated;
repositoryManager.OnRepositoryUpdated += RepositoryManager_OnRepositoryUpdated;
<<<<<<<
private void CacheContainer_OnCacheUpdated(CacheType cacheType, DateTimeOffset offset)
{
var cacheUpdateEvent = new CacheUpdateEvent { UpdatedTimeString = offset.ToString() };
switch (cacheType)
{
case CacheType.BranchCache:
HandleBranchCacheUpdatedEvent(cacheUpdateEvent);
break;
case CacheType.GitLogCache:
HandleGitLogCacheUpdatedEvent(cacheUpdateEvent);
break;
case CacheType.GitStatusCache:
HandleGitStatusCacheUpdatedEvent(cacheUpdateEvent);
break;
case CacheType.GitLocksCache:
HandleGitLocksCacheUpdatedEvent(cacheUpdateEvent);
break;
case CacheType.GitUserCache:
break;
case CacheType.RepositoryInfoCache:
HandleRepositoryInfoCacheUpdatedEvent(cacheUpdateEvent);
break;
default:
throw new ArgumentOutOfRangeException(nameof(cacheType), cacheType, null);
}
}
private void HandleRepositoryInfoCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("RepositoryInfoCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
CurrentBranchChanged?.Invoke(cacheUpdateEvent);
CurrentRemoteChanged?.Invoke(cacheUpdateEvent);
CurrentBranchAndRemoteChanged?.Invoke(cacheUpdateEvent);
}
private void HandleGitLocksCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("GitLocksCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
LocksChanged?.Invoke(cacheUpdateEvent);
}
private void HandleGitStatusCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("GitStatusCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
StatusChanged?.Invoke(cacheUpdateEvent);
}
private void HandleGitLogCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("GitLogCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
LogChanged?.Invoke(cacheUpdateEvent);
}
private void HandleBranchCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("BranchCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
LocalBranchListChanged?.Invoke(cacheUpdateEvent);
RemoteBranchListChanged?.Invoke(cacheUpdateEvent);
LocalAndRemoteBranchListChanged?.Invoke(cacheUpdateEvent);
}
private void RepositoryManager_OnCurrentRemoteUpdated(ConfigRemote? remote)
{
new ActionTask(CancellationToken.None, () => {
if (!Nullable.Equals(CurrentConfigRemote, remote))
{
CurrentConfigRemote = remote;
CurrentRemote = GetGitRemote(remote.Value);
UpdateRepositoryInfo();
}
}) { Affinity = TaskAffinity.UI }.Start();
}
private void RepositoryManager_OnRepositoryUpdated()
{
Logger.Trace("OnRepositoryUpdated");
UpdateGitStatus();
UpdateGitLog();
}
private void UpdateGitStatus()
{
repositoryManager?.Status()
.ThenInUI((b, status) => { CurrentStatus = status; })
.Start();
}
private void UpdateGitLog()
{
repositoryManager?.Log()
.ThenInUI((b, log) => { CurrentLog = log; })
.Start();
}
private void UpdateLocks()
=======
private void RepositoryManager_OnLocalBranchUpdated(string name)
>>>>>>>
private void CacheContainer_OnCacheUpdated(CacheType cacheType, DateTimeOffset offset)
{
var cacheUpdateEvent = new CacheUpdateEvent { UpdatedTimeString = offset.ToString() };
switch (cacheType)
{
case CacheType.BranchCache:
HandleBranchCacheUpdatedEvent(cacheUpdateEvent);
break;
case CacheType.GitLogCache:
HandleGitLogCacheUpdatedEvent(cacheUpdateEvent);
break;
case CacheType.GitStatusCache:
HandleGitStatusCacheUpdatedEvent(cacheUpdateEvent);
break;
case CacheType.GitLocksCache:
HandleGitLocksCacheUpdatedEvent(cacheUpdateEvent);
break;
case CacheType.GitUserCache:
break;
case CacheType.RepositoryInfoCache:
HandleRepositoryInfoCacheUpdatedEvent(cacheUpdateEvent);
break;
default:
throw new ArgumentOutOfRangeException(nameof(cacheType), cacheType, null);
}
}
private void HandleRepositoryInfoCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("RepositoryInfoCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
CurrentBranchChanged?.Invoke(cacheUpdateEvent);
CurrentRemoteChanged?.Invoke(cacheUpdateEvent);
CurrentBranchAndRemoteChanged?.Invoke(cacheUpdateEvent);
}
private void HandleGitLocksCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("GitLocksCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
LocksChanged?.Invoke(cacheUpdateEvent);
}
private void HandleGitStatusCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("GitStatusCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
StatusChanged?.Invoke(cacheUpdateEvent);
}
private void HandleGitLogCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("GitLogCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
LogChanged?.Invoke(cacheUpdateEvent);
}
private void HandleBranchCacheUpdatedEvent(CacheUpdateEvent cacheUpdateEvent)
{
Logger.Trace("BranchCache Updated {0}", cacheUpdateEvent.UpdatedTimeString);
LocalBranchListChanged?.Invoke(cacheUpdateEvent);
RemoteBranchListChanged?.Invoke(cacheUpdateEvent);
LocalAndRemoteBranchListChanged?.Invoke(cacheUpdateEvent);
}
private void RepositoryManager_OnRepositoryUpdated()
{
Logger.Trace("OnRepositoryUpdated");
UpdateGitStatus();
UpdateGitLog();
}
private void UpdateGitStatus()
{
repositoryManager?.Status()
.ThenInUI((b, status) => { CurrentStatus = status; })
.Start();
}
private void UpdateGitLog()
{
repositoryManager?.Log()
.ThenInUI((b, log) => { CurrentLog = log; })
.Start();
}
private void UpdateLocks()
<<<<<<<
new ActionTask(CancellationToken.None, () => {
cacheContainer.BranchCache.RemoveRemoteBranch(remote, name);
UpdateRemoteAndRemoteBranches();
}) { Affinity = TaskAffinity.UI }.Start();
=======
Dictionary<string, ConfigBranch> branchList;
if (remoteBranches.TryGetValue(remote, out branchList))
{
if (branchList.ContainsKey(name))
{
branchList.Remove(name);
Logger.Trace("OnRemoteBranchListChanged");
OnRemoteBranchListChanged?.Invoke();
}
else
{
Logger.Warning("Branch {0} is not found in Remote {1}", name, remote);
}
}
else
{
Logger.Warning("Remote {0} is not found", remote);
}
>>>>>>>
new ActionTask(CancellationToken.None, () => {
cacheContainer.BranchCache.RemoveRemoteBranch(remote, name);
UpdateRemoteAndRemoteBranches();
}) { Affinity = TaskAffinity.UI }.Start(); |
<<<<<<<
//TODO: This is removed in another branch anyway
//OnInstallPathGUI();
}
Styles.EndInitialStateArea();
return false;
}
=======
OnInstallPathGUI();
}
Styles.EndInitialStateArea();
return false;
}
>>>>>>>
}
Styles.EndInitialStateArea();
return false;
}
<<<<<<<
=======
private void OnInstallPathGUI()
{
// Install path
GUILayout.Label(GitInstallTitle, EditorStyles.boldLabel);
EditorGUI.BeginDisabledGroup(isBusy);
{
// Install path field
//EditorGUI.BeginChangeCheck();
{
GUILayout.BeginHorizontal();
{
newGitExec = EditorGUILayout.TextField(PathToGit, newGitExec);
if (GUILayout.Button(BrowseButton, EditorStyles.miniButton, GUILayout.Width(25)))
{
GUI.FocusControl(null);
var newValue = EditorUtility.OpenFilePanel(GitInstallBrowseTitle,
gitExecParent,
gitExecExtension);
if (!string.IsNullOrEmpty(newValue))
{
newGitExec = newValue;
}
}
}
GUILayout.EndHorizontal();
}
GUILayout.Space(EditorGUIUtility.standardVerticalSpacing);
GUILayout.BeginHorizontal();
{
var needsSaving = !string.IsNullOrEmpty(newGitExec)
&& newGitExec != gitExec
&& newGitExec.ToNPath().FileExists();
EditorGUI.BeginDisabledGroup(!needsSaving);
{
if (GUILayout.Button(GitPathSaveButton, GUILayout.ExpandWidth(false)))
{
Logger.Trace("Saving Git Path:{0}", newGitExec);
GUI.FocusControl(null);
Manager.SystemSettings.Set(Constants.GitInstallPathKey, newGitExec);
Environment.GitExecutablePath = newGitExec.ToNPath();
gitExecHasChanged = true;
}
}
EditorGUI.EndDisabledGroup();
//Find button - for attempting to locate a new install
if (GUILayout.Button(GitInstallFindButton, GUILayout.ExpandWidth(false)))
{
GUI.FocusControl(null);
var task = new ProcessTask<NPath>(Manager.CancellationToken, new FirstLineIsPathOutputProcessor())
.Configure(Manager.ProcessManager, Environment.IsWindows ? "where" : "which", "git")
.FinallyInUI((success, ex, path) =>
{
Logger.Trace("Find Git Completed Success:{0} Path:{1}", success, path);
if (success && !string.IsNullOrEmpty(path))
{
Manager.SystemSettings.Set(Constants.GitInstallPathKey, path);
Environment.GitExecutablePath = path;
gitExecHasChanged = true;
}
});
}
}
GUILayout.EndHorizontal();
}
EditorGUI.EndDisabledGroup();
}
>>>>>>> |
<<<<<<<
var gitLfsVersionTask = new GitLfsVersionTask(cancellationToken)
.Configure(processManager, path, dontSetupGit: isCustomGit);
gitLfsVersionTask
.Then((result, version) => {return gitLfsVersion = version;})
.Then(endTask, taskIsTopOfChain: true);
gitLfsVersionTask.Then(endTask, TaskRunOptions.OnFailure, taskIsTopOfChain:true);
var gitVersionTask = new GitVersionTask(cancellationToken)
.Configure(processManager, path, dontSetupGit: isCustomGit);
gitVersionTask
.Then((result, version) => { return gitVersion = version; })
.Then(gitLfsVersionTask, taskIsTopOfChain: true);
gitVersionTask.Then(endTask, TaskRunOptions.OnFailure, taskIsTopOfChain:true);
=======
>>>>>>> |
<<<<<<<
#if ENABLE_BROADMODE
if (broadMode)
{
((Window)Parent).Branches.RefreshEmbedded();
}
#endif
=======
>>>>>>>
<<<<<<<
#if ENABLE_BROADMODE
if (broadMode)
OnBroadGUI();
else
#endif
=======
if (!HasRepository)
{
DoOfferToInitializeRepositoryGUI();
return;
}
>>>>>>>
<<<<<<<
#if ENABLE_BROADMODE
if (Event.current.type == EventType.Repaint && EvaluateBroadMode())
{
Refresh();
}
#endif
}
#if ENABLE_BROADMODE
public void OnBroadGUI()
{
GUILayout.BeginHorizontal();
{
GUILayout.BeginVertical(
GUILayout.MinWidth(Styles.BroadModeBranchesMinWidth),
GUILayout.MaxWidth(Mathf.Max(Styles.BroadModeBranchesMinWidth, Position.width * Styles.BroadModeBranchesRatio))
);
{
((Window)Parent).Branches.OnEmbeddedGUI();
}
GUILayout.EndVertical();
GUILayout.BeginVertical();
{
OnEmbeddedGUI();
}
GUILayout.EndVertical();
}
GUILayout.EndHorizontal();
=======
>>>>>>> |
<<<<<<<
var convertSceneHelper = new UnityToMayaConvertSceneHelper (uniPropertyName);
=======
var convertSceneHelper = new UnityToMayaConvertSceneHelper (uniPropertyName, fbxNode);
// TODO: we'll resample the curve so we don't have to
// configure tangents
>>>>>>>
var convertSceneHelper = new UnityToMayaConvertSceneHelper (uniPropertyName, fbxNode); |
<<<<<<<
protected static bool ExportSingleEditorClip(Object editorClipSelected)
=======
/// <summary>
/// Validate the menu item defined by the function OnClipContextClick.
/// </summary>
[MenuItem(TimelineClipMenuItemName, true, 31)]
static bool ValidateOnClipContextClick()
{
Object[] selectedObjects = Selection.objects;
foreach (Object editorClipSelected in selectedObjects)
{
if (editorClipSelected.GetType().Name.Contains("EditorClip"))
{
return true;
}
}
return false;
}
public static bool ExportSingleEditorClip(Object editorClipSelected)
>>>>>>>
/// <summary>
/// Validate the menu item defined by the function OnClipContextClick.
/// </summary>
[MenuItem(TimelineClipMenuItemName, true, 31)]
static bool ValidateOnClipContextClick()
{
Object[] selectedObjects = Selection.objects;
foreach (Object editorClipSelected in selectedObjects)
{
if (editorClipSelected.GetType().Name.Contains("EditorClip"))
{
return true;
}
}
return false;
}
protected static bool ExportSingleEditorClip(Object editorClipSelected)
<<<<<<<
UnityEngine.Object[] myArray = new UnityEngine.Object[] {
=======
string AnimFbxFormat = AnimFbxFileFormat;
if (timelineClipSelected.displayName.Contains("@"))
{
AnimFbxFormat = "{0}/{2}.fbx";
}
string filePath = string.Format(AnimFbxFormat, folderPath, animationTrackGObject.name, timelineClipSelected.displayName);
if (string.IsNullOrEmpty (filePath)) {
return;
}
UnityEngine.Object[] exportArray = new UnityEngine.Object[] {
>>>>>>>
UnityEngine.Object[] exportArray = new UnityEngine.Object[] {
<<<<<<<
if (!string.IsNullOrEmpty (filePath)) {
ExportObjects (filePath, myArray, timelineAnim: true);
return;
}
ExportModelEditorWindow.Init (myArray, string.Format ("{0}@{1}", animationTrackGObject.name, timelineClipSelected.displayName), isTimelineAnim: true);
=======
ExportObjects (filePath, exportArray, AnimationExportType.timelineAnimationClip);
>>>>>>>
if (!string.IsNullOrEmpty (filePath)) {
ExportObjects (filePath, exportArray, timelineAnim: true);
return;
}
string AnimFbxFormat = "{0}@{1}";
if (timelineClipSelected.displayName.Contains("@"))
{
AnimFbxFormat = "{1}";
}
ExportModelEditorWindow.Init (myArray, string.Format (AnimFbxFormat, animationTrackGObject.name, timelineClipSelected.displayName), isTimelineAnim: true);
<<<<<<<
public static void ExportAllTimelineClips(GameObject objectWithPlayableDirector, string folderPath, IExportOptions exportOptions = null)
{
PlayableDirector pd = objectWithPlayableDirector.GetComponent<PlayableDirector>();
if (pd == null)
{
return;
}
foreach (PlayableBinding output in pd.playableAsset.outputs)
{
AnimationTrack at = output.sourceObject as AnimationTrack;
GameObject atObject = pd.GetGenericBinding(output.sourceObject) as GameObject;
// One file by animation clip
foreach (TimelineClip timeLineClip in at.GetClips()) {
string filePath = string.Format(AnimFbxFileFormat, folderPath, atObject.name, timeLineClip.displayName);
UnityEngine.Object[] myArray = new UnityEngine.Object[] { atObject, timeLineClip.animationClip };
ExportObjects (filePath, myArray, exportOptions, timelineAnim: true);
}
}
}
=======
>>>>>>>
public static void ExportAllTimelineClips(GameObject objectWithPlayableDirector, string folderPath, IExportOptions exportOptions = null)
{
PlayableDirector pd = objectWithPlayableDirector.GetComponent<PlayableDirector>();
if (pd == null)
{
return;
}
foreach (PlayableBinding output in pd.playableAsset.outputs)
{
AnimationTrack at = output.sourceObject as AnimationTrack;
GameObject atObject = pd.GetGenericBinding(output.sourceObject) as GameObject;
// One file by animation clip
foreach (TimelineClip timeLineClip in at.GetClips()) {
string filePath = string.Format(AnimFbxFileFormat, folderPath, atObject.name, timeLineClip.displayName);
UnityEngine.Object[] myArray = new UnityEngine.Object[] { atObject, timeLineClip.animationClip };
ExportObjects (filePath, myArray, exportOptions, timelineAnim: true);
}
}
}
<<<<<<<
/// Validate the menu item defined by the function above.
=======
/// Add a menu item "Export Model Only..." to a GameObject's context menu.
/// </summary>
/// <param name="command">Command.</param>
[MenuItem (ModelOnlyMenuItemName, false, 30)]
static void ModelOnlyOnContextItem (MenuCommand command)
{
if (Selection.objects.Length <= 0) {
DisplayNoSelectionDialog ();
return;
}
OnExport (AnimationExportType.none);
}
/// <summary>
/// Validate the menu item defined by the function ModelOnlyOnContextItem.
>>>>>>>
/// Validate the menu item defined by the function ModelOnlyOnContextItem. |
<<<<<<<
=======
using (var fbxLayerElement = FbxLayerElementUV.Create (fbxMesh, "UVSet")) {
fbxLayerElement.SetMappingMode (FbxLayerElement.EMappingMode.eByPolygonVertex);
fbxLayerElement.SetReferenceMode (FbxLayerElement.EReferenceMode.eIndexToDirect);
// set texture coordinates per vertex
FbxLayerElementArray fbxElementArray = fbxLayerElement.GetDirectArray ();
// TODO: only copy unique UVs into this array, and index appropriately
for (int n = 0; n < mesh.UV.Length; n++) {
fbxElementArray.Add (new FbxVector2 (mesh.UV [n] [0],
mesh.UV [n] [1]));
}
// For each face index, point to a texture uv
FbxLayerElementArray fbxIndexArray = fbxLayerElement.GetIndexArray ();
fbxIndexArray.SetCount (unmergedTriangles.Length);
for(int i = 0; i < unmergedTriangles.Length; i++){
fbxIndexArray.SetAt (i, unmergedTriangles [i]);
}
fbxLayer.SetUVs (fbxLayerElement, FbxLayerElement.EType.eTextureDiffuse);
}
>>>>>>>
mesh.UV [n] [1])); |
<<<<<<<
=======
exportSettings.exportMeshNoRenderer = EditorGUILayout.Toggle(
new GUIContent("Export Unrendered:",
"If checked, meshes will be exported even if they don't have a Renderer component."),
exportSettings.exportMeshNoRenderer
);
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(new GUIContent(
"Export Path:",
"Relative path for saving Model Prefabs."), GUILayout.Width(LabelWidth - FieldOffset));
var pathLabel = ExportSettings.GetRelativeSavePath();
if (pathLabel == ".") { pathLabel = "(Assets root)"; }
EditorGUILayout.SelectableLabel(pathLabel,
EditorStyles.textField,
GUILayout.MinWidth(SelectableLabelMinWidth),
GUILayout.Height(EditorGUIUtility.singleLineHeight));
if (GUILayout.Button(new GUIContent("...", "Browse to a new location for saving model prefabs"), EditorStyles.miniButton, GUILayout.Width(BrowseButtonWidth)))
{
string initialPath = ExportSettings.GetAbsoluteSavePath();
// if the directory doesn't exist, set it to the default save path
// so we don't open somewhere unexpected
if (!System.IO.Directory.Exists(initialPath))
{
initialPath = Application.dataPath;
}
string fullPath = EditorUtility.OpenFolderPanel(
"Select Model Prefabs Path", initialPath, null
);
// Unless the user canceled, make sure they chose something in the Assets folder.
if (!string.IsNullOrEmpty(fullPath))
{
var relativePath = ExportSettings.ConvertToAssetRelativePath(fullPath);
if (string.IsNullOrEmpty(relativePath))
{
Debug.LogWarning("Please select a location in the Assets folder");
}
else
{
ExportSettings.SetRelativeSavePath(relativePath);
// Make sure focus is removed from the selectable label
// otherwise it won't update
GUIUtility.hotControl = 0;
GUIUtility.keyboardControl = 0;
}
}
}
GUILayout.EndHorizontal();
>>>>>>>
exportSettings.exportMeshNoRenderer = EditorGUILayout.Toggle(
new GUIContent("Export Unrendered:",
"If checked, meshes will be exported even if they don't have a Renderer component."),
exportSettings.exportMeshNoRenderer
); |
<<<<<<<
private const string MODULE_TEMPLATE_PATH = "Integrations/Autodesk/maya/" + MODULE_FILENAME + ".txt";
=======
private const string MAYA_INSTRUCTION_FILENAME = "_safe_to_delete/_temp.txt";
public class MayaException : System.Exception {
public MayaException() { }
public MayaException(string message) : base(message) { }
public MayaException(string message, System.Exception inner) : base(message, inner) { }
}
public class MayaVersion {
/// <summary>
/// Find the Maya installation that has your desired version, or
/// the newest version if the 'desired' is an empty string.
///
/// If MAYA_LOCATION is set, the desired version is ignored.
/// </summary>
public MayaVersion(string desiredVersion = "") {
// If the location is given by the environment, use it.
Location = System.Environment.GetEnvironmentVariable ("MAYA_LOCATION");
if (!string.IsNullOrEmpty(Location)) {
Location = Location.TrimEnd('/');
Debug.Log("Using maya set by MAYA_LOCATION: " + Location);
return;
}
// List that directory and find the right version:
// either the newest version, or the exact version we wanted.
string mayaRoot = "";
string bestVersion = "";
var adskRoot = new System.IO.DirectoryInfo(AdskRoot);
foreach(var productDir in adskRoot.GetDirectories()) {
var product = productDir.Name;
// Only accept those that start with 'maya' in either case.
if (!product.StartsWith("maya", StringComparison.InvariantCultureIgnoreCase)) {
continue;
}
// Reject MayaLT -- it doesn't have plugins.
if (product.StartsWith("mayalt", StringComparison.InvariantCultureIgnoreCase)) {
continue;
}
// Parse the version number at the end. Check if it matches,
// or if it's newer than the best so far.
string thisNumber = product.Substring("maya".Length);
if (thisNumber == desiredVersion) {
mayaRoot = product;
bestVersion = thisNumber;
break;
} else if (thisNumber.CompareTo(bestVersion) > 0) {
mayaRoot = product;
bestVersion = thisNumber;
}
}
if (!string.IsNullOrEmpty(desiredVersion) && bestVersion != desiredVersion) {
throw new MayaException(string.Format(
"Unable to find maya {0} in its default installation path. Set MAYA_LOCATION.", desiredVersion));
} else if (string.IsNullOrEmpty(bestVersion)) {
throw new MayaException(string.Format(
"Unable to find any version of maya. Set MAYA_LOCATION."));
}
Location = AdskRoot + "/" + mayaRoot;
if (string.IsNullOrEmpty(desiredVersion)) {
Debug.Log("Using latest version of maya found in: " + Location);
} else {
Debug.Log(string.Format("Using maya {0} found in: {1}", desiredVersion, Location));
}
}
>>>>>>>
private const string MAYA_INSTRUCTION_FILENAME = "_safe_to_delete/_temp.txt";
private const string MODULE_TEMPLATE_PATH = "Integrations/Autodesk/maya/" + MODULE_FILENAME + ".txt"; |
<<<<<<<
private static string m_integrationFolderPath = null;
public static string INTEGRATION_FOLDER_PATH
{
get{
if (string.IsNullOrEmpty (m_integrationFolderPath)) {
m_integrationFolderPath = Application.dataPath;
}
return m_integrationFolderPath;
}
set{
if (!string.IsNullOrEmpty (value) && System.IO.Directory.Exists (value)) {
m_integrationFolderPath = value;
} else {
Debug.LogError (string.Format("Failed to set integration folder path, invalid directory \"{0}\"", value));
}
}
}
public class MayaException : System.Exception {
public MayaException() { }
public MayaException(string message) : base(message) { }
public MayaException(string message, System.Exception inner) : base(message, inner) { }
}
=======
private const string MAYA_INSTRUCTION_FILENAME = "_safe_to_delete/_temp.txt";
>>>>>>>
private const string MAYA_INSTRUCTION_FILENAME = "_safe_to_delete/_temp.txt";
private static string m_integrationFolderPath = null;
public static string INTEGRATION_FOLDER_PATH
{
get{
if (string.IsNullOrEmpty (m_integrationFolderPath)) {
m_integrationFolderPath = Application.dataPath;
}
return m_integrationFolderPath;
}
set{
if (!string.IsNullOrEmpty (value) && System.IO.Directory.Exists (value)) {
m_integrationFolderPath = value;
} else {
Debug.LogError (string.Format("Failed to set integration folder path, invalid directory \"{0}\"", value));
}
}
}
<<<<<<<
public const string MODULE_TEMPLATE_PATH = "Integrations/Autodesk/maya/" + MODULE_FILENAME + ".txt";
#if UNITY_EDITOR_OSX
private const string MAYA_MODULES_PATH = "Library/Preferences/Autodesk/Maya/modules";
#elif UNITY_EDITOR_LINUX
private const string MAYA_MODULES_PATH = "Maya/modules";
#else
private const string MAYA_MODULES_PATH = "maya/modules";
#endif
=======
>>>>>>>
<<<<<<<
string result = System.IO.Path.Combine(INTEGRATION_FOLDER_PATH, MODULE_TEMPLATE_PATH);
if (!ModuleTemplateCompatibility.TryGetValue(version, out version)) {
throw new MayaException("FbxExporters does not support Maya version " + version);
}
return result.Replace(VERSION_TAG,version);
=======
return System.IO.Path.Combine(Application.dataPath, MODULE_TEMPLATE_PATH);
>>>>>>>
return System.IO.Path.Combine(INTEGRATION_FOLDER_PATH, MODULE_TEMPLATE_PATH);
<<<<<<<
const string IntegrationZipPath = "FbxExporters/unityoneclick_for_maya.zip";
private static string DefaultIntegrationSavePath
{
get{
return Application.dataPath;
}
}
private static string LastIntegrationSavePath = DefaultIntegrationSavePath;
=======
/// <summary>
/// The path of the Maya executable.
/// </summary>
public static string GetMayaExe () {
return FbxExporters.EditorTools.ExportSettings.GetSelectedMayaPath ();
}
>>>>>>>
/// <summary>
/// The path of the Maya executable.
/// </summary>
public static string GetMayaExe () {
return FbxExporters.EditorTools.ExportSettings.GetSelectedMayaPath ();
}
const string IntegrationZipPath = "FbxExporters/unityoneclick_for_maya.zip";
private static string DefaultIntegrationSavePath
{
get{
return Application.dataPath;
}
}
private static string LastIntegrationSavePath = DefaultIntegrationSavePath;
<<<<<<<
// decompress zip file if it exists, otherwise try using default location
if (System.IO.File.Exists (GetIntegrationZipFullPath())) {
var result = DecompressIntegrationZipFile ();
if (!result) {
// could not find integration
return;
}
} else {
Integrations.INTEGRATION_FOLDER_PATH = DefaultIntegrationSavePath;
}
var mayaVersion = new Integrations.MayaVersion();
if (!Integrations.InstallMaya(mayaVersion, verbose: true)) {
=======
var mayaExe = GetMayaExe ();
if (string.IsNullOrEmpty (mayaExe)) {
return;
}
if (!Integrations.InstallMaya(verbose: true)) {
>>>>>>>
var mayaExe = GetMayaExe ();
if (string.IsNullOrEmpty (mayaExe)) {
return;
// decompress zip file if it exists, otherwise try using default location
if (System.IO.File.Exists (GetIntegrationZipFullPath())) {
var result = DecompressIntegrationZipFile ();
if (!result) {
// could not find integration
return;
}
} else {
Integrations.INTEGRATION_FOLDER_PATH = DefaultIntegrationSavePath;
}
if (!Integrations.InstallMaya(verbose: true)) { |
<<<<<<<
using System.Runtime.Serialization;
using UnityEngine.Formats.FbxSdk;
=======
using Autodesk.Fbx;
>>>>>>>
using Autodesk.Fbx;
using System.Runtime.Serialization; |
<<<<<<<
// check if file already exists, give a warning if it does
if (!OverwriteExistingFile (fbxPath) || !OverwriteExistingFile (prefabPath)) {
return false;
}
=======
>>>>>>>
// check if file already exists, give a warning if it does
if (!OverwriteExistingFile (fbxPath) || !OverwriteExistingFile (prefabPath)) {
return false;
} |
<<<<<<<
fbxPrefab = toConvert.AddComponent<FbxPrefab>();
fbxPrefab.SetSourceModel(unityMainAsset);
=======
fbxPrefab = unityGO.AddComponent<FbxPrefab>();
var fbxPrefabUtility = new FbxPrefabAutoUpdater.FbxPrefabUtility (fbxPrefab);
fbxPrefabUtility.SetSourceModel(unityMainAsset);
>>>>>>>
fbxPrefab = toConvert.AddComponent<FbxPrefab>();
var fbxPrefabUtility = new FbxPrefabAutoUpdater.FbxPrefabUtility (fbxPrefab);
fbxPrefabUtility.SetSourceModel(unityMainAsset);
<<<<<<<
var prefab = PrefabUtility.CreatePrefab(prefabFileName, toConvert, ReplacePrefabOptions.ConnectToPrefab);
=======
var prefab = PrefabUtility.CreatePrefab(prefabFileName, unityGO, ReplacePrefabOptions.ConnectToPrefab);
>>>>>>>
var prefab = PrefabUtility.CreatePrefab(prefabFileName, toConvert, ReplacePrefabOptions.ConnectToPrefab);
<<<<<<<
return toConvert;
=======
// Remove (now redundant) gameobject
bool actuallyKeepOriginal;
switch(keepOriginal) {
case KeepOriginal.Delete:
actuallyKeepOriginal = false;
break;
case KeepOriginal.Keep:
actuallyKeepOriginal = true;
break;
case KeepOriginal.Default:
default:
actuallyKeepOriginal = ExportSettings.keepOriginalAfterConvert;
break;
}
if (!actuallyKeepOriginal) {
Object.DestroyImmediate (toConvert);
} else {
// rename and put under scene root in case we need to check values
toConvert.name = "_safe_to_delete_" + toConvert.name;
toConvert.SetActive (false);
}
return unityGO;
>>>>>>>
return toConvert;
<<<<<<<
// copy over mesh filter and mesh renderer to replace
// skinned mesh renderer
if (component is MeshFilter) {
var skinnedMesh = to.GetComponent<SkinnedMeshRenderer> ();
if (skinnedMesh) {
toComponent = to.AddComponent(component.GetType());
EditorJsonUtility.FromJsonOverwrite (json, toComponent);
var toRenderer = to.AddComponent <MeshRenderer>();
var fromRenderer = from.GetComponent<MeshRenderer> ();
if (toRenderer && fromRenderer) {
EditorJsonUtility.FromJsonOverwrite (EditorJsonUtility.ToJson(fromRenderer), toRenderer);
}
Object.DestroyImmediate (skinnedMesh);
}
=======
// It doesn't exist => create and copy.
toComponent = to.AddComponent(component.GetType());
if (toComponent) {
EditorJsonUtility.FromJsonOverwrite (json, toComponent);
}
} else {
// It exists => copy.
// But we want to override that behaviour in a few
// cases, to avoid clobbering references to the new FBX
// TODO: interpret the object or the json more directly
// TODO: be more generic
// TODO: handle references to other objects in the same hierarchy
if (toComponent is MeshFilter) {
// Don't copy the mesh. But there's nothing else to
// copy, so just don't copy anything.
} else if (toComponent is SkinnedMeshRenderer) {
// Don't want to clobber materials or the mesh.
var skinnedMesh = toComponent as SkinnedMeshRenderer;
var sharedMesh = skinnedMesh.sharedMesh;
var sharedMats = skinnedMesh.sharedMaterials;
EditorJsonUtility.FromJsonOverwrite(json, toComponent);
skinnedMesh.sharedMesh = sharedMesh;
skinnedMesh.sharedMaterials = sharedMats;
} else if (toComponent is Renderer) {
// Don't want to clobber materials.
var renderer = toComponent as Renderer;
var sharedMats = renderer.sharedMaterials;
EditorJsonUtility.FromJsonOverwrite(json, toComponent);
renderer.sharedMaterials = sharedMats;
} else {
// Normal case: copy everything.
EditorJsonUtility.FromJsonOverwrite(json, toComponent);
>>>>>>>
// copy over mesh filter and mesh renderer to replace
// skinned mesh renderer
if (component is MeshFilter) {
var skinnedMesh = to.GetComponent<SkinnedMeshRenderer> ();
if (skinnedMesh) {
toComponent = to.AddComponent(component.GetType());
EditorJsonUtility.FromJsonOverwrite (json, toComponent);
var toRenderer = to.AddComponent <MeshRenderer>();
var fromRenderer = from.GetComponent<MeshRenderer> ();
if (toRenderer && fromRenderer) {
EditorJsonUtility.FromJsonOverwrite (EditorJsonUtility.ToJson(fromRenderer), toRenderer);
}
}
Object.DestroyImmediate (skinnedMesh);
} |
<<<<<<<
// create camera and light if none
if (Camera.main == null) {
GameObject camera = new GameObject ("MainCamera");
camera.AddComponent<Camera> ();
camera.tag = "MainCamera";
}
if(!Object.FindObjectOfType<Light>()){
GameObject light = new GameObject ("Light");
light.transform.localEulerAngles = new Vector3 (50, -30, 0);
Light lightComp = light.AddComponent<Light> ();
lightComp.type = LightType.Directional;
lightComp.intensity = 1;
lightComp.shadows = LightShadows.Soft;
}
=======
// maximize game window and start playing
var gameWindow = GetMainGameView();
if (gameWindow) {
gameWindow.maximized = true;
UnityEditor.EditorApplication.isPlaying = true;
} else {
Debug.LogWarning ("Failed to access Game Window, please restart Unity to try again.");
}
>>>>>>>
// create camera and light if none
if (Camera.main == null) {
GameObject camera = new GameObject ("MainCamera");
camera.AddComponent<Camera> ();
camera.tag = "MainCamera";
}
if(!Object.FindObjectOfType<Light>()){
GameObject light = new GameObject ("Light");
light.transform.localEulerAngles = new Vector3 (50, -30, 0);
Light lightComp = light.AddComponent<Light> ();
lightComp.type = LightType.Directional;
lightComp.intensity = 1;
lightComp.shadows = LightShadows.Soft;
}
// maximize game window and start playing
var gameWindow = GetMainGameView();
if (gameWindow) {
gameWindow.maximized = true;
UnityEditor.EditorApplication.isPlaying = true;
} else {
Debug.LogWarning ("Failed to access Game Window, please restart Unity to try again.");
} |
<<<<<<<
fbxLayer.SetNormals (fbxLayerElement);
}
=======
fbxLayer.SetNormals (fbxLayerElement);
exportedAttribute = true;
>>>>>>>
fbxLayer.SetNormals (fbxLayerElement);
}
exportedAttribute = true;
<<<<<<<
=======
fbxLayer.SetBinormals (fbxLayerElement);
exportedAttribute = true;
>>>>>>>
exportedAttribute = true;
<<<<<<<
=======
fbxLayer.SetTangents (fbxLayerElement);
exportedAttribute = true;
>>>>>>>
exportedAttribute = true;
<<<<<<<
=======
fbxLayer.SetVertexColors (fbxLayerElement);
exportedAttribute = true;
>>>>>>>
exportedAttribute = true; |
<<<<<<<
var filename = gosToExport [n].name + ".fbx";
var filePath = Path.Combine (dirPath, filename);
if (File.Exists (filePath)) {
filePath = IncrementFileName (dirPath, filename);
}
filePaths[n] = filePath;
=======
string filename = ModelExporter.ConvertToValidFilename (gosToExport [n].name + ".fbx");
filePaths[n] = Path.Combine (dirPath, filename);
>>>>>>>
var filename = ModelExporter.ConvertToValidFilename (gosToExport [n].name + ".fbx");
var filePath = Path.Combine (dirPath, filename);
if (File.Exists (filePath)) {
filePath = IncrementFileName (dirPath, filename);
}
filePaths[n] = filePath; |
<<<<<<<
#if INDICATE_SHARP
IndicateManager IndicateManager { get; set; }
=======
#if INDICATE_SHARP || MESSAGING_MENU_SHARP
private IndicateManager _IndicateManager;
>>>>>>>
#if INDICATE_SHARP || MESSAGING_MENU_SHARP
IndicateManager IndicateManager { get; set; }
<<<<<<<
#if INDICATE_SHARP
IndicateManager = new IndicateManager(this, ChatViewManager);
=======
#if INDICATE_SHARP || MESSAGING_MENU_SHARP
_IndicateManager = new IndicateManager(this, _ChatViewManager);
>>>>>>>
#if INDICATE_SHARP || MESSAGING_MENU_SHARP
IndicateManager = new IndicateManager(this, ChatViewManager);
<<<<<<<
#if INDICATE_SHARP
IndicateManager.ApplyConfig(userConfig);
=======
#if INDICATE_SHARP || MESSAGING_MENU_SHARP
_IndicateManager.ApplyConfig(userConfig);
>>>>>>>
#if INDICATE_SHARP || MESSAGING_MENU_SHARP
IndicateManager.ApplyConfig(userConfig); |
<<<<<<<
msg = "irc://freenode/smuxi";
builder = new MessageBuilder();
builder.TimeStamp = DateTime.MinValue;
builder.Append(new UrlMessagePartModel(msg));
TestMessage(msg, builder.ToMessage());
=======
msg = "http://www.test.de/bilder.html?data[meta_id]=13895&data[bild_id]=7";
builder = new MessageBuilder();
builder.TimeStamp = DateTime.MinValue;
builder.Append(new UrlMessagePartModel("http://www.test.de/bilder.html?data[meta_id]=13895&data[bild_id]=7"));
TestMessage(msg, builder.ToMessage());
>>>>>>>
msg = "irc://freenode/smuxi";
builder = new MessageBuilder();
builder.TimeStamp = DateTime.MinValue;
builder.Append(new UrlMessagePartModel(msg));
TestMessage(msg, builder.ToMessage());
msg = "http://www.test.de/bilder.html?data[meta_id]=13895&data[bild_id]=7";
builder = new MessageBuilder();
builder.TimeStamp = DateTime.MinValue;
builder.Append(new UrlMessagePartModel("http://www.test.de/bilder.html?data[meta_id]=13895&data[bild_id]=7"));
TestMessage(msg, builder.ToMessage()); |
<<<<<<<
public override bool allowedInSubGraph
{
get { return false; }
}
=======
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Sub-graph-Node"; }
}
>>>>>>>
public override bool allowedInSubGraph
{
get { return false; }
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Sub-graph-Node"; }
} |
<<<<<<<
using System.IO;
using SignalR.Hosting.Self.Infrastructure;
=======
using System;
>>>>>>>
using System.IO;
using SignalR.Hosting.Self.Infrastructure;
<<<<<<<
=======
using System.Threading.Tasks;
using SignalR.Hosting.Self.Infrastructure;
>>>>>>> |
<<<<<<<
IDisposable registration = CancellationToken.SafeRegister(cancelState =>
=======
var closeDisposer = new Disposer();
var abortDisposer = new Disposer();
IDisposable closeRegistration = CancellationToken.SafeRegister(asyncResult =>
>>>>>>>
var closeDisposer = new Disposer();
var abortDisposer = new Disposer();
IDisposable closeRegistration = CancellationToken.SafeRegister(cancelState => |
<<<<<<<
break;
}
catch (QuotaExceededException ex)
{
_trace.TraceError(errorMessage, ex.Message);
if(ex.IsTransient)
{
Thread.Sleep(RetryDelay);
}
else
{
break;
}
=======
break;
>>>>>>>
break;
} |
<<<<<<<
? value.ToBoolean() : conversionType.GetTypeInfo().IsEnum
? value.ToEnum(conversionType) : safeChangeType();
=======
? value.ToBoolean() : conversionType.IsEnum
? value.ToEnum(conversionType, ignoreValueCase) : safeChangeType();
>>>>>>>
? value.ToBoolean() : conversionType.GetTypeInfo().IsEnum
? value.ToEnum(conversionType, ignoreValueCase) : safeChangeType(); |
<<<<<<<
(vals, type, isScalar) => TypeConverter.ChangeType(vals, type, isScalar, CultureInfo.InvariantCulture),
StringComparer.Ordinal
);
=======
(vals, type, isScalar) => TypeConverter.ChangeType(vals, type, isScalar, CultureInfo.InvariantCulture, false),
StringComparer.InvariantCulture);
>>>>>>>
(vals, type, isScalar) => TypeConverter.ChangeType(vals, type, isScalar, CultureInfo.InvariantCulture, false),
StringComparer.Ordinal
); |
<<<<<<<
ExpectedType = "double",
FirstType = "double",
SecondType = "double",
IncludeRem = false
=======
ExpectedType = @"double",
FirstType = @"double",
SecondType = @"double",
IncludeRem = false,
IncludeRet = false
>>>>>>>
ExpectedType = "double",
FirstType = "double",
SecondType = "double",
IncludeRem = false,
IncludeRet = false |
<<<<<<<
private readonly Dictionary<ILayerRenderer, ElapsedMillisecondsTimedStat> _renderCacheDrawTimes;
private readonly Dictionary<ILayerRenderer, IBitmap> _bitmapBuffer = new Dictionary<ILayerRenderer, IBitmap>();
=======
private readonly Dictionary<ILayerRenderer, IBitmap> _bitmapBuffer = new();
>>>>>>>
private readonly Dictionary<ILayerRenderer, ElapsedMillisecondsTimedStat> _renderCacheDrawTimes;
private readonly Dictionary<ILayerRenderer, IBitmap> _bitmapBuffer = new(); |
<<<<<<<
}
private void GameLoopStep(object sender, EventArgs e)
{
_gameLoopTimer?.Stop();
GameLoopStep(0.005f * this.SpeedAdjustmentFactor);
_gameLoopTimer?.Start();
=======
return distance <= 0.0f;
}
private static (TrainPosition NewPosition, int NewColumn, int NewRow) GetNextPosition(Train train, float distance, Track track)
{
int newColumn = train.Column;
int newRow = train.Row;
var position = new TrainPosition(train.RelativeLeft, train.RelativeTop, train.Angle, distance);
track.Move(position);
if (position.RelativeLeft < 0.0f)
{
newColumn--;
position.RelativeLeft = 0.999f;
}
if (position.RelativeLeft > 1.0f)
{
newColumn++;
position.RelativeLeft = 0.001f;
}
if (position.RelativeTop < 0.0f)
{
newRow--;
position.RelativeTop = 0.999f;
}
if (position.RelativeTop > 1.0f)
{
newRow++;
position.RelativeTop = 0.001f;
}
return (position, newColumn, newRow);
>>>>>>>
return distance <= 0.0f;
}
private void GameLoopStep(object sender, EventArgs e)
{
_gameLoopTimer?.Stop();
GameLoopStep(0.005f * this.SpeedAdjustmentFactor);
_gameLoopTimer?.Start();
}
private static (TrainPosition NewPosition, int NewColumn, int NewRow) GetNextPosition(Train train, float distance, Track track)
{
int newColumn = train.Column;
int newRow = train.Row;
var position = new TrainPosition(train.RelativeLeft, train.RelativeTop, train.Angle, distance);
track.Move(position);
if (position.RelativeLeft < 0.0f)
{
newColumn--;
position.RelativeLeft = 0.999f;
}
if (position.RelativeLeft > 1.0f)
{
newColumn++;
position.RelativeLeft = 0.001f;
}
if (position.RelativeTop < 0.0f)
{
newRow--;
position.RelativeTop = 0.999f;
}
if (position.RelativeTop > 1.0f)
{
newRow++;
position.RelativeTop = 0.001f;
}
return (position, newColumn, newRow); |
<<<<<<<
public CachableLayoutRenderer(ILayout<T> layout, IRenderer<T> renderer, IImageFactory imageFactory)
: this(layout, new[] { renderer }, imageFactory)
{
}
public CachableLayoutRenderer(ILayout<T> layout, IEnumerable<IRenderer<T>> renderers, IImageFactory imageFactory)
: base(layout, renderers, imageFactory)
=======
public CachableLayoutRenderer(ILayout<T> layout, IRenderer<T> renderer, IImageFactory imageFactory, ITerrainMap terrainMap)
: base (layout, renderer, imageFactory, terrainMap)
>>>>>>>
public CachableLayoutRenderer(ILayout<T> layout, IRenderer<T> renderer, IImageFactory imageFactory, ITerrainMap terrainMap)
: this(layout, new[] { renderer }, imageFactory, terrainMap)
{
}
public CachableLayoutRenderer(ILayout<T> layout, IEnumerable<IRenderer<T>> renderers, IImageFactory imageFactory, ITerrainMap terrainMap)
: base (layout, renderers, imageFactory, terrainMap) |
<<<<<<<
=======
DoAnEdgeSnap(position);
}
private static void DoAnEdgeSnap(TrainPosition position)
{
// Do some fun snapping
if (position.RelativeLeft < 0)
{
position.RelativeLeft = -0.1f;
position.RelativeTop = 0.5f;
position.Angle = 180.0f;
}
else if (position.RelativeLeft >= 1.0f)
{
position.RelativeLeft = 1.1f;
position.RelativeTop = 0.5f;
position.Angle = 0.0f;
}
if (position.RelativeTop < 0)
{
position.RelativeTop = -0.1f;
position.RelativeLeft = 0.5f;
position.Angle = 270.0f;
}
else if (position.RelativeTop >= 1.0f)
{
position.RelativeTop = 1.1f;
position.RelativeLeft = 0.5f;
position.Angle = 90.0f;
}
}
>>>>>>>
<<<<<<<
// Do some fun snapping
if (position.RelativeLeft < 0)
{
position.RelativeLeft = -0.1f;
position.RelativeTop = 0.5f;
position.Angle = 180.0f;
}
else if (position.RelativeLeft >= 1.0f)
{
position.RelativeLeft = 1.1f;
position.RelativeTop = 0.5f;
position.Angle = 0.0f;
}
=======
TrainMovement.MoveAroundCorner(position, -1, -1, 45, 225, -180, 270);
}
>>>>>>>
// Do some fun snapping
if (position.RelativeLeft < 0)
{
position.RelativeLeft = -0.1f;
position.RelativeTop = 0.5f;
position.Angle = 180.0f;
}
else if (position.RelativeLeft >= 1.0f)
{
position.RelativeLeft = 1.1f;
position.RelativeTop = 0.5f;
position.Angle = 0.0f;
}
<<<<<<<
distance = -(float)(angleOver * radius);
=======
distance = (float)(angleOver * 0.5f);
>>>>>>>
distance = (float)(angleOver * 0.5f);
<<<<<<<
currentAngle = maximumNewAngle + 0.1f;
if (currentAngle > Math.PI * 2.0) currentAngle -= Math.PI * 2.0;
distance = (float)(angleOver * radius);
=======
double angleOver = (angleToMove + currentAngle) - maximumNewAngle;
currentAngle = maximumNewAngle + 0.1f;
distance = (float)(angleOver * 0.5f);
>>>>>>>
currentAngle = maximumNewAngle + 0.1f;
if (currentAngle > Math.PI * 2.0) currentAngle -= Math.PI * 2.0;
distance = (float)(angleOver * radius); |
<<<<<<<
public class MappingEngine : IMappingEngine, IMappingEngineRunner
{
private static readonly IDictionaryFactory DictionaryFactory = PlatformAdapter.Resolve<IDictionaryFactory>();
private static readonly IProxyGeneratorFactory ProxyGeneratorFactory = PlatformAdapter.Resolve<IProxyGeneratorFactory>();
private bool _disposed;
private readonly IConfigurationProvider _configurationProvider;
internal readonly IObjectMapper[] _mappers;
internal readonly IDictionary<TypePair, IObjectMapper> _objectMapperCache = DictionaryFactory.CreateDictionary<TypePair, IObjectMapper>();
private readonly Func<Type, object> _serviceCtor;
public MappingEngine(IConfigurationProvider configurationProvider)
: this(configurationProvider, DictionaryFactory.CreateDictionary<TypePair, IObjectMapper>(), configurationProvider.ServiceCtor)
{
}
public MappingEngine(IConfigurationProvider configurationProvider, IDictionary<TypePair, IObjectMapper> objectMapperCache, Func<Type, object> serviceCtor)
{
_configurationProvider = configurationProvider;
_objectMapperCache = objectMapperCache;
_serviceCtor = serviceCtor;
_mappers = configurationProvider.GetMappers();
_configurationProvider.TypeMapCreated += ClearTypeMap;
}
public IConfigurationProvider ConfigurationProvider => _configurationProvider;
public void Dispose()
{
Dispose(true);
=======
using System;
using System.Linq;
using System.Reflection;
using Impl;
using Internal;
using Mappers;
public class MappingEngine : IMappingEngine, IMappingEngineRunner
{
private static readonly IDictionaryFactory DictionaryFactory = PlatformAdapter.Resolve<IDictionaryFactory>();
private static readonly IProxyGeneratorFactory ProxyGeneratorFactory =
PlatformAdapter.Resolve<IProxyGeneratorFactory>();
private bool _disposed;
private readonly IObjectMapper[] _mappers;
private readonly IDictionary<TypePair, IObjectMapper> _objectMapperCache;
private readonly Func<Type, object> _serviceCtor;
public MappingEngine(IConfigurationProvider configurationProvider)
: this(
configurationProvider, DictionaryFactory.CreateDictionary<TypePair, IObjectMapper>(),
configurationProvider.ServiceCtor)
{
}
public MappingEngine(IConfigurationProvider configurationProvider,
IDictionary<TypePair, IObjectMapper> objectMapperCache, Func<Type, object> serviceCtor)
{
ConfigurationProvider = configurationProvider;
_objectMapperCache = objectMapperCache;
_serviceCtor = serviceCtor;
_mappers = configurationProvider.GetMappers();
ConfigurationProvider.TypeMapCreated += ClearTypeMap;
}
public IConfigurationProvider ConfigurationProvider { get; }
public void Dispose()
{
Dispose(true);
>>>>>>>
using System;
using System.Linq;
using System.Reflection;
using Impl;
using Internal;
using Mappers;
public class MappingEngine : IMappingEngine, IMappingEngineRunner
{
private static readonly IDictionaryFactory DictionaryFactory = PlatformAdapter.Resolve<IDictionaryFactory>();
private static readonly IProxyGeneratorFactory ProxyGeneratorFactory =
PlatformAdapter.Resolve<IProxyGeneratorFactory>();
private bool _disposed;
private readonly IConfigurationProvider _configurationProvider;
internal readonly IObjectMapper[] _mappers;
internal readonly IDictionary<TypePair, IObjectMapper> _objectMapperCache = DictionaryFactory.CreateDictionary<TypePair, IObjectMapper>();
private readonly Func<Type, object> _serviceCtor;
public MappingEngine(IConfigurationProvider configurationProvider)
: this(
configurationProvider, DictionaryFactory.CreateDictionary<TypePair, IObjectMapper>(),
configurationProvider.ServiceCtor)
{
}
public MappingEngine(IConfigurationProvider configurationProvider,
IDictionary<TypePair, IObjectMapper> objectMapperCache, Func<Type, object> serviceCtor)
{
ConfigurationProvider = configurationProvider;
_objectMapperCache = objectMapperCache;
_serviceCtor = serviceCtor;
_mappers = configurationProvider.GetMappers();
ConfigurationProvider.TypeMapCreated += ClearTypeMap;
}
public IConfigurationProvider ConfigurationProvider { get; }
public void Dispose()
{
Dispose(true); |
<<<<<<<
{
private static readonly IDictionaryFactory DictionaryFactory = PlatformAdapter.Resolve<IDictionaryFactory>();
internal readonly ITypeMapFactory _typeMapFactory;
private readonly IEnumerable<IObjectMapper> _mappers;
internal const string DefaultProfileName = "";
private readonly ThreadSafeList<TypeMap> _typeMaps = new ThreadSafeList<TypeMap>();
private readonly IDictionary<TypePair, TypeMap> _typeMapCache = DictionaryFactory.CreateDictionary<TypePair, TypeMap>();
private readonly IDictionary<TypePair, CreateTypeMapExpression> _typeMapExpressionCache = DictionaryFactory.CreateDictionary<TypePair, CreateTypeMapExpression>();
private readonly IDictionary<string, FormatterExpression> _formatterProfiles = DictionaryFactory.CreateDictionary<string, FormatterExpression>();
private Func<Type, object> _serviceCtor = ObjectCreator.CreateObject;
private readonly List<string> _globalIgnore;
public ConfigurationStore(ITypeMapFactory typeMapFactory, IEnumerable<IObjectMapper> mappers)
{
_typeMapFactory = typeMapFactory;
_mappers = mappers;
=======
{
private static readonly IDictionaryFactory DictionaryFactory = PlatformAdapter.Resolve<IDictionaryFactory>();
private readonly ITypeMapFactory _typeMapFactory;
private readonly IEnumerable<IObjectMapper> _mappers;
internal const string DefaultProfileName = "";
private readonly Internal.IDictionary<TypePair, TypeMap> _userDefinedTypeMaps =
DictionaryFactory.CreateDictionary<TypePair, TypeMap>();
private readonly Internal.IDictionary<TypePair, TypeMap> _typeMapPlanCache =
DictionaryFactory.CreateDictionary<TypePair, TypeMap>();
private readonly Internal.IDictionary<TypePair, CreateTypeMapExpression> _typeMapExpressionCache =
DictionaryFactory.CreateDictionary<TypePair, CreateTypeMapExpression>();
private readonly Internal.IDictionary<string, ProfileConfiguration> _formatterProfiles =
DictionaryFactory.CreateDictionary<string, ProfileConfiguration>();
private Func<Type, object> _serviceCtor = ObjectCreator.CreateObject;
private readonly List<string> _globalIgnore;
public ConfigurationStore(ITypeMapFactory typeMapFactory, IEnumerable<IObjectMapper> mappers)
{
_typeMapFactory = typeMapFactory;
_mappers = mappers;
>>>>>>>
{
private static readonly IDictionaryFactory DictionaryFactory = PlatformAdapter.Resolve<IDictionaryFactory>();
internal readonly ITypeMapFactory _typeMapFactory;
private readonly IEnumerable<IObjectMapper> _mappers;
internal const string DefaultProfileName = "";
private readonly Internal.IDictionary<TypePair, TypeMap> _userDefinedTypeMaps =
DictionaryFactory.CreateDictionary<TypePair, TypeMap>();
private readonly Internal.IDictionary<TypePair, TypeMap> _typeMapPlanCache =
DictionaryFactory.CreateDictionary<TypePair, TypeMap>();
private readonly Internal.IDictionary<TypePair, CreateTypeMapExpression> _typeMapExpressionCache =
DictionaryFactory.CreateDictionary<TypePair, CreateTypeMapExpression>();
private readonly Internal.IDictionary<string, ProfileConfiguration> _formatterProfiles =
DictionaryFactory.CreateDictionary<string, ProfileConfiguration>();
private Func<Type, object> _serviceCtor = ObjectCreator.CreateObject;
private readonly List<string> _globalIgnore;
public ConfigurationStore(ITypeMapFactory typeMapFactory, IEnumerable<IObjectMapper> mappers)
{
_typeMapFactory = typeMapFactory;
_mappers = mappers; |
<<<<<<<
SquirrelAwareApp.HandleEvents(
version => AppHost.OnInitialInstall(version),
version => AppHost.OnAppUpdate(version),
onAppUninstall: version => AppHost.OnAppUninstall(version),
onFirstRun: () => AppHost.OnFirstRun());
=======
Cef.EnableHighDPISupport();
>>>>>>>
SquirrelAwareApp.HandleEvents(
version => AppHost.OnInitialInstall(version),
version => AppHost.OnAppUpdate(version),
onAppUninstall: version => AppHost.OnAppUninstall(version),
onFirstRun: () => AppHost.OnFirstRun());
Cef.EnableHighDPISupport(); |
<<<<<<<
[SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "ViewPort")]
public static IList<WeakReference> GetItemsInViewPort(ItemsControl list)
=======
public static IList<WeakReference> GetItemsInViewPort(this ItemsControl list)
>>>>>>>
[SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "ViewPort")]
public static IList<WeakReference> GetItemsInViewPort(this ItemsControl list)
<<<<<<<
[SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "ViewPort")]
public static void GetItemsInViewPort(ItemsControl list, IList<WeakReference> items)
=======
public static void GetItemsInViewPort(this ItemsControl list, IList<WeakReference> items)
>>>>>>>
[SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "ViewPort")]
public static void GetItemsInViewPort(this ItemsControl list, IList<WeakReference> items) |
<<<<<<<
ownerFrameworkElement.RemoveHandler(MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnOwnerMouseLeftButtonDown));
ownerFrameworkElement.ManipulationDelta -= OnOwnerManipulationDelta;
ownerFrameworkElement.RemoveHandler(MouseLeftButtonUpEvent, new MouseButtonEventHandler(OnOwnerMouseLeftButtonUp));
ownerFrameworkElement.Loaded -= OnOwnerLoaded;
=======
ownerFrameworkElement.Hold -= OnOwnerHold;
>>>>>>>
ownerFrameworkElement.RemoveHandler(MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnOwnerMouseLeftButtonDown));
ownerFrameworkElement.ManipulationDelta -= OnOwnerManipulationDelta;
ownerFrameworkElement.RemoveHandler(MouseLeftButtonUpEvent, new MouseButtonEventHandler(OnOwnerMouseLeftButtonUp));
<<<<<<<
ownerFrameworkElement.AddHandler(MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnOwnerMouseLeftButtonDown), true);
ownerFrameworkElement.ManipulationDelta += OnOwnerManipulationDelta;
ownerFrameworkElement.AddHandler(MouseLeftButtonUpEvent, new MouseButtonEventHandler(OnOwnerMouseLeftButtonUp), true);
ownerFrameworkElement.Loaded += OnOwnerLoaded;
=======
ownerFrameworkElement.Hold += OnOwnerHold;
>>>>>>>
ownerFrameworkElement.AddHandler(MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnOwnerMouseLeftButtonDown), true);
ownerFrameworkElement.ManipulationDelta += OnOwnerManipulationDelta;
ownerFrameworkElement.AddHandler(MouseLeftButtonUpEvent, new MouseButtonEventHandler(OnOwnerMouseLeftButtonUp), true);
<<<<<<<
_rootVisual.Navigated -= OnEventThatClosesContextMenu;
_rootVisual.Navigated += OnEventThatClosesContextMenu;
=======
/// <summary>
/// Attaches the ContxtMenu's BackKeyPress handler to properly enfore
/// dismissal on back key press.
/// </summary>
private void InitializePage()
{
if (null != _rootVisual)
{
_page = _rootVisual.Content as PhoneApplicationPage;
if (_page != null)
{
_page.BackKeyPress += OnPageBackKeyPress;
SetBinding(ApplicationBarMirrorProperty, new Binding { Source = _page, Path = new PropertyPath("ApplicationBar") });
}
}
}
/// <summary>
/// Sets focus to the next item in the ContextMenu.
/// </summary>
/// <param name="down">True to move the focus down; false to move it up.</param>
private void FocusNextItem(bool down)
{
int count = Items.Count;
int startingIndex = down ? -1 : count;
MenuItem focusedMenuItem = FocusManager.GetFocusedElement() as MenuItem;
if (null != focusedMenuItem && (this == focusedMenuItem.ParentMenuBase))
{
startingIndex = ItemContainerGenerator.IndexFromContainer(focusedMenuItem);
}
int index = startingIndex;
do
{
index = (index + count + (down ? 1 : -1)) % count;
MenuItem container = ItemContainerGenerator.ContainerFromIndex(index) as MenuItem;
if (null != container)
{
if (container.IsEnabled && container.Focus())
{
break;
}
>>>>>>>
_rootVisual.Navigated -= OnEventThatClosesContextMenu;
_rootVisual.Navigated += OnEventThatClosesContextMenu;
}
}
}
/// <summary>
/// Attaches the ContxtMenu's BackKeyPress handler to properly enfore
/// dismissal on back key press.
/// </summary>
private void InitializePage()
{
if (null != _rootVisual)
{
_page = _rootVisual.Content as PhoneApplicationPage;
if (_page != null)
{
_page.BackKeyPress += OnPageBackKeyPress;
SetBinding(ApplicationBarMirrorProperty, new Binding { Source = _page, Path = new PropertyPath("ApplicationBar") });
<<<<<<<
CenterX = scaleTransformCenter.X,
CenterY = scaleTransformCenter.Y,
=======
Width = width,
Height = height,
Fill = _backgroundBrush,
CacheMode = new BitmapCache(),
>>>>>>>
CenterX = scaleTransformCenter.X,
CenterY = scaleTransformCenter.Y,
<<<<<<<
UpdateContextMenuPlacement();
FrameworkElement dataContextSource = Owner as FrameworkElement ?? _rootVisual;
=======
>>>>>>>
FrameworkElement dataContextSource = Owner as FrameworkElement ?? _rootVisual; |
<<<<<<<
serializer.Serialize(ms, new SimlpeStringKeyData
=======
MessagePackSerializer.Serialize(ms, new SimpleStringKeyData
>>>>>>>
serializer.Serialize(ms, new SimpleStringKeyData
<<<<<<<
var d = serializer.Deserialize<SimlpeStringKeyData>(ms, readStrict: true);
=======
var d = MessagePackSerializer.Deserialize<SimpleStringKeyData>(ms, readStrict: true);
>>>>>>>
var d = serializer.Deserialize<SimpleStringKeyData>(ms, readStrict: true);
<<<<<<<
lz4Serializer.Serialize(ms, new SimlpeStringKeyData
=======
LZ4MessagePackSerializer.Serialize(ms, new SimpleStringKeyData
>>>>>>>
lz4Serializer.Serialize(ms, new SimpleStringKeyData
<<<<<<<
var d = lz4Serializer.Deserialize<SimlpeStringKeyData>(ms, readStrict: true);
=======
var d = LZ4MessagePackSerializer.Deserialize<SimpleStringKeyData>(ms, readStrict: true);
>>>>>>>
var d = lz4Serializer.Deserialize<SimpleStringKeyData>(ms, readStrict: true); |
<<<<<<<
config.BootstrapServers = "localhost:9093";
config.FollowMetadata = true;
config.NumStreamThreads = 2;
=======
config.BootstrapServers = "localhost:9093";
>>>>>>>
config.BootstrapServers = "localhost:9093";
<<<<<<<
IKStream<string, string> kStream = builder.Stream<string, string>("test");
kStream.MapValues((v) =>
{
var headers = StreamizMetadata.GetCurrentHeadersMetadata();
if(headers.Count > 0 )
Console.WriteLine("RANDOM : " + BitConverter.ToInt32(headers.GetLastBytes("random")));
return v;
});
kStream.Print(Printed<string, string>.ToOut());
=======
builder.Stream<string, string>("evenements")
.GroupByKey()
.WindowedBy(TumblingWindowOptions.Of(TimeSpan.FromMinutes(1)))
.Aggregate(() => "", (k, v, va) => va += v)
.ToStream()
.Print(Printed<Windowed<String>, String>.ToOut());
// kStream.Print(Printed<string, string>.ToOut());
>>>>>>>
builder.Stream<string, string>("evenements")
.GroupByKey()
.WindowedBy(TumblingWindowOptions.Of(TimeSpan.FromMinutes(1)))
.Aggregate(() => "", (k, v, va) => va += v)
.ToStream()
.Print(Printed<Windowed<String>, String>.ToOut()); |
<<<<<<<
SimpleWeb.Configuration.DefaultMediaTypeHandler = new JsonMediaTypeHandler();
=======
SimpleWeb.Configuration.ExceptionHandler = new ExceptionHandler();
>>>>>>>
SimpleWeb.Configuration.ExceptionHandler = new ExceptionHandler();
SimpleWeb.Configuration.DefaultMediaTypeHandler = new JsonMediaTypeHandler(); |
<<<<<<<
/// <summary>
/// Distance between the top and bottom faces in milliradii
/// </summary>
[ParserTarget("thickness")]
public NumericParser<float> thickness {
get { return ring.thickness; }
set { ring.thickness = value; }
}
// Axis angle of our ring
=======
// Axis angle (inclination) of our ring
>>>>>>>
/// <summary>
/// Distance between the top and bottom faces in milliradii
/// </summary>
[ParserTarget("thickness")]
public NumericParser<float> thickness {
get { return ring.thickness; }
set { ring.thickness = value; }
}
// Axis angle (inclination) of our ring |
<<<<<<<
else if (s.StartsWith("RGB("))
{
s = s.Replace("RGB(", string.Empty);
s = s.Replace(")", string.Empty);
s = s.Replace(" ", string.Empty);
string[] colorArray = s.Split(',');
value = new Color(float.Parse(colorArray[0]) / 255, float.Parse(colorArray[1]) / 255, float.Parse(colorArray[2]) / 255, 1);
}
=======
else if (s.StartsWith("XKCD."))
{
PropertyInfo color = typeof(XKCDColors).GetProperty(s.Replace("XKCD.", ""), BindingFlags.Static | BindingFlags.Public);
value = (Color)color.GetValue(null, null);
}
else if (s.StartsWith("#"))
{
value = XKCDColors.ColorTranslator.FromHtml(s);
}
>>>>>>>
else if (s.StartsWith("RGB("))
{
s = s.Replace("RGB(", string.Empty);
s = s.Replace(")", string.Empty);
s = s.Replace(" ", string.Empty);
string[] colorArray = s.Split(',');
value = new Color(float.Parse(colorArray[0]) / 255, float.Parse(colorArray[1]) / 255, float.Parse(colorArray[2]) / 255, 1);
}
else if (s.StartsWith("XKCD."))
{
PropertyInfo color = typeof(XKCDColors).GetProperty(s.Replace("XKCD.", ""), BindingFlags.Static | BindingFlags.Public);
value = (Color)color.GetValue(null, null);
}
else if (s.StartsWith("#"))
{
value = XKCDColors.ColorTranslator.FromHtml(s);
}
<<<<<<<
}
// Create the final animation curve
curve = new AnimationCurve();
foreach(KeyValuePair<int, Keyframe> keyframe in keyframes)
curve.AddKey(keyframe.Value);
}
// We don't use this
void IParserEventSubscriber.PostApply(ConfigNode node) { }
// Default constructor
public AnimationCurveParser ()
{
this.curve = null;
}
// Construct this fine object
public AnimationCurveParser (AnimationCurve curve)
{
this.curve = curve;
}
}
/** Parser for Physics Material **/
[RequireConfigType(ConfigType.Node)]
public class PhysicsMaterialParser : IParserEventSubscriber
{
// Physics material we are generating
public PhysicMaterial material { get; private set; }
// Physics material parameters
[ParserTarget("bounceCombine", optional = true)]
private EnumParser<PhysicMaterialCombine> bounceCombine
{
set { material.bounceCombine = value.value; }
}
[ParserTarget("frictionCombine", optional = true)]
private EnumParser<PhysicMaterialCombine> frictionCombine
{
set { material.frictionCombine = value.value; }
}
[ParserTarget("frictionDirection2", optional = true)]
private Vector3Parser frictionDirection2
{
set { material.frictionDirection2 = value.value; }
}
[ParserTarget("bounciness", optional = true)]
private NumericParser<float> bounciness
{
set { material.bounciness = value.value; }
}
[ParserTarget("staticFriction", optional = true)]
private NumericParser<float> staticFriction
{
set { material.staticFriction = value.value; }
}
[ParserTarget("staticFriction2", optional = true)]
private NumericParser<float> staticFriction2
{
set { material.staticFriction2 = value.value; }
}
[ParserTarget("dynamicFriction", optional = true)]
private NumericParser<float> dynamicFriction
{
set { material.dynamicFriction = value.value; }
}
[ParserTarget("dynamicFriction2", optional = true)]
private NumericParser<float> dynamicFriction2
{
set { material.dynamicFriction2 = value.value; }
}
void IParserEventSubscriber.Apply(ConfigNode node) { }
void IParserEventSubscriber.PostApply(ConfigNode node) { }
// Default constructor
public PhysicsMaterialParser ()
{
this.material = null;
}
// Initializing constructor
public PhysicsMaterialParser (PhysicMaterial material)
{
this.material = material;
}
}
/** Parser for mesh */
[RequireConfigType(ConfigType.Value)]
public class MeshParser : IParsable
{
public Mesh value;
public void SetFromString (string s)
{
// Check if we are attempting to load a builtin mesh
if (s.StartsWith ("BUILTIN/"))
{
string meshName = Regex.Replace (s, "BUILTIN/", "");
value = UnityEngine.Resources.FindObjectsOfTypeAll<Mesh> ().Where (mesh => mesh.name == meshName).First ();
return;
}
// TODO: Load a custom mesh file here
// Mesh was not found
value = null;
}
public MeshParser ()
{
}
public MeshParser (Mesh value)
{
this.value = value;
}
}
}
=======
}
// Create the final animation curve
curve = new AnimationCurve();
foreach(KeyValuePair<int, Keyframe> keyframe in keyframes)
curve.AddKey(keyframe.Value);
}
// We don't use this
void IParserEventSubscriber.PostApply(ConfigNode node) { }
// Default constructor
public AnimationCurveParser ()
{
this.curve = null;
}
// Construct this fine object
public AnimationCurveParser (AnimationCurve curve)
{
this.curve = curve;
}
}
/** Parser for Physics Material **/
[RequireConfigType(ConfigType.Node)]
public class PhysicsMaterialParser : IParserEventSubscriber
{
// Physics material we are generating
public PhysicMaterial material { get; private set; }
// Physics material parameters
[ParserTarget("bounceCombine", optional = true)]
private EnumParser<PhysicMaterialCombine> bounceCombine
{
set { material.bounceCombine = value.value; }
}
[ParserTarget("frictionCombine", optional = true)]
private EnumParser<PhysicMaterialCombine> frictionCombine
{
set { material.frictionCombine = value.value; }
}
[ParserTarget("frictionDirection2", optional = true)]
private Vector3Parser frictionDirection2
{
set { material.frictionDirection2 = value.value; }
}
[ParserTarget("bounciness", optional = true)]
private NumericParser<float> bounciness
{
set { material.bounciness = value.value; }
}
[ParserTarget("staticFriction", optional = true)]
private NumericParser<float> staticFriction
{
set { material.staticFriction = value.value; }
}
[ParserTarget("staticFriction2", optional = true)]
private NumericParser<float> staticFriction2
{
set { material.staticFriction2 = value.value; }
}
[ParserTarget("dynamicFriction", optional = true)]
private NumericParser<float> dynamicFriction
{
set { material.dynamicFriction = value.value; }
}
[ParserTarget("dynamicFriction2", optional = true)]
private NumericParser<float> dynamicFriction2
{
set { material.dynamicFriction2 = value.value; }
}
void IParserEventSubscriber.Apply(ConfigNode node) { }
void IParserEventSubscriber.PostApply(ConfigNode node) { }
// Default constructor
public PhysicsMaterialParser ()
{
this.material = null;
}
// Initializing constructor
public PhysicsMaterialParser (PhysicMaterial material)
{
this.material = material;
}
}
}
>>>>>>>
}
// Create the final animation curve
curve = new AnimationCurve();
foreach(KeyValuePair<int, Keyframe> keyframe in keyframes)
curve.AddKey(keyframe.Value);
}
// We don't use this
void IParserEventSubscriber.PostApply(ConfigNode node) { }
// Default constructor
public AnimationCurveParser ()
{
this.curve = null;
}
// Construct this fine object
public AnimationCurveParser (AnimationCurve curve)
{
this.curve = curve;
}
}
/** Parser for Physics Material **/
[RequireConfigType(ConfigType.Node)]
public class PhysicsMaterialParser : IParserEventSubscriber
{
// Physics material we are generating
public PhysicMaterial material { get; private set; }
// Physics material parameters
[ParserTarget("bounceCombine", optional = true)]
private EnumParser<PhysicMaterialCombine> bounceCombine
{
set { material.bounceCombine = value.value; }
}
[ParserTarget("frictionCombine", optional = true)]
private EnumParser<PhysicMaterialCombine> frictionCombine
{
set { material.frictionCombine = value.value; }
}
[ParserTarget("frictionDirection2", optional = true)]
private Vector3Parser frictionDirection2
{
set { material.frictionDirection2 = value.value; }
}
[ParserTarget("bounciness", optional = true)]
private NumericParser<float> bounciness
{
set { material.bounciness = value.value; }
}
[ParserTarget("staticFriction", optional = true)]
private NumericParser<float> staticFriction
{
set { material.staticFriction = value.value; }
}
[ParserTarget("staticFriction2", optional = true)]
private NumericParser<float> staticFriction2
{
set { material.staticFriction2 = value.value; }
}
[ParserTarget("dynamicFriction", optional = true)]
private NumericParser<float> dynamicFriction
{
set { material.dynamicFriction = value.value; }
}
[ParserTarget("dynamicFriction2", optional = true)]
private NumericParser<float> dynamicFriction2
{
set { material.dynamicFriction2 = value.value; }
}
void IParserEventSubscriber.Apply(ConfigNode node) { }
void IParserEventSubscriber.PostApply(ConfigNode node) { }
// Default constructor
public PhysicsMaterialParser ()
{
this.material = null;
}
// Initializing constructor
public PhysicsMaterialParser (PhysicMaterial material)
{
this.material = material;
}
}
/** Parser for mesh */
[RequireConfigType(ConfigType.Value)]
public class MeshParser : IParsable
{
public Mesh value;
public void SetFromString (string s)
{
// Check if we are attempting to load a builtin mesh
if (s.StartsWith ("BUILTIN/"))
{
string meshName = Regex.Replace (s, "BUILTIN/", "");
value = UnityEngine.Resources.FindObjectsOfTypeAll<Mesh> ().Where (mesh => mesh.name == meshName).First ();
return;
}
// TODO: Load a custom mesh file here
// Mesh was not found
value = null;
}
public MeshParser ()
{
}
public MeshParser (Mesh value)
{
this.value = value;
}
}
} |
<<<<<<<
=======
private string _asymmAlg;
private bool _unofficial;
>>>>>>>
<<<<<<<
this.HasOption("a|asymmetric:", Localized.Asymmetric, v => { _asymm = true;});
=======
this.HasOption("a|asymmetric:", Localized.Asymmetric, v =>
{
_asymm = true;
_asymmAlg = v;
});
this.HasOption("u|unofficial:", Localized.UnofficialCreate, v =>
{
_unofficial = true;
});
>>>>>>>
this.HasOption("a|asymmetric:", Localized.Asymmetric, v => { _asymm = true;});
<<<<<<<
var meta =new KeyMetadata()
{
Name = _name,
Purpose = purpose,
Kind = _asymm ? KeyKind.Private : KeyKind.Symmetric,
};
=======
KeyType type = PickKeyType(purpose);
var meta = new KeyMetadata()
{
Name = _name,
Purpose = purpose,
KeyType = type,
};
>>>>>>>
var meta =new KeyMetadata()
{
Name = _name,
Purpose = purpose,
Kind = _asymm ? KeyKind.Private : KeyKind.Symmetric,
};
<<<<<<<
=======
private KeyType PickKeyType(KeyPurpose purpose)
{
KeyType type;
if (_asymm)
{
if (purpose == KeyPurpose.DecryptAndEncrypt)
{
type = KeyType.RsaPriv;
}
else
{
if (_unofficial)
{
type = UnofficialKeyType.RSAPrivSign;
}
else if (_asymmAlg == "rsa")
{
type = KeyType.RsaPriv;
}
else
{
type = KeyType.DsaPriv;
}
}
}
else if (purpose == KeyPurpose.DecryptAndEncrypt)
{
if (_unofficial)
{
type = UnofficialKeyType.AesAead;
}
else
{
type = KeyType.Aes;
}
}
else
{
type = KeyType.HmacSha1;
}
return type;
}
>>>>>>> |
<<<<<<<
/// <summary>
/// Gets the <see cref="Board"/> on which the label is defined.
/// </summary>
IBoard Board { get; }
/// <summary>
/// Gets and sets the color. Use null for no color.
/// </summary>
LabelColor? Color { get; set; }
/// <summary>
/// Gets the creation date of the label.
/// </summary>
DateTime CreationDate { get; }
/// <summary>
/// Gets and sets the label's name.
/// </summary>
string Name { get; set; }
/// <summary>
/// Gets the number of cards which use this label.
/// </summary>
int? Uses { get; }
/// <summary>
/// Deletes the label. All usages of the label will also be removed.
/// </summary>
/// <remarks>
/// This permanently deletes the label from Trello's server, however, this object will
/// remain in memory and all properties will remain accessible.
/// </remarks>
void Delete();
/// <summary>
/// Marks the label to be refreshed the next time data is accessed.
/// </summary>
void Refresh();
}
/// <summary>
/// A label.
/// </summary>
public class Label : ILabel
{
/// <summary>
/// Defines fetchable fields for <see cref="Label"/>s.
/// </summary>
=======
/// <summary>
/// Enumerates the data which can be pulled for labels.
/// </summary>
>>>>>>>
/// <summary>
/// Gets the <see cref="Board"/> on which the label is defined.
/// </summary>
IBoard Board { get; }
/// <summary>
/// Gets and sets the color. Use null for no color.
/// </summary>
LabelColor? Color { get; set; }
/// <summary>
/// Gets the creation date of the label.
/// </summary>
DateTime CreationDate { get; }
/// <summary>
/// Gets and sets the label's name.
/// </summary>
string Name { get; set; }
/// <summary>
/// Gets the number of cards which use this label.
/// </summary>
int? Uses { get; }
/// <summary>
/// Deletes the label. All usages of the label will also be removed.
/// </summary>
/// <remarks>
/// This permanently deletes the label from Trello's server, however, this object will
/// remain in memory and all properties will remain accessible.
/// </remarks>
void Delete();
/// <summary>
/// Marks the label to be refreshed the next time data is accessed.
/// </summary>
void Refresh();
}
/// <summary>
/// A label.
/// </summary>
public class Label : ILabel
{
/// <summary>
/// Enumerates the data which can be pulled for labels.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Label.Board"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Board property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Board property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Label.Color"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Color property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Color property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Label.Name"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Name property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Name property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Label.Uses"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Uses property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Uses property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Gets and sets the fields to fetch.
/// </summary>
=======
/// <summary>
/// Specifies which fields should be downloaded.
/// </summary>
>>>>>>>
/// <summary>
/// Specifies which fields should be downloaded.
/// </summary> |
<<<<<<<
public ICard Card => _card.Value;
=======
/// <associated-notification-types>
/// - AddedAttachmentToCard
/// - AddedToCard
/// - AddedMemberToCard
/// - ChangeCard
/// - CommentCard
/// - CreatedCard
/// - RemovedFromCard
/// - RemovedMemberFromCard
/// - MentionedOnCard
/// - UpdateCheckItemStateOnCard
/// - CardDueSoon
/// </associated-notification-types>
public Card Card => _card.Value;
>>>>>>>
/// <associated-notification-types>
/// - AddedAttachmentToCard
/// - AddedToCard
/// - AddedMemberToCard
/// - ChangeCard
/// - CommentCard
/// - CreatedCard
/// - RemovedFromCard
/// - RemovedMemberFromCard
/// - MentionedOnCard
/// - UpdateCheckItemStateOnCard
/// - CardDueSoon
/// </associated-notification-types>
public ICard Card => _card.Value;
<<<<<<<
public ICheckItem CheckItem => _checkItem.Value;
=======
/// <associated-notification-types>
/// - UpdateCheckItemStateOnCard
/// </associated-notification-types>
public CheckItem CheckItem => _checkItem.Value;
>>>>>>>
/// <associated-notification-types>
/// - UpdateCheckItemStateOnCard
/// </associated-notification-types>
public ICheckItem CheckItem => _checkItem.Value;
<<<<<<<
public IMember Member => _member.Value;
=======
/// <associated-notification-types>
/// - AddedMemberToCard
/// - RemovedMemberFromCard
/// - MentionedOnCard
/// </associated-notification-types>
public Member Member => _member.Value;
>>>>>>>
/// <associated-notification-types>
/// - AddedMemberToCard
/// - RemovedMemberFromCard
/// - MentionedOnCard
/// </associated-notification-types>
public IMember Member => _member.Value;
<<<<<<<
public IOrganization Organization => _organization.Value;
=======
/// <associated-notification-types>
/// - AddedToOrganization
/// - AddAdminToOrganization
/// - RemovedFromOrganization
/// - MakeAdminOfOrganization
/// </associated-notification-types>
public Organization Organization => _organization.Value;
>>>>>>>
/// <associated-notification-types>
/// - AddedToOrganization
/// - AddAdminToOrganization
/// - RemovedFromOrganization
/// - MakeAdminOfOrganization
/// </associated-notification-types>
public IOrganization Organization => _organization.Value; |
<<<<<<<
/// <summary>
/// Gets the collection of actions performed on the organization.
/// </summary>
IReadOnlyCollection<IAction> Actions { get; }
/// <summary>
/// Gets the collection of boards owned by the organization.
/// </summary>
IBoardCollection Boards { get; }
/// <summary>
/// Gets the creation date of the organization.
/// </summary>
DateTime CreationDate { get; }
/// <summary>
/// Gets or sets the organization's description.
/// </summary>
string Description { get; set; }
/// <summary>
/// Gets or sets the organization's display name.
/// </summary>
string DisplayName { get; set; }
/// <summary>
/// Gets whether the organization has business class status.
/// </summary>
bool IsBusinessClass { get; }
/// <summary>
/// Gets the collection of members who belong to the organization.
/// </summary>
IReadOnlyCollection<IMember> Members { get; }
/// <summary>
/// Gets the collection of members and their priveledges on this organization.
/// </summary>
IOrganizationMembershipCollection Memberships { get; }
/// <summary>
/// Gets the organization's name.
/// </summary>
string Name { get; set; }
/// <summary>
/// Gets specific data regarding power-ups.
/// </summary>
IReadOnlyCollection<IPowerUpData> PowerUpData { get; }
/// <summary>
/// Gets the set of preferences for the organization.
/// </summary>
IOrganizationPreferences Preferences { get; }
/// <summary>
/// Gets the organization's URL.
/// </summary>
string Url { get; }
/// <summary>
/// Gets or sets the organization's website.
/// </summary>
string Website { get; set; }
/// <summary>
/// Raised when data on the organization is updated.
/// </summary>
event Action<IOrganization, IEnumerable<string>> Updated;
/// <summary>
/// Deletes the organization.
/// </summary>
/// <remarks>
/// This permanently deletes the organization from Trello's server, however, this
/// object will remain in memory and all properties will remain accessible.
/// </remarks>
void Delete();
/// <summary>
/// Marks the organization to be refreshed the next time data is accessed.
/// </summary>
void Refresh();
}
/// <summary>
/// Represents an organization.
/// </summary>
public class Organization : IOrganization
{
/// <summary>
/// Defines fetchable fields for <see cref="Organization"/>s.
/// </summary>
=======
/// <summary>
/// Enumerates the data which can be pulled for organizations (teams).
/// </summary>
>>>>>>>
/// <summary>
/// Gets the collection of actions performed on the organization.
/// </summary>
IReadOnlyCollection<IAction> Actions { get; }
/// <summary>
/// Gets the collection of boards owned by the organization.
/// </summary>
IBoardCollection Boards { get; }
/// <summary>
/// Gets the creation date of the organization.
/// </summary>
DateTime CreationDate { get; }
/// <summary>
/// Gets or sets the organization's description.
/// </summary>
string Description { get; set; }
/// <summary>
/// Gets or sets the organization's display name.
/// </summary>
string DisplayName { get; set; }
/// <summary>
/// Gets whether the organization has business class status.
/// </summary>
bool IsBusinessClass { get; }
/// <summary>
/// Gets the collection of members who belong to the organization.
/// </summary>
IReadOnlyCollection<IMember> Members { get; }
/// <summary>
/// Gets the collection of members and their priveledges on this organization.
/// </summary>
IOrganizationMembershipCollection Memberships { get; }
/// <summary>
/// Gets the organization's name.
/// </summary>
string Name { get; set; }
/// <summary>
/// Gets specific data regarding power-ups.
/// </summary>
IReadOnlyCollection<IPowerUpData> PowerUpData { get; }
/// <summary>
/// Gets the set of preferences for the organization.
/// </summary>
IOrganizationPreferences Preferences { get; }
/// <summary>
/// Gets the organization's URL.
/// </summary>
string Url { get; }
/// <summary>
/// Gets or sets the organization's website.
/// </summary>
string Website { get; set; }
/// <summary>
/// Raised when data on the organization is updated.
/// </summary>
event Action<IOrganization, IEnumerable<string>> Updated;
/// <summary>
/// Deletes the organization.
/// </summary>
/// <remarks>
/// This permanently deletes the organization from Trello's server, however, this
/// object will remain in memory and all properties will remain accessible.
/// </remarks>
void Delete();
/// <summary>
/// Marks the organization to be refreshed the next time data is accessed.
/// </summary>
void Refresh();
}
/// <summary>
/// Represents an organization.
/// </summary>
public class Organization : IOrganization
{
/// <summary>
/// Enumerates the data which can be pulled for organizations (teams).
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Organization.Description"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Description property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Description property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Organization.DisplayName"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the DisplayName property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the DisplayName property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Not Implemented.
/// </summary>
=======
/// <summary>
/// Indicates the LogoHash property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the LogoHash property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Organization.Name"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Name property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Name property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Organization.PowerUpData"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the PowerUps property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the PowerUps property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Organization.Preferences"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Preferences property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Preferences property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Organization.Url"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Url property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Url property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Indicates that <see cref="Organization.Website"/> should be fetched.
/// </summary>
=======
/// <summary>
/// Indicates the Website property should be populated.
/// </summary>
>>>>>>>
/// <summary>
/// Indicates the Website property should be populated.
/// </summary>
<<<<<<<
/// <summary>
/// Gets and sets the fields to fetch.
/// </summary>
=======
/// <summary>
/// Specifies which fields should be downloaded.
/// </summary>
>>>>>>>
/// <summary>
/// Specifies which fields should be downloaded.
/// </summary> |
<<<<<<<
return new StateInfo(stateRepresentation.UnderlyingState, ignoredTriggers,
stateRepresentation.EntryActions.Select(e => ActionInfo.Create(e)).ToList(),
stateRepresentation.ActivateActions.Select(e => e.Description).ToList(),
stateRepresentation.DeactivateActions.Select(e => e.Description).ToList(),
stateRepresentation.ExitActions.Select(e => e.Description).ToList());
=======
StateInfo stateInfo = new StateInfo(stateReperesentation.UnderlyingState, ignoredTriggers,
stateReperesentation.EntryActions.Select(e => e.Description).ToList(),
stateReperesentation.ActivateActions.Select(e => e.Description).ToList(),
stateReperesentation.DeactivateActions.Select(e => e.Description).ToList(),
stateReperesentation.ExitActions.Select(e => e.Description).ToList());
return stateInfo;
>>>>>>>
return new StateInfo(stateRepresentation.UnderlyingState, ignoredTriggers,
stateRepresentation.EntryActions.Select(e => ActionInfo.Create(e)).ToList(),
stateRepresentation.ActivateActions.Select(e => e.Description).ToList(),
stateRepresentation.DeactivateActions.Select(e => e.Description).ToList(),
stateRepresentation.ExitActions.Select(e => e.Description).ToList());
<<<<<<<
Enforce.ArgumentNotNull(lookupState, nameof(lookupState));
var substates = stateRepresentation.GetSubstates().Select(s => lookupState(s.UnderlyingState)).ToList();
=======
if (lookupState == null) throw new ArgumentNullException(nameof(lookupState));
var substates = stateReperesentation.GetSubstates().Select(s => lookupState(s.UnderlyingState)).ToList();
>>>>>>>
if (lookupState == null) throw new ArgumentNullException(nameof(lookupState));
var substates = stateRepresentation.GetSubstates().Select(s => lookupState(s.UnderlyingState)).ToList();
<<<<<<<
/// <summary>
/// Transitions defined for this state.
/// </summary>
=======
/// <summary>
/// Transitions defined for this state.
/// </summary>
>>>>>>>
/// <summary>
/// Transitions defined for this state.
/// </summary> |
<<<<<<<
[Test]
public void TestEmptyCollectionParsing()
{
string code = @"
class FooBar
{
Dictionary<byte, string> foo = new Dictionary<byte, string>{
{},
{}
};
}
";
var unit = SyntaxTree.Parse(code);
var type = unit.Members.First() as TypeDeclaration;
var member = type.Members.First() as FieldDeclaration;
var init = member.Variables.First().Initializer as ObjectCreateExpression;
Assert.AreEqual(2, init.Initializer.Elements.Count);
}
=======
[Test]
public void AsyncAfterEnum() {
string code = @"
using System.Threading.Tasks;
class C
{
enum E {}
async Task M() {
}
}";
var unit = SyntaxTree.Parse(code);
var type = unit.Members.OfType<TypeDeclaration>().Single();
var member = type.Members.OfType<MethodDeclaration>().SingleOrDefault(m => m.Name == "M");
Assert.IsNotNull(member, "M() not found.");
Assert.That(member.Modifiers, Is.EqualTo(Modifiers.Async));
}
>>>>>>>
[Test]
public void TestEmptyCollectionParsing()
{
string code = @"
class FooBar
{
Dictionary<byte, string> foo = new Dictionary<byte, string>{
{},
{}
};
}
";
var unit = SyntaxTree.Parse(code);
var type = unit.Members.First() as TypeDeclaration;
var member = type.Members.First() as FieldDeclaration;
var init = member.Variables.First().Initializer as ObjectCreateExpression;
Assert.AreEqual(2, init.Initializer.Elements.Count);
}
[Test]
public void AsyncAfterEnum() {
string code = @"
using System.Threading.Tasks;
class C
{
enum E {}
async Task M() {
}
}";
var unit = SyntaxTree.Parse(code);
var type = unit.Members.OfType<TypeDeclaration>().Single();
var member = type.Members.OfType<MethodDeclaration>().SingleOrDefault(m => m.Name == "M");
Assert.IsNotNull(member, "M() not found.");
Assert.That(member.Modifiers, Is.EqualTo(Modifiers.Async));
} |
<<<<<<<
[Test]
=======
[Test, Ignore("Explicit conversions with nullables are currently broken")]
public void UserDefinedExplicitConversion_Lifted() {
string program = @"using System;
struct Convertible {
public static explicit operator Convertible(int i) {return new Convertible(); }
}
class Test {
public void M(int? i) {
a = $(Convertible?)i$;
}
}";
var rr = Resolve<ConversionResolveResult>(program);
Assert.IsTrue(rr.Conversion.IsValid);
Assert.IsTrue(rr.Conversion.IsUserDefined);
Assert.IsTrue(rr.Conversion.IsLifted);
}
[Test]
public void UserDefinedExplicitConversionFollowedByImplicitNullableConversion() {
string program = @"using System;
struct Convertible {
public static explicit operator Convertible(int i) {return new Convertible(); }
}
class Test {
public void M(int i) {
a = $(Convertible?)i$;
}
}";
var rr = Resolve<ConversionResolveResult>(program);
Assert.IsTrue(rr.Conversion.IsValid);
Assert.IsTrue(rr.Conversion.IsUserDefined);
Assert.IsFalse(rr.Conversion.IsLifted);
}
[Test, Ignore("Explicit conversions with nullables are currently broken")]
public void UserDefinedExplicitConversion_ExplicitNullable_ThenUserDefined() {
string program = @"using System;
struct Convertible {
public static explicit operator Convertible(int i) {return new Convertible(); }
public static explicit operator Convertible?(int? ni) {return new Convertible(); }
}
class Test {
public void M(int? i) {
a = $(Convertible)i$;
}
}";
var rr = Resolve<ConversionResolveResult>(program);
Assert.IsTrue(rr.Conversion.IsValid);
Assert.IsTrue(rr.Conversion.IsUserDefined);
Assert.IsFalse(rr.Conversion.IsLifted);
Assert.AreEqual("i", rr.Conversion.Method.Parameters[0].Name);
}
[Test, Ignore("Explicit conversions with nullables are currently broken")]
>>>>>>>
[Test]
public void UserDefinedExplicitConversion_Lifted() {
string program = @"using System;
struct Convertible {
public static explicit operator Convertible(int i) {return new Convertible(); }
}
class Test {
public void M(int? i) {
a = $(Convertible?)i$;
}
}";
var rr = Resolve<ConversionResolveResult>(program);
Assert.IsTrue(rr.Conversion.IsValid);
Assert.IsTrue(rr.Conversion.IsUserDefined);
Assert.IsTrue(rr.Conversion.IsLifted);
}
[Test]
public void UserDefinedExplicitConversionFollowedByImplicitNullableConversion() {
string program = @"using System;
struct Convertible {
public static explicit operator Convertible(int i) {return new Convertible(); }
}
class Test {
public void M(int i) {
a = $(Convertible?)i$;
}
}";
var rr = Resolve<ConversionResolveResult>(program);
Assert.IsTrue(rr.Conversion.IsValid);
Assert.IsTrue(rr.Conversion.IsUserDefined);
Assert.IsFalse(rr.Conversion.IsLifted);
}
[Test]
public void UserDefinedExplicitConversion_ExplicitNullable_ThenUserDefined() {
string program = @"using System;
struct Convertible {
public static explicit operator Convertible(int i) {return new Convertible(); }
public static explicit operator Convertible?(int? ni) {return new Convertible(); }
}
class Test {
public void M(int? i) {
a = $(Convertible)i$;
}
}";
var rr = Resolve<ConversionResolveResult>(program);
Assert.IsTrue(rr.Conversion.IsValid);
Assert.IsTrue(rr.Conversion.IsUserDefined);
Assert.IsFalse(rr.Conversion.IsLifted);
Assert.AreEqual("i", rr.Conversion.Method.Parameters[0].Name);
}
[Test] |
<<<<<<<
if (varDecl == null)
return false;
var type = context.Resolve (varDecl.Variables.First ().Initializer).Type;
return !type.Equals (SpecialType.NullType) && !type.Equals (SpecialType.UnknownType);
=======
IType type;
if (varDecl != null) {
type = context.Resolve (varDecl.Variables.First ().Initializer).Type;
} else {
var foreachStatement = GetForeachStatement (context);
if (foreachStatement == null)
return false;
type = context.Resolve (foreachStatement.VariableType).Type;
}
return !type.Equals (SharedTypes.Null) && !type.Equals (SharedTypes.UnknownType);
>>>>>>>
IType type;
if (varDecl != null) {
type = context.Resolve (varDecl.Variables.First ().Initializer).Type;
} else {
var foreachStatement = GetForeachStatement (context);
if (foreachStatement == null)
return false;
type = context.Resolve (foreachStatement.VariableType).Type;
}
return !type.Equals (SpecialType.NullType) && !type.Equals (SpecialType.UnknownType); |
<<<<<<<
WriteKeyword ("__arglist");
=======
WriteKeyword("__arglist");
>>>>>>>
WriteKeyword ("__arglist");
<<<<<<<
StartNode (namedArgumentExpression);
WriteIdentifier (namedArgumentExpression.Identifier);
WriteToken (":", NamedArgumentExpression.Roles.Colon);
Space ();
namedArgumentExpression.Expression.AcceptVisitor (this, data);
return EndNode (namedArgumentExpression);
=======
StartNode(namedArgumentExpression);
WriteIdentifier(namedArgumentExpression.Identifier);
if (namedArgumentExpression.Parent is ArrayInitializerExpression) {
Space();
WriteToken("=", NamedArgumentExpression.Roles.Assign);
} else {
WriteToken(":", NamedArgumentExpression.Roles.Colon);
}
Space();
namedArgumentExpression.Expression.AcceptVisitor(this, data);
return EndNode(namedArgumentExpression);
>>>>>>>
StartNode (namedArgumentExpression);
WriteIdentifier (namedArgumentExpression.Identifier);
if (namedArgumentExpression.Parent is ArrayInitializerExpression) {
Space();
WriteToken("=", NamedArgumentExpression.Roles.Assign);
} else {
WriteToken(":", NamedArgumentExpression.Roles.Colon);
}
Space ();
namedArgumentExpression.Expression.AcceptVisitor (this, data);
return EndNode (namedArgumentExpression);
<<<<<<<
StartNode (objectCreateExpression);
WriteKeyword ("new");
objectCreateExpression.Type.AcceptVisitor (this, data);
Space (policy.SpaceBeforeMethodCallParentheses);
WriteCommaSeparatedListInParenthesis (objectCreateExpression.Arguments, policy.SpaceWithinMethodCallParentheses);
objectCreateExpression.Initializer.AcceptVisitor (this, data);
return EndNode (objectCreateExpression);
=======
StartNode(objectCreateExpression);
WriteKeyword("new");
objectCreateExpression.Type.AcceptVisitor(this, data);
bool useParenthesis = objectCreateExpression.Arguments.Any() || objectCreateExpression.Initializer.IsNull;
// also use parenthesis if there is an '(' token and this isn't an anonymous type
if (!objectCreateExpression.LParToken.IsNull && !objectCreateExpression.Type.IsNull)
useParenthesis = true;
if (useParenthesis) {
Space(policy.SpaceBeforeMethodCallParentheses);
WriteCommaSeparatedListInParenthesis(objectCreateExpression.Arguments, policy.SpaceWithinMethodCallParentheses);
}
objectCreateExpression.Initializer.AcceptVisitor(this, data);
return EndNode(objectCreateExpression);
>>>>>>>
StartNode (objectCreateExpression);
WriteKeyword ("new");
objectCreateExpression.Type.AcceptVisitor (this, data);
bool useParenthesis = objectCreateExpression.Arguments.Any() || objectCreateExpression.Initializer.IsNull;
// also use parenthesis if there is an '(' token and this isn't an anonymous type
if (!objectCreateExpression.LParToken.IsNull && !objectCreateExpression.Type.IsNull)
useParenthesis = true;
if (useParenthesis) {
Space (policy.SpaceBeforeMethodCallParentheses);
WriteCommaSeparatedListInParenthesis (objectCreateExpression.Arguments, policy.SpaceWithinMethodCallParentheses);
}
objectCreateExpression.Initializer.AcceptVisitor (this, data);
return EndNode (objectCreateExpression);
<<<<<<<
static string ConvertChar (char ch)
=======
/// <summary>
/// Gets the escape sequence for the specified character.
/// </summary>
/// <remarks>This method does not convert ' or ".</remarks>
public static string ConvertChar(char ch)
>>>>>>>
/// <summary>
/// Gets the escape sequence for the specified character.
/// </summary>
/// <remarks>This method does not convert ' or ".</remarks>
public static string ConvertChar(char ch)
<<<<<<<
StartNode (queryExpression);
=======
StartNode(queryExpression);
bool indent = !(queryExpression.Parent is QueryContinuationClause);
if (indent) {
formatter.Indent();
NewLine();
}
>>>>>>>
StartNode (queryExpression);
bool indent = !(queryExpression.Parent is QueryContinuationClause);
if (indent) {
formatter.Indent();
NewLine();
}
<<<<<<<
NewLine ();
}
clause.AcceptVisitor (this, data);
}
return EndNode (queryExpression);
}
public object VisitQueryContinuationClause (QueryContinuationClause queryContinuationClause, object data)
{
StartNode (queryContinuationClause);
queryContinuationClause.PrecedingQuery.AcceptVisitor (this, data);
Space ();
WriteKeyword ("into", QueryContinuationClause.IntoKeywordRole);
Space ();
WriteIdentifier (queryContinuationClause.Identifier);
return EndNode (queryContinuationClause);
}
public object VisitQueryFromClause (QueryFromClause queryFromClause, object data)
{
StartNode (queryFromClause);
WriteKeyword ("from", QueryFromClause.FromKeywordRole);
queryFromClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (queryFromClause.Identifier);
Space ();
WriteKeyword ("in", QueryFromClause.InKeywordRole);
Space ();
queryFromClause.Expression.AcceptVisitor (this, data);
return EndNode (queryFromClause);
}
public object VisitQueryLetClause (QueryLetClause queryLetClause, object data)
{
StartNode (queryLetClause);
WriteKeyword ("let");
Space ();
WriteIdentifier (queryLetClause.Identifier);
Space (policy.SpaceAroundAssignment);
WriteToken ("=", QueryLetClause.Roles.Assign);
Space (policy.SpaceAroundAssignment);
queryLetClause.Expression.AcceptVisitor (this, data);
return EndNode (queryLetClause);
}
public object VisitQueryWhereClause (QueryWhereClause queryWhereClause, object data)
{
StartNode (queryWhereClause);
WriteKeyword ("where");
Space ();
queryWhereClause.Condition.AcceptVisitor (this, data);
return EndNode (queryWhereClause);
}
public object VisitQueryJoinClause (QueryJoinClause queryJoinClause, object data)
{
StartNode (queryJoinClause);
WriteKeyword ("join", QueryJoinClause.JoinKeywordRole);
queryJoinClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (queryJoinClause.JoinIdentifier, QueryJoinClause.JoinIdentifierRole);
Space ();
WriteKeyword ("in", QueryJoinClause.InKeywordRole);
Space ();
queryJoinClause.InExpression.AcceptVisitor (this, data);
Space ();
WriteKeyword ("on", QueryJoinClause.OnKeywordRole);
Space ();
queryJoinClause.OnExpression.AcceptVisitor (this, data);
Space ();
WriteKeyword ("equals", QueryJoinClause.EqualsKeywordRole);
Space ();
queryJoinClause.EqualsExpression.AcceptVisitor (this, data);
=======
NewLine();
clause.AcceptVisitor(this, data);
}
if (indent)
formatter.Unindent();
return EndNode(queryExpression);
}
public object VisitQueryContinuationClause(QueryContinuationClause queryContinuationClause, object data)
{
StartNode(queryContinuationClause);
queryContinuationClause.PrecedingQuery.AcceptVisitor(this, data);
Space();
WriteKeyword("into", QueryContinuationClause.IntoKeywordRole);
Space();
WriteIdentifier(queryContinuationClause.Identifier);
return EndNode(queryContinuationClause);
}
public object VisitQueryFromClause(QueryFromClause queryFromClause, object data)
{
StartNode(queryFromClause);
WriteKeyword("from", QueryFromClause.FromKeywordRole);
queryFromClause.Type.AcceptVisitor(this, data);
Space();
WriteIdentifier(queryFromClause.Identifier);
Space();
WriteKeyword("in", QueryFromClause.InKeywordRole);
Space();
queryFromClause.Expression.AcceptVisitor(this, data);
return EndNode(queryFromClause);
}
public object VisitQueryLetClause(QueryLetClause queryLetClause, object data)
{
StartNode(queryLetClause);
WriteKeyword("let");
Space();
WriteIdentifier(queryLetClause.Identifier);
Space(policy.SpaceAroundAssignment);
WriteToken("=", QueryLetClause.Roles.Assign);
Space(policy.SpaceAroundAssignment);
queryLetClause.Expression.AcceptVisitor(this, data);
return EndNode(queryLetClause);
}
public object VisitQueryWhereClause(QueryWhereClause queryWhereClause, object data)
{
StartNode(queryWhereClause);
WriteKeyword("where");
Space();
queryWhereClause.Condition.AcceptVisitor(this, data);
return EndNode(queryWhereClause);
}
public object VisitQueryJoinClause(QueryJoinClause queryJoinClause, object data)
{
StartNode(queryJoinClause);
WriteKeyword("join", QueryJoinClause.JoinKeywordRole);
queryJoinClause.Type.AcceptVisitor(this, data);
Space();
WriteIdentifier(queryJoinClause.JoinIdentifier, QueryJoinClause.JoinIdentifierRole);
Space();
WriteKeyword("in", QueryJoinClause.InKeywordRole);
Space();
queryJoinClause.InExpression.AcceptVisitor(this, data);
Space();
WriteKeyword("on", QueryJoinClause.OnKeywordRole);
Space();
queryJoinClause.OnExpression.AcceptVisitor(this, data);
Space();
WriteKeyword("equals", QueryJoinClause.EqualsKeywordRole);
Space();
queryJoinClause.EqualsExpression.AcceptVisitor(this, data);
>>>>>>>
NewLine ();
}
clause.AcceptVisitor (this, data);
}
if (indent)
formatter.Unindent();
return EndNode (queryExpression);
}
public object VisitQueryContinuationClause (QueryContinuationClause queryContinuationClause, object data)
{
StartNode (queryContinuationClause);
queryContinuationClause.PrecedingQuery.AcceptVisitor (this, data);
Space ();
WriteKeyword ("into", QueryContinuationClause.IntoKeywordRole);
Space ();
WriteIdentifier (queryContinuationClause.Identifier);
return EndNode (queryContinuationClause);
}
public object VisitQueryFromClause (QueryFromClause queryFromClause, object data)
{
StartNode (queryFromClause);
WriteKeyword ("from", QueryFromClause.FromKeywordRole);
queryFromClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (queryFromClause.Identifier);
Space ();
WriteKeyword ("in", QueryFromClause.InKeywordRole);
Space ();
queryFromClause.Expression.AcceptVisitor (this, data);
return EndNode (queryFromClause);
}
public object VisitQueryLetClause (QueryLetClause queryLetClause, object data)
{
StartNode (queryLetClause);
WriteKeyword ("let");
Space ();
WriteIdentifier (queryLetClause.Identifier);
Space (policy.SpaceAroundAssignment);
WriteToken ("=", QueryLetClause.Roles.Assign);
Space (policy.SpaceAroundAssignment);
queryLetClause.Expression.AcceptVisitor (this, data);
return EndNode (queryLetClause);
}
public object VisitQueryWhereClause (QueryWhereClause queryWhereClause, object data)
{
StartNode (queryWhereClause);
WriteKeyword ("where");
Space ();
queryWhereClause.Condition.AcceptVisitor (this, data);
return EndNode (queryWhereClause);
}
public object VisitQueryJoinClause (QueryJoinClause queryJoinClause, object data)
{
StartNode (queryJoinClause);
WriteKeyword ("join", QueryJoinClause.JoinKeywordRole);
queryJoinClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (queryJoinClause.JoinIdentifier, QueryJoinClause.JoinIdentifierRole);
Space ();
WriteKeyword ("in", QueryJoinClause.InKeywordRole);
Space ();
queryJoinClause.InExpression.AcceptVisitor (this, data);
Space ();
WriteKeyword ("on", QueryJoinClause.OnKeywordRole);
Space ();
queryJoinClause.OnExpression.AcceptVisitor (this, data);
Space ();
WriteKeyword ("equals", QueryJoinClause.EqualsKeywordRole);
Space ();
queryJoinClause.EqualsExpression.AcceptVisitor (this, data);
<<<<<<<
StartNode (labelStatement);
WriteIdentifier (labelStatement.Label);
WriteToken (":", LabelStatement.Roles.Colon);
NewLine ();
return EndNode (labelStatement);
=======
StartNode(labelStatement);
WriteIdentifier(labelStatement.Label);
WriteToken(":", LabelStatement.Roles.Colon);
bool foundLabelledStatement = false;
for (AstNode tmp = labelStatement.NextSibling; tmp != null; tmp = tmp.NextSibling) {
if (tmp.Role == labelStatement.Role) {
foundLabelledStatement = true;
}
}
if (!foundLabelledStatement) {
// introduce an EmptyStatement so that the output becomes syntactically valid
WriteToken(";", LabelStatement.Roles.Semicolon);
}
NewLine();
return EndNode(labelStatement);
>>>>>>>
StartNode (labelStatement);
WriteIdentifier (labelStatement.Label);
WriteToken (":", LabelStatement.Roles.Colon);
bool foundLabelledStatement = false;
for (AstNode tmp = labelStatement.NextSibling; tmp != null; tmp = tmp.NextSibling) {
if (tmp.Role == labelStatement.Role) {
foundLabelledStatement = true;
}
}
if (!foundLabelledStatement) {
// introduce an EmptyStatement so that the output becomes syntactically valid
WriteToken(";", LabelStatement.Roles.Semicolon);
}
NewLine ();
return EndNode (labelStatement);
<<<<<<<
Space (policy.SpaceBeforeCatchParentheses);
LPar ();
Space (policy.SpacesWithinCatchParentheses);
catchClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (catchClause.VariableName);
Space (policy.SpacesWithinCatchParentheses);
RPar ();
=======
Space(policy.SpaceBeforeCatchParentheses);
LPar();
Space(policy.SpacesWithinCatchParentheses);
catchClause.Type.AcceptVisitor(this, data);
if (!string.IsNullOrEmpty(catchClause.VariableName)) {
Space();
WriteIdentifier(catchClause.VariableName);
}
Space(policy.SpacesWithinCatchParentheses);
RPar();
>>>>>>>
Space (policy.SpaceBeforeCatchParentheses);
LPar ();
Space (policy.SpacesWithinCatchParentheses);
catchClause.Type.AcceptVisitor (this, data);
if (!string.IsNullOrEmpty(catchClause.VariableName)) {
Space ();
WriteIdentifier (catchClause.VariableName);
}
Space (policy.SpacesWithinCatchParentheses);
RPar ();
<<<<<<<
formatter.WriteComment (comment.CommentType, comment.Content);
=======
formatter.StartNode(comment);
formatter.WriteComment(comment.CommentType, comment.Content);
formatter.EndNode(comment);
>>>>>>>
formatter.StartNode(comment);
formatter.WriteComment (comment.CommentType, comment.Content);
formatter.EndNode(comment); |
<<<<<<<
variable.AddChild ((Expression)em.Initializer.Accept (this), VariableInitializer.Roles.Expression);
=======
var initializer = (Expression)em.Initializer.Accept (this);
if (initializer != null)
newField.AddChild (initializer, EnumMemberDeclaration.InitializerRole);
>>>>>>>
newField.AddChild ((Expression)em.Initializer.Accept (this), EnumMemberDeclaration.InitializerRole); |
<<<<<<<
using System.Numerics;
using System.Text;
using System;
=======
using System;
>>>>>>>
using System.Numerics;
using System;
<<<<<<<
if ((canMap != null && !canMap(type, propertyInfo)))
{
continue;
}
=======
if (propertyInfo.GetCustomAttributes(typeof(IgnoreAttribute), true).Length > 0)
{
continue;
}
PropertyMap map = Map(propertyInfo);
>>>>>>>
if ((canMap != null && !canMap(type, propertyInfo)))
{
continue;
}
<<<<<<<
if (string.Equals(map.PropertyInfo.Name, "id", StringComparison.InvariantCultureIgnoreCase))
=======
if (map.PropertyInfo.PropertyType == typeof(int) ||
map.PropertyInfo.PropertyType == typeof(int?) ||
map.PropertyInfo.PropertyType == typeof(long) || // SQLite stores all integers as Int64, IDs must follow suit
map.PropertyInfo.PropertyType == typeof(long?))
{
map.Key(KeyType.Identity);
}
else if (map.PropertyInfo.PropertyType == typeof(Guid) || map.PropertyInfo.PropertyType == typeof(Guid?))
>>>>>>>
if (string.Equals(map.PropertyInfo.Name, "id", StringComparison.InvariantCultureIgnoreCase)) |
<<<<<<<
bool OnFocusSelectAll { get; }
=======
bool ReadOnly { get; }
>>>>>>>
bool ReadOnly { get; }
bool OnFocusSelectAll { get; } |
<<<<<<<
/// Looks up a localized string similar to Managing desktop integration.
/// </summary>
internal static string ActionAppCommand {
get {
return ResourceManager.GetString("ActionAppCommand", resourceCulture);
}
}
/// <summary>
=======
/// Looks up a localized string similar to Calculating digest.
/// </summary>
internal static string ActionDigest {
get {
return ResourceManager.GetString("ActionDigest", resourceCulture);
}
}
/// <summary>
>>>>>>>
/// Looks up a localized string similar to Managing desktop integration.
/// </summary>
internal static string ActionAppCommand {
get {
return ResourceManager.GetString("ActionAppCommand", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Calculating digest.
/// </summary>
internal static string ActionDigest {
get {
return ResourceManager.GetString("ActionDigest", resourceCulture);
}
}
/// <summary>
<<<<<<<
/// Looks up a localized string similar to Removes an existing alias..
/// </summary>
internal static string OptionAliasRemove {
get {
return ResourceManager.GetString("OptionAliasRemove", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Print the interface URI for the given alias..
/// </summary>
internal static string OptionAliasResolve {
get {
return ResourceManager.GetString("OptionAliasResolve", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Applies all {CATEGORY} access points..
/// </summary>
internal static string OptionAppAdd {
get {
return ResourceManager.GetString("OptionAppAdd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {CATEGORY} must be on of the following: .
/// </summary>
internal static string OptionAppCategory {
get {
return ResourceManager.GetString("OptionAppCategory", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Note: '{0}' are added implicitly if nothing else is specified..
/// </summary>
internal static string OptionAppImplicitCategory {
get {
return ResourceManager.GetString("OptionAppImplicitCategory", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Removes all {CATEGORY} access points..
/// </summary>
internal static string OptionAppRemove {
get {
return ResourceManager.GetString("OptionAppRemove", resourceCulture);
}
}
/// <summary>
=======
/// Looks up a localized string similar to The {HASH} algorithm to use for the digest..
/// </summary>
internal static string OptionAlgorithm {
get {
return ResourceManager.GetString("OptionAlgorithm", resourceCulture);
}
}
/// <summary>
>>>>>>>
/// Looks up a localized string similar to The {HASH} algorithm to use for the digest..
/// </summary>
internal static string OptionAlgorithm {
get {
return ResourceManager.GetString("OptionAlgorithm", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Removes an existing alias..
/// </summary>
internal static string OptionAliasRemove {
get {
return ResourceManager.GetString("OptionAliasRemove", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Print the interface URI for the given alias..
/// </summary>
internal static string OptionAliasResolve {
get {
return ResourceManager.GetString("OptionAliasResolve", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Applies all {CATEGORY} access points..
/// </summary>
internal static string OptionAppAdd {
get {
return ResourceManager.GetString("OptionAppAdd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {CATEGORY} must be on of the following: .
/// </summary>
internal static string OptionAppCategory {
get {
return ResourceManager.GetString("OptionAppCategory", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Note: '{0}' are added implicitly if nothing else is specified..
/// </summary>
internal static string OptionAppImplicitCategory {
get {
return ResourceManager.GetString("OptionAppImplicitCategory", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Removes all {CATEGORY} access points..
/// </summary>
internal static string OptionAppRemove {
get {
return ResourceManager.GetString("OptionAppRemove", resourceCulture);
}
}
/// <summary> |
<<<<<<<
/// <exception cref="ImplementationNotFoundException">Thrown if one of the <see cref="Model.Implementation"/>s is not cached yet.</exception>
/// <exception cref="CommandException">Thrown if there was a problem locating the implementation executable.</exception>
/// <exception cref="Win32Exception">Thrown if the main executable could not be launched.</exception>
private int LaunchImplementation()
=======
protected int LaunchImplementation()
>>>>>>>
/// <exception cref="ImplementationNotFoundException">Thrown if one of the <see cref="Model.Implementation"/>s is not cached yet.</exception>
/// <exception cref="CommandException">Thrown if there was a problem locating the implementation executable.</exception>
/// <exception cref="Win32Exception">Thrown if the main executable could not be launched.</exception>
protected int LaunchImplementation()
<<<<<<<
if (_noWait || process == null) return 0;
=======
if (NoWait) return 0;
>>>>>>>
if (NoWait || process == null) return 0; |
<<<<<<<
private readonly C5.LinkedList<CapabilityList> _capabilityLists = new C5.LinkedList<CapabilityList>();
/// <summary>
/// A set of <see cref="Capability"/> lists for different architectures.
/// </summary>
[Description("A set of Capability lists for different architectures.")]
[XmlElement("capabilities", Namespace = Capability.XmlNamespace)]
// Note: Can not use ICollection<T> interface with XML Serialization
public C5.LinkedList<CapabilityList> CapabilityLists { get { return _capabilityLists; } }
// Preserve order
=======
>>>>>>> |
<<<<<<<
using CRMCore.Mvc.Core.LocationExpander;
=======
using CRMCore.Mvc.Core.LocationExpander;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
>>>>>>>
using CRMCore.Mvc.Core.LocationExpander;
<<<<<<<
services.AddMvc()
.AddViewLocalization();
=======
// services.TryAddSingleton(new ApplicationPartManager());
services.AddMvc().AddViewLocalization();
>>>>>>>
services.AddMvc()
.AddViewLocalization();
<<<<<<<
=======
>>>>>>> |
<<<<<<<
using global::Catalog.API.IntegrationEvents;
=======
using System.Threading.Tasks;
>>>>>>>
using global::Catalog.API.IntegrationEvents;
using System.Threading.Tasks;
<<<<<<<
checks.AddSqlCheck("CatalogDb", Configuration["ConnectionString"]);
=======
checks.AddSqlCheck("Catalog_Db", Configuration["ConnectionString"]);
>>>>>>>
checks.AddSqlCheck("CatalogDb", Configuration["ConnectionString"]); |
<<<<<<<
WaitForSqlAvailabilityAsync(loggerFactory, app, env).Wait();
ConfigureEventBus(app);
=======
WaitForSqlAvailabilityAsync(loggerFactory, app).Wait();
>>>>>>>
WaitForSqlAvailabilityAsync(loggerFactory, app, env).Wait(); |
<<<<<<<
services.AddSingleton<IEventBus, EventBusRabbitMQ>();
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
services.AddTransient<UserCheckoutAcceptedIntegrationEventHandler>();
services.AddTransient<IIntegrationEventHandler<ConfirmGracePeriodCommandMsg>, OrderProcessSaga>();
services.AddTransient<OrderStockConfirmedIntegrationEventHandler>();
services.AddTransient<OrderStockNotConfirmedIntegrationEventHandler>();
=======
RegisterServiceBus(services);
>>>>>>>
RegisterServiceBus(services);
services.AddSingleton<IEventBus, EventBusRabbitMQ>();
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
services.AddTransient<UserCheckoutAcceptedIntegrationEventHandler>();
services.AddTransient<IIntegrationEventHandler<ConfirmGracePeriodCommandMsg>, OrderProcessSaga>();
services.AddTransient<OrderStockConfirmedIntegrationEventHandler>();
services.AddTransient<OrderStockNotConfirmedIntegrationEventHandler>();
<<<<<<<
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, UserCheckoutAcceptedIntegrationEventHandler>();
eventBus.Subscribe<ConfirmGracePeriodCommandMsg, IIntegrationEventHandler<ConfirmGracePeriodCommandMsg>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, OrderStockConfirmedIntegrationEventHandler>();
eventBus.Subscribe<OrderStockNotConfirmedIntegrationEvent, OrderStockNotConfirmedIntegrationEventHandler>();
=======
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, IIntegrationEventHandler<UserCheckoutAcceptedIntegrationEvent>>();
eventBus.Subscribe<ConfirmGracePeriodCommand, IIntegrationEventHandler<ConfirmGracePeriodCommand>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderStockNotConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockNotConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentFailedIntegrationEvent, IIntegrationEventHandler<OrderPaymentFailedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentSuccededIntegrationEvent, IIntegrationEventHandler<OrderPaymentSuccededIntegrationEvent>>();
>>>>>>>
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, IIntegrationEventHandler<UserCheckoutAcceptedIntegrationEvent>>();
eventBus.Subscribe<ConfirmGracePeriodCommand, IIntegrationEventHandler<ConfirmGracePeriodCommand>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderStockNotConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockNotConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentFailedIntegrationEvent, IIntegrationEventHandler<OrderPaymentFailedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentSuccededIntegrationEvent, IIntegrationEventHandler<OrderPaymentSuccededIntegrationEvent>>();
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, UserCheckoutAcceptedIntegrationEventHandler>();
eventBus.Subscribe<ConfirmGracePeriodCommandMsg, IIntegrationEventHandler<ConfirmGracePeriodCommandMsg>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, OrderStockConfirmedIntegrationEventHandler>();
eventBus.Subscribe<OrderStockNotConfirmedIntegrationEvent, OrderStockNotConfirmedIntegrationEventHandler>(); |
<<<<<<<
Task<IEnumerable<dynamic>> GetOrdersAsync(string userId);
Task<IEnumerable<dynamic>> GetCardTypesAsync();
Task<IEnumerable<dynamic>> GetOrderItems();
=======
Task<IEnumerable<CardType>> GetCardTypesAsync();
>>>>>>>
Task<IEnumerable<dynamic>> GetOrdersAsync(string userId);
Task<IEnumerable<CardType>> GetCardTypesAsync();
Task<IEnumerable<dynamic>> GetOrderItems(); |
<<<<<<<
=======
var catalogPriceHandler = serviceProvider.GetService<IIntegrationEventHandler<ProductPriceChangedIntegrationEvent>>();
eventBus.Subscribe<ProductPriceChangedIntegrationEvent>(catalogPriceHandler);
>>>>>>> |
<<<<<<<
private readonly Mock<IBuyerRepository> _buyerRepositoryMock;
private readonly Mock<IOrderRepository> _orderRepositoryMock;
=======
private readonly Mock<IOrderRepository<Order>> _orderRepositoryMock;
>>>>>>>
private readonly Mock<IOrderRepository> _orderRepositoryMock;
<<<<<<<
_buyerRepositoryMock = new Mock<IBuyerRepository>();
_orderRepositoryMock = new Mock<IOrderRepository>();
=======
_orderRepositoryMock = new Mock<IOrderRepository<Order>>();
>>>>>>>
_orderRepositoryMock = new Mock<IOrderRepository>(); |
<<<<<<<
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
=======
using MediatR;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
using Microsoft.Extensions.Logging;
using Ordering.API.Application.IntegrationEvents.Events;
using System;
>>>>>>>
using MediatR;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; |
<<<<<<<
services.AddSingleton<IEventBus, EventBusRabbitMQ>();
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
services.AddTransient<UserCheckoutAcceptedIntegrationEventHandler>();
services.AddTransient<IIntegrationEventHandler<ConfirmGracePeriodCommandMsg>, OrderProcessSaga>();
services.AddTransient<OrderStockConfirmedIntegrationEventHandler>();
services.AddTransient<OrderStockNotConfirmedIntegrationEventHandler>();
=======
RegisterServiceBus(services);
>>>>>>>
RegisterServiceBus(services);
services.AddSingleton<IEventBus, EventBusRabbitMQ>();
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
services.AddTransient<UserCheckoutAcceptedIntegrationEventHandler>();
services.AddTransient<IIntegrationEventHandler<ConfirmGracePeriodCommandMsg>, OrderProcessSaga>();
services.AddTransient<OrderStockConfirmedIntegrationEventHandler>();
services.AddTransient<OrderStockNotConfirmedIntegrationEventHandler>();
<<<<<<<
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, UserCheckoutAcceptedIntegrationEventHandler>();
eventBus.Subscribe<ConfirmGracePeriodCommandMsg, IIntegrationEventHandler<ConfirmGracePeriodCommandMsg>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, OrderStockConfirmedIntegrationEventHandler>();
eventBus.Subscribe<OrderStockNotConfirmedIntegrationEvent, OrderStockNotConfirmedIntegrationEventHandler>();
=======
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, IIntegrationEventHandler<UserCheckoutAcceptedIntegrationEvent>>();
eventBus.Subscribe<ConfirmGracePeriodCommand, IIntegrationEventHandler<ConfirmGracePeriodCommand>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderStockNotConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockNotConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentFailedIntegrationEvent, IIntegrationEventHandler<OrderPaymentFailedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentSuccededIntegrationEvent, IIntegrationEventHandler<OrderPaymentSuccededIntegrationEvent>>();
>>>>>>>
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, IIntegrationEventHandler<UserCheckoutAcceptedIntegrationEvent>>();
eventBus.Subscribe<ConfirmGracePeriodCommand, IIntegrationEventHandler<ConfirmGracePeriodCommand>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderStockNotConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockNotConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentFailedIntegrationEvent, IIntegrationEventHandler<OrderPaymentFailedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentSuccededIntegrationEvent, IIntegrationEventHandler<OrderPaymentSuccededIntegrationEvent>>();
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, UserCheckoutAcceptedIntegrationEventHandler>();
eventBus.Subscribe<ConfirmGracePeriodCommandMsg, IIntegrationEventHandler<ConfirmGracePeriodCommandMsg>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, OrderStockConfirmedIntegrationEventHandler>();
eventBus.Subscribe<OrderStockNotConfirmedIntegrationEvent, OrderStockNotConfirmedIntegrationEventHandler>(); |
<<<<<<<
public string LocationsUrl { get; set; }
public string ArtificialIntelligenceUrl { get; set; }
public string ProductRecommenderUrl { get; set; }
public string ProductSearchImageUrl
{
get
{
if (ProductSearchImageBased == null || string.IsNullOrEmpty(ProductSearchImageBased.Approach))
return string.Empty;
switch (ProductSearchImageBased.ModelApproach)
{
case ProductSearchImageBasedSchema.Approaches.CognitiveServices:
return ProductSearchImageBased.CognitiveUrl;
case ProductSearchImageBasedSchema.Approaches.TensorFlowCustom:
case ProductSearchImageBasedSchema.Approaches.TensorFlowPreTrained:
return ProductSearchImageBased.TensorFlowUrl;
default:
return ProductSearchImageBased.TensorFlowUrl;
}
}
}
=======
public string PurchaseUrl { get; set; }
>>>>>>>
public string ProductSearchImageUrl
{
get
{
if (ProductSearchImageBased == null || string.IsNullOrEmpty(ProductSearchImageBased.Approach))
return string.Empty;
switch (ProductSearchImageBased.ModelApproach)
{
case ProductSearchImageBasedSchema.Approaches.CognitiveServices:
return ProductSearchImageBased.CognitiveUrl;
case ProductSearchImageBasedSchema.Approaches.TensorFlowCustom:
case ProductSearchImageBasedSchema.Approaches.TensorFlowPreTrained:
return ProductSearchImageBased.TensorFlowUrl;
default:
return ProductSearchImageBased.TensorFlowUrl;
}
}
}
public string ArtificialIntelligenceUrl { get; set; }
public string PurchaseUrl { get; set; } |
<<<<<<<
using Ordering.API.Application.IntegrationEvents;
=======
>>>>>>>
using Ordering.API.Application.IntegrationEvents;
<<<<<<<
=======
using System;
>>>>>>>
using System;
<<<<<<<
=======
using Ordering.API.Application.IntegrationEvents;
>>>>>>>
using Ordering.API.Application.IntegrationEvents; |
<<<<<<<
public bool UseCustomizationData { get; set; }
=======
public string ActivateCampaignDetailFunction { get; set; }
>>>>>>>
public string ActivateCampaignDetailFunction { get; set; }
public bool UseCustomizationData { get; set; } |
<<<<<<<
public int GetOrderStatusId()
{
return _orderStatusId;
}
=======
#endregion
>>>>>>>
#endregion
public int GetOrderStatusId()
{
return _orderStatusId;
} |
<<<<<<<
new ApiResource("basket", "Basket Service"),
new ApiResource("marketing", "Marketing Service")
=======
new ApiResource("basket", "Basket Service"),
new ApiResource("locations", "Locations Service")
>>>>>>>
new ApiResource("basket", "Basket Service"),
new ApiResource("marketing", "Marketing Service"),
new ApiResource("locations", "Locations Service") |
<<<<<<<
return new DefaultRabbitMQPersistentConnection(factory, logger);
});
}
RegisterEventBus(services);
=======
RegisterServiceBus(services);
>>>>>>>
return new DefaultRabbitMQPersistentConnection(factory, logger);
});
}
RegisterEventBus(services);
<<<<<<<
ConfigureEventBus(app);
=======
}
private void RegisterServiceBus(IServiceCollection services)
{
services.AddSingleton<IEventBus, EventBusRabbitMQ>();
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
}
private void ConfigureEventBus(IApplicationBuilder app)
{
var eventBus = app.ApplicationServices.GetRequiredService<IEventBus>();
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, IIntegrationEventHandler<UserCheckoutAcceptedIntegrationEvent>>();
eventBus.Subscribe<GracePeriodConfirmedIntegrationEvent, IIntegrationEventHandler<GracePeriodConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderStockRejectedIntegrationEvent, IIntegrationEventHandler<OrderStockRejectedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentFailedIntegrationEvent, IIntegrationEventHandler<OrderPaymentFailedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentSuccededIntegrationEvent, IIntegrationEventHandler<OrderPaymentSuccededIntegrationEvent>>();
>>>>>>>
ConfigureEventBus(app);
}
private void ConfigureEventBus(IApplicationBuilder app)
{
var eventBus = app.ApplicationServices.GetRequiredService<IEventBus>();
eventBus.Subscribe<UserCheckoutAcceptedIntegrationEvent, IIntegrationEventHandler<UserCheckoutAcceptedIntegrationEvent>>();
eventBus.Subscribe<GracePeriodConfirmedIntegrationEvent, IIntegrationEventHandler<GracePeriodConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderStockConfirmedIntegrationEvent, IIntegrationEventHandler<OrderStockConfirmedIntegrationEvent>>();
eventBus.Subscribe<OrderStockRejectedIntegrationEvent, IIntegrationEventHandler<OrderStockRejectedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentFailedIntegrationEvent, IIntegrationEventHandler<OrderPaymentFailedIntegrationEvent>>();
eventBus.Subscribe<OrderPaymentSuccededIntegrationEvent, IIntegrationEventHandler<OrderPaymentSuccededIntegrationEvent>>();
<<<<<<<
private void RegisterEventBus(IServiceCollection services)
{
if (Configuration.GetValue<bool>("AzureServiceBusEnabled"))
{
services.AddSingleton<IEventBus, EventBusServiceBus>(sp =>
{
var serviceBusPersisterConnection = sp.GetRequiredService<IServiceBusPersisterConnection>();
var logger = sp.GetRequiredService<ILogger<EventBusServiceBus>>();
var eventBusSubcriptionsManager = sp.GetRequiredService<IEventBusSubscriptionsManager>();
var subscriptionClientName = Configuration["SubscriptionClientName"];
return new EventBusServiceBus(serviceBusPersisterConnection, logger,
eventBusSubcriptionsManager, subscriptionClientName);
});
}
else
{
services.AddSingleton<IEventBus, EventBusRabbitMQ>();
}
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
}
protected virtual void ConfigureEventBus(IApplicationBuilder app)
{
var eventBus = app.ApplicationServices.GetRequiredService<IEventBus>();
}
=======
private async Task WaitForSqlAvailabilityAsync(ILoggerFactory loggerFactory, IApplicationBuilder app, int retries = 0)
{
var logger = loggerFactory.CreateLogger(nameof(Startup));
var policy = CreatePolicy(retries, logger, nameof(WaitForSqlAvailabilityAsync));
await policy.ExecuteAsync(async () =>
{
await OrderingContextSeed.SeedAsync(app);
});
}
private Policy CreatePolicy(int retries, ILogger logger, string prefix)
{
return Policy.Handle<SqlException>().
WaitAndRetryAsync(
retryCount: retries,
sleepDurationProvider: retry => TimeSpan.FromSeconds(5),
onRetry: (exception, timeSpan, retry, ctx) =>
{
logger.LogTrace($"[{prefix}] Exception {exception.GetType().Name} with message ${exception.Message} detected on attempt {retry} of {retries}");
}
);
}
>>>>>>>
private void RegisterEventBus(IServiceCollection services)
{
if (Configuration.GetValue<bool>("AzureServiceBusEnabled"))
{
services.AddSingleton<IEventBus, EventBusServiceBus>(sp =>
{
var serviceBusPersisterConnection = sp.GetRequiredService<IServiceBusPersisterConnection>();
var logger = sp.GetRequiredService<ILogger<EventBusServiceBus>>();
var eventBusSubcriptionsManager = sp.GetRequiredService<IEventBusSubscriptionsManager>();
var subscriptionClientName = Configuration["SubscriptionClientName"];
return new EventBusServiceBus(serviceBusPersisterConnection, logger,
eventBusSubcriptionsManager, subscriptionClientName);
});
}
else
{
services.AddSingleton<IEventBus, EventBusRabbitMQ>();
}
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
}
private async Task WaitForSqlAvailabilityAsync(ILoggerFactory loggerFactory, IApplicationBuilder app, int retries = 0)
{
var logger = loggerFactory.CreateLogger(nameof(Startup));
var policy = CreatePolicy(retries, logger, nameof(WaitForSqlAvailabilityAsync));
await policy.ExecuteAsync(async () =>
{
await OrderingContextSeed.SeedAsync(app);
});
}
private Policy CreatePolicy(int retries, ILogger logger, string prefix)
{
return Policy.Handle<SqlException>().
WaitAndRetryAsync(
retryCount: retries,
sleepDurationProvider: retry => TimeSpan.FromSeconds(5),
onRetry: (exception, timeSpan, retry, ctx) =>
{
logger.LogTrace($"[{prefix}] Exception {exception.GetType().Name} with message ${exception.Message} detected on attempt {retry} of {retries}");
}
);
} |
<<<<<<<
Task<CustomerBasket> GetBasketAsync(string customerId);
Task<CustomerBasket> UpdateBasketAsync(CustomerBasket basket);
Task<bool> DeleteBasketAsync(string id);
=======
Task<CustomerBasket> GetBasket(string customerId);
Task<IEnumerable<string>> GetUsers();
Task<CustomerBasket> UpdateBasket(CustomerBasket basket);
Task<bool> DeleteBasket(string id);
>>>>>>>
Task<CustomerBasket> GetBasketAsync(string customerId);
Task<IEnumerable<string>> GetUsers();
Task<CustomerBasket> UpdateBasketAsync(CustomerBasket basket);
Task<bool> DeleteBasketAsync(string id); |
<<<<<<<
public void Destroy() {
_controller.gameObject.GetEntityLink().entity.isOutOfScreen = true;
_controller.gameObject.GetEntityLink().entity.flagDestroy = true;
=======
public void HandlePathComplete() {
var entity = _controller.gameObject.GetEntityLink().entity;
entity.isOutOfScreen = true;
>>>>>>>
public void HandlePathComplete() {
_controller.gameObject.GetEntityLink().entity.isOutOfScreen = true; |
<<<<<<<
[Fact]
public void Union_IssueOrPullRequest()
{
var expression = new Query()
.Repository("foo", "bar")
.IssueOrPullRequest(1)
.Select(x => x.Switch<object>(when =>
when.Issue(issue => new IssueModel
{
Number = issue.Number,
}).PullRequest(pr => new PullRequestModel
{
Title = pr.Title,
})));
var data = @"{
""data"": {
""repository"": {
""issueOrPullRequest"": {
""__typename"": ""Issue"",
""number"": 1
}
}
}
}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data);
Assert.IsType<IssueModel>(result);
Assert.Equal(1, ((IssueModel)result).Number);
}
[Fact]
public void Union_PullRequest_Timeline()
{
var expression = new Query()
.Repository("foo", "bar")
.PullRequest(1)
.Timeline(first: 100)
.Nodes
.Select(node => node.Switch<TimelineItemModel>(when =>
when.Commit(commit => new CommitModel
{
Oid = commit.AbbreviatedOid,
}).IssueComment(comment => new IssueCommentModel
{
Body = comment.Body,
})));
var data = @"{
""data"": {
""repository"": {
""pullRequest"": {
""timeline"": {
""nodes"": [
{
""__typename"": ""Commit"",
""oid"": ""2a1d6c7""
},
{
""__typename"": ""Commit"",
""oid"": ""cdac23a""
},
{
""__typename"": ""PullRequestReview"",
},
{
""__typename"": ""IssueComment"",
""body"": ""Hello World?""
},
]
}
}
}
}
}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data).ToList();
// TODO: Switch currently returns a null item for non-matching types.
Assert.Equal(4, result.Count);
Assert.IsType<CommitModel>(result[0]);
Assert.IsType<CommitModel>(result[1]);
Assert.Null(result[2]);
Assert.IsType<IssueCommentModel>(result[3]);
Assert.Equal("2a1d6c7", ((CommitModel)result[0]).Oid);
Assert.Equal("cdac23a", ((CommitModel)result[1]).Oid);
Assert.Equal("Hello World?", ((IssueCommentModel)result[3]).Body);
}
=======
[Fact]
public void Repository_Issue_SingleOrDefault_Returned_Null()
{
var expression = new Query()
.Repository("foo", "bar")
.Select(x => new
{
Value = x.Issue(1).Select(y => new
{
y.Title,
y.Number,
}).SingleOrDefault()
});
var data = @"{
""data"":{
""repository"": {
""value"": null
}
}
}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data);
Assert.Null(result.Value);
}
[Fact]
public void Should_Handle_Null_Repository_Parent_Using_SingleOrDefault()
{
var expression = new Query()
.Repository("octokit", "octokit.net")
.Select(repository => new
{
Name = repository.Name,
Parent = repository.Parent.Select(parent => new
{
parent.Name
}).SingleOrDefault()
});
var data = @"{""data"":{""repository"":{""name"":""octokit.net"",""parent"":null}}}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data);
Assert.Equal("octokit.net", result.Name);
Assert.Null(result.Parent);
}
[Fact]
public void Should_Handle_Null_Repository_ParentName_Using_SingleOrDefault()
{
var expression = new Query()
.Repository("octokit", "octokit.net")
.Select(repository => new
{
Name = repository.Name,
ParentName = repository.Parent.Select(parent => parent.Name).SingleOrDefault()
});
var data = @"{""data"":{""repository"":{""name"":""octokit.net"",""parentName"":null}}}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data);
Assert.Equal("octokit.net", result.Name);
Assert.Null(result.ParentName);
}
>>>>>>>
[Fact]
public void Repository_Issue_SingleOrDefault_Returned_Null()
{
var expression = new Query()
.Repository("foo", "bar")
.Select(x => new
{
Value = x.Issue(1).Select(y => new
{
y.Title,
y.Number,
}).SingleOrDefault()
});
var data = @"{
""data"":{
""repository"": {
""value"": null
}
}
}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data);
Assert.Null(result.Value);
}
[Fact]
public void Should_Handle_Null_Repository_Parent_Using_SingleOrDefault()
{
var expression = new Query()
.Repository("octokit", "octokit.net")
.Select(repository => new
{
Name = repository.Name,
Parent = repository.Parent.Select(parent => new
{
parent.Name
}).SingleOrDefault()
});
var data = @"{""data"":{""repository"":{""name"":""octokit.net"",""parent"":null}}}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data);
Assert.Equal("octokit.net", result.Name);
Assert.Null(result.Parent);
}
[Fact]
public void Should_Handle_Null_Repository_ParentName_Using_SingleOrDefault()
{
var expression = new Query()
.Repository("octokit", "octokit.net")
.Select(repository => new
{
Name = repository.Name,
ParentName = repository.Parent.Select(parent => parent.Name).SingleOrDefault()
});
var data = @"{""data"":{""repository"":{""name"":""octokit.net"",""parentName"":null}}}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data);
Assert.Equal("octokit.net", result.Name);
Assert.Null(result.ParentName);
}
[Fact]
public void Union_IssueOrPullRequest()
{
var expression = new Query()
.Repository("foo", "bar")
.IssueOrPullRequest(1)
.Select(x => x.Switch<object>(when =>
when.Issue(issue => new IssueModel
{
Number = issue.Number,
}).PullRequest(pr => new PullRequestModel
{
Title = pr.Title,
})));
var data = @"{
""data"": {
""repository"": {
""issueOrPullRequest"": {
""__typename"": ""Issue"",
""number"": 1
}
}
}
}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data);
Assert.IsType<IssueModel>(result);
Assert.Equal(1, ((IssueModel)result).Number);
}
[Fact]
public void Union_PullRequest_Timeline()
{
var expression = new Query()
.Repository("foo", "bar")
.PullRequest(1)
.Timeline(first: 100)
.Nodes
.Select(node => node.Switch<TimelineItemModel>(when =>
when.Commit(commit => new CommitModel
{
Oid = commit.AbbreviatedOid,
}).IssueComment(comment => new IssueCommentModel
{
Body = comment.Body,
})));
var data = @"{
""data"": {
""repository"": {
""pullRequest"": {
""timeline"": {
""nodes"": [
{
""__typename"": ""Commit"",
""oid"": ""2a1d6c7""
},
{
""__typename"": ""Commit"",
""oid"": ""cdac23a""
},
{
""__typename"": ""PullRequestReview"",
},
{
""__typename"": ""IssueComment"",
""body"": ""Hello World?""
},
]
}
}
}
}
}";
var foo = JObject.Parse(data);
var query = new QueryBuilder().Build(expression);
var result = query.Deserialize(data).ToList();
// TODO: Switch currently returns a null item for non-matching types.
Assert.Equal(4, result.Count);
Assert.IsType<CommitModel>(result[0]);
Assert.IsType<CommitModel>(result[1]);
Assert.Null(result[2]);
Assert.IsType<IssueCommentModel>(result[3]);
Assert.Equal("2a1d6c7", ((CommitModel)result[0]).Oid);
Assert.Equal("cdac23a", ((CommitModel)result[1]).Oid);
Assert.Equal("Hello World?", ((IssueCommentModel)result[3]).Body);
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.