conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.HandleTwoFactorException(exception).Returns(new TwoFactorChallengeResult("123456"));
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
tfa.Value.HandleTwoFactorException(exception).Returns(new TwoFactorChallengeResult("123456"));
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.Value.HandleTwoFactorException(exception).Returns(new TwoFactorChallengeResult("123456"));
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.HandleTwoFactorException(exception).Returns(
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
tfa.Value.HandleTwoFactorException(exception).Returns(
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.Value.HandleTwoFactorException(exception).Returns(
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.HandleTwoFactorException(twoFaException).Returns(
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
tfa.Value.HandleTwoFactorException(twoFaException).Returns(
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.Value.HandleTwoFactorException(twoFaException).Returns(
<<<<<<<
await tfa.Received(1).ChallengeFailed(loginAttemptsException);
=======
tfa.Value.Received(1).ChallengeFailed(loginAttemptsException);
>>>>>>>
await tfa.Value.Received(1).ChallengeFailed(loginAttemptsException);
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.HandleTwoFactorException(exception).Returns(
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
tfa.Value.HandleTwoFactorException(exception).Returns(
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.Value.HandleTwoFactorException(exception).Returns(
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
<<<<<<<
var tfa = Substitute.For<ITwoFactorChallengeHandler>();
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.HandleTwoFactorException(exception).Returns(new TwoFactorChallengeResult("123456"));
=======
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
tfa.Value.HandleTwoFactorException(exception).Returns(new TwoFactorChallengeResult("123456"));
>>>>>>>
var tfa = new Lazy<ITwoFactorChallengeHandler>(() => Substitute.For<ITwoFactorChallengeHandler>());
var oauthListener = Substitute.For<IOAuthCallbackListener>();
tfa.Value.HandleTwoFactorException(exception).Returns(new TwoFactorChallengeResult("123456")); |
<<<<<<<
using NullGuard;
=======
using NLog;
>>>>>>>
<<<<<<<
using System.Collections.ObjectModel;
using GitHub.Collections;
using GitHub.UI;
using GitHub.Extensions.Reactive;
using GitHub.Infrastructure;
using Serilog;
=======
>>>>>>>
using Serilog;
<<<<<<<
IObservable<Unit> OnCloneRepository(object state)
{
return Observable.Start(() =>
{
var repository = SelectedRepository;
log.Assert(repository != null, "Should not be able to attempt to clone a repo when it's null");
if (repository == null)
{
notificationService.ShowError(Resources.RepositoryCloneFailedNoSelectedRepo);
return Observable.Return(Unit.Default);
}
// The following is a noop if the directory already exists.
operatingSystem.Directory.CreateDirectory(BaseRepositoryPath);
return cloneService.CloneRepository(repository.CloneUrl, repository.Name, BaseRepositoryPath)
.ContinueAfter(() =>
{
usageTracker.IncrementCloneCount().Forget();
return Observable.Return(Unit.Default);
});
})
.SelectMany(_ => _)
.Catch<Unit, Exception>(e =>
{
var repository = SelectedRepository;
log.Assert(repository != null, "Should not be able to attempt to clone a repo when it's null");
notificationService.ShowError(e.GetUserFriendlyErrorMessage(ErrorType.ClonedFailed, repository.Name));
return Observable.Return(Unit.Default);
});
}
=======
>>>>>>>
<<<<<<<
log.Assert(path != null, "RepositoryCloneViewModel.IsAlreadyRepoAtPath cannot be passed null as a path parameter.");
=======
Guard.ArgumentNotNull(path, nameof(path));
>>>>>>>
Guard.ArgumentNotNull(path, nameof(path)); |
<<<<<<<
public const string InlineReviewsPackageId = "248325BE-4A2D-4111-B122-E7D59BF73A35";
=======
public const string TeamExplorerWelcomeMessage = "C529627F-8AA6-4FDB-82EB-4BFB7DB753C3";
>>>>>>>
public const string InlineReviewsPackageId = "248325BE-4A2D-4111-B122-E7D59BF73A35";
public const string TeamExplorerWelcomeMessage = "C529627F-8AA6-4FDB-82EB-4BFB7DB753C3"; |
<<<<<<<
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
=======
Copyright (C) 2003-2016 Dominik Reichl <[email protected]>
>>>>>>>
Copyright (C) 2003-2016 Dominik Reichl <[email protected]>
<<<<<<<
get { return GetLazyTime(ref m_tLastModLazy, ref m_tLastMod); }
set { m_tLastMod = value; m_tLastModLazy = null; }
}
public void SetLazyLastModificationTime(string xmlDateTime)
{
m_tLastModLazy = xmlDateTime;
=======
get { return m_tLastAccess; }
set { m_tLastAccess = value; }
>>>>>>>
get { return GetLazyTime(ref m_tLastAccessLazy, ref m_tLastAccess); }
set { m_tLastAccess = value; m_tLastAccessLazy = null; }
}
public void SetLazyLastAccessTime(string xmlDateTime)
{
m_tLastAccessLazy = xmlDateTime;
}
/// <summary>
/// The date/time when this entry was last modified.
/// </summary>
public DateTime LastModificationTime
{
get { return GetLazyTime(ref m_tLastModLazy, ref m_tLastMod); }
set { m_tLastMod = value; m_tLastModLazy = null; }
}
public void SetLazyLastModificationTime(string xmlDateTime)
{
m_tLastModLazy = xmlDateTime;
<<<<<<<
if(bOnlyIfNewer && (TimeUtil.Compare(peTemplate.LastModificationTime,LastModificationTime,true) < 0)) return;
=======
if(bOnlyIfNewer && (TimeUtil.Compare(peTemplate.m_tLastMod,
m_tLastMod, true) < 0))
return;
>>>>>>>
if(bOnlyIfNewer && (TimeUtil.Compare(peTemplate.LastModificationTime,LastModificationTime,true) < 0)) return;
<<<<<<<
private DateTime GetLazyTime(ref string lazyTime, ref DateTime dateTime)
{
if (lazyTime != null)
{
dateTime = TimeUtil.DeserializeUtcOrDefault(lazyTime, dateTime);
lazyTime = null;
}
return dateTime;
}
=======
public void SetCreatedNow()
{
DateTime dt = DateTime.Now;
m_tCreation = dt;
m_tLastAccess = dt;
}
public PwEntry Duplicate()
{
PwEntry pe = CloneDeep();
pe.SetUuid(new PwUuid(true), true);
pe.SetCreatedNow();
return pe;
}
>>>>>>>
private DateTime GetLazyTime(ref string lazyTime, ref DateTime dateTime)
{
if (lazyTime != null)
{
dateTime = TimeUtil.DeserializeUtcOrDefault(lazyTime, dateTime);
lazyTime = null;
}
return dateTime;
}
public void SetCreatedNow()
{
DateTime dt = DateTime.Now;
m_tCreation = dt;
m_tLastAccess = dt;
}
public PwEntry Duplicate()
{
PwEntry pe = CloneDeep();
pe.SetUuid(new PwUuid(true), true);
pe.SetCreatedNow();
return pe;
}
<<<<<<<
#if KeePassRT
return string.Compare(strA, strB, m_bCaseInsensitive ?
StringComparison.CurrentCultureIgnoreCase : StringComparison.CurrentCulture);
#else
=======
>>>>>>> |
<<<<<<<
string AvatarUrl { get; }
BitmapImage Avatar { get; }
=======
/// <summary>
/// Gets the type of check run, Status/Check.
/// </summary>
PullRequestCheckType CheckType { get; }
/// <summary>
/// Gets the id of the check run.
/// </summary>
int CheckRunId { get; }
/// <summary>
/// Gets a flag to show this check run has annotations.
/// </summary>
bool HasAnnotations { get; }
>>>>>>>
/// <summary>
/// Gets the type of check run, Status/Check.
/// </summary>
PullRequestCheckType CheckType { get; }
/// <summary>
/// Gets the id of the check run.
/// </summary>
int CheckRunId { get; }
/// <summary>
/// Gets a flag to show this check run has annotations.
/// </summary>
bool HasAnnotations { get; }
string AvatarUrl { get; }
BitmapImage Avatar { get; } |
<<<<<<<
IExportFactoryProvider SetupFactory(IServiceProvider provider)
{
var factory = provider.GetExportFactoryProvider();
factory.GetViewModel(GitHub.Exports.UIViewType.Login).Returns(new ExportLifetimeContext<IViewModel>(Substitute.For<IViewModel>(), () => { }));
factory.GetView(GitHub.Exports.UIViewType.Login).Returns(new ExportLifetimeContext<IView>(Substitute.For<IView, IViewFor<ILoginControlViewModel>, UserControl>(), () => { }));
factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor).Returns(new ExportLifetimeContext<IViewModel>(Substitute.For<IViewModel>(), () => { }));
factory.GetView(GitHub.Exports.UIViewType.TwoFactor).Returns(new ExportLifetimeContext<IView>(Substitute.For<IView, IViewFor<ITwoFactorDialogViewModel>, UserControl>(), () => { }));
factory.GetViewModel(GitHub.Exports.UIViewType.Clone).Returns(new ExportLifetimeContext<IViewModel>(Substitute.For<IViewModel>(), () => { }));
factory.GetView(GitHub.Exports.UIViewType.Clone).Returns(new ExportLifetimeContext<IView>(Substitute.For<IView, IViewFor<IRepositoryCloneViewModel>, UserControl>(), () => { }));
return factory;
}
[Fact]
=======
[STAFact]
>>>>>>>
IExportFactoryProvider SetupFactory(IServiceProvider provider)
{
var factory = provider.GetExportFactoryProvider();
factory.GetViewModel(GitHub.Exports.UIViewType.Login).Returns(new ExportLifetimeContext<IViewModel>(Substitute.For<IViewModel>(), () => { }));
factory.GetView(GitHub.Exports.UIViewType.Login).Returns(new ExportLifetimeContext<IView>(Substitute.For<IView, IViewFor<ILoginControlViewModel>, UserControl>(), () => { }));
factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor).Returns(new ExportLifetimeContext<IViewModel>(Substitute.For<IViewModel>(), () => { }));
factory.GetView(GitHub.Exports.UIViewType.TwoFactor).Returns(new ExportLifetimeContext<IView>(Substitute.For<IView, IViewFor<ITwoFactorDialogViewModel>, UserControl>(), () => { }));
factory.GetViewModel(GitHub.Exports.UIViewType.Clone).Returns(new ExportLifetimeContext<IViewModel>(Substitute.For<IViewModel>(), () => { }));
factory.GetView(GitHub.Exports.UIViewType.Clone).Returns(new ExportLifetimeContext<IView>(Substitute.For<IView, IViewFor<IRepositoryCloneViewModel>, UserControl>(), () => { }));
return factory;
}
[STAFact] |
<<<<<<<
public partial class RepositoryCreationControl : GenericRepositoryCreationControl
=======
[PartCreationPolicy(CreationPolicy.NonShared)]
public partial class RepositoryCreationControl : SimpleViewUserControl, IViewFor<IRepositoryCreationViewModel>, IView
>>>>>>>
[PartCreationPolicy(CreationPolicy.NonShared)]
public partial class RepositoryCreationControl : GenericRepositoryCreationControl |
<<<<<<<
=======
using GitHub.Logging;
using System.Threading.Tasks;
using ILoginCache = GitHub.Caches.ILoginCache;
>>>>>>>
<<<<<<<
public ApiClientFactory(IKeychain keychain, IProgram program, ILoggingConfiguration config)
=======
public ApiClientFactory(ILoginCache loginCache, IProgram program)
>>>>>>>
public ApiClientFactory(IKeychain keychain, IProgram program) |
<<<<<<<
var list = GetObjectsForFlow(activeFlow);
foreach (var i in list.Values)
i.ClearHandlers();
if (activeFlow == mainFlow)
{
uiProvider.RemoveService(typeof(IConnection));
completion?.OnNext(success);
completion?.OnCompleted();
transition.OnCompleted();
}
// if we're stopping the controller and the active flow wasn't the main one
// we need to stop the main flow
else if (stopping)
Fire(Trigger.Finish);
else
Fire(Trigger.Next);
=======
uiProvider.RemoveService(typeof(IConnection), this);
completion?.OnNext(success);
completion?.OnCompleted();
transition.OnCompleted();
>>>>>>>
var list = GetObjectsForFlow(activeFlow);
foreach (var i in list.Values)
i.ClearHandlers();
if (activeFlow == mainFlow)
{
uiProvider.RemoveService(typeof(IConnection), this);
completion?.OnNext(success);
completion?.OnCompleted();
transition.OnCompleted();
}
// if we're stopping the controller and the active flow wasn't the main one
// we need to stop the main flow
else if (stopping)
Fire(Trigger.Finish);
else
Fire(Trigger.Next);
<<<<<<<
if (mainFlow != UIControllerFlow.Authentication)
uiProvider.AddService(connection);
=======
if (currentFlow != UIControllerFlow.Authentication)
uiProvider.AddService(this, connection);
>>>>>>>
if (mainFlow != UIControllerFlow.Authentication)
uiProvider.AddService(this, connection);
<<<<<<<
{
connection = c;
uiProvider.AddService(c);
}
=======
uiProvider.AddService(this, c);
>>>>>>>
{
connection = c;
uiProvider.AddService(this, c);
}
<<<<<<<
{
connection = e.NewItems[0] as IConnection;
uiProvider.AddService(typeof(IConnection), connection);
}
=======
uiProvider.AddService(typeof(IConnection), this, e.NewItems[0]);
>>>>>>>
{
connection = e.NewItems[0] as IConnection;
if (connection != null)
uiProvider.AddService(typeof(IConnection), this, connection);
} |
<<<<<<<
// You do not need to add suppressions to this file manually.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "GitHub.ViewModels.CreateRepoViewModel.#ResetState()")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.Resources.resources")]
[assembly: SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Scope = "member", Target = "GitHub.Caches.CredentialCache.#InsertObject`1(System.String,!!0,System.Nullable`1<System.DateTimeOffset>)")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.App.Resources.resources")]
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String)")]
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String,System.Text.Encoding)")]
[assembly: SuppressMessage("Design", "CA1056:Uri properties should not be strings")]
[assembly: SuppressMessage("Design", "CA1054:Uri parameters should not be strings")]
=======
// You do not need to add suppressions to this file manually.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "GitHub.ViewModels.CreateRepoViewModel.#ResetState()")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.Resources.resources")]
[assembly: SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Scope = "member", Target = "GitHub.Caches.CredentialCache.#InsertObject`1(System.String,!!0,System.Nullable`1<System.DateTimeOffset>)")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.App.Resources.resources")]
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String)")]
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String,System.Text.Encoding)")]
[assembly: SuppressMessage("Reliability", "CA2007:Do not directly await a Task", Justification = "Discouraged for VSSDK projects.")]
>>>>>>>
// You do not need to add suppressions to this file manually.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "GitHub.ViewModels.CreateRepoViewModel.#ResetState()")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.Resources.resources")]
[assembly: SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Scope = "member", Target = "GitHub.Caches.CredentialCache.#InsertObject`1(System.String,!!0,System.Nullable`1<System.DateTimeOffset>)")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.App.Resources.resources")]
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String)")]
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String,System.Text.Encoding)")]
[assembly: SuppressMessage("Design", "CA1056:Uri properties should not be strings")]
[assembly: SuppressMessage("Design", "CA1054:Uri parameters should not be strings")]
[assembly: SuppressMessage("Reliability", "CA2007:Do not directly await a Task", Justification = "Discouraged for VSSDK projects.")] |
<<<<<<<
using GitHub.Extensions;
=======
using GitHub.Primitives;
>>>>>>>
using GitHub.Extensions;
using GitHub.Primitives;
<<<<<<<
public static Uri GetUriFromRepository(this Repository repo)
=======
public static UriString GetUri(this Repository repo)
>>>>>>>
public static Uri GetUriFromRepository(Repository repo) |
<<<<<<<
if (!customIconId.EqualsValue(PwUuid.Zero)) {
return getIconDrawable (res, db, customIconId);
} else {
return getIconDrawable (res, icon);
=======
if (customIconId != PwUuid.Zero) {
return GetIconDrawable (res, db, customIconId);
>>>>>>>
if (!customIconId.EqualsValue(PwUuid.Zero)) {
return GetIconDrawable (res, db, customIconId);
<<<<<<<
private static void initBlank (Resources res)
=======
private static void InitBlank (Resources res)
>>>>>>>
private static void InitBlank (Resources res)
<<<<<<<
initBlank (res);
if (icon.EqualsValue(PwUuid.Zero)) {
return blank;
=======
InitBlank (res);
if (icon == PwUuid.Zero) {
return _blank;
>>>>>>>
InitBlank (res);
if (icon.EqualsValue(PwUuid.Zero)) {
return _blank; |
<<<<<<<
async Task<string> GetFileFromRepositoryOrApi(
ILocalRepositoryModel repository,
IRepository repo,
IModelService modelService,
string commitSha,
string fileName,
string fileSha)
{
return await gitClient.ExtractFile(repo, commitSha, fileName) ??
await modelService.GetFileContents(repository, commitSha, fileName, fileSha);
}
public IObservable<Unit> RemoteUnusedRemotes(ILocalRepositoryModel repository)
=======
public IObservable<Unit> RemoveUnusedRemotes(ILocalRepositoryModel repository)
>>>>>>>
async Task<string> GetFileFromRepositoryOrApi(
ILocalRepositoryModel repository,
IRepository repo,
IModelService modelService,
string commitSha,
string fileName,
string fileSha)
{
return await gitClient.ExtractFile(repo, commitSha, fileName) ??
await modelService.GetFileContents(repository, commitSha, fileName, fileSha);
}
public IObservable<Unit> RemoveUnusedRemotes(ILocalRepositoryModel repository) |
<<<<<<<
public Guid Guid { get; set; }
public DateTimeOffset Date { get; set; }
=======
public Guid Guid { get; set; }
public bool IsGitHubUser { get; set; }
public bool IsEnterpriseUser { get; set; }
>>>>>>>
public Guid Guid { get; set; }
public DateTimeOffset Date { get; set; }
public bool IsGitHubUser { get; set; }
public bool IsEnterpriseUser { get; set; } |
<<<<<<<
using System.Reactive.Subjects;
using GitHub.Primitives;
using System.Collections.Specialized;
using System.ComponentModel;
=======
using System.Collections.ObjectModel;
>>>>>>>
using System.Reactive.Subjects;
using GitHub.Primitives;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Collections.ObjectModel;
<<<<<<<
[Fact]
public void PullRequestFlowWhenLoggedOut()
{
var provider = Substitutes.GetFullyMockedServiceProvider();
var hosts = provider.GetRepositoryHosts();
var factory = SetupFactory(provider);
var cm = provider.GetConnectionManager();
var cons = new System.Collections.ObjectModel.ObservableCollection<IConnection>();
cm.Connections.Returns(cons);
using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
{
var count = 0;
var list = new List<IView>();
var flow = uiController.SelectFlow(UIControllerFlow.PullRequests);
flow.Subscribe(uc =>
{
switch (++count)
{
case 1:
Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
vm.Value.IsShowing.Returns(true);
RaisePropertyChange(vm.Value, "IsShowing");
break;
case 2:
Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
var con = Substitutes.Connection;
var host = Substitute.For<IRepositoryHost>();
host.IsLoggedIn.Returns(true);
con.HostAddress.Returns(HostAddress.GitHubDotComHostAddress);
hosts.LookupHost(Args.HostAddress).Returns(host);
cons.Add(con);
var v = factory.GetView(GitHub.Exports.UIViewType.Login).Value;
((ReplaySubject<object>)v.Done).OnNext(null);
break;
case 3:
Assert.IsAssignableFrom<IViewFor<IPullRequestListViewModel>>(uc);
((ReplaySubject<object>)(uc as IHasDetailView).Open).OnNext(null);
break;
case 4:
Assert.IsAssignableFrom<IViewFor<IPullRequestDetailViewModel>>(uc);
((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
break;
case 5:
Assert.IsAssignableFrom<IViewFor<IPullRequestListViewModel>>(uc);
((ReplaySubject<object>)(uc as IHasCreationView).Create).OnNext(null);
break;
case 6:
Assert.IsAssignableFrom<IViewFor<IPullRequestCreationViewModel>>(uc);
uiController.Stop();
break;
}
});
uiController.Start(null);
Assert.Equal(6, count);
Assert.True(uiController.IsStopped);
}
}
[Fact]
public void GoingBackAndForthOnTheLoginFlow()
{
var provider = Substitutes.GetFullyMockedServiceProvider();
var hosts = provider.GetRepositoryHosts();
var factory = SetupFactory(provider);
var cm = provider.GetConnectionManager();
var cons = new System.Collections.ObjectModel.ObservableCollection<IConnection>();
cm.Connections.Returns(cons);
using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
{
var count = 0;
var list = new List<IView>();
var flow = uiController.SelectFlow(UIControllerFlow.PullRequests);
flow.Subscribe(uc =>
{
switch (++count)
{
case 1:
{
Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
vm.Value.IsShowing.Returns(true);
RaisePropertyChange(vm.Value, "IsShowing");
}
break;
case 2:
{
Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
vm.Value.IsShowing.Returns(false);
RaisePropertyChange(vm.Value, "IsShowing");
((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
}
break;
case 3:
{
Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
vm.Value.IsShowing.Returns(true);
RaisePropertyChange(vm.Value, "IsShowing");
}
break;
case 4:
{
Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
uiController.Stop();
}
break;
}
});
uiController.Start(null);
Assert.Equal(4, count);
Assert.True(uiController.IsStopped);
}
}
=======
[STAFact]
public void CloneDialogLoggedInWithoutConnection()
{
var provider = Substitutes.GetFullyMockedServiceProvider();
var hosts = provider.GetRepositoryHosts();
var factory = SetupFactory(provider);
var connection = provider.GetConnection();
connection.Login().Returns(Observable.Return(connection));
var cm = provider.GetConnectionManager();
cm.Connections.Returns(new ObservableCollection<IConnection> { connection });
var host = hosts.GitHubHost;
hosts.LookupHost(connection.HostAddress).Returns(host);
host.IsLoggedIn.Returns(true);
using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm, LazySubstitute.For<ITwoFactorChallengeHandler>()))
{
var list = new List<IView>();
uiController.SelectFlow(UIControllerFlow.Clone)
.Subscribe(uc => list.Add(uc as IView),
() =>
{
Assert.Equal(1, list.Count);
Assert.IsAssignableFrom<IViewFor<IRepositoryCloneViewModel>>(list[0]);
((IUIProvider)provider).Received().AddService(connection);
});
uiController.Start(null);
}
}
>>>>>>>
[Fact]
public void PullRequestFlowWhenLoggedOut()
{
var provider = Substitutes.GetFullyMockedServiceProvider();
var hosts = provider.GetRepositoryHosts();
var factory = SetupFactory(provider);
var cm = provider.GetConnectionManager();
var cons = new System.Collections.ObjectModel.ObservableCollection<IConnection>();
cm.Connections.Returns(cons);
using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
{
var count = 0;
var list = new List<IView>();
var flow = uiController.SelectFlow(UIControllerFlow.PullRequests);
flow.Subscribe(uc =>
{
switch (++count)
{
case 1:
Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
vm.Value.IsShowing.Returns(true);
RaisePropertyChange(vm.Value, "IsShowing");
break;
case 2:
Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
var con = Substitutes.Connection;
var host = Substitute.For<IRepositoryHost>();
host.IsLoggedIn.Returns(true);
con.HostAddress.Returns(HostAddress.GitHubDotComHostAddress);
hosts.LookupHost(Args.HostAddress).Returns(host);
cons.Add(con);
var v = factory.GetView(GitHub.Exports.UIViewType.Login).Value;
((ReplaySubject<object>)v.Done).OnNext(null);
break;
case 3:
Assert.IsAssignableFrom<IViewFor<IPullRequestListViewModel>>(uc);
((ReplaySubject<object>)(uc as IHasDetailView).Open).OnNext(null);
break;
case 4:
Assert.IsAssignableFrom<IViewFor<IPullRequestDetailViewModel>>(uc);
((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
break;
case 5:
Assert.IsAssignableFrom<IViewFor<IPullRequestListViewModel>>(uc);
((ReplaySubject<object>)(uc as IHasCreationView).Create).OnNext(null);
break;
case 6:
Assert.IsAssignableFrom<IViewFor<IPullRequestCreationViewModel>>(uc);
uiController.Stop();
break;
}
});
uiController.Start(null);
Assert.Equal(6, count);
Assert.True(uiController.IsStopped);
}
}
[Fact]
public void CloneDialogLoggedInWithoutConnection()
{
var provider = Substitutes.GetFullyMockedServiceProvider();
var hosts = provider.GetRepositoryHosts();
var factory = SetupFactory(provider);
var connection = provider.GetConnection();
connection.Login().Returns(Observable.Return(connection));
var cm = provider.GetConnectionManager();
cm.Connections.Returns(new ObservableCollection<IConnection> { connection });
var host = hosts.GitHubHost;
hosts.LookupHost(connection.HostAddress).Returns(host);
host.IsLoggedIn.Returns(true);
using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm, LazySubstitute.For<ITwoFactorChallengeHandler>()))
{
var list = new List<IView>();
uiController.SelectFlow(UIControllerFlow.Clone)
.Subscribe(uc => list.Add(uc as IView),
() =>
{
Assert.Equal(1, list.Count);
Assert.IsAssignableFrom<IViewFor<IRepositoryCloneViewModel>>(list[0]);
((IUIProvider)provider).Received().AddService(connection);
});
uiController.Start(null);
}
}
[Fact]
public void GoingBackAndForthOnTheLoginFlow()
{
var provider = Substitutes.GetFullyMockedServiceProvider();
var hosts = provider.GetRepositoryHosts();
var factory = SetupFactory(provider);
var cm = provider.GetConnectionManager();
var cons = new System.Collections.ObjectModel.ObservableCollection<IConnection>();
cm.Connections.Returns(cons);
using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
{
var count = 0;
var list = new List<IView>();
var flow = uiController.SelectFlow(UIControllerFlow.PullRequests);
flow.Subscribe(uc =>
{
switch (++count)
{
case 1:
{
Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
vm.Value.IsShowing.Returns(true);
RaisePropertyChange(vm.Value, "IsShowing");
}
break;
case 2:
{
Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
vm.Value.IsShowing.Returns(false);
RaisePropertyChange(vm.Value, "IsShowing");
((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
}
break;
case 3:
{
Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
vm.Value.IsShowing.Returns(true);
RaisePropertyChange(vm.Value, "IsShowing");
}
break;
case 4:
{
Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
uiController.Stop();
}
break;
}
});
uiController.Start(null);
Assert.Equal(4, count);
Assert.True(uiController.IsStopped);
}
} |
<<<<<<<
var provider = Substitutes.ServiceProvider;
var gitservice = provider.GetGitService();
var repo = Substitute.For<IRepository>();
var path = Directory.CreateSubdirectory("repo-name");
gitservice.GetUri(path.FullName).Returns((UriString)null);
var model = new LocalRepositoryModel(path.FullName);
Assert.Equal("repo-name", model.Name);
=======
using (var temp = new TempDirectory())
{
var provider = Substitutes.ServiceProvider;
var gitservice = provider.GetGitService();
var repo = Substitute.For<IRepository>();
var path = temp.Directory.CreateSubdirectory("repo-name");
gitservice.GetUri(path.FullName).Returns((UriString)null);
var model = new SimpleRepositoryModel(path.FullName);
Assert.Equal("repo-name", model.Name);
}
>>>>>>>
using (var temp = new TempDirectory())
{
var provider = Substitutes.ServiceProvider;
var gitservice = provider.GetGitService();
var repo = Substitute.For<IRepository>();
var path = temp.Directory.CreateSubdirectory("repo-name");
gitservice.GetUri(path.FullName).Returns((UriString)null);
var model = new LocalRepositoryModel(path.FullName);
Assert.Equal("repo-name", model.Name);
}
<<<<<<<
var provider = Substitutes.ServiceProvider;
var gitservice = provider.GetGitService();
var repo = Substitute.For<IRepository>();
var path = Directory.CreateSubdirectory("repo-name");
gitservice.GetUri(path.FullName).Returns(new UriString("https://github.com/user/repo-name"));
var model = new LocalRepositoryModel(path.FullName);
Assert.Equal("repo-name", model.Name);
Assert.Equal("user", model.Owner);
=======
using (var temp = new TempDirectory())
{
var provider = Substitutes.ServiceProvider;
var gitservice = provider.GetGitService();
var repo = Substitute.For<IRepository>();
var path = temp.Directory.CreateSubdirectory("repo-name");
gitservice.GetUri(path.FullName).Returns(new UriString("https://github.com/user/repo-name"));
var model = new SimpleRepositoryModel(path.FullName);
Assert.Equal("repo-name", model.Name);
Assert.Equal("user", model.Owner);
}
>>>>>>>
using (var temp = new TempDirectory())
{
var provider = Substitutes.ServiceProvider;
var gitservice = provider.GetGitService();
var repo = Substitute.For<IRepository>();
var path = temp.Directory.CreateSubdirectory("repo-name");
gitservice.GetUri(path.FullName).Returns(new UriString("https://github.com/user/repo-name"));
var model = new LocalRepositoryModel(path.FullName);
Assert.Equal("repo-name", model.Name);
Assert.Equal("user", model.Owner);
} |
<<<<<<<
using GitHub.InlineReviews.Commands;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.VisualStudio.TextManager.Interop;
using System.Text;
=======
>>>>>>>
using Microsoft.VisualStudio.TextManager.Interop;
using System.Text;
<<<<<<<
var rightFile = workingDirectory ? ViewModel.GetLocalFilePath(file) : await ViewModel.ExtractFile(file, true, Encoding.UTF8);
var encoding = ViewModel.GetEncoding(rightFile);
var leftFile = await ViewModel.ExtractFile(file, false, encoding);
var fullPath = System.IO.Path.Combine(ViewModel.Repository.LocalPath, relativePath);
=======
var fullPath = System.IO.Path.Combine(ViewModel.LocalRepository.LocalPath, relativePath);
>>>>>>>
var rightFile = workingDirectory ? ViewModel.GetLocalFilePath(file) : await ViewModel.ExtractFile(file, true, Encoding.UTF8);
var encoding = ViewModel.GetEncoding(rightFile);
var leftFile = await ViewModel.ExtractFile(file, false, encoding);
var fullPath = System.IO.Path.Combine(ViewModel.LocalRepository.LocalPath, relativePath); |
<<<<<<<
using System;
using System.Collections.Generic;
=======
using System.Collections.Generic;
using System.Globalization;
>>>>>>>
using System;
using System.Collections.Generic;
using System.Globalization; |
<<<<<<<
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
=======
>>>>>>>
using System.IO;
<<<<<<<
using GitHub.Info;
using GitHub.Infrastructure;
=======
using System.Threading.Tasks;
using System.Windows;
using GitHub.Extensions;
using GitHub.Helpers;
>>>>>>>
using System.Threading.Tasks;
using GitHub.Extensions;
using GitHub.Helpers;
<<<<<<<
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.VisualStudio.Shell;
=======
using NLog;
>>>>>>>
<<<<<<<
using Serilog;
using Task = System.Threading.Tasks.Task;
=======
using ReactiveUI;
using GitHub.App.Factories;
using GitHub.Exports;
using GitHub.Controllers;
>>>>>>>
using Serilog;
using ReactiveUI;
using GitHub.App.Factories;
using GitHub.Exports;
using GitHub.Controllers;
<<<<<<<
class OwnedComposablePart
{
public object Owner { get; set; }
public ComposablePart Part { get; set; }
}
static readonly ILogger log = LogManager.ForContext<GitHubServiceProvider>();
CompositeDisposable disposables = new CompositeDisposable();
readonly IServiceProvider serviceProvider;
readonly Dictionary<string, OwnedComposablePart> tempParts;
ExportLifetimeContext<IUIController> currentUIFlow;
readonly Version currentVersion;
=======
static readonly Logger log = LogManager.GetCurrentClassLogger();
>>>>>>>
static readonly ILogger log = LogManager.ForContext<GitHubServiceProvider>();
<<<<<<<
tempParts = new Dictionary<string, OwnedComposablePart>();
}
public async Task Initialize()
{
var asyncProvider = serviceProvider as IAsyncServiceProvider;
IComponentModel componentModel = null;
if (asyncProvider != null)
{
componentModel = await asyncProvider.GetServiceAsync(typeof(SComponentModel)) as IComponentModel;
}
else
{
componentModel = serviceProvider?.GetService(typeof(SComponentModel)) as IComponentModel;
}
Debug.Assert(componentModel != null, "Service of type SComponentModel not found");
if (componentModel == null)
{
log.Error("Service of type SComponentModel not found");
return;
}
ExportProvider = componentModel.DefaultExportProvider;
if (ExportProvider == null)
{
log.Error("DefaultExportProvider could not be obtained.");
}
}
[return: AllowNull]
public object TryGetService(Type serviceType)
{
string contract = AttributedModelServices.GetContractName(serviceType);
var instance = AddToDisposables(TempContainer.GetExportedValueOrDefault<object>(contract));
if (instance != null)
return instance;
instance = AddToDisposables(ExportProvider.GetExportedValues<object>(contract).FirstOrDefault(x => contract.StartsWith("github.", StringComparison.OrdinalIgnoreCase) ? x.GetType().Assembly.GetName().Version == currentVersion : true));
if (instance != null)
return instance;
instance = serviceProvider.GetService(serviceType);
if (instance != null)
return instance;
instance = GitServiceProvider?.GetService(serviceType);
if (instance != null)
return instance;
return null;
=======
>>>>>>>
<<<<<<<
public IObservable<bool> ListenToCompletionState()
{
var ui = currentUIFlow?.Value;
if (ui == null)
{
log.Error("UIProvider:ListenToCompletionState:Cannot call ListenToCompletionState without calling SetupUI first");
#if DEBUG
throw new InvalidOperationException("Cannot call ListenToCompletionState without calling SetupUI first");
#endif
}
return ui?.ListenToCompletionState() ?? Observable.Return(false);
}
public void RunUI()
{
Debug.Assert(windowController != null, "WindowController is null, did you forget to call SetupUI?");
if (windowController == null)
{
log.Error("WindowController is null, cannot run UI.");
return;
}
try
{
windowController.ShowModal();
}
catch (Exception ex)
{
log.Error(ex, "WindowController ShowModal failed.");
}
=======
controller.Start();
windowController.ShowModal();
windowController = null;
>>>>>>>
controller.Start();
windowController.ShowModal();
windowController = null;
<<<<<<<
windowController.ShowModal();
}
catch (Exception ex)
{
log.Error(ex, "WindowController ShowModal failed for {controllerFlow}.", controllerFlow);
}
}
public void StopUI()
{
StopUI(currentUIFlow);
currentUIFlow = null;
}
static void StopUI(ExportLifetimeContext<IUIController> disposable)
{
try {
if (disposable != null && disposable.Value != null)
{
if (!disposable.Value.IsStopped)
disposable.Value.Stop();
disposable.Dispose();
}
=======
if (!controller.IsStopped)
controller.Stop();
disposables.Remove(controller);
>>>>>>>
if (!controller.IsStopped)
controller.Stop();
disposables.Remove(controller); |
<<<<<<<
/// Compares two commits.
/// </summary>
/// <param name="repository">The repository</param>
/// <param name="sha1">The SHA of the first commit.</param>
/// <param name="sha2">The SHA of the second commit.</param>
/// <param name="detectRenames">Whether to detect renames</param>
/// <returns>
/// A <see cref="TreeChanges"/> object or null if one of the commits could not be found in the repository,
/// (e.g. it is from a fork).
/// </returns>
Task<TreeChanges> Compare(IRepository repository, string sha1, string sha2, bool detectRenames = false);
/// <summary>
=======
/// Gets the value of a configuration key.
/// </summary>
/// <param name="repository">The repository.</param>
/// <param name="key">The configuration key. Keys are in the form 'section.name'.</param>
/// <returns></returns>
Task<T> GetConfig<T>(IRepository repository, string key);
/// <summary>
>>>>>>>
/// Compares two commits.
/// </summary>
/// <param name="repository">The repository</param>
/// <param name="sha1">The SHA of the first commit.</param>
/// <param name="sha2">The SHA of the second commit.</param>
/// <param name="detectRenames">Whether to detect renames</param>
/// <returns>
/// A <see cref="TreeChanges"/> object or null if one of the commits could not be found in the repository,
/// (e.g. it is from a fork).
/// </returns>
Task<TreeChanges> Compare(IRepository repository, string sha1, string sha2, bool detectRenames = false);
/// Gets the value of a configuration key.
/// </summary>
/// <param name="repository">The repository.</param>
/// <param name="key">The configuration key. Keys are in the form 'section.name'.</param>
/// <returns></returns>
Task<T> GetConfig<T>(IRepository repository, string key);
/// <summary> |
<<<<<<<
=======
using Octokit;
>>>>>>>
<<<<<<<
using static System.FormattableString;
=======
using Serilog;
>>>>>>>
using Serilog;
using static System.FormattableString;
<<<<<<<
readonly IConnection connection;
=======
static readonly ILogger log = LogManager.ForContext<RepositoryHosts>();
readonly ILoginManager loginManager;
readonly HostAddress hostAddress;
readonly IKeychain keychain;
readonly IUsageTracker usage;
bool isLoggedIn;
>>>>>>>
static readonly ILogger log = LogManager.ForContext<RepositoryHosts>();
readonly IConnection connection;
<<<<<<<
=======
this.loginManager = loginManager;
this.keychain = keychain;
this.usage = usage;
log.Assert(apiClient.HostAddress != null, "HostAddress of an api client shouldn't be null");
Address = apiClient.HostAddress;
hostAddress = apiClient.HostAddress;
Title = apiClient.HostAddress.Title;
}
public HostAddress Address { get; private set; }
public IApiClient ApiClient { get; private set; }
public bool IsLoggedIn
{
get { return isLoggedIn; }
private set { this.RaiseAndSetIfChanged(ref isLoggedIn, value); }
>>>>>>>
<<<<<<<
internal string DebuggerDisplay => Invariant($"RepositoryHost: {Title} {Address.ApiUri}");
=======
if (user != null)
{
IsLoggedIn = true;
return Observable.Return(AuthenticationResult.Success);
}
else
{
return Observable.Return(AuthenticationResult.VerificationFailure);
}
});
}
public IObservable<Unit> LogOut()
{
if (!IsLoggedIn) return Observable.Return(Unit.Default);
log.Information("Logged off of host '{ApiUri}'", hostAddress.ApiUri);
return keychain.Delete(Address).ToObservable()
.Catch<Unit, Exception>(e =>
{
log.Warning(e, "ASSERT! Failed to erase login. Going to invalidate cache anyways");
return Observable.Return(Unit.Default);
})
.SelectMany(_ => ModelService.InvalidateAll())
.Catch<Unit, Exception>(e =>
{
log.Warning(e, "ASSERT! Failed to invaldiate caches");
return Observable.Return(Unit.Default);
})
.ObserveOn(RxApp.MainThreadScheduler)
.Finally(() =>
{
IsLoggedIn = false;
});
}
protected virtual void Dispose(bool disposing)
{}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture, "RepositoryHost: {0} {1}", Title, hostAddress.ApiUri);
}
}
public IModelService ModelService
{
get;
private set;
}
>>>>>>>
internal string DebuggerDisplay => Invariant($"RepositoryHost: {Title} {Address.ApiUri}"); |
<<<<<<<
Gist,
=======
PRList,
PRDetail,
PRCreation,
>>>>>>>
Gist,
PRList,
PRDetail,
PRCreation, |
<<<<<<<
await vm.InitializeAsync(session, annotationModels, file, thread.Comments[0].Review, thread, true);
=======
await vm.InitializeAsync(session, file, thread, true);
>>>>>>>
await vm.InitializeAsync(session, annotationModels, file, thread, true); |
<<<<<<<
.Where(annotation => annotation.Path == relativePath && annotation.AnnotationLevel.HasValue)
.Select(annotation => new InlineAnnotationModel(arg.checkSuite, arg.checkRun, annotation)))
=======
.Where(annotation => annotation.Path == relativePath)
.Select(annotation => new InlineAnnotationModel(arg.checkRun, annotation)))
>>>>>>>
.Where(annotation => annotation.Path == relativePath)
.Select(annotation => new InlineAnnotationModel(arg.checkSuite, arg.checkRun, annotation)))
<<<<<<<
Annotations = run.Annotations(null, null, null, null).AllPages()
.Select(annotation => new CheckRunAnnotationModel
{
Title = annotation.Title,
Message = annotation.Message,
Path = annotation.Path,
AnnotationLevel = annotation.AnnotationLevel.FromGraphQl(),
StartLine = annotation.Location.Start.Line,
EndLine = annotation.Location.End.Line,
}).ToList()
=======
Annotations = run.Annotations(null, null, null, null).AllPages()
.Select(annotation => new CheckRunAnnotationModel
{
Title = annotation.Title,
Message = annotation.Message,
Path = annotation.Path,
AnnotationLevel = annotation.AnnotationLevel.Value.FromGraphQl(),
StartLine = annotation.Location.Start.Line,
EndLine = annotation.Location.End.Line,
}).ToList()
>>>>>>>
Annotations = run.Annotations(null, null, null, null).AllPages()
.Select(annotation => new CheckRunAnnotationModel
{
Title = annotation.Title,
Message = annotation.Message,
Path = annotation.Path,
StartLine = annotation.Location.Start.Line,
EndLine = annotation.Location.End.Line,
}).ToList() |
<<<<<<<
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reactive;
=======
using System.ComponentModel.Composition;
using System.Threading.Tasks;
>>>>>>>
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Threading.Tasks;
<<<<<<<
/// <param name="annotations"></param>
protected CommentThreadViewModel(ActorModel currentUser, IReadOnlyList<InlineAnnotationViewModel> annotations)
=======
protected Task InitializeAsync(ActorModel currentUser)
>>>>>>>
/// <param name="annotations"></param>
protected Task InitializeAsync(ActorModel currentUser, IReadOnlyList<IInlineAnnotationViewModel> annotations)
<<<<<<<
public IActorViewModel CurrentUser { get; }
/// <inheritdoc/>
public IReadOnlyList<IInlineAnnotationViewModel> Annotations { get; }
=======
public abstract Task DeleteComment(int pullRequestId, int commentId);
>>>>>>>
public abstract Task DeleteComment(int pullRequestId, int commentId); |
<<<<<<<
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
=======
Copyright (C) 2003-2016 Dominik Reichl <[email protected]>
>>>>>>>
Copyright (C) 2003-2016 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
<<<<<<<
#if (!KeePassLibSD && !KeePassRT)
=======
#if (!KeePassLibSD && !KeePassUAP)
>>>>>>>
#if (!KeePassLibSD && !KeePassUAP)
<<<<<<<
using KeePassLib.Native;
=======
using KeePassLib.Native;
using KeePassLib.Resources;
>>>>>>>
using KeePassLib.Native;
<<<<<<<
// Prevent transactions for FTP URLs under .NET 4.0 in order to
// avoid/workaround .NET bug 621450:
// https://connect.microsoft.com/VisualStudio/feedback/details/621450/problem-renaming-file-on-ftp-server-using-ftpwebrequest-in-net-framework-4-0-vs2010-only
if(m_iocBase.Path.StartsWith("ftp:", StrUtil.CaseIgnoreCmp) &&
(Environment.Version.Major >= 4) && !NativeLib.IsUnix())
m_bTransacted = false;
=======
string strPath = m_iocBase.Path;
#if !KeePassUAP
// Prevent transactions for FTP URLs under .NET 4.0 in order to
// avoid/workaround .NET bug 621450:
// https://connect.microsoft.com/VisualStudio/feedback/details/621450/problem-renaming-file-on-ftp-server-using-ftpwebrequest-in-net-framework-4-0-vs2010-only
if(strPath.StartsWith("ftp:", StrUtil.CaseIgnoreCmp) &&
(Environment.Version.Major >= 4) && !NativeLib.IsUnix())
m_bTransacted = false;
else
{
#endif
foreach(KeyValuePair<string, bool> kvp in g_dEnabled)
{
if(strPath.StartsWith(kvp.Key, StrUtil.CaseIgnoreCmp))
{
m_bTransacted = kvp.Value;
break;
}
}
#if !KeePassUAP
}
#endif
>>>>>>>
// Prevent transactions for FTP URLs under .NET 4.0 in order to
// avoid/workaround .NET bug 621450:
// https://connect.microsoft.com/VisualStudio/feedback/details/621450/problem-renaming-file-on-ftp-server-using-ftpwebrequest-in-net-framework-4-0-vs2010-only
if(m_iocBase.Path.StartsWith("ftp:", StrUtil.CaseIgnoreCmp) &&
(Environment.Version.Major >= 4) && !NativeLib.IsUnix())
m_bTransacted = false;
<<<<<<<
#if (!KeePassLibSD && !KeePassRT)
=======
#if (!KeePassLibSD && !KeePassUAP)
FileSecurity bkSecurity = null;
>>>>>>>
#if (!KeePassLibSD && !KeePassUAP)
<<<<<<<
=======
>>>>>>>
<<<<<<<
#if (!KeePassLibSD && !KeePassRT)
=======
#if (!KeePassLibSD && !KeePassUAP)
>>>>>>>
#if (!KeePassLibSD && !KeePassUAP) |
<<<<<<<
this.mainContainer1.MinimizeBox = false;
=======
this.mainContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainContainer1.Location = new System.Drawing.Point(0, 0);
this.mainContainer1.Margin = new System.Windows.Forms.Padding(0);
this.mainContainer1.MinimizeBox = false;
this.mainContainer1.MinimumSize = new System.Drawing.Size(310, 250);
>>>>>>>
this.mainContainer1.MinimizeBox = false;
<<<<<<<
=======
this.lb_Ver.Size = new System.Drawing.Size(39, 16);
this.lb_Ver.TabIndex = 43;
this.lb_Ver.Text = "v136";
>>>>>>> |
<<<<<<<
private void PictureBoxButtonCustom6_Click(object sender, EventArgs e)
{
using (var x = new FriendsForm())
{
x.ShowDialog();
}
}
=======
private void UpdateDiagModeToolStripFromConfig()
{
if (Program.UserConfig.IsDiagnosticMode)
{
enableDiagnosticModeToolStripMenuItem.Text = @"Disable Diagnostic Mode";
}
else
{
enableDiagnosticModeToolStripMenuItem.Text = @"Enable Diagnostic Mode";
}
}
private void EnableDiagnosticModeToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.UserConfig.IsDiagnosticMode = !Program.UserConfig.IsDiagnosticMode;
UpdateDiagModeToolStripFromConfig();
}
>>>>>>>
private void PictureBoxButtonCustom6_Click(object sender, EventArgs e)
{
using (var x = new FriendsForm())
{
x.ShowDialog();
}
}
private void UpdateDiagModeToolStripFromConfig()
{
if (Program.UserConfig.IsDiagnosticMode)
{
enableDiagnosticModeToolStripMenuItem.Text = @"Disable Diagnostic Mode";
}
else
{
enableDiagnosticModeToolStripMenuItem.Text = @"Enable Diagnostic Mode";
}
}
private void EnableDiagnosticModeToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.UserConfig.IsDiagnosticMode = !Program.UserConfig.IsDiagnosticMode;
UpdateDiagModeToolStripFromConfig();
} |
<<<<<<<
Copyright (C) 2003-2012 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
=======
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
>>>>>>>
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll |
<<<<<<<
private readonly object songLock;
private readonly HashSet<LocalSong> songs;
=======
private readonly ReaderWriterLockSlim songLock;
private readonly HashSet<Song> songs;
>>>>>>>
private readonly ReaderWriterLockSlim songLock;
private readonly HashSet<LocalSong> songs;
<<<<<<<
this.accessControl = new AccessControl(settings);
this.songLock = new object();
this.songs = new HashSet<LocalSong>();
=======
this.songLock = new ReaderWriterLockSlim();
this.songs = new HashSet<Song>();
>>>>>>>
this.accessControl = new AccessControl(settings);
this.songLock = new ReaderWriterLockSlim();
this.songs = new HashSet<LocalSong>();
<<<<<<<
=======
/// Gets a value indicating whether the administrator is created.
/// </summary>
/// <value>
/// <c>true</c> if the administrator is created; otherwise, <c>false</c>.
/// </value>
public bool IsAdministratorCreated { get; private set; }
/// <summary>
/// Gets an observable that reports whether the library is currently
/// looking for new songs at the song source or removing songs that don't exist anymore.
/// </summary>
public IObservable<bool> IsUpdating
{
get { return this.isUpdating.DistinctUntilChanged(); }
}
/// <summary>
>>>>>>>
/// Gets an observable that reports whether the library is currently
/// looking for new songs at the song source or removing songs that don't exist anymore.
/// </summary>
public IObservable<bool> IsUpdating
{
get { return this.isUpdating.DistinctUntilChanged(); }
}
/// <summary>
<<<<<<<
List<LocalSong> currentSongs;
lock (this.songLock)
{
currentSongs = this.songs.ToList();
}
=======
List<Song> currentSongs = this.Songs.ToList();
>>>>>>>
List<Song> currentSongs = this.Songs.ToList(); |
<<<<<<<
var path = !string.IsNullOrWhiteSpace(LegacyBootstrapper.UserConfig?.GameFilesPath)
? LegacyBootstrapper.UserConfig?.GameFilesPath
: GameScannnerApi.GetGameFilesRootPath();
=======
var path = !string.IsNullOrWhiteSpace(Program.UserConfig?.GameFilesPath)
? Program.UserConfig?.GameFilesPath
: GameScannnerManager.GetGameFilesRootPath();
>>>>>>>
var path = !string.IsNullOrWhiteSpace(LegacyBootstrapper.UserConfig?.GameFilesPath)
? LegacyBootstrapper.UserConfig?.GameFilesPath
: GameScannnerManager.GetGameFilesRootPath();
<<<<<<<
var path = !string.IsNullOrWhiteSpace(LegacyBootstrapper.UserConfig?.GameFilesPath)
? LegacyBootstrapper.UserConfig?.GameFilesPath
: GameScannnerApi.GetGameFilesRootPath();
=======
var path = !string.IsNullOrWhiteSpace(Program.UserConfig?.GameFilesPath)
? Program.UserConfig?.GameFilesPath
: GameScannnerManager.GetGameFilesRootPath();
>>>>>>>
var path = !string.IsNullOrWhiteSpace(LegacyBootstrapper.UserConfig?.GameFilesPath)
? LegacyBootstrapper.UserConfig?.GameFilesPath
: GameScannnerManager.GetGameFilesRootPath(); |
<<<<<<<
Copyright (C) 2003-2012 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
=======
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
>>>>>>>
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
<<<<<<<
#if !KeePassLibSD
/*// Mono returns PlatformID.Unix on Mac OS X, workaround this
//fails on Anroid
=======
#if (!KeePassLibSD && !KeePassRT)
// Mono returns PlatformID.Unix on Mac OS X, workaround this
>>>>>>>
#if (!KeePassLibSD && !KeePassRT)
/*// Mono returns PlatformID.Unix on Mac OS X, workaround this
//fails on Anroid |
<<<<<<<
Console.WriteLine($"Processing file:");
foreach (string filePath in args) {
Console.WriteLine($"Processing file: {filePath}");
var success = ProcessAssembly(rewriter, filePath);
if (!success) {
Environment.ExitCode = 3;
}
=======
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
foreach (string filePath in args)
{
ProcessAssembly(rewriter, filePath);
additionalAssemblySearchPath = null;
>>>>>>>
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Console.WriteLine($"Processing file:");
foreach (string filePath in args)
{
Console.WriteLine($"Processing file: {filePath}");
var success = ProcessAssembly(rewriter, filePath);
if (!success)
{
Environment.ExitCode = 3;
}
additionalAssemblySearchPath = null; |
<<<<<<<
using System;
using System.Diagnostics;
=======
using System;
>>>>>>>
using System;
<<<<<<<
static class Program
=======
public class Program
>>>>>>>
public static class Program
<<<<<<<
var message = messageEventArgs.Message;
if (message == null || message.Type != MessageType.TextMessage) return;
IReplyMarkup keyboard = new ReplyKeyboardRemove();
switch (message.Text.Split(' ').First())
{
// send inline keyboard
case "/inline":
await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.Typing);
await Task.Delay(500); // simulate longer running task
keyboard = new InlineKeyboardMarkup(new[]
{
new[] // first row
{
new InlineKeyboardCallbackButton("1.1", "1.1"),
new InlineKeyboardCallbackButton("1.2", "1.2"),
},
new[] // second row
{
new InlineKeyboardCallbackButton("2.1", "2.1"),
new InlineKeyboardCallbackButton("2.2", "2.2"),
}
});
await Bot.SendTextMessageAsync(
message.Chat.Id,
"Choose",
replyMarkup: keyboard);
break;
// send custom keyboard
case "/keyboard":
keyboard = new ReplyKeyboardMarkup(new[]
{
new [] // first row
{
new KeyboardButton("1.1"),
new KeyboardButton("1.2"),
},
new [] // last row
{
new KeyboardButton("2.1"),
new KeyboardButton("2.2"),
}
});
await Bot.SendTextMessageAsync(
message.Chat.Id,
"Choose",
replyMarkup: keyboard);
break;
// send a photo
case "/photo":
await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.UploadPhoto);
const string file = @"Files/tux.png";
var fileName = file.Split('\\').Last();
using (var fileStream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read))
{
var fts = new FileToSend(fileName, fileStream);
await Bot.SendPhotoAsync(
message.Chat.Id,
fts,
"Nice Picture");
}
break;
// request location or contact
case "/request":
keyboard = new ReplyKeyboardMarkup(new[]
{
new KeyboardButton("Location")
{
RequestLocation = true
},
new KeyboardButton("Contact")
{
RequestContact = true
},
});
await Bot.SendTextMessageAsync(
message.Chat.Id,
"Who or Where are you?",
replyMarkup: keyboard);
break;
default:
const string usage = @"Usage:
/inline - send inline keyboard
/keyboard - send custom keyboard
/photo - send a photo
/request - request location or contact
";
await Bot.SendTextMessageAsync(
message.Chat.Id,
usage,
replyMarkup: new ReplyKeyboardRemove());
break;
}
=======
Console.WriteLine("Received error: {0} — {1}",
receiveErrorEventArgs.ApiRequestException.ErrorCode,
receiveErrorEventArgs.ApiRequestException.Message);
>>>>>>>
var message = messageEventArgs.Message;
if (message == null || message.Type != MessageType.TextMessage) return;
IReplyMarkup keyboard = new ReplyKeyboardRemove();
switch (message.Text.Split(' ').First())
{
// send inline keyboard
case "/inline":
await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.Typing);
await Task.Delay(500); // simulate longer running task
keyboard = new InlineKeyboardMarkup(new[]
{
new [] // first row
{
InlineKeyboardButton.WithCallbackData("1.1"),
InlineKeyboardButton.WithCallbackData("1.2"),
},
new [] // second row
{
InlineKeyboardButton.WithCallbackData("2.1"),
InlineKeyboardButton.WithCallbackData("2.2"),
}
});
await Bot.SendTextMessageAsync(
message.Chat.Id,
"Choose",
replyMarkup: keyboard);
break;
// send custom keyboard
case "/keyboard":
keyboard = new ReplyKeyboardMarkup(new[]
{
new [] // first row
{
new KeyboardButton("1.1"),
new KeyboardButton("1.2"),
},
new [] // last row
{
new KeyboardButton("2.1"),
new KeyboardButton("2.2"),
}
});
await Bot.SendTextMessageAsync(
message.Chat.Id,
"Choose",
replyMarkup: keyboard);
break;
// send a photo
case "/photo":
await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.UploadPhoto);
const string file = @"Files/tux.png";
var fileName = file.Split(Path.DirectorySeparatorChar).Last();
using (var fileStream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read))
{
var fts = new FileToSend(fileName, fileStream);
await Bot.SendPhotoAsync(
message.Chat.Id,
fts,
"Nice Picture");
}
break;
// request location or contact
case "/request":
keyboard = new ReplyKeyboardMarkup(new[]
{
new KeyboardButton("Location")
{
RequestLocation = true
},
new KeyboardButton("Contact")
{
RequestContact = true
},
});
await Bot.SendTextMessageAsync(
message.Chat.Id,
"Who or Where are you?",
replyMarkup: keyboard);
break;
default:
const string usage = @"Usage:
/inline - send inline keyboard
/keyboard - send custom keyboard
/photo - send a photo
/request - request location or contact
";
await Bot.SendTextMessageAsync(
message.Chat.Id,
usage,
replyMarkup: new ReplyKeyboardRemove());
break;
}
<<<<<<<
Console.WriteLine($"Received inline result: {chosenInlineResultEventArgs.ChosenInlineResult.ResultId}");
=======
var message = messageEventArgs.Message;
if (message == null || message.Type != MessageType.TextMessage) return;
if (message.Text.StartsWith("/inline")) // send inline keyboard
{
await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.Typing);
var keyboard = new InlineKeyboardMarkup(new []
{
new [] // first row
{
InlineKeyboardButton.WithCallbackData("1.1"),
InlineKeyboardButton.WithCallbackData("1.2"),
},
new [] // second row
{
InlineKeyboardButton.WithCallbackData("2.1"),
InlineKeyboardButton.WithCallbackData("2.2"),
}
});
await Task.Delay(500); // simulate longer running task
await Bot.SendTextMessageAsync(message.Chat.Id, "Choose",
replyMarkup: keyboard);
}
else if (message.Text.StartsWith("/keyboard")) // send custom keyboard
{
var keyboard = new ReplyKeyboardMarkup(new []
{
new [] // first row
{
new KeyboardButton("1.1"),
new KeyboardButton("1.2"),
},
new [] // last row
{
new KeyboardButton("2.1"),
new KeyboardButton("2.2"),
}
});
await Bot.SendTextMessageAsync(message.Chat.Id, "Choose",
replyMarkup: keyboard);
}
else if (message.Text.StartsWith("/photo")) // send a photo
{
await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.UploadPhoto);
const string file = @"<FilePath>";
var fileName = file.Split(Path.DirectorySeparatorChar).Last();
using (var fileStream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read))
{
var fts = new FileToSend(fileName, fileStream);
await Bot.SendPhotoAsync(message.Chat.Id, fts, "Nice Picture");
}
}
else if (message.Text.StartsWith("/request")) // request location or contact
{
var keyboard = new ReplyKeyboardMarkup(new []
{
new KeyboardButton("Location")
{
RequestLocation = true
},
new KeyboardButton("Contact")
{
RequestContact = true
},
});
await Bot.SendTextMessageAsync(message.Chat.Id, "Who or Where are you?", replyMarkup: keyboard);
}
else
{
var usage = @"Usage:
/inline - send inline keyboard
/keyboard - send custom keyboard
/photo - send a photo
/request - request location or contact
";
await Bot.SendTextMessageAsync(message.Chat.Id, usage,
replyMarkup: new ReplyKeyboardRemove());
}
>>>>>>>
Console.WriteLine($"Received inline result: {chosenInlineResultEventArgs.ChosenInlineResult.ResultId}"); |
<<<<<<<
this.tbxChangelog = new System.Windows.Forms.TextBox();
this.lblChangelog = new System.Windows.Forms.Label();
this.btnUpateInstall = new System.Windows.Forms.Button();
this.timFetch = new System.Windows.Forms.Timer(this.components);
=======
>>>>>>>
this.timFetch = new System.Windows.Forms.Timer(this.components);
<<<<<<<
// tbxChangelog
//
this.tbxChangelog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbxChangelog.Location = new System.Drawing.Point(9, 70);
this.tbxChangelog.Multiline = true;
this.tbxChangelog.Name = "tbxChangelog";
this.tbxChangelog.ReadOnly = true;
this.tbxChangelog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.tbxChangelog.Size = new System.Drawing.Size(531, 178);
this.tbxChangelog.TabIndex = 6;
//
// lblChangelog
//
this.lblChangelog.AutoSize = true;
this.lblChangelog.Location = new System.Drawing.Point(6, 54);
this.lblChangelog.Name = "lblChangelog";
this.lblChangelog.Size = new System.Drawing.Size(61, 13);
this.lblChangelog.TabIndex = 7;
this.lblChangelog.Text = "Changelog:";
//
// btnUpateInstall
//
this.btnUpateInstall.Location = new System.Drawing.Point(302, 19);
this.btnUpateInstall.Name = "btnUpateInstall";
this.btnUpateInstall.Size = new System.Drawing.Size(138, 23);
this.btnUpateInstall.TabIndex = 8;
this.btnUpateInstall.Text = "Update";
this.btnUpateInstall.UseVisualStyleBackColor = true;
this.btnUpateInstall.Click += new System.EventHandler(this.btnUpateInstall_Click);
//
// timFetch
//
this.timFetch.Enabled = true;
this.timFetch.Interval = 1;
this.timFetch.Tick += new System.EventHandler(this.timFetch_Tick);
//
=======
>>>>>>>
// tbxChangelog
//
this.tbxChangelog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbxChangelog.Location = new System.Drawing.Point(9, 70);
this.tbxChangelog.Multiline = true;
this.tbxChangelog.Name = "tbxChangelog";
this.tbxChangelog.ReadOnly = true;
this.tbxChangelog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.tbxChangelog.Size = new System.Drawing.Size(531, 178);
this.tbxChangelog.TabIndex = 6;
//
// lblChangelog
//
this.lblChangelog.AutoSize = true;
this.lblChangelog.Location = new System.Drawing.Point(6, 54);
this.lblChangelog.Name = "lblChangelog";
this.lblChangelog.Size = new System.Drawing.Size(61, 13);
this.lblChangelog.TabIndex = 7;
this.lblChangelog.Text = "Changelog:";
//
// btnUpateInstall
//
this.btnUpateInstall.Location = new System.Drawing.Point(302, 19);
this.btnUpateInstall.Name = "btnUpateInstall";
this.btnUpateInstall.Size = new System.Drawing.Size(138, 23);
this.btnUpateInstall.TabIndex = 8;
this.btnUpateInstall.Text = "Update";
this.btnUpateInstall.UseVisualStyleBackColor = true;
this.btnUpateInstall.Click += new System.EventHandler(this.btnUpateInstall_Click);
//
// timFetch
//
this.timFetch.Enabled = true;
this.timFetch.Interval = 1;
this.timFetch.Tick += new System.EventHandler(this.timFetch_Tick);
//
<<<<<<<
private System.Windows.Forms.TextBox tbxChangelog;
private System.Windows.Forms.Button btnUpateInstall;
private System.Windows.Forms.Timer timFetch;
=======
private System.Windows.Forms.TextBox txtChangelog;
private System.Windows.Forms.Button btUpateInstall;
private System.Windows.Forms.Button btGenerate;
>>>>>>>
private System.Windows.Forms.TextBox txtChangelog;
private System.Windows.Forms.Button btUpateInstall;
private System.Windows.Forms.Button btGenerate;
private System.Windows.Forms.Timer timFetch; |
<<<<<<<
{"15.0.1236.3", "Exchange 2013 SP1 CU14"},
{"15.0.1263.5", "Exchange 2013 SP1 CU15"},
{"15.0.1293.2", "Exchange 2013 SP1 CU16"},
{"15.0.1320.4", "Exchange 2013 SP1 CU17"},
{"15.1.225.17", "Exchange 2016 Preview"},
=======
{"15.0.1236.3", "Exchange 2013 SP1 CU14"},
{"15.0.1263.5", "Exchange 2013 SP1 CU15"},
{"15.0.1293.2", "Exchange 2013 SP1 CU16"},
{"15.0.1347.2", "Exchange 2013 SP1 CU18"},
{"15.1.225.17", "Exchange 2016 Preview"},
>>>>>>>
{"15.0.1236.3", "Exchange 2013 SP1 CU14"},
{"15.0.1263.5", "Exchange 2013 SP1 CU15"},
{"15.0.1293.2", "Exchange 2013 SP1 CU16"},
{"15.0.1320.4", "Exchange 2013 SP1 CU17"},
{"15.0.1347.2", "Exchange 2013 SP1 CU18"},
{"15.1.225.17", "Exchange 2016 Preview"}, |
<<<<<<<
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
=======
Copyright (C) 2003-2016 Dominik Reichl <[email protected]>
>>>>>>>
Copyright (C) 2003-2016 Dominik Reichl <[email protected]>
<<<<<<<
using System.Runtime.InteropServices;
using System.Threading;
=======
>>>>>>>
<<<<<<<
using Android.Util;
=======
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
#if !KeePassUAP
using System.IO;
using System.Threading;
using System.Windows.Forms;
#endif
>>>>>>>
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using Java.Text;
using keepass2android;
#if !KeePassUAP
using System.IO;
using System.Threading;
#endif
<<<<<<<
#if KeePassRT
m_platID = PlatformID.Win32NT;
#else
=======
#if KeePassUAP
m_platID = EnvironmentExt.OSVersion.Platform;
#else
>>>>>>>
#if KeePassUAP
m_platID = EnvironmentExt.OSVersion.Platform;
#else
<<<<<<<
#if (!KeePassLibSD && !KeePassRT)
/*// Mono returns PlatformID.Unix on Mac OS X, workaround this
//fails on Anroid
=======
#if (!KeePassLibSD && !KeePassUAP)
// Mono returns PlatformID.Unix on Mac OS X, workaround this
>>>>>>>
#if (!KeePassLibSD && !KeePassUAP)
/*// Mono returns PlatformID.Unix on Mac OS X, workaround this
//not supported on Mono
<<<<<<<
=======
private static DesktopType? m_tDesktop = null;
public static DesktopType GetDesktopType()
{
if(!m_tDesktop.HasValue)
{
DesktopType t = DesktopType.None;
if(!IsUnix()) t = DesktopType.Windows;
else
{
try
{
string strXdg = (Environment.GetEnvironmentVariable(
"XDG_CURRENT_DESKTOP") ?? string.Empty).Trim();
string strGdm = (Environment.GetEnvironmentVariable(
"GDMSESSION") ?? string.Empty).Trim();
StringComparison sc = StrUtil.CaseIgnoreCmp;
if(strXdg.Equals("Unity", sc))
t = DesktopType.Unity;
else if(strXdg.Equals("LXDE", sc))
t = DesktopType.Lxde;
else if(strXdg.Equals("XFCE", sc))
t = DesktopType.Xfce;
else if(strXdg.Equals("MATE", sc))
t = DesktopType.Mate;
else if(strXdg.Equals("X-Cinnamon", sc))
t = DesktopType.Cinnamon;
else if(strXdg.Equals("Pantheon", sc)) // Elementary OS
t = DesktopType.Pantheon;
else if(strXdg.Equals("KDE", sc) || // Mint 16
strGdm.Equals("kde-plasma", sc)) // Ubuntu 12.04
t = DesktopType.Kde;
else if(strXdg.Equals("GNOME", sc))
{
if(strGdm.Equals("cinnamon", sc)) // Mint 13
t = DesktopType.Cinnamon;
else t = DesktopType.Gnome;
}
}
catch(Exception) { Debug.Assert(false); }
}
m_tDesktop = t;
}
return m_tDesktop.Value;
}
#if (!KeePassLibSD && !KeePassUAP)
public static string RunConsoleApp(string strAppPath, string strParams)
{
return RunConsoleApp(strAppPath, strParams, null);
}
public static string RunConsoleApp(string strAppPath, string strParams,
string strStdInput)
{
return RunConsoleApp(strAppPath, strParams, strStdInput,
(AppRunFlags.GetStdOutput | AppRunFlags.WaitForExit));
}
private delegate string RunProcessDelegate();
public static string RunConsoleApp(string strAppPath, string strParams,
string strStdInput, AppRunFlags f)
{
if(strAppPath == null) throw new ArgumentNullException("strAppPath");
if(strAppPath.Length == 0) throw new ArgumentException("strAppPath");
bool bStdOut = ((f & AppRunFlags.GetStdOutput) != AppRunFlags.None);
RunProcessDelegate fnRun = delegate()
{
try
{
ProcessStartInfo psi = new ProcessStartInfo();
psi.CreateNoWindow = true;
psi.FileName = strAppPath;
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.UseShellExecute = false;
psi.RedirectStandardOutput = bStdOut;
if(strStdInput != null) psi.RedirectStandardInput = true;
if(!string.IsNullOrEmpty(strParams)) psi.Arguments = strParams;
Process p = Process.Start(psi);
if(strStdInput != null)
{
EnsureNoBom(p.StandardInput);
p.StandardInput.Write(strStdInput);
p.StandardInput.Close();
}
string strOutput = string.Empty;
if(bStdOut) strOutput = p.StandardOutput.ReadToEnd();
if((f & AppRunFlags.WaitForExit) != AppRunFlags.None)
p.WaitForExit();
else if((f & AppRunFlags.GCKeepAlive) != AppRunFlags.None)
{
Thread th = new Thread(delegate()
{
try { p.WaitForExit(); }
catch(Exception) { Debug.Assert(false); }
});
th.Start();
}
return strOutput;
}
catch(Exception) { Debug.Assert(false); }
return null;
};
if((f & AppRunFlags.DoEvents) != AppRunFlags.None)
{
List<Form> lDisabledForms = new List<Form>();
if((f & AppRunFlags.DisableForms) != AppRunFlags.None)
{
foreach(Form form in Application.OpenForms)
{
if(!form.Enabled) continue;
lDisabledForms.Add(form);
form.Enabled = false;
}
}
IAsyncResult ar = fnRun.BeginInvoke(null, null);
while(!ar.AsyncWaitHandle.WaitOne(0))
{
Application.DoEvents();
Thread.Sleep(2);
}
string strRet = fnRun.EndInvoke(ar);
for(int i = lDisabledForms.Count - 1; i >= 0; --i)
lDisabledForms[i].Enabled = true;
return strRet;
}
return fnRun();
}
private static void EnsureNoBom(StreamWriter sw)
{
if(sw == null) { Debug.Assert(false); return; }
if(!MonoWorkarounds.IsRequired(1219)) return;
try
{
Encoding enc = sw.Encoding;
if(enc == null) { Debug.Assert(false); return; }
byte[] pbBom = enc.GetPreamble();
if((pbBom == null) || (pbBom.Length == 0)) return;
// For Mono >= 4.0 (using Microsoft's reference source)
try
{
FieldInfo fi = typeof(StreamWriter).GetField("haveWrittenPreamble",
BindingFlags.Instance | BindingFlags.NonPublic);
if(fi != null)
{
fi.SetValue(sw, true);
return;
}
}
catch(Exception) { Debug.Assert(false); }
// For Mono < 4.0
FieldInfo fiPD = typeof(StreamWriter).GetField("preamble_done",
BindingFlags.Instance | BindingFlags.NonPublic);
if(fiPD != null) fiPD.SetValue(sw, true);
else { Debug.Assert(false); }
}
catch(Exception) { Debug.Assert(false); }
}
#endif
>>>>>>>
private static DesktopType? m_tDesktop = null;
public static DesktopType GetDesktopType()
{
if(!m_tDesktop.HasValue)
{
DesktopType t = DesktopType.None;
if(!IsUnix()) t = DesktopType.Windows;
else
{
try
{
string strXdg = (Environment.GetEnvironmentVariable(
"XDG_CURRENT_DESKTOP") ?? string.Empty).Trim();
string strGdm = (Environment.GetEnvironmentVariable(
"GDMSESSION") ?? string.Empty).Trim();
StringComparison sc = StrUtil.CaseIgnoreCmp;
if(strXdg.Equals("Unity", sc))
t = DesktopType.Unity;
else if(strXdg.Equals("LXDE", sc))
t = DesktopType.Lxde;
else if(strXdg.Equals("XFCE", sc))
t = DesktopType.Xfce;
else if(strXdg.Equals("MATE", sc))
t = DesktopType.Mate;
else if(strXdg.Equals("X-Cinnamon", sc))
t = DesktopType.Cinnamon;
else if(strXdg.Equals("Pantheon", sc)) // Elementary OS
t = DesktopType.Pantheon;
else if(strXdg.Equals("KDE", sc) || // Mint 16
strGdm.Equals("kde-plasma", sc)) // Ubuntu 12.04
t = DesktopType.Kde;
else if(strXdg.Equals("GNOME", sc))
{
if(strGdm.Equals("cinnamon", sc)) // Mint 13
t = DesktopType.Cinnamon;
else t = DesktopType.Gnome;
}
}
catch(Exception) { Debug.Assert(false); }
}
m_tDesktop = t;
}
return m_tDesktop.Value;
}
#if (!KeePassLibSD && !KeePassUAP)
/* Not supported on Android
public static string RunConsoleApp(string strAppPath, string strParams)
{
return RunConsoleApp(strAppPath, strParams, null);
}
public static string RunConsoleApp(string strAppPath, string strParams,
string strStdInput)
{
return RunConsoleApp(strAppPath, strParams, strStdInput,
(AppRunFlags.GetStdOutput | AppRunFlags.WaitForExit));
}
*/
private delegate string RunProcessDelegate();
private static void EnsureNoBom(StreamWriter sw)
{
if(sw == null) { Debug.Assert(false); return; }
if(!MonoWorkarounds.IsRequired(1219)) return;
try
{
Encoding enc = sw.Encoding;
if(enc == null) { Debug.Assert(false); return; }
byte[] pbBom = enc.GetPreamble();
if((pbBom == null) || (pbBom.Length == 0)) return;
// For Mono >= 4.0 (using Microsoft's reference source)
try
{
FieldInfo fi = typeof(StreamWriter).GetField("haveWrittenPreamble",
BindingFlags.Instance | BindingFlags.NonPublic);
if(fi != null)
{
fi.SetValue(sw, true);
return;
}
}
catch(Exception) { Debug.Assert(false); }
// For Mono < 4.0
FieldInfo fiPD = typeof(StreamWriter).GetField("preamble_done",
BindingFlags.Instance | BindingFlags.NonPublic);
if(fiPD != null) fiPD.SetValue(sw, true);
else { Debug.Assert(false); }
}
catch(Exception) { Debug.Assert(false); }
}
#endif
/// <summary>
/// Transform a key.
/// </summary>
/// <param name="pBuf256">Source and destination buffer.</param>
/// <param name="pKey256">Key to use in the transformation.</param>
/// <param name="uRounds">Number of transformation rounds.</param>
/// <returns>Returns <c>true</c>, if the key was transformed successfully.</returns> |
<<<<<<<
public static readonly string PoptipDemoCtl = nameof(PoptipDemoCtl);
=======
public static readonly string RangeSliderDemoCtl = nameof(RangeSliderDemoCtl);
>>>>>>>
public static readonly string PoptipDemoCtl = nameof(PoptipDemoCtl);
public static readonly string RangeSliderDemoCtl = nameof(RangeSliderDemoCtl); |
<<<<<<<
public SystemVersionInfo(int major, int minor, int build, int revision = 0)
=======
public static SystemVersionInfo Windows10_1903 => new SystemVersionInfo(10, 0, 18362);
public SystemVersionInfo(int major, int minor, int build)
>>>>>>>
public static SystemVersionInfo Windows10_1903 => new SystemVersionInfo(10, 0, 18362);
public SystemVersionInfo(int major, int minor, int build, int revision = 0) |
<<<<<<<
/// Looks up a localized string similar to 格式错误.
=======
/// 查找类似 查找 的本地化字符串。
/// </summary>
public static string Find {
get {
return ResourceManager.GetString("Find", resourceCulture);
}
}
/// <summary>
/// 查找类似 格式错误 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 格式错误.
/// 查找类似 查找 的本地化字符串。
/// </summary>
public static string Find {
get {
return ResourceManager.GetString("Find", resourceCulture);
}
}
/// <summary>
/// 查找类似 格式错误 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 否.
=======
/// 查找类似 下一页 的本地化字符串。
/// </summary>
public static string NextPage {
get {
return ResourceManager.GetString("NextPage", resourceCulture);
}
}
/// <summary>
/// 查找类似 否 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 否.
/// 查找类似 下一页 的本地化字符串。
/// </summary>
public static string NextPage {
get {
return ResourceManager.GetString("NextPage", resourceCulture);
}
}
/// <summary>
/// 查找类似 否 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 下午.
=======
/// 查找类似 页面模式 的本地化字符串。
/// </summary>
public static string PageMode {
get {
return ResourceManager.GetString("PageMode", resourceCulture);
}
}
/// <summary>
/// 查找类似 下午 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 下午.
/// 查找类似 页面模式 的本地化字符串。
/// </summary>
public static string PageMode {
get {
return ResourceManager.GetString("PageMode", resourceCulture);
}
}
/// <summary>
/// 查找类似 下午 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 用;分隔标签; 或空间.
/// </summary>
public static string TagPlaceHolder {
get {
return ResourceManager.GetString("TagPlaceHolder", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 提示.
=======
/// 查找类似 上一页 的本地化字符串。
/// </summary>
public static string PreviousPage {
get {
return ResourceManager.GetString("PreviousPage", resourceCulture);
}
}
/// <summary>
/// 查找类似 滚动模式 的本地化字符串。
/// </summary>
public static string ScrollMode {
get {
return ResourceManager.GetString("ScrollMode", resourceCulture);
}
}
/// <summary>
/// 查找类似 提示 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 用;分隔标签; 或空间.
/// </summary>
public static string TagPlaceHolder {
get {
return ResourceManager.GetString("TagPlaceHolder", resourceCulture);
}
}
/// 查找类似 上一页 的本地化字符串。
/// </summary>
public static string PreviousPage {
get {
return ResourceManager.GetString("PreviousPage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 提示.
/// 查找类似 滚动模式 的本地化字符串。
/// </summary>
public static string ScrollMode {
get {
return ResourceManager.GetString("ScrollMode", resourceCulture);
}
}
/// <summary>
/// 查找类似 提示 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 未知.
=======
/// 查找类似 双页模式 的本地化字符串。
/// </summary>
public static string TwoPageMode {
get {
return ResourceManager.GetString("TwoPageMode", resourceCulture);
}
}
/// <summary>
/// 查找类似 未知 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 未知.
/// 查找类似 双页模式 的本地化字符串。
/// </summary>
public static string TwoPageMode {
get {
return ResourceManager.GetString("TwoPageMode", resourceCulture);
}
}
/// <summary>
/// 查找类似 未知 的本地化字符串。 |
<<<<<<<
this.horizontalLayout1 = new DiabloInterface.Gui.Controls.HorizontalLayout();
this.verticalLayout2 = new DiabloInterface.Gui.Controls.VerticalLayout();
=======
this.loadConfigMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.frwLabel = new System.Windows.Forms.Label();
this.fcrLabel = new System.Windows.Forms.Label();
this.fhrLabel = new System.Windows.Forms.Label();
this.iasLabel = new System.Windows.Forms.Label();
this.panelRuneDisplay = new System.Windows.Forms.Panel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.panelDeathsLvl = new System.Windows.Forms.TableLayoutPanel();
this.panelSimpleStats = new System.Windows.Forms.TableLayoutPanel();
this.panelStats = new System.Windows.Forms.FlowLayoutPanel();
this.panelBaseStats = new System.Windows.Forms.TableLayoutPanel();
this.labelStrVal = new System.Windows.Forms.Label();
this.labelDexVal = new System.Windows.Forms.Label();
this.labelVitVal = new System.Windows.Forms.Label();
this.labelEneVal = new System.Windows.Forms.Label();
this.panelAdvancedStats = new System.Windows.Forms.TableLayoutPanel();
this.labelFrwVal = new System.Windows.Forms.Label();
this.labelFhrVal = new System.Windows.Forms.Label();
this.labelFcrVal = new System.Windows.Forms.Label();
this.labelIasVal = new System.Windows.Forms.Label();
this.panelResistances = new System.Windows.Forms.TableLayoutPanel();
this.labelFireResVal = new System.Windows.Forms.Label();
this.labelColdResVal = new System.Windows.Forms.Label();
this.labelLightResVal = new System.Windows.Forms.Label();
this.labelPoisonResVal = new System.Windows.Forms.Label();
>>>>>>>
this.horizontalLayout1 = new DiabloInterface.Gui.Controls.HorizontalLayout();
this.verticalLayout2 = new DiabloInterface.Gui.Controls.VerticalLayout();
<<<<<<<
=======
this.flowLayoutPanel1.SuspendLayout();
this.panelDeathsLvl.SuspendLayout();
this.panelSimpleStats.SuspendLayout();
this.panelStats.SuspendLayout();
this.panelBaseStats.SuspendLayout();
this.panelAdvancedStats.SuspendLayout();
this.panelResistances.SuspendLayout();
>>>>>>>
<<<<<<<
=======
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.panelDeathsLvl.ResumeLayout(false);
this.panelDeathsLvl.PerformLayout();
this.panelSimpleStats.ResumeLayout(false);
this.panelSimpleStats.PerformLayout();
this.panelStats.ResumeLayout(false);
this.panelBaseStats.ResumeLayout(false);
this.panelBaseStats.PerformLayout();
this.panelAdvancedStats.ResumeLayout(false);
this.panelAdvancedStats.PerformLayout();
this.panelResistances.ResumeLayout(false);
this.panelResistances.PerformLayout();
>>>>>>>
<<<<<<<
private Controls.VerticalLayout verticalLayout2;
private Controls.HorizontalLayout horizontalLayout1;
=======
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel panelStats;
private System.Windows.Forms.TableLayoutPanel panelBaseStats;
private System.Windows.Forms.TableLayoutPanel panelAdvancedStats;
private System.Windows.Forms.TableLayoutPanel panelResistances;
private System.Windows.Forms.TableLayoutPanel panelSimpleStats;
private System.Windows.Forms.TableLayoutPanel panelDeathsLvl;
private System.Windows.Forms.Label labelStrVal;
private System.Windows.Forms.Label labelDexVal;
private System.Windows.Forms.Label labelVitVal;
private System.Windows.Forms.Label labelEneVal;
private System.Windows.Forms.Label labelFrwVal;
private System.Windows.Forms.Label labelFhrVal;
private System.Windows.Forms.Label labelFcrVal;
private System.Windows.Forms.Label labelIasVal;
private System.Windows.Forms.Label labelFireResVal;
private System.Windows.Forms.Label labelColdResVal;
private System.Windows.Forms.Label labelLightResVal;
private System.Windows.Forms.Label labelPoisonResVal;
private System.Windows.Forms.ToolStripMenuItem loadConfigMenuItem;
>>>>>>>
private Controls.VerticalLayout verticalLayout2;
private Controls.HorizontalLayout horizontalLayout1; |
<<<<<<<
var paymentRequest = MockPosApiRequest.CreatePosPaymentRequest("Request");
var client = CreateMockTestClientPosCloudApiRequest("Mocks/terminalapi/pospayment-success.json");
=======
var paymentRequest = MockPosApiRequest.CreatePosPaymentRequest();
var client = CreateMockTestClientPosApiRequest("Mocks/terminalapi/pospayment-success.json");
>>>>>>>
var paymentRequest = MockPosApiRequest.CreatePosPaymentRequest();
var client = CreateMockTestClientPosCloudApiRequest("Mocks/terminalapi/pospayment-success.json");
<<<<<<<
var paymentRequest = MockPosApiRequest.CreatePosPaymentRequest("Request");
var client = CreateMockTestClientPosCloudApiRequest("Mocks/terminalapi/pospayment-success.json");
=======
var paymentRequest = MockPosApiRequest.CreatePosPaymentRequest();
var client = CreateMockTestClientPosApiRequest("Mocks/terminalapi/pospayment-success.json");
>>>>>>>
Model.Nexo.Message.SaleToPOIRequest paymentRequest = MockPosApiRequest.CreatePosPaymentRequest();
var client = CreateMockTestClientPosCloudApiRequest("Mocks/terminalapi/pospayment-success.json");
<<<<<<<
var paymentRequest = MockPosApiRequest.CreatePosPaymentRequest("Request");
var client = CreateMockTestClientPosCloudApiRequest("Mocks/terminalapi/pospayment-transaction-status-response.json");
=======
var paymentRequest = MockPosApiRequest.CreatePosPaymentRequest();
var client = CreateMockTestClientPosApiRequest("Mocks/terminalapi/pospayment-transaction-status-response.json");
>>>>>>>
var paymentRequest = MockPosApiRequest.CreatePosPaymentRequest();
var client = CreateMockTestClientPosCloudApiRequest("Mocks/terminalapi/pospayment-transaction-status-response.json"); |
<<<<<<<
//Set security protocol. Only TLS1.2
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var httpWebRequest = GetHttpWebRequest(endpoint, config, isApiKeyRequired, idempotencyKey);
=======
var httpWebRequest = GetHttpWebRequest(endpoint, config, isApiKeyRequired);
>>>>>>>
var httpWebRequest = GetHttpWebRequest(endpoint, config, isApiKeyRequired, idempotencyKey); |
<<<<<<<
this.library.RemovePlaylist(this.CurrentPlaylist.Model);
=======
this.CurrentPlaylist.Dispose();
this.library.RemovePlaylist(this.CurrentPlaylist.Name);
>>>>>>>
this.CurrentPlaylist.Dispose();
this.library.RemovePlaylist(this.CurrentPlaylist.Model); |
<<<<<<<
Copyright (C) 2003-2012 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
=======
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
>>>>>>>
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
<<<<<<<
#if !KeePassLibSD
/*public void ApplyTo(Form form)
=======
public void ApplyTo(Form form)
>>>>>>>
/*public void ApplyTo(Form form) |
<<<<<<<
public bool CanStartAnotherINstance()
{
throw new NotImplementedException();
}
public bool CanStartAnotherInstance(out string errorMessage)
{
switch(mBrowserTpe)
{
case eBrowserType.IE:
errorMessage = "Internet Explorer Doen't Support Virtual Agents";
return false;
default:
errorMessage = string.Empty;
return true;
}
}
=======
public List<AppWindow> GetWindowAllFrames()
{
throw new NotImplementedException();
}
>>>>>>>
public bool CanStartAnotherINstance()
{
throw new NotImplementedException();
}
public bool CanStartAnotherInstance(out string errorMessage)
{
switch(mBrowserTpe)
{
case eBrowserType.IE:
errorMessage = "Internet Explorer Doen't Support Virtual Agents";
return false;
default:
errorMessage = string.Empty;
return true;
}
}
public List<AppWindow> GetWindowAllFrames()
{
throw new NotImplementedException();
} |
<<<<<<<
SetActionDetails(act);
App.AutomateTabGingerRunner.PrepActionVE(act);
ApplicationAgent ag = App.AutomateTabGingerRunner.ApplicationAgents.Where(x => x.AppName == App.BusinessFlow.CurrentActivity.TargetApplication).FirstOrDefault();
=======
App.AutomateTabGingerRunner.PrepActionValueExpression(act);
ApplicationAgent ag =(ApplicationAgent) App.AutomateTabGingerRunner.ApplicationAgents.Where(x => x.AppName == App.BusinessFlow.CurrentActivity.TargetApplication).FirstOrDefault();
>>>>>>>
SetActionDetails(act);
App.AutomateTabGingerRunner.PrepActionValueExpression(act);
ApplicationAgent ag =(ApplicationAgent) App.AutomateTabGingerRunner.ApplicationAgents.Where(x => x.AppName == App.BusinessFlow.CurrentActivity.TargetApplication).FirstOrDefault(); |
<<<<<<<
Copyright (C) 2003-2012 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll
=======
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
>>>>>>>
Copyright (C) 2003-2013 Dominik Reichl <[email protected]>
Modified to be used with Mono for Android. Changes Copyright (C) 2013 Philipp Crocoll |
<<<<<<<
GingerLoadingInfo,
StaticStatusMessage, StaticStatusProcess, PasteProcess,
=======
GingerLoadingInfo,
NewVersionAvailable
>>>>>>>
GingerLoadingInfo,
StaticStatusMessage, StaticStatusProcess, PasteProcess,
NewVersionAvailable |
<<<<<<<
if ( WorkSpace.UserProfile.Solution != null)
{
mVariablesParentObj = WorkSpace.UserProfile.Solution;
((Solution)mVariablesParentObj).PropertyChanged -= Solution_PropertyChanged;
((Solution)mVariablesParentObj).PropertyChanged += Solution_PropertyChanged;//Hook to catch Solution Variables changes
}
else
mVariablesParentObj = new Solution();//to avoid crashing
=======
mVariablesParentObj = variablesParentObj;
((Solution)mVariablesParentObj).PropertyChanged += Solution_PropertyChanged;//Hook to catch Solution Variables changes
LoadGridData();
>>>>>>>
mVariablesParentObj = variablesParentObj;
((Solution)mVariablesParentObj).PropertyChanged -= Solution_PropertyChanged;
((Solution)mVariablesParentObj).PropertyChanged += Solution_PropertyChanged;//Hook to catch Solution Variables changes
LoadGridData();
<<<<<<<
if (App.BusinessFlow != null)
{
mVariablesParentObj = App.BusinessFlow;
((BusinessFlow)mVariablesParentObj).PropertyChanged -= BusinessFlow_PropertyChanged;//Hook to catch Business Flow Variables changes
((BusinessFlow)mVariablesParentObj).PropertyChanged += BusinessFlow_PropertyChanged;//Hook to catch Business Flow Variables changes
}
else
mVariablesParentObj = new BusinessFlow();//to avoid crashing
=======
UpdateBusinessFlow((BusinessFlow)variablesParentObj);
>>>>>>>
UpdateBusinessFlow((BusinessFlow)variablesParentObj); |
<<<<<<<
if (elNode != null)
{
EI.ElementObject = elNode;
}
=======
>>>>>>>
<<<<<<<
list.Add(new ControlProperty() { Name = "RelXPath", Value = ((HTMLElementInfo)ElementInfo).RelXpath });
=======
list.Add(new ControlProperty() { Name = "Relative XPath", Value = ((HTMLElementInfo)ElementInfo).RelXpath });
>>>>>>>
list.Add(new ControlProperty() { Name = "Relative XPath", Value = ((HTMLElementInfo)ElementInfo).RelXpath });
<<<<<<<
{
object parentElement;
object childElement = ElementInfo.ElementObject;
if(childElement == null)
Driver.FindElement(By.XPath(ElementInfo.XPath));
if(childElement is HtmlNode)
=======
{
ElementInfo parentEI = null;
IWebElement parentElementIWebElement = null;
HtmlNode parentElementHtmlNode = null;
if (((HTMLElementInfo)ElementInfo).HTMLElementObject != null)
>>>>>>>
{
ElementInfo parentEI = null;
IWebElement parentElementIWebElement = null;
HtmlNode parentElementHtmlNode = null;
if (((HTMLElementInfo)ElementInfo).HTMLElementObject != null)
<<<<<<<
else
{
parentElement = ((IWebElement)childElement).FindElement(By.XPath(".."));
}
=======
else
{
>>>>>>>
else
{
<<<<<<<
parentEI = GetElementInfoFromIWebElement(parentElement,ElementInfo);
=======
parentEI = GetElementInfoFromIWebElement(parentElementIWebElement, parentElementHtmlNode, ElementInfo);
>>>>>>>
parentEI = GetElementInfoFromIWebElement(parentElementIWebElement, parentElementHtmlNode, ElementInfo);
<<<<<<<
private ElementInfo GetElementInfoFromIWebElement(object el, ElementInfo ChildElementInfo)
=======
private ElementInfo GetElementInfoFromIWebElement(IWebElement el, HtmlNode htmlNode, ElementInfo ChildElementInfo)
>>>>>>>
private ElementInfo GetElementInfoFromIWebElement(IWebElement el, HtmlNode htmlNode, ElementInfo ChildElementInfo) |
<<<<<<<
using Amdocs.Ginger.Plugin.Core.Attributes;
using Amdocs.Ginger.Plugin.Core.Drivers;
=======
>>>>>>>
using Amdocs.Ginger.Plugin.Core.Attributes;
using Amdocs.Ginger.Plugin.Core.Drivers;
<<<<<<<
// Scan once and cache
Console.WriteLine("Scanning Service: " + mService.GetType().FullName) ;
=======
// Scan once and cache
if (mServiceActions != null)
{
return;
}
Console.WriteLine("Scanning Service: " + mService.GetType().FullName);
>>>>>>>
// Scan once and cache
if (mServiceActions != null)
{
return;
}
Console.WriteLine("Scanning Service: " + mService.GetType().FullName);
<<<<<<<
try
{
List<NewPayLoad> FieldsandParams = pl.GetListPayLoad();
Dictionary<string, string> InputParams = new Dictionary<string, string>();
foreach (NewPayLoad Np in FieldsandParams)
{
string Name = Np.GetValueString();
string Value = Np.GetValueString();
if (!InputParams.ContainsKey(Name))
{
InputParams.Add(Name, Value);
}
}
ConfigureServiceParams(mService, InputParams);
Console.WriteLine("Payload - Start Session");
((IServiceSession)mService).StartSession();
NewPayLoad PLRC = new NewPayLoad("OK");
PLRC.ClosePackage();
return PLRC;
}
catch(Exception ex)
{
return NewPayLoad.Error(ex.Message);
}
}
private void ConfigureServiceParams(object Service, Dictionary<string, string> Configs)
{
try
{
PropertyInfo[] members = Service.GetType().GetProperties();
foreach (PropertyInfo propertyInfo in members)
{
if (Attribute.GetCustomAttribute(propertyInfo, typeof(ServiceConfigurationAttribute), false) is ServiceConfigurationAttribute mconfig)
{
if (Configs.ContainsKey(mconfig.Name))
{
propertyInfo.SetValue(Service, Convert.ChangeType(Configs[mconfig.Name], propertyInfo.PropertyType), null);
}
}
}
}
catch(Exception ex)
{
Console.WriteLine("Failure when setting value in Service {0} ", ex.Message);
throw ex;
}
=======
Console.WriteLine("Payload - Start Session");
((IServiceSession)mService).StartSession();
NewPayLoad PLRC = new NewPayLoad("OK");
PLRC.ClosePackage();
return PLRC;
>>>>>>>
try
{
List<NewPayLoad> FieldsandParams = pl.GetListPayLoad();
Dictionary<string, string> InputParams = new Dictionary<string, string>();
foreach (NewPayLoad Np in FieldsandParams)
{
string Name = Np.GetValueString();
string Value = Np.GetValueString();
if (!InputParams.ContainsKey(Name))
{
InputParams.Add(Name, Value);
}
}
ConfigureServiceParams(mService, InputParams);
Console.WriteLine("Payload - Start Session");
((IServiceSession)mService).StartSession();
NewPayLoad PLRC = new NewPayLoad("OK");
PLRC.ClosePackage();
return PLRC;
}
catch(Exception ex)
{
return NewPayLoad.Error(ex.Message);
}
}
private void ConfigureServiceParams(object Service, Dictionary<string, string> Configs)
{
try
{
PropertyInfo[] members = Service.GetType().GetProperties();
foreach (PropertyInfo propertyInfo in members)
{
if (Attribute.GetCustomAttribute(propertyInfo, typeof(ServiceConfigurationAttribute), false) is ServiceConfigurationAttribute mconfig)
{
if (Configs.ContainsKey(mconfig.Name))
{
propertyInfo.SetValue(Service, Convert.ChangeType(Configs[mconfig.Name], propertyInfo.PropertyType), null);
}
}
}
}
catch(Exception ex)
{
Console.WriteLine("Failure when setting value in Service {0} ", ex.Message);
throw ex;
} |
<<<<<<<
using Couchbase.Utils;
=======
using GingerCore.ALM.QC;
using OctaneSDK.Services.Queries;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Web;
using QCRestClient;
using QCTestSet = QCRestClient.QCTestSet;
>>>>>>>
using GingerCore.ALM.QC;
using OctaneSDK.Services.Queries;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Web;
using QCRestClient;
using QCTestSet = QCRestClient.QCTestSet;
using Couchbase.Utils; |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
exitingFields.Append(mergedFields);
=======
exitingFields.Append(mergedFields);
}
}
internal ObservableList<ExternalItemFieldBase> GetUpdatedFields(ObservableList<ExternalItemFieldBase> mItemsFields, bool online, BackgroundWorker bw = null)
{
ObservableList<ExternalItemFieldBase> updatedFields = new ObservableList<ExternalItemFieldBase>();
if (AlmCore.AlmItemFields != null)
{
foreach (ExternalItemFieldBase defaultField in AlmCore.AlmItemFields)
{
ExternalItemFieldBase currentField = mItemsFields.Where(x => x.ID == defaultField.ID && x.ItemType == defaultField.ItemType).FirstOrDefault();
if (currentField != null)
{
currentField.ToUpdate = false;
if (string.IsNullOrEmpty(currentField.SelectedValue) == false)
{
if ((defaultField.PossibleValues.Count == 0 && currentField.SelectedValue != defaultField.SelectedValue) || (defaultField.PossibleValues.Count > 0 && defaultField.PossibleValues.Contains(currentField.SelectedValue) && currentField.SelectedValue != defaultField.PossibleValues[0]))
{
currentField.ToUpdate = true;
updatedFields.Add(currentField);
}
else
{
currentField.SelectedValue = defaultField.SelectedValue;
currentField.ToUpdate = false;
}
}
else
{
currentField.SelectedValue = defaultField.SelectedValue;
currentField.ToUpdate = false;
}
}
}
>>>>>>>
exitingFields.Append(mergedFields);
}
}
internal ObservableList<ExternalItemFieldBase> GetUpdatedFields(ObservableList<ExternalItemFieldBase> mItemsFields, bool online, BackgroundWorker bw = null)
{
ObservableList<ExternalItemFieldBase> updatedFields = new ObservableList<ExternalItemFieldBase>();
if (AlmCore.AlmItemFields != null)
{
foreach (ExternalItemFieldBase defaultField in AlmCore.AlmItemFields)
{
ExternalItemFieldBase currentField = mItemsFields.Where(x => x.ID == defaultField.ID && x.ItemType == defaultField.ItemType).FirstOrDefault();
if (currentField != null)
{
currentField.ToUpdate = false;
if (string.IsNullOrEmpty(currentField.SelectedValue) == false)
{
if ((defaultField.PossibleValues.Count == 0 && currentField.SelectedValue != defaultField.SelectedValue) || (defaultField.PossibleValues.Count > 0 && defaultField.PossibleValues.Contains(currentField.SelectedValue) && currentField.SelectedValue != defaultField.PossibleValues[0]))
{
currentField.ToUpdate = true;
updatedFields.Add(currentField);
}
else
{
currentField.SelectedValue = defaultField.SelectedValue;
currentField.ToUpdate = false;
}
}
else
{
currentField.SelectedValue = defaultField.SelectedValue;
currentField.ToUpdate = false;
}
}
} |
<<<<<<<
[TestMethod]
=======
[TestMethod] [Timeout(60000)]
[Ignore]
>>>>>>>
[TestMethod] [Timeout(60000)] |
<<<<<<<
using GingerCore.DataSource;
=======
using GingerCore.Environments;
>>>>>>>
using GingerCore.Environments;
using GingerCore.DataSource; |
<<<<<<<
WindowControlsTreeView.TreeGrid.RowDefinitions[0].Height = new GridLength(0);
mContext = Context;
=======
mContext = context;
>>>>>>>
WindowControlsTreeView.TreeGrid.RowDefinitions[0].Height = new GridLength(0);
mContext = context; |
<<<<<<<
using Amdocs.Ginger.Common.Enums;
=======
using Amdocs.Ginger.CoreNET;
using GingerCore.Actions.Common;
>>>>>>>
using Amdocs.Ginger.Common.Enums;
using Amdocs.Ginger.CoreNET;
using GingerCore.Actions.Common; |
<<<<<<<
public AutomatePage(BusinessFlow businessFlow)
=======
public AutomatePage()
>>>>>>>
public AutomatePage(BusinessFlow businessFlow)
<<<<<<<
App.AutomateBusinessFlowEvent += App_AutomateBusinessFlowEvent;
WorkSpace.UserProfile.PropertyChanged += UserProfilePropertyChanged;
mContext.Runner = App.AutomateTabGingerRunner;
=======
if (App.BusinessFlow == null)
{
//App.SetDefaultBusinessFlow();
Reporter.ToUser(eUserMsgKey.StaticErrorMessage, string.Format("Failed to find {0} to load into Automate page.", GingerDicser.GetTermResValue(eTermResKey.BusinessFlow)));
return;
}
>>>>>>>
App.AutomateBusinessFlowEvent += App_AutomateBusinessFlowEvent;
WorkSpace.UserProfile.PropertyChanged += UserProfilePropertyChanged;
mContext.Runner = App.AutomateTabGingerRunner;
<<<<<<<
AppAgentsMappingExpander2Frame.Content = new ApplicationAgentsMapPage(mContext);
=======
AppAgentsMappingExpander2Frame.Content = new ApplicationAgentsMapPage(App.AutomateTabGingerRunner);
>>>>>>>
AppAgentsMappingExpander2Frame.Content = new ApplicationAgentsMapPage(mContext);
<<<<<<<
SetFramesContent();
=======
SetFramesContent();
App.PropertyChanged += AppPropertychanged;
WorkSpace.UserProfile.PropertyChanged += UserProfilePropertyChanged;
App.AutomateBusinessFlowEvent -= App_AutomateBusinessFlowEvent;
App.AutomateBusinessFlowEvent += App_AutomateBusinessFlowEvent;
>>>>>>>
SetFramesContent();
App.AutomateBusinessFlowEvent -= App_AutomateBusinessFlowEvent;
App.AutomateBusinessFlowEvent += App_AutomateBusinessFlowEvent; |
<<<<<<<
var httpClient = new HttpClient(new ServiceClientRouteHandler(r => Assert.AreEqual(r.Headers.UserAgent.ToString(), UserAgent + "/v32")));
var forceClient = new ForceClient("http://localhost:1899", "accessToken", "v32", httpClient, new HttpClient());
=======
var httpClient = new HttpClient(new ServiceClientRouteHandler(r => Assert.AreEqual(r.Headers.UserAgent.ToString(), UserAgent + string.Format("/{0}", ApiVersion))));
var forceClient = new ForceClient("http://localhost:1899", "accessToken", ApiVersion, httpClient);
>>>>>>>
var httpClient = new HttpClient(new ServiceClientRouteHandler(r => Assert.AreEqual(r.Headers.UserAgent.ToString(), UserAgent + "/v32")));
var forceClient = new ForceClient("http://localhost:1899", "accessToken", ApiVersion, httpClient);
<<<<<<<
var forceClient = new ForceClient("http://localhost:1899", "accessToken", "v29", httpClient, null);
=======
var forceClient = new ForceClient("http://localhost:1899", "accessToken", ApiVersion, httpClient);
>>>>>>>
var forceClient = new ForceClient("http://localhost:1899", "accessToken", ApiVersion, httpClient);
<<<<<<<
var forceClient = new ForceClient("http://localhost:1899", "accessToken", "v29", httpClient, new HttpClient());
=======
var forceClient = new ForceClient("http://localhost:1899", "accessToken", ApiVersion, httpClient);
>>>>>>>
var forceClient = new ForceClient("http://localhost:1899", "accessToken", ApiVersion, httpClient); |
<<<<<<<
using System;
using System.Collections.Generic;
using Amdocs.Ginger.Common.InterfacesLib;
using GingerCore.Variables;
using Amdocs.Ginger.CoreNET.Execution;
=======
#region License
/*
Copyright © 2014-2018 European Support Limited
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion
using GingerCore.Variables;
>>>>>>>
using System;
using System.Collections.Generic;
using Amdocs.Ginger.Common.InterfacesLib;
#region License
/*
Copyright © 2014-2018 European Support Limited
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion
using GingerCore.Variables;
using Amdocs.Ginger.CoreNET.Execution; |
<<<<<<<
=======
return mVERefrences;
}
set
{
mVERefrences = value;
}
}
public static BusinessFlow Businessflow { get; set; }
>>>>>>>
return mVERefrences;
}
set
{
mVERefrences = value;
}
} |
<<<<<<<
using Files.Views;
=======
using Files.Helpers;
>>>>>>>
using Files.Views;
using Files.Helpers; |
<<<<<<<
private void xActionLogConfigExpander_Expanded(object sender, RoutedEventArgs e)
{
ActionDetailsRow.Height = new GridLength(220);
}
private void xActionLogConfigExpander_Collapsed(object sender, RoutedEventArgs e)
{
ActionDetailsRow.Height= new GridLength(30);
}
=======
private void Page_Unloaded(object sender, RoutedEventArgs e)
{
StopEdit();
BindingOperations.ClearAllBindings(txtDescription);
BindingOperations.ClearAllBindings(cboLocateBy);
BindingOperations.ClearAllBindings(comboWindowsToCapture);
BindingOperations.ClearAllBindings(txtLocateValue);
BindingOperations.ClearAllBindings(RTStatusLabel);
BindingOperations.ClearAllBindings(RTElapsedLabel);
BindingOperations.ClearAllBindings(RTErrorLabel);
BindingOperations.ClearAllBindings(RTExInfoLabel);
BindingOperations.ClearAllBindings(txtLocateValue);
BindingOperations.ClearAllBindings(TakeScreenShotCheckBox);
BindingOperations.ClearAllBindings(FailIgnoreCheckBox);
BindingOperations.ClearAllBindings(comboFinalStatus);
BindingOperations.ClearAllBindings(xWaittxtWait);
BindingOperations.ClearAllBindings(txtTimeout);
BindingOperations.ClearAllBindings(StatusLabel);
BindingOperations.ClearAllBindings(ErrorTextBlock);
BindingOperations.ClearAllBindings(ExtraInfoTextBlock);
BindingOperations.ClearAllBindings(EnableRetryMechanismCheckBox);
BindingOperations.ClearAllBindings(RetryMechanismIntervalTextBox);
BindingOperations.ClearAllBindings(RetryMechanismMaxRetriesTextBox);
BindingOperations.ClearAllBindings(AddOutDS);
BindingOperations.ClearAllBindings(cmbDataSourceName);
BindingOperations.ClearAllBindings(cmbDataSourceTableName);
BindingOperations.ClearAllBindings(dsOutputParamMapType);
BindingOperations.ClearAllBindings(EnableActionLogConfigCheckBox);
BindingOperations.ClearAllBindings(txtLocateValue);
TagsViewer.ClearBinding();
this.ClearControlsBindings();
if (mAction != null)
{
mAction.PropertyChanged -= ActionPropertyChanged;
mAction.InputValues.CollectionChanged -= InputValues_CollectionChanged;
mAction.FlowControls.CollectionChanged -= FlowControls_CollectionChanged;
mAction.ReturnValues.CollectionChanged -= ReturnValues_CollectionChanged;
mAction = null;
}
FlowControlFrame.NavigationService.RemoveBackEntry();
ActionPrivateConfigsFrame.NavigationService.RemoveBackEntry();
ActDescriptionFrm.NavigationService.RemoveBackEntry();
ActionLogConfigFrame.NavigationService.RemoveBackEntry();
}
>>>>>>>
private void Page_Unloaded(object sender, RoutedEventArgs e)
{
StopEdit();
BindingOperations.ClearAllBindings(txtDescription);
BindingOperations.ClearAllBindings(cboLocateBy);
BindingOperations.ClearAllBindings(comboWindowsToCapture);
BindingOperations.ClearAllBindings(txtLocateValue);
BindingOperations.ClearAllBindings(RTStatusLabel);
BindingOperations.ClearAllBindings(RTElapsedLabel);
BindingOperations.ClearAllBindings(RTErrorLabel);
BindingOperations.ClearAllBindings(RTExInfoLabel);
BindingOperations.ClearAllBindings(txtLocateValue);
BindingOperations.ClearAllBindings(TakeScreenShotCheckBox);
BindingOperations.ClearAllBindings(FailIgnoreCheckBox);
BindingOperations.ClearAllBindings(comboFinalStatus);
BindingOperations.ClearAllBindings(xWaittxtWait);
BindingOperations.ClearAllBindings(txtTimeout);
BindingOperations.ClearAllBindings(StatusLabel);
BindingOperations.ClearAllBindings(ErrorTextBlock);
BindingOperations.ClearAllBindings(ExtraInfoTextBlock);
BindingOperations.ClearAllBindings(EnableRetryMechanismCheckBox);
BindingOperations.ClearAllBindings(RetryMechanismIntervalTextBox);
BindingOperations.ClearAllBindings(RetryMechanismMaxRetriesTextBox);
BindingOperations.ClearAllBindings(AddOutDS);
BindingOperations.ClearAllBindings(cmbDataSourceName);
BindingOperations.ClearAllBindings(cmbDataSourceTableName);
BindingOperations.ClearAllBindings(dsOutputParamMapType);
BindingOperations.ClearAllBindings(EnableActionLogConfigCheckBox);
BindingOperations.ClearAllBindings(txtLocateValue);
TagsViewer.ClearBinding();
this.ClearControlsBindings();
if (mAction != null)
{
mAction.PropertyChanged -= ActionPropertyChanged;
mAction.InputValues.CollectionChanged -= InputValues_CollectionChanged;
mAction.FlowControls.CollectionChanged -= FlowControls_CollectionChanged;
mAction.ReturnValues.CollectionChanged -= ReturnValues_CollectionChanged;
mAction = null;
}
FlowControlFrame.NavigationService.RemoveBackEntry();
ActionPrivateConfigsFrame.NavigationService.RemoveBackEntry();
ActDescriptionFrm.NavigationService.RemoveBackEntry();
ActionLogConfigFrame.NavigationService.RemoveBackEntry();
}
private void xActionLogConfigExpander_Expanded(object sender, RoutedEventArgs e)
{
ActionDetailsRow.Height = new GridLength(220);
}
private void xActionLogConfigExpander_Collapsed(object sender, RoutedEventArgs e)
{
ActionDetailsRow.Height= new GridLength(30);
} |
<<<<<<<
public void CollectOriginalElementsDataForDeltaCheck(ObservableList<ElementInfo> originalList)
{
throw new NotImplementedException();
}
public ElementInfo GetMatchingElement(ElementInfo latestElement, ObservableList<ElementInfo> originalElements)
{
throw new NotImplementedException();
}
=======
public void StartSpying()
{
throw new NotImplementedException();
}
>>>>>>>
public void CollectOriginalElementsDataForDeltaCheck(ObservableList<ElementInfo> originalList)
{
throw new NotImplementedException();
}
public ElementInfo GetMatchingElement(ElementInfo latestElement, ObservableList<ElementInfo> originalElements)
{
throw new NotImplementedException();
}
public void StartSpying()
{
throw new NotImplementedException();
} |
<<<<<<<
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v36", "accessToken", client))
=======
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v36", "accessToken", client))
<<<<<<<
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v36", "accessToken", client))
=======
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v36", "accessToken", client))
<<<<<<<
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v36", "accessToken", client))
=======
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v36", "accessToken", client))
<<<<<<<
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v36", "accessToken", client))
=======
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v36", "accessToken", client))
<<<<<<<
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v36", "accessToken", client))
=======
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v36", "accessToken", client))
<<<<<<<
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v36", "accessToken", client))
=======
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v32", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v36", "accessToken", client)) |
<<<<<<<
using System.IO;
=======
using Ginger.Reports.GingerExecutionReport;
>>>>>>>
using Ginger.Reports.GingerExecutionReport;
using System.IO; |
<<<<<<<
mConversionProcess.BusinessFlowsActionsConversion(ListOfBusinessFlow);
});
=======
xContinue.Visibility = Visibility.Collapsed;
mWizard.BusinessFlowsActionsConversion(ListOfBusinessFlow);
});
>>>>>>>
xContinue.Visibility = Visibility.Collapsed;
mWizard.BusinessFlowsActionsConversion(ListOfBusinessFlow);
});
<<<<<<<
mConversionProcess.StopConversion();
=======
xContinue.Visibility = Visibility.Visible;
mWizard.StopConversion();
>>>>>>>
xContinue.Visibility = Visibility.Visible;
mConversionProcess.StopConversion();
<<<<<<<
mConversionProcess.ProcessConversion(ListOfBusinessFlow, false);
=======
xContinue.Visibility = Visibility.Collapsed;
mWizard.ProcessConversion(ListOfBusinessFlow, false);
>>>>>>>
xContinue.Visibility = Visibility.Collapsed;
mConversionProcess.ProcessConversion(ListOfBusinessFlow, false); |
<<<<<<<
private JsonHttpClient _jsonHttpClient;
=======
private readonly ServiceHttpClient _serviceHttpClient;
private readonly string _itemsOrElements = "feed-items";
>>>>>>>
private readonly JsonHttpClient _jsonHttpClient;
private readonly string _itemsOrElements = "feed-items";
<<<<<<<
_jsonHttpClient = new JsonHttpClient(instanceUrl, apiVersion, accessToken, httpClient);
=======
_serviceHttpClient = new ServiceHttpClient(instanceUrl, apiVersion, accessToken, httpClient);
// A change in endpoint for feed item was introduced in v31 of the API.
_itemsOrElements = float.Parse(_serviceHttpClient.ApiVersion.Substring(1)) > 30 ? "feed-elements" : "feed-items";
>>>>>>>
_jsonHttpClient = new ServiceHttpClient(instanceUrl, apiVersion, accessToken, httpClient);
// A change in endpoint for feed item was introduced in v31 of the API.
_itemsOrElements = float.Parse(_serviceHttpClient.ApiVersion.Substring(1)) > 30 ? "feed-elements" : "feed-items";
<<<<<<<
return _jsonHttpClient.HttpPostAsync<T>(feedItemInput, string.Format("chatter/feeds/news/{0}/feed-items", userId));
=======
// Feed items not available post v30.0
if (float.Parse(_serviceHttpClient.ApiVersion.Substring(1)) > 30.0)
{
return _serviceHttpClient.HttpPostAsync<T>(feedItemInput, "chatter/feed-elements");
}
return _serviceHttpClient.HttpPostAsync<T>(feedItemInput, string.Format("chatter/feeds/news/{0}/{1}", userId, _itemsOrElements));
}
public Task<T> PostFeedItemToObjectAsync<T>(ObjectFeedItemInput envelope)
{
return _serviceHttpClient.HttpPostAsync<T>(envelope, "chatter/feed-elements/");
}
public Task<T> PostFeedItemWithAttachmentAsync<T>(ObjectFeedItemInput envelope, byte[] fileContents, string fileName)
{
return _serviceHttpClient.HttpBinaryDataPostAsync<T>("chatter/feed-elements/", envelope, fileContents, "feedElementFileUpload", fileName);
>>>>>>>
// Feed items not available post v30.0
if (float.Parse(_serviceHttpClient.ApiVersion.Substring(1)) > 30.0)
{
return _serviceHttpClient.HttpPostAsync<T>(feedItemInput, "chatter/feed-elements");
}
return _jsonHttpClient.HttpPostAsync<T>(feedItemInput, string.Format("chatter/feeds/news/{0}/{1}", userId, _itemsOrElements));
}
public Task<T> PostFeedItemToObjectAsync<T>(ObjectFeedItemInput envelope)
{
return _serviceHttpClient.HttpPostAsync<T>(envelope, "chatter/feed-elements/");
}
public Task<T> PostFeedItemWithAttachmentAsync<T>(ObjectFeedItemInput envelope, byte[] fileContents, string fileName)
{
return _serviceHttpClient.HttpBinaryDataPostAsync<T>("chatter/feed-elements/", envelope, fileContents, "feedElementFileUpload", fileName);
<<<<<<<
return _jsonHttpClient.HttpPostAsync<T>(envelope, string.Format("chatter/feed-items/{0}/comments", feedId));
=======
if (float.Parse(_serviceHttpClient.ApiVersion.Substring(1)) > 30.0)
{
return _serviceHttpClient.HttpPostAsync<T>(envelope, string.Format("chatter/{0}/{1}/capabilities/comments/items", _itemsOrElements, feedId));
}
return _serviceHttpClient.HttpPostAsync<T>(envelope, string.Format("chatter/{0}/{1}/comments", _itemsOrElements, feedId));
>>>>>>>
if (float.Parse(_serviceHttpClient.ApiVersion.Substring(1)) > 30.0)
{
return _jsonHttpClient.HttpPostAsync<T>(envelope, string.Format("chatter/{0}/{1}/capabilities/comments/items", _itemsOrElements, feedId));
}
return _serviceHttpClient.HttpPostAsync<T>(envelope, string.Format("chatter/{0}/{1}/comments", _itemsOrElements, feedId));
<<<<<<<
return _jsonHttpClient.HttpPostAsync<T>(null, string.Format("chatter/feed-items/{0}/likes", feedId));
=======
if (float.Parse(_serviceHttpClient.ApiVersion.Substring(1))> 30.0)
{
return _serviceHttpClient.HttpPostAsync<T>(null, string.Format("chatter/{0}/{1}/capabilities/chatter-likes/items", _itemsOrElements, feedId));
}
return _serviceHttpClient.HttpPostAsync<T>(null, string.Format("chatter/{0}/{1}/likes", _itemsOrElements, feedId));
>>>>>>>
if (float.Parse(_serviceHttpClient.ApiVersion.Substring(1))> 30.0)
{
return _jsonHttpClient.HttpPostAsync<T>(null, string.Format("chatter/{0}/{1}/capabilities/chatter-likes/items", _itemsOrElements, feedId));
}
return _serviceHttpClient.HttpPostAsync<T>(null, string.Format("chatter/{0}/{1}/likes", _itemsOrElements, feedId));
<<<<<<<
var sharedFeedItem = new SharedFeedItemInput {OriginalFeedItemId = feedId};
return _jsonHttpClient.HttpPostAsync<T>(sharedFeedItem, string.Format("chatter/feeds/user-profile/{0}/feed-items", userId));
=======
var sharedFeedItem = new SharedFeedItemInput { SubjectId = userId };
if (float.Parse(_serviceHttpClient.ApiVersion.Substring(1)) > 30.0)
{
sharedFeedItem.OriginalFeedElementId = feedId;
return _serviceHttpClient.HttpPostAsync<T>(sharedFeedItem, "chatter/feed-elements");
}
sharedFeedItem.OriginalFeedItemId = feedId;
return _serviceHttpClient.HttpPostAsync<T>(sharedFeedItem, string.Format("chatter/feeds/user-profile/{0}/{1}", userId, _itemsOrElements));
>>>>>>>
var sharedFeedItem = new SharedFeedItemInput { SubjectId = userId };
if (float.Parse(_serviceHttpClient.ApiVersion.Substring(1)) > 30.0)
{
sharedFeedItem.OriginalFeedElementId = feedId;
return _jsonHttpClient.HttpPostAsync<T>(sharedFeedItem, "chatter/feed-elements");
}
sharedFeedItem.OriginalFeedItemId = feedId;
return _serviceHttpClient.HttpPostAsync<T>(sharedFeedItem, string.Format("chatter/feeds/user-profile/{0}/{1}", userId, _itemsOrElements));
<<<<<<<
return _jsonHttpClient.HttpGetAsync<T>(string.Format("chatter/feeds/record/{0}/feed-items", groupId));
=======
return _serviceHttpClient.HttpGetAsync<T>(string.Format("chatter/feeds/record/{0}/{1}", _itemsOrElements, groupId));
>>>>>>>
return _jsonHttpClient.HttpGetAsync<T>(string.Format("chatter/feeds/record/{0}/{1}", _itemsOrElements, groupId)); |
<<<<<<<
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v32", "accessToken", client))
=======
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
<<<<<<<
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v32", "accessToken", client))
=======
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
<<<<<<<
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v32", "accessToken", client))
=======
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
<<<<<<<
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v32", "accessToken", client))
=======
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
<<<<<<<
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v32", "accessToken", client))
=======
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v34", "accessToken", client))
<<<<<<<
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v32", "accessToken", client))
=======
using (var httpClient = new ServiceHttpClient("http://localhost:1899", "v34", "accessToken", client))
>>>>>>>
using (var httpClient = new JsonHttpClient("http://localhost:1899", "v32", "accessToken", client)) |
<<<<<<<
UpdateOutputValuesTabHeader();
mAction.OnPropertyChanged(nameof(Act.ReturnValuesInfo));
this.Dispatcher.Invoke(() =>
{
if (mAction.ActReturnValues.Count > 0)
{
xOutputValuesExpander.IsExpanded = true;
}
});
=======
UpdateOutputTabVisual();
mAction.OnPropertyChanged(nameof(Act.ReturnValuesCount));
>>>>>>>
UpdateOutputValuesTabHeader();
mAction.OnPropertyChanged(nameof(Act.ReturnValuesCount));
this.Dispatcher.Invoke(() =>
{
if (mAction.ActReturnValues.Count > 0)
{
xOutputValuesExpander.IsExpanded = true;
}
}); |
<<<<<<<
=======
using Ginger.DataSource;
using GingerCore.DataSource;
using Ginger.Actions;
using Ginger.UserControlsLib.TextEditor;
using Ginger.Variables;
using Ginger.Environments;
using System.Reflection;
using Amdocs.Ginger.CoreNET.ValueExpression;
using Amdocs.Ginger.Repository;
using amdocs.ginger.GingerCoreNET;
using Ginger.SolutionGeneral;
using System.IO;
using System.Dynamic;
using Newtonsoft.Json.Linq;
using Amdocs.Ginger.Common.InterfacesLib;
using System.Linq;
using Amdocs.Ginger.CoreNET.RosLynLib.Refrences;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
>>>>>>>
using Ginger.DataSource;
using GingerCore.DataSource;
using Ginger.Actions;
using Ginger.UserControlsLib.TextEditor;
using Ginger.Variables;
using Ginger.Environments;
using System.Reflection;
using Amdocs.Ginger.CoreNET.ValueExpression;
using Amdocs.Ginger.Repository;
using amdocs.ginger.GingerCoreNET;
using Ginger.SolutionGeneral;
using System.IO;
using System.Dynamic;
using Newtonsoft.Json.Linq;
using Amdocs.Ginger.Common.InterfacesLib;
using System.Linq;
using Amdocs.Ginger.CoreNET.RosLynLib.Refrences;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
<<<<<<<
{
=======
{
private static Regex VBSReg = new Regex(@"{VBS Eval=([^}])*}", RegexOptions.Compiled);
ValueExpression mVE = new ValueExpression(App.AutomateTabEnvironment, App.BusinessFlow,WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems<DataSourceBase>(),false,"",false);
VEReferenceList Tvel = new VEReferenceList();
>>>>>>>
{
private static Regex VBSReg = new Regex(@"{VBS Eval=([^}])*}", RegexOptions.Compiled);
ValueExpression mVE = new ValueExpression(App.AutomateTabEnvironment, App.BusinessFlow,WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems<DataSourceBase>(),false,"",false);
VEReferenceList Tvel = new VEReferenceList(); |
<<<<<<<
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
using Amdocs.Ginger.Common;
using Amdocs.Ginger.Common.InterfacesLib;
using Amdocs.Ginger.Common.Enums;
=======
using System.IO;
using System.Linq;
>>>>>>>
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
using Amdocs.Ginger.Common;
using Amdocs.Ginger.Common.InterfacesLib;
using Amdocs.Ginger.Common.Enums;
using System.IO;
using System.Linq; |
<<<<<<<
Task<string> GetFieldsCommaSeparatedListAsync(string objectName);
=======
Task<T> ExecuteAnonymousAsync<T>(string apex);
>>>>>>>
Task<string> GetFieldsCommaSeparatedListAsync(string objectName);
Task<T> ExecuteAnonymousAsync<T>(string apex); |
<<<<<<<
MainPage.sideBarItems.Add(new LocationItem { Text = ResourceController.GetTranslation("SidebarHome"), Glyph = "\uE737", IsDefaultLocation = true, Path = "Home" });
=======
App.sideBarItems.Add(new LocationItem { Text = ResourceController.GetTranslation("SidebarHome"), Font = App.Current.Resources["FluentUIGlyphs"] as FontFamily, Glyph = "\uea80", IsDefaultLocation = true, Path = "Home" });
>>>>>>>
MainPage.sideBarItems.Add(new LocationItem { Text = ResourceController.GetTranslation("SidebarHome"), Font = App.Current.Resources["FluentUIGlyphs"] as FontFamily, Glyph = "\uea80", IsDefaultLocation = true, Path = "Home" }); |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
LoadInfoFromJSON();
PluginID = PluginPackageInfo.Id;
=======
LoadInfo();
PluginId = PluginPackageInfo.Id;
>>>>>>>
LoadInfoFromJSON();
PluginId = PluginPackageInfo.Id;
<<<<<<<
// foreach (PluginServiceInfo pluginService in LoadPluginServicesFromDLL())
// {
// foreach (MethodInfo MI in pluginService.mStandAloneMethods)
// {
// GingerActionAttribute token = (GingerActionAttribute)Attribute.GetCustomAttribute(MI, typeof(GingerActionAttribute), false);
// StandAloneAction DA = new StandAloneAction();
// DA.ActionId = token.Id;
// // AssemblyName AN = MI.DeclaringType.Assembly.GetName();
// DA.PluginId = PluginID; //AN.Name;
// DA.ServiceId = pluginService.ServiceId;
// DA.Description = token.Description;
// foreach (ParameterInfo PI in MI.GetParameters())
// {
// if (PI.ParameterType.Name != nameof(GingerAction))
// {
// DA.InputValues.Add(new ActionInputValueInfo() { Param = PI.Name, ParamType = PI.ParameterType });
// }
// }
// list.Add(DA);
// }
// }
// return list;
//}
=======
foreach (PluginService pluginService in GetPluginServices())
{
foreach (MethodInfo MI in pluginService.mStandAloneMethods)
{
GingerActionAttribute token = (GingerActionAttribute)Attribute.GetCustomAttribute(MI, typeof(GingerActionAttribute), false);
StandAloneAction DA = new StandAloneAction();
DA.ActionId = token.Id;
// AssemblyName AN = MI.DeclaringType.Assembly.GetName();
DA.PluginId = PluginId; //AN.Name;
DA.ServiceId = pluginService.ServiceId;
DA.Description = token.Description;
foreach (ParameterInfo PI in MI.GetParameters())
{
if (PI.ParameterType.Name != nameof(GingerAction))
{
DA.InputValues.Add(new ActionInputValueInfo() { Param = PI.Name, ParamType = PI.ParameterType });
}
}
list.Add(DA);
}
}
return list;
}
>>>>>>>
// foreach (PluginServiceInfo pluginService in LoadPluginServicesFromDLL())
// {
// foreach (MethodInfo MI in pluginService.mStandAloneMethods)
// {
// GingerActionAttribute token = (GingerActionAttribute)Attribute.GetCustomAttribute(MI, typeof(GingerActionAttribute), false);
// StandAloneAction DA = new StandAloneAction();
// DA.ActionId = token.Id;
// // AssemblyName AN = MI.DeclaringType.Assembly.GetName();
// DA.PluginId = PluginID; //AN.Name;
// DA.ServiceId = pluginService.ServiceId;
// DA.Description = token.Description;
// foreach (ParameterInfo PI in MI.GetParameters())
// {
// if (PI.ParameterType.Name != nameof(GingerAction))
// {
// DA.InputValues.Add(new ActionInputValueInfo() { Param = PI.Name, ParamType = PI.ParameterType });
// }
// }
// list.Add(DA);
// }
// }
// return list;
//}
<<<<<<<
return Path.Combine(mFolder, "Ginger.PluginPackage.Services.json");
=======
return Path.Combine(Folder, "Ginger.PluginPackage.Actions.json");
>>>>>>>
return Path.Combine(mFolder, "Ginger.PluginPackage.Services.json"); |
<<<<<<<
using Amdocs.Ginger.Common.Enums;
=======
using Amdocs.Ginger.CoreNET;
using GingerCore.Actions.WebServices;
>>>>>>>
using Amdocs.Ginger.CoreNET;
using GingerCore.Actions.WebServices;
using Amdocs.Ginger.Common.Enums; |
<<<<<<<
private const string UserAgent = "forcedotcom-libraries-dotnet";
=======
private static string _userAgent = "forcedotcom-toolkit-dotnet";
>>>>>>>
private const string UserAgent = "forcedotcom-toolkit-dotnet";
<<<<<<<
if (string.IsNullOrEmpty(objectName)) throw new ArgumentNullException("objectName");
if (record == null) throw new ArgumentNullException("record");
//TODO: implement try/catch and throw auth exception if appropriate
var response = await _serviceHttpClient.HttpPost<SuccessResponse>(record, string.Format("sobjects/{0}", objectName));
=======
var response = await _serviceHttpClient.HttpPostAsync<SuccessResponse>(record, string.Format("sobjects/{0}", objectName));
>>>>>>>
if (string.IsNullOrEmpty(objectName)) throw new ArgumentNullException("objectName");
if (record == null) throw new ArgumentNullException("record");
//TODO: implement try/catch and throw auth exception if appropriate
var response = await _serviceHttpClient.HttpPostAsync<SuccessResponse>(record, string.Format("sobjects/{0}", objectName));
<<<<<<<
if (string.IsNullOrEmpty(objectName)) throw new ArgumentNullException("objectName");
if (string.IsNullOrEmpty(recordId)) throw new ArgumentNullException("recordId");
if (record == null) throw new ArgumentNullException("record");
//TODO: implement try/catch and throw auth exception if appropriate
var response = await _serviceHttpClient.HttpPatch(record, string.Format("sobjects/{0}/{1}", objectName, recordId));
=======
var response = await _serviceHttpClient.HttpPatchAsync(record, string.Format("sobjects/{0}/{1}", objectName, recordId));
>>>>>>>
if (string.IsNullOrEmpty(objectName)) throw new ArgumentNullException("objectName");
if (string.IsNullOrEmpty(recordId)) throw new ArgumentNullException("recordId");
if (record == null) throw new ArgumentNullException("record");
//TODO: implement try/catch and throw auth exception if appropriate
var response = await _serviceHttpClient.HttpPatchAsync(record, string.Format("sobjects/{0}/{1}", objectName, recordId));
<<<<<<<
if (string.IsNullOrEmpty(objectName)) throw new ArgumentNullException("objectName");
//TODO: implement try/catch and throw auth exception if appropriate
var response = await _serviceHttpClient.HttpGet<T>(string.Format("sobjects/{0}", objectName), "objectDescribe");
=======
var response = await _serviceHttpClient.HttpGetAsync<T>(string.Format("sobjects/{0}", objectName), "objectDescribe");
>>>>>>>
if (string.IsNullOrEmpty(objectName)) throw new ArgumentNullException("objectName");
//TODO: implement try/catch and throw auth exception if appropriate
var response = await _serviceHttpClient.HttpGetAsync<T>(string.Format("sobjects/{0}", objectName), "objectDescribe");
<<<<<<<
//TODO: implement try/catch and throw auth exception if appropriate
var response = await _serviceHttpClient.HttpGet<T>(string.Format("recent/?limit={0}", limit));
=======
var response = await _serviceHttpClient.HttpGetAsync<T>(string.Format("recent/?limit={0}", limit));
>>>>>>>
//TODO: implement try/catch and throw auth exception if appropriate
var response = await _serviceHttpClient.HttpGetAsync<T>(string.Format("recent/?limit={0}", limit)); |
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse<Pet>> GetPetByIdWithHttpMessagesAsync(long? petId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse<Pet>> GetPetByIdWithHttpMessagesAsync(long petId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse<Pet>> GetPetByIdWithHttpMessagesAsync(long petId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> UpdatePetWithFormWithHttpMessagesAsync(long? petId, System.IO.Stream fileContent, string fileName = default(string), string status = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> UpdatePetWithFormWithHttpMessagesAsync(long petId, System.IO.Stream fileContent, string fileName = default(string), string status = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> UpdatePetWithFormWithHttpMessagesAsync(long petId, System.IO.Stream fileContent, string fileName = default(string), string status = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> DeletePetWithHttpMessagesAsync(long? petId, string apiKey = "", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> DeletePetWithHttpMessagesAsync(long petId, string apiKey = "", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> DeletePetWithHttpMessagesAsync(long petId, string apiKey = "", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutTrueWithHttpMessagesAsync(bool? boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutTrueWithHttpMessagesAsync(bool boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutTrueWithHttpMessagesAsync(bool boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutFalseWithHttpMessagesAsync(bool? boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutFalseWithHttpMessagesAsync(bool boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutFalseWithHttpMessagesAsync(bool boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamIntegerWithHttpMessagesAsync(string scenario, int? value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> ParamIntegerWithHttpMessagesAsync(string scenario, int value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamIntegerWithHttpMessagesAsync(string scenario, int value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamLongWithHttpMessagesAsync(string scenario, long? value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> ParamLongWithHttpMessagesAsync(string scenario, long value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamLongWithHttpMessagesAsync(string scenario, long value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamFloatWithHttpMessagesAsync(string scenario, double? value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> ParamFloatWithHttpMessagesAsync(string scenario, double value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamFloatWithHttpMessagesAsync(string scenario, double value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamDoubleWithHttpMessagesAsync(string scenario, double? value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> ParamDoubleWithHttpMessagesAsync(string scenario, double value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamDoubleWithHttpMessagesAsync(string scenario, double value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamBoolWithHttpMessagesAsync(string scenario, bool? value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> ParamBoolWithHttpMessagesAsync(string scenario, bool value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamBoolWithHttpMessagesAsync(string scenario, bool value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamDateWithHttpMessagesAsync(string scenario, DateTime? value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> ParamDateWithHttpMessagesAsync(string scenario, DateTime value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamDateWithHttpMessagesAsync(string scenario, DateTime value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamDatetimeWithHttpMessagesAsync(string scenario, DateTime? value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> ParamDatetimeWithHttpMessagesAsync(string scenario, DateTime value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamDatetimeWithHttpMessagesAsync(string scenario, DateTime value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamDurationWithHttpMessagesAsync(string scenario, TimeSpan? value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> ParamDurationWithHttpMessagesAsync(string scenario, TimeSpan value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> ParamDurationWithHttpMessagesAsync(string scenario, TimeSpan value, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutPositiveDurationWithHttpMessagesAsync(TimeSpan? durationBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutPositiveDurationWithHttpMessagesAsync(TimeSpan durationBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutPositiveDurationWithHttpMessagesAsync(TimeSpan durationBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
<<<<<<<
this.Responses.ForEach(r => imports.AddRange(r.Value.Body.ImportFrom(ServiceClient.Namespace)));
imports.AddRange(DefaultResponse.Body.ImportFrom(ServiceClient.Namespace));
=======
this.Responses.ForEach(r => imports.AddRange(r.Value.ImportFrom(ServiceClient.Namespace)));
imports.AddRange(DefaultResponse.ImportFrom(ServiceClient.Namespace));
// exceptions
this.Exceptions.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries)
.ForEach(ex => imports.Add(JavaCodeNamer.GetJavaException(ex)));
>>>>>>>
this.Responses.ForEach(r => imports.AddRange(r.Value.Body.ImportFrom(ServiceClient.Namespace)));
imports.AddRange(DefaultResponse.Body.ImportFrom(ServiceClient.Namespace));
// exceptions
this.Exceptions.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries)
.ForEach(ex => imports.Add(JavaCodeNamer.GetJavaException(ex))); |
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigFloatWithHttpMessagesAsync(double? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutBigFloatWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigFloatWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDoubleWithHttpMessagesAsync(double? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutBigDoubleWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDoubleWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDoublePositiveDecimalWithHttpMessagesAsync(double? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutBigDoublePositiveDecimalWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDoublePositiveDecimalWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDoubleNegativeDecimalWithHttpMessagesAsync(double? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutBigDoubleNegativeDecimalWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDoubleNegativeDecimalWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDecimalWithHttpMessagesAsync(decimal? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutBigDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDecimalPositiveDecimalWithHttpMessagesAsync(decimal? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutBigDecimalPositiveDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDecimalPositiveDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDecimalNegativeDecimalWithHttpMessagesAsync(decimal? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutBigDecimalNegativeDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutBigDecimalNegativeDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutSmallFloatWithHttpMessagesAsync(double? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutSmallFloatWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutSmallFloatWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutSmallDoubleWithHttpMessagesAsync(double? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutSmallDoubleWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutSmallDoubleWithHttpMessagesAsync(double numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutSmallDecimalWithHttpMessagesAsync(decimal? numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutSmallDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutSmallDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutMax32WithHttpMessagesAsync(int? intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutMax32WithHttpMessagesAsync(int intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutMax32WithHttpMessagesAsync(int intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutMax64WithHttpMessagesAsync(long? intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutMax64WithHttpMessagesAsync(long intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutMax64WithHttpMessagesAsync(long intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutMin32WithHttpMessagesAsync(int? intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutMin32WithHttpMessagesAsync(int intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutMin32WithHttpMessagesAsync(int intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutMin64WithHttpMessagesAsync(long? intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutMin64WithHttpMessagesAsync(long intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutMin64WithHttpMessagesAsync(long intBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<bool?>> Head200WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<AzureOperationResponse<bool>> Head200WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<bool>> Head200WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<bool?>> Head204WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<AzureOperationResponse<bool>> Head204WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<bool>> Head204WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<bool?>> Head404WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<AzureOperationResponse<bool>> Head404WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<bool>> Head404WithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutTrueWithHttpMessagesAsync(bool? boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutTrueWithHttpMessagesAsync(bool boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutTrueWithHttpMessagesAsync(bool boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
<<<<<<<
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutFalseWithHttpMessagesAsync(bool? boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public async Task<HttpOperationResponse> PutFalseWithHttpMessagesAsync(bool boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
>>>>>>>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse> PutFalseWithHttpMessagesAsync(bool boolBody, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
<<<<<<<
method.Documentation = _operation.Description;
method.ContentType = "application/json";
if (this._effectiveProduces != null && this._effectiveProduces.Count > 0)
{
method.ContentType = this._effectiveProduces[0];
}
if (method.ContentType.IndexOf("charset=", StringComparison.InvariantCultureIgnoreCase) == -1)
{
// Enable UTF-8 charset
method.ContentType += "; charset=utf-8";
}
=======
method.Description = _operation.Description;
method.Summary = _operation.Summary;
>>>>>>>
method.ContentType = "application/json";
if (this._effectiveProduces != null && this._effectiveProduces.Count > 0)
{
method.ContentType = this._effectiveProduces[0];
}
if (method.ContentType.IndexOf("charset=", StringComparison.InvariantCultureIgnoreCase) == -1)
{
// Enable UTF-8 charset
method.ContentType += "; charset=utf-8";
}
method.Description = _operation.Description;
method.Summary = _operation.Summary; |
<<<<<<<
=======
private UPnPWrapper _upnp;
>>>>>>>
private UPnPWrapper _upnp;
<<<<<<<
panel2.Enabled = true;
listener = new UdpConnectionListener(new NetworkEndPoint(IPAddress.Any, (int) numericUpDown2.Value));
=======
int port = (int) numericUpDown2.Value;
if (_upnp.UPnPAvailable)
{
// TODO: Add info to toolstrip
_upnp.AddPortRule(port, false, "SM64O");
textBox5.Text = _upnp.GetExternalIp();
}
listener = new UdpConnectionListener(new NetworkEndPoint(IPAddress.Any, port));
>>>>>>>
int port = (int) numericUpDown2.Value;
if (_upnp.UPnPAvailable)
{
// TODO: Add info to toolstrip
_upnp.AddPortRule(port, false, "SM64O");
textBox5.Text = _upnp.GetExternalIp();
}
panel2.Enabled = true;
listener = new UdpConnectionListener(new NetworkEndPoint(IPAddress.Any, port));
<<<<<<<
panel2.Enabled = true;
=======
textBox5.ReadOnly = true;
button1.Enabled = true;
if (_upnp.UPnPAvailable)
textBox5.Text = _upnp.GetExternalIp();
else textBox5.Text = "";
>>>>>>>
panel2.Enabled = true;
textBox5.ReadOnly = true;
button1.Enabled = true;
if (_upnp.UPnPAvailable)
textBox5.Text = _upnp.GetExternalIp();
else textBox5.Text = "";
<<<<<<<
panel2.Enabled = false;
=======
button1.Enabled = false;
>>>>>>>
panel2.Enabled = false;
button1.Enabled = false;
<<<<<<<
gamemodeBox.SelectedIndex = 0;
=======
_upnp = new UPnPWrapper();
_upnp.Initialize();
}
public void setGamemode()
{
byte[] buffer = new byte[0];
>>>>>>>
gamemodeBox.SelectedIndex = 0;
_upnp = new UPnPWrapper();
_upnp.Initialize();
<<<<<<<
if (playerClient[i] == null) continue;
if (playerClient[i].Connection.State == Hazel.ConnectionState.Disconnecting ||
playerClient[i].Connection.State == Hazel.ConnectionState.NotConnected)
{
removePlayer(i);
}
else if (playerClient[i].LastUpdate.HasValue &&
DateTime.Now.Subtract(playerClient[i].LastUpdate.Value).TotalMilliseconds > 3000)
{
playerClient[i].Connection.Close();
removePlayer(i);
}
}
}
private void chatBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
if (_chatEnabled)
=======
Client cl = playerClient[i];
if (cl == null) continue;
if (cl.Connection.State == Hazel.ConnectionState.Disconnecting ||
cl.Connection.State == Hazel.ConnectionState.NotConnected)
>>>>>>>
if (playerClient[i] == null) continue;
if (playerClient[i].Connection.State == Hazel.ConnectionState.Disconnecting ||
playerClient[i].Connection.State == Hazel.ConnectionState.NotConnected)
{
removePlayer(i);
}
else if (playerClient[i].LastUpdate.HasValue &&
DateTime.Now.Subtract(playerClient[i].LastUpdate.Value).TotalMilliseconds > 3000)
{
playerClient[i].Connection.Close();
removePlayer(i);
}
}
}
private void chatBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
if (_chatEnabled)
<<<<<<<
private void gamemodeBox_SelectedIndexChanged(object sender, EventArgs e)
{
setGamemode();
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
_chatEnabled = !checkBox2.Checked;
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (connection == null && listener == null)
return; // We are not in a server yet
Characters.setCharacterAll(comboBox2.SelectedIndex + 1, _memory);
if (connection != null) // we are a client, notify host to update playerlist
connection.SendBytes(PacketType.CharacterSwitch, new byte[]{ (byte) (comboBox2.SelectedIndex) });
}
private void removeAllPlayers()
{
const int maxPlayers = 27;
for (int i = 0; i < maxPlayers; i++)
{
const int playersPositionsStart = 0x36790C;
const int playerPositionsSize = 0x100;
// 0xc800
byte[] buffer = new byte[] { 0x00, 0x00, 0x00, 0xFD };
_memory.WriteMemory(playersPositionsStart + (playerPositionsSize * i), buffer, buffer.Length);
}
}
private void resetGame()
{
if (!_memory.Attached) return;
if (listener != null)
{
for (int i = 0; i < playerClient.Length; i++)
{
if (playerClient[i] != null)
playerClient[i].Connection.Close();
}
listener.Close();
listener.Dispose();
}
else if (connection != null)
{
connection.Close();
connection.Dispose();
}
byte[] buffer = new byte[4];
buffer[0] = 0x00;
buffer[1] = 0x00;
buffer[2] = 0x04;
buffer[3] = 0x00;
_memory.WriteMemory(0x33b238, buffer, buffer.Length);
buffer[0] = 0x00;
buffer[1] = 0x00;
buffer[2] = 0x01;
buffer[3] = 0x01;
_memory.WriteMemory(0x33b248, buffer, buffer.Length);
buffer[0] = 0x00;
buffer[1] = 0x00;
buffer[2] = 0x00;
buffer[3] = 0x00;
_memory.WriteMemory(0x38eee0, buffer, buffer.Length);
Program.ResetMe = true;
Close();
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
removeAllPlayers();
}
private void button4_Click(object sender, EventArgs e)
{
resetGame();
}
private string getCharacterName(int id)
{
string character = "custom";
switch (id)
{
case 0:
character = "Mario";
break;
case 1:
character = "Luigi";
break;
case 2:
character = "Yoshi";
break;
case 3:
character = "Wario";
break;
case 4:
character = "Peach";
break;
case 5:
character = "Toad";
break;
case 6:
character = "Waluigi";
break;
case 7:
character = "Rosalina";
break;
}
return character;
}
private int getClient(Connection conn)
{
for (int i = 0; i < playerClient.Length; i++)
{
if (playerClient[i] != null && playerClient[i].Connection == conn)
return i;
}
return -1;
}
private void insertChatBox()
{
// 200 / 2 + 10
listBox1.Size = new Size(268, 95);
_dynamicChatbox = new ListBox();
_dynamicChatbox.Location = new Point(13, 84 + 100);
_dynamicChatbox.Size = new Size(268, 95);
_dynamicChatbox.Enabled = false;
this.panel2.Controls.Add(_dynamicChatbox);
}
=======
private void closePort()
{
_upnp.RemoveOurRules();
_upnp.StopDiscovery();
}
>>>>>>>
private void gamemodeBox_SelectedIndexChanged(object sender, EventArgs e)
{
setGamemode();
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
_chatEnabled = !checkBox2.Checked;
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (connection == null && listener == null)
return; // We are not in a server yet
Characters.setCharacterAll(comboBox2.SelectedIndex + 1, _memory);
if (connection != null) // we are a client, notify host to update playerlist
connection.SendBytes(PacketType.CharacterSwitch, new byte[]{ (byte) (comboBox2.SelectedIndex) });
}
private void removeAllPlayers()
{
const int maxPlayers = 27;
for (int i = 0; i < maxPlayers; i++)
{
const int playersPositionsStart = 0x36790C;
const int playerPositionsSize = 0x100;
// 0xc800
byte[] buffer = new byte[] { 0x00, 0x00, 0x00, 0xFD };
_memory.WriteMemory(playersPositionsStart + (playerPositionsSize * i), buffer, buffer.Length);
}
}
private void resetGame()
{
if (!_memory.Attached) return;
if (listener != null)
{
for (int i = 0; i < playerClient.Length; i++)
{
if (playerClient[i] != null)
playerClient[i].Connection.Close();
}
listener.Close();
listener.Dispose();
}
else if (connection != null)
{
connection.Close();
connection.Dispose();
}
byte[] buffer = new byte[4];
buffer[0] = 0x00;
buffer[1] = 0x00;
buffer[2] = 0x04;
buffer[3] = 0x00;
_memory.WriteMemory(0x33b238, buffer, buffer.Length);
buffer[0] = 0x00;
buffer[1] = 0x00;
buffer[2] = 0x01;
buffer[3] = 0x01;
_memory.WriteMemory(0x33b248, buffer, buffer.Length);
buffer[0] = 0x00;
buffer[1] = 0x00;
buffer[2] = 0x00;
buffer[3] = 0x00;
_memory.WriteMemory(0x38eee0, buffer, buffer.Length);
Program.ResetMe = true;
Close();
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
removeAllPlayers();
}
private void button4_Click(object sender, EventArgs e)
{
resetGame();
}
private string getCharacterName(int id)
{
string character = "custom";
switch (id)
{
case 0:
character = "Mario";
break;
case 1:
character = "Luigi";
break;
case 2:
character = "Yoshi";
break;
case 3:
character = "Wario";
break;
case 4:
character = "Peach";
break;
case 5:
character = "Toad";
break;
case 6:
character = "Waluigi";
break;
case 7:
character = "Rosalina";
break;
}
return character;
}
private int getClient(Connection conn)
{
for (int i = 0; i < playerClient.Length; i++)
{
if (playerClient[i] != null && playerClient[i].Connection == conn)
return i;
}
return -1;
}
private void insertChatBox()
{
// 200 / 2 + 10
listBox1.Size = new Size(268, 95);
_dynamicChatbox = new ListBox();
_dynamicChatbox.Location = new Point(13, 84 + 100);
_dynamicChatbox.Size = new Size(268, 95);
_dynamicChatbox.Enabled = false;
this.panel2.Controls.Add(_dynamicChatbox);
}
private void closePort()
{
_upnp.RemoveOurRules();
_upnp.StopDiscovery();
} |
<<<<<<<
this.label7.Location = new System.Drawing.Point(10, 17);
=======
this.label7.Location = new System.Drawing.Point(46, 17);
>>>>>>>
this.label7.Location = new System.Drawing.Point(46, 17);
<<<<<<<
this.numericUpDown3.Location = new System.Drawing.Point(119, 14);
=======
this.numericUpDown3.Location = new System.Drawing.Point(119, 15);
>>>>>>>
this.numericUpDown3.Location = new System.Drawing.Point(119, 15);
<<<<<<<
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 43);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(101, 13);
this.label10.TabIndex = 35;
this.label10.Text = "Current Gamemode:";
//
// gamemodeBox
//
this.gamemodeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gamemodeBox.FormattingEnabled = true;
this.gamemodeBox.Items.AddRange(new object[] {
"Normal Mode",
"No Interactions"});
this.gamemodeBox.Location = new System.Drawing.Point(119, 40);
this.gamemodeBox.Name = "gamemodeBox";
this.gamemodeBox.Size = new System.Drawing.Size(163, 21);
this.gamemodeBox.TabIndex = 34;
this.gamemodeBox.SelectedIndexChanged += new System.EventHandler(this.gamemodeBox_SelectedIndexChanged);
//
=======
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 43);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(101, 13);
this.label10.TabIndex = 35;
this.label10.Text = "Current Gamemode:";
//
// gamemodeBox
//
this.gamemodeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gamemodeBox.FormattingEnabled = true;
this.gamemodeBox.Items.AddRange(new object[] {
"Normal Mode",
"No Interactions"});
this.gamemodeBox.Location = new System.Drawing.Point(119, 40);
this.gamemodeBox.Name = "gamemodeBox";
this.gamemodeBox.Size = new System.Drawing.Size(163, 21);
this.gamemodeBox.TabIndex = 34;
//
>>>>>>>
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 43);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(101, 13);
this.label10.TabIndex = 35;
this.label10.Text = "Current Gamemode:";
//
// gamemodeBox
//
this.gamemodeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gamemodeBox.FormattingEnabled = true;
this.gamemodeBox.Items.AddRange(new object[] {
"Normal Mode",
"No Interactions"});
this.gamemodeBox.Location = new System.Drawing.Point(119, 40);
this.gamemodeBox.Name = "gamemodeBox";
this.gamemodeBox.Size = new System.Drawing.Size(163, 21);
this.gamemodeBox.TabIndex = 34;
//
this.gamemodeBox.SelectedIndexChanged += new System.EventHandler(this.gamemodeBox_SelectedIndexChanged);
<<<<<<<
this.checkBox2.Location = new System.Drawing.Point(27, 98);
=======
this.checkBox2.Enabled = false;
this.checkBox2.Location = new System.Drawing.Point(13, 98);
>>>>>>>
this.checkBox2.Enabled = false;
this.checkBox2.Location = new System.Drawing.Point(13, 98); |
<<<<<<<
using System.Net;
=======
using System.Threading;
>>>>>>>
using System.Net;
using System.Threading;
<<<<<<<
RestResponse<Collection> resp = await req.ExecuteGet<Collection>().ConfigureAwait(false);
Collection item = await resp.GetDataObject().ConfigureAwait(false);
=======
RestResponse<Collection> resp = await req.ExecuteGet<Collection>(cancellationToken).ConfigureAwait(false);
>>>>>>>
RestResponse<Collection> resp = await req.ExecuteGet<Collection>(cancellationToken).ConfigureAwait(false);
Collection item = await resp.GetDataObject().ConfigureAwait(false); |
<<<<<<<
=======
/// <summary>
/// Country ISO code ex. US
/// </summary>
public List<string> OriginCountry { get; set; }
public string OriginalLanguage { get; set; }
>>>>>>>
/// <summary>
/// Country ISO code ex. US
/// </summary>
public List<string> OriginCountry { get; set; }
public string OriginalLanguage { get; set; } |
<<<<<<<
[TestMethod]
public void TestADOTabularCSDLVisitorMeasures()
{
var c = new ADOTabularConnection(@"Data Source=.\sql2014tb", AdomdType.AnalysisServices);
var v = new MetaDataVisitorCSDL(c);
var m = new ADOTabularModel(c, "AdventureWorks", "AdventureWorks", "Test AdventureWorks", "");
var tabs = new ADOTabularTableCollection(c, m);
foreach (var table in tabs)
{
var measures = table.Measures;
}
}
=======
[TestMethod]
public void TestColumnRenaming()
{
ADOTabularConnection c = new ADOTabularConnection("Data Source=localhost", AdomdType.AnalysisServices);
var dt = new DataTable();
dt.Columns.Add("table1[Column1]");
dt.Columns.Add("table2[Column1]");
dt.Columns.Add("table1[Column2]");
dt.Columns.Add("table2[Column3]");
ADOTabularConnection.FixColumnNaming(dt);
Assert.AreEqual("table1[Column1]", dt.Columns[0].ColumnName );
Assert.AreEqual("table2[Column1]",dt.Columns[1].ColumnName );
Assert.AreEqual("Column2", dt.Columns[2].ColumnName);
Assert.AreEqual("Column3", dt.Columns[3].ColumnName);
}
>>>>>>>
[TestMethod]
public void TestADOTabularCSDLVisitorMeasures()
{
var c = new ADOTabularConnection(@"Data Source=.\sql2014tb", AdomdType.AnalysisServices);
var v = new MetaDataVisitorCSDL(c);
var m = new ADOTabularModel(c, "AdventureWorks", "AdventureWorks", "Test AdventureWorks", "");
var tabs = new ADOTabularTableCollection(c, m);
foreach (var table in tabs)
{
var measures = table.Measures;
}
}
[TestMethod]
public void TestColumnRenaming()
{
ADOTabularConnection c = new ADOTabularConnection("Data Source=localhost", AdomdType.AnalysisServices);
var dt = new DataTable();
dt.Columns.Add("table1[Column1]");
dt.Columns.Add("table2[Column1]");
dt.Columns.Add("table1[Column2]");
dt.Columns.Add("table2[Column3]");
ADOTabularConnection.FixColumnNaming(dt);
Assert.AreEqual("table1[Column1]", dt.Columns[0].ColumnName );
Assert.AreEqual("table2[Column1]",dt.Columns[1].ColumnName );
Assert.AreEqual("Column2", dt.Columns[2].ColumnName);
Assert.AreEqual("Column3", dt.Columns[3].ColumnName);
} |
<<<<<<<
return new ScriptExecuteCommand(args.ScriptName, _scriptServiceRoot.FileSystem,
_scriptServiceRoot.PackageAssemblyResolver, _scriptServiceRoot.Executor, _scriptServiceRoot.ScriptPackResolver, _scriptServiceRoot.Logger);
=======
var executeCommand = new ExecuteScriptCommand(
args.ScriptName,
_scriptServiceRoot.FileSystem,
_scriptServiceRoot.Executor,
_scriptServiceRoot.ScriptPackResolver);
if (args.Restore)
{
var restoreCommand = new RestoreCommand(
args.ScriptName,
_scriptServiceRoot.FileSystem,
_scriptServiceRoot.PackageAssemblyResolver);
return new CompositeCommand(restoreCommand, executeCommand);
}
return executeCommand;
>>>>>>>
var executeCommand = new ExecuteScriptCommand(
args.ScriptName,
_scriptServiceRoot.FileSystem,
_scriptServiceRoot.Executor,
_scriptServiceRoot.ScriptPackResolver,
_scriptServiceRoot.Logger);
if (args.Restore)
{
var restoreCommand = new RestoreCommand(
args.ScriptName,
_scriptServiceRoot.FileSystem,
_scriptServiceRoot.PackageAssemblyResolver);
return new CompositeCommand(restoreCommand, executeCommand);
}
return executeCommand; |
<<<<<<<
=======
using System.Reflection;
using ScriptCs.Contracts;
>>>>>>>
using ScriptCs.Contracts; |
<<<<<<<
using DaxStudio.UI.Extensions;
=======
using DaxStudio.UI.Interfaces;
>>>>>>>
using DaxStudio.UI.Extensions;
using DaxStudio.UI.Interfaces; |
<<<<<<<
// Arrange
var args = new ScriptCsArgs { AllowPreRelease = false, Install = "", ScriptName = "test.csx" };
fileSystem.SetupGet(x => x.CurrentDirectory).Returns(CurrentDirectory);
// Act
factory.CreateCommand(args, new string[0]).Execute();
=======
var args = new ScriptCsArgs
{
AllowPreRelease = false,
Install = "",
ScriptName = "test.csx"
};
var fs = new Mock<IFileSystem>();
fs.SetupGet(x => x.CurrentDirectory).Returns("C:\\");
var resolver = new Mock<IPackageAssemblyResolver>();
var executor = new Mock<IScriptExecutor>();
var engine = new Mock<IScriptEngine>();
var scriptpackResolver = new Mock<IScriptPackResolver>();
var packageInstaller = new Mock<IPackageInstaller>();
var logger = new Mock<ILog>();
var filePreProcessor = new Mock<IFilePreProcessor>();
var assemblyName = new Mock<IAssemblyResolver>();
var root = new ScriptServices(fs.Object, resolver.Object, executor.Object, engine.Object, filePreProcessor.Object, scriptpackResolver.Object, packageInstaller.Object, logger.Object, assemblyName.Object);
var factory = new CommandFactory(root);
var result = factory.CreateCommand(args, new string[0]);
result.Execute();
>>>>>>>
// Arrange
var args = new ScriptCsArgs { AllowPreRelease = false, Install = "", ScriptName = "test.csx" };
fileSystem.SetupGet(x => x.CurrentDirectory).Returns(CurrentDirectory);
// Act
factory.CreateCommand(args, new string[0]).Execute();
<<<<<<<
assemblyUtility.Setup(x => x.IsManagedAssembly(It.Is<string>(y => y == NonManaged))).Returns(false);
=======
var root = new ScriptServices(fs.Object, resolver.Object, executor.Object, engine.Object, filePreProcessor.Object, scriptpackResolver.Object, packageInstaller.Object, logger.Object, assemblyName.Object);
>>>>>>>
assemblyUtility.Setup(x => x.IsManagedAssembly(It.Is<string>(y => y == NonManaged))).Returns(false);
<<<<<<<
.Returns(new ScriptResult { CompileException = new Exception("test") });
=======
.Returns(new ScriptResult {CompileException = new Exception("test")});
var engine = new Mock<IScriptEngine>();
var scriptpackResolver = new Mock<IScriptPackResolver>();
var packageInstaller = new Mock<IPackageInstaller>();
var logger = new Mock<ILog>();
var filePreProcessor = new Mock<IFilePreProcessor>();
var assemblyName = new Mock<IAssemblyResolver>();
var root = new ScriptServices(fs.Object, resolver.Object, executor.Object, engine.Object, filePreProcessor.Object, scriptpackResolver.Object, packageInstaller.Object, logger.Object, assemblyName.Object);
var factory = new CommandFactory(root);
var result = factory.CreateCommand(args, new string[0]);
>>>>>>>
.Returns(new ScriptResult {CompileException = new Exception("test")});
<<<<<<<
// Act
var result = factory.CreateCommand(args, new string[0]).Execute();
=======
var engine = new Mock<IScriptEngine>();
var scriptpackResolver = new Mock<IScriptPackResolver>();
var packageInstaller = new Mock<IPackageInstaller>();
var logger = new Mock<ILog>();
var filePreProcessor = new Mock<IFilePreProcessor>();
var assemblyName = new Mock<IAssemblyResolver>();
var root = new ScriptServices(fs.Object, resolver.Object, executor.Object, engine.Object, filePreProcessor.Object, scriptpackResolver.Object, packageInstaller.Object, logger.Object, assemblyName.Object);
var factory = new CommandFactory(root);
var result = factory.CreateCommand(args, new string[0]);
var commandResult = result.Execute();
>>>>>>>
// Act
var result = factory.CreateCommand(args, new string[0]).Execute(); |
<<<<<<<
using System.Globalization;
using log4net.Core;
=======
[ArgExample("scriptcs server.csx -debug", "Shows how to start the script with debug mode switched on")]
>>>>>>>
[ArgExample("scriptcs server.csx -debug", "Shows how to start the script with debug mode switched on")]
<<<<<<<
private const string ValidLogLevels = "error, info, debug, trace";
private string _logLevel;
[ArgDescription("Script file name")]
=======
[ArgDescription("Script file name, must be specified first")]
>>>>>>>
private const string ValidLogLevels = "error, info, debug, trace";
private string _logLevel;
[ArgDescription("Script file name, must be specified first")]
<<<<<<<
[ArgDescription("Flag which defines the log level used. Possible values:" + ValidLogLevels)]
[ArgShortcut("log")]
[DefaultValue("info")]
public string LogLevel
{
get
{
return _logLevel;
}
set
{
_logLevel = value.ToUpper(CultureInfo.CurrentUICulture);
}
}
=======
[ArgDescription("Installs and restores packages which are specified in packages.config")]
>>>>>>>
[ArgDescription("Flag which defines the log level used. Possible values:" + ValidLogLevels)]
[ArgShortcut("log")]
[DefaultValue("info")]
public string LogLevel
{
get
{
return _logLevel;
}
set
{
_logLevel = value.ToUpper(CultureInfo.CurrentUICulture);
}
}
[ArgDescription("Installs and restores packages which are specified in packages.config")]
<<<<<<<
public bool IsValid()
{
return (!string.IsNullOrWhiteSpace(ScriptName) || Install != null) && this.IsLogLevelValid();
}
private bool IsLogLevelValid()
{
if (!ValidLogLevels.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Contains(LogLevel))
{
return false;
}
var repository = LogManager.GetRepository();
var levelMap = repository.LevelMap;
return levelMap
.AllLevels
.Cast<Level>()
.Any(level =>
level.Name.Equals(LogLevel, StringComparison.CurrentCulture));
}
=======
>>>>>>>
public bool IsValid()
{
return (!string.IsNullOrWhiteSpace(ScriptName) || Install != null) && this.IsLogLevelValid();
}
private bool IsLogLevelValid()
{
if (!ValidLogLevels.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Contains(LogLevel))
{
return false;
}
var repository = LogManager.GetRepository();
var levelMap = repository.LevelMap;
return levelMap
.AllLevels
.Cast<Level>()
.Any(level =>
level.Name.Equals(LogLevel, StringComparison.CurrentCulture));
} |
<<<<<<<
using Common.Logging;
=======
using System.Reflection;
>>>>>>>
using System.Reflection;
using Common.Logging;
<<<<<<<
_logger.Debug("Retrieving script packs contexts");
var contexts = scriptPackSession.ScriptPacks.Select(x => x.GetContext());
_logger.Debug("Creating script host");
var host = _scriptHostFactory.CreateScriptHost(contexts);
_logger.Debug("Creating session");
=======
var host = _scriptHostFactory.CreateScriptHost(new ScriptPackManager(scriptPackSession.Contexts));
>>>>>>>
_logger.Debug("Creating script host");
var host = _scriptHostFactory.CreateScriptHost(new ScriptPackManager(scriptPackSession.Contexts));
_logger.Debug("Creating session"); |
<<<<<<<
public ScriptExecutor(IFileSystem fileSystem, IFilePreProcessor filePreProcessor, IScriptEngine scriptEngine, IScriptHostFactory scriptHostFactory)
=======
[ImportingConstructor]
public ScriptExecutor(IFileSystem fileSystem, [Import(Constants.RunContractName)]IFilePreProcessor filePreProcessor, [Import(Constants.RunContractName)]IScriptEngine scriptEngine)
>>>>>>>
public ScriptExecutor(IFileSystem fileSystem, IFilePreProcessor filePreProcessor, IScriptEngine scriptEngine) |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.