conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
/// Looks up a localized string similar to 动画路径.
=======
/// 查找类似 添加项 的本地化字符串。
/// </summary>
public static string AddItem {
get {
return ResourceManager.GetString("AddItem", resourceCulture);
}
}
/// <summary>
/// 查找类似 动画路径 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 动画路径.
/// 查找类似 添加项 的本地化字符串。
/// </summary>
public static string AddItem {
get {
return ResourceManager.GetString("AddItem", resourceCulture);
}
}
/// <summary>
/// 查找类似 动画路径 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 在这里拖拽.
=======
/// 查找类似 分割线 的本地化字符串。
/// </summary>
public static string Divider {
get {
return ResourceManager.GetString("Divider", resourceCulture);
}
}
/// <summary>
/// 查找类似 在这里拖拽 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 在这里拖拽.
/// 查找类似 分割线 的本地化字符串。
/// </summary>
public static string Divider {
get {
return ResourceManager.GetString("Divider", resourceCulture);
}
}
/// <summary>
/// 查找类似 在这里拖拽 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to Gif图片.
=======
/// 查找类似 漂浮块 的本地化字符串。
/// </summary>
public static string FloatingBlock {
get {
return ResourceManager.GetString("FloatingBlock", resourceCulture);
}
}
/// <summary>
/// 查找类似 Gif图片 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to Gif图片.
/// 查找类似 漂浮块 的本地化字符串。
/// </summary>
public static string FloatingBlock {
get {
return ResourceManager.GetString("FloatingBlock", resourceCulture);
}
}
/// <summary>
/// 查找类似 Gif图片 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 混合布局.
=======
/// 查找类似 阴影画笔生成器 的本地化字符串。
/// </summary>
public static string HatchBrushGenerator {
get {
return ResourceManager.GetString("HatchBrushGenerator", resourceCulture);
}
}
/// <summary>
/// 查找类似 蜂窝布局 的本地化字符串。
/// </summary>
public static string HoneycombPanel {
get {
return ResourceManager.GetString("HoneycombPanel", resourceCulture);
}
}
/// <summary>
/// 查找类似 混合布局 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 混合布局.
/// 查找类似 阴影画笔生成器 的本地化字符串。
/// </summary>
public static string HatchBrushGenerator {
get {
return ResourceManager.GetString("HatchBrushGenerator", resourceCulture);
}
}
/// <summary>
/// 查找类似 蜂窝布局 的本地化字符串。
/// </summary>
public static string HoneycombPanel {
get {
return ResourceManager.GetString("HoneycombPanel", resourceCulture);
}
}
/// <summary>
/// 查找类似 混合布局 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 名称.
=======
/// 查找类似 变形动画 的本地化字符串。
/// </summary>
public static string Morphing_Animation {
get {
return ResourceManager.GetString("Morphing Animation", resourceCulture);
}
}
/// <summary>
/// 查找类似 名称 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 名称.
/// 查找类似 变形动画 的本地化字符串。
/// </summary>
public static string Morphing_Animation {
get {
return ResourceManager.GetString("Morphing Animation", resourceCulture);
}
}
/// <summary>
/// 查找类似 名称 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 托盘图标.
=======
/// 查找类似 桌面通知 的本地化字符串。
/// </summary>
public static string Notification {
get {
return ResourceManager.GetString("Notification", resourceCulture);
}
}
/// <summary>
/// 查找类似 托盘图标 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 托盘图标.
/// 查找类似 桌面通知 的本地化字符串。
/// </summary>
public static string Notification {
get {
return ResourceManager.GetString("Notification", resourceCulture);
}
}
/// <summary>
/// 查找类似 托盘图标 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 轮廓文本.
=======
/// 查找类似 打开精灵 的本地化字符串。
/// </summary>
public static string OpenSprite {
get {
return ResourceManager.GetString("OpenSprite", resourceCulture);
}
}
/// <summary>
/// 查找类似 轮廓文本 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 轮廓文本.
/// 查找类似 打开精灵 的本地化字符串。
/// </summary>
public static string OpenSprite {
get {
return ResourceManager.GetString("OpenSprite", resourceCulture);
}
}
/// <summary>
/// 查找类似 轮廓文本 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 重复按钮.
=======
/// 查找类似 删除项 的本地化字符串。
/// </summary>
public static string RemoveItem {
get {
return ResourceManager.GetString("RemoveItem", resourceCulture);
}
}
/// <summary>
/// 查找类似 重复按钮 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 重复按钮.
/// 查找类似 删除项 的本地化字符串。
/// </summary>
public static string RemoveItem {
get {
return ResourceManager.GetString("RemoveItem", resourceCulture);
}
}
/// <summary>
/// 查找类似 重复按钮 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 滚动视图.
=======
/// 查找类似 滚动块 的本地化字符串。
/// </summary>
public static string RunningBlock {
get {
return ResourceManager.GetString("RunningBlock", resourceCulture);
}
}
/// <summary>
/// 查找类似 滚动视图 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 滚动视图.
/// 查找类似 滚动块 的本地化字符串。
/// </summary>
public static string RunningBlock {
get {
return ResourceManager.GetString("RunningBlock", resourceCulture);
}
}
/// <summary>
/// 查找类似 滚动视图 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 徽章.
=======
/// 查找类似 发送通知 的本地化字符串。
/// </summary>
public static string SendNotification {
get {
return ResourceManager.GetString("SendNotification", resourceCulture);
}
}
/// <summary>
/// 查找类似 徽章 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 徽章.
/// 查找类似 发送通知 的本地化字符串。
/// </summary>
public static string SendNotification {
get {
return ResourceManager.GetString("SendNotification", resourceCulture);
}
}
/// <summary>
/// 查找类似 徽章 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 步骤.
=======
/// 查找类似 分割按钮 的本地化字符串。
/// </summary>
public static string SplitButton {
get {
return ResourceManager.GetString("SplitButton", resourceCulture);
}
}
/// <summary>
/// 查找类似 精灵 的本地化字符串。
/// </summary>
public static string Sprite {
get {
return ResourceManager.GetString("Sprite", resourceCulture);
}
}
/// <summary>
/// 查找类似 保持打开 的本地化字符串。
/// </summary>
public static string StaysOpen {
get {
return ResourceManager.GetString("StaysOpen", resourceCulture);
}
}
/// <summary>
/// 查找类似 步骤 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 步骤.
/// 查找类似 分割按钮 的本地化字符串。
/// </summary>
public static string SplitButton {
get {
return ResourceManager.GetString("SplitButton", resourceCulture);
}
}
/// <summary>
/// 查找类似 精灵 的本地化字符串。
/// </summary>
public static string Sprite {
get {
return ResourceManager.GetString("Sprite", resourceCulture);
}
}
/// <summary>
/// 查找类似 保持打开 的本地化字符串。
/// </summary>
public static string StaysOpen {
get {
return ResourceManager.GetString("StaysOpen", resourceCulture);
}
}
/// <summary>
/// 查找类似 步骤 的本地化字符串。
<<<<<<<
/// Looks up a localized string similar to 穿梭框.
=======
/// 查找类似 工具 的本地化字符串。
/// </summary>
public static string Tools {
get {
return ResourceManager.GetString("Tools", resourceCulture);
}
}
/// <summary>
/// 查找类似 穿梭框 的本地化字符串。
>>>>>>>
/// Looks up a localized string similar to 穿梭框.
/// 查找类似 工具 的本地化字符串。
/// </summary>
public static string Tools {
get {
return ResourceManager.GetString("Tools", resourceCulture);
}
}
/// <summary>
/// 查找类似 穿梭框 的本地化字符串。 |
<<<<<<<
public static readonly string NotifyIconDemoCtl = nameof(NotifyIconDemoCtl);
=======
public static readonly string BadgeDemoCtl = nameof(BadgeDemoCtl);
public static readonly string GravatarDemoCtl = nameof(GravatarDemoCtl);
public static readonly string DialogDemoCtl = nameof(DialogDemoCtl);
>>>>>>>
public static readonly string NotifyIconDemoCtl = nameof(NotifyIconDemoCtl);
public static readonly string BadgeDemoCtl = nameof(BadgeDemoCtl);
public static readonly string GravatarDemoCtl = nameof(GravatarDemoCtl);
public static readonly string DialogDemoCtl = nameof(DialogDemoCtl); |
<<<<<<<
=======
namespace Android.Gms.Games.Request
{
}
>>>>>>>
<<<<<<<
=======
namespace Android.Gms.Games.Quest
{
}
namespace Android.Gms.Games.Video
{
}
>>>>>>> |
<<<<<<<
using System.Web.Routing;
using Glimpse.Core2.Extensibility;
=======
using Glimpse.Core.Extensibility;
>>>>>>>
using System.Web.Routing;
using Glimpse.Core.Extensibility;
<<<<<<<
/// <summary>
/// PipelineInspector which will replace any routes in the route table
/// with a proxied version (from Glimpse.AspNet.AlternateImplementation.Route)
/// </summary>
public class RoutesInspector:IPipelineInspector
=======
public class RoutesInspector : IPipelineInspector
>>>>>>>
/// <summary>
/// PipelineInspector which will replace any routes in the route table
/// with a proxied version (from Glimpse.AspNet.AlternateImplementation.Route)
/// </summary>
public class RoutesInspector : IPipelineInspector |
<<<<<<<
RouteHashCode = invocationTarget.GetHashCode();
RouteName = routeName;
=======
RouteHashCode = routeHashCode;
>>>>>>>
RouteHashCode = routeHashCode;
RouteName = routeName; |
<<<<<<<
=======
using System.Linq;
using System.Reflection;
using System.Text;
>>>>>>>
using System.Linq;
using System.Reflection;
using System.Text;
<<<<<<<
context.TabStore.Setup(x => x.Contains(typeof(IList<ITimerResultMessage>).AssemblyQualifiedName)).Returns(true);
context.TabStore.Setup(x => x.Get(typeof(IList<ITimerResultMessage>).AssemblyQualifiedName)).Returns(BuildMessages());
=======
context.TabStore.Setup(x => x.Get<IEnumerable<ITimelineMessage>>(typeof(ITimelineMessage).FullName)).Returns(BuildMessages());
>>>>>>>
context.TabStore.Setup(x => x.Contains(typeof(IList<ITimelineMessage>).AssemblyQualifiedName)).Returns(true);
context.TabStore.Setup(x => x.Get(typeof(IList<ITimelineMessage>).AssemblyQualifiedName)).Returns(BuildMessages());
<<<<<<<
context.TabStore.Setup(x => x.Get(typeof(ITimerResultMessage).FullName)).Returns((IEnumerable<ITimerResultMessage>)null);
=======
context.TabStore.Setup(x => x.Get<IEnumerable<ITimelineMessage>>(typeof(ITimelineMessage).FullName)).Returns((IEnumerable<ITimelineMessage>)null);
>>>>>>>
context.TabStore.Setup(x => x.Get(typeof(ITimelineMessage).FullName)).Returns((IEnumerable<ITimelineMessage>)null); |
<<<<<<<
public void SendGiveItem(int id, int pokemon)
{
string toSend = "{|.|/giveitem " + pokemon + "," + id;
SendPacket(toSend);
}
=======
public void SendTakeItem(int pokemon)
{
string toSend = "{|.|/takeitem " + pokemon;
SendPacket(toSend);
}
>>>>>>>
public void SendGiveItem(int id, int pokemon)
{
string toSend = "{|.|/giveitem " + pokemon + "," + id;
SendPacket(toSend);
}
public void SendTakeItem(int pokemon)
{
string toSend = "{|.|/takeitem " + pokemon;
SendPacket(toSend);
}
<<<<<<<
public void GiveItem(int id, int pokemonUid)
{
if (!(pokemonUid >= 0 && pokemonUid <= 6) || !HasItemId(id))
{
return;
}
InventoryItem item = GetItemFromId(id);
if (item == null || item.Quantity == 0)
{
return;
}
{
if (!_itemUseTimeout.IsActive && !IsInBattle
&& (item.Scope == 2 || item.Scope == 3 || item.Scope == 9 || item.Scope == 13
|| item.Scope == 14 || item.Scope == 5 || item.Scope == 12 || item.Scope == 6))
{
SendGiveItem(id, pokemonUid);
_itemUseTimeout.Set();
}
}
}
=======
public void TakeItem(int pokemonUid)
{
if (!(pokemonUid >= 0 && pokemonUid <= 6))
{
return;
}
if (!(_itemUseTimeout.IsActive))
{
SendTakeItem(pokemonUid);
_itemUseTimeout.Set();
}
}
>>>>>>>
public void GiveItem(int id, int pokemonUid)
{
if (!(pokemonUid >= 0 && pokemonUid <= 6) || !HasItemId(id))
{
return;
}
InventoryItem item = GetItemFromId(id);
if (item == null || item.Quantity == 0)
{
return;
}
{
if (!_itemUseTimeout.IsActive && !IsInBattle
&& (item.Scope == 2 || item.Scope == 3 || item.Scope == 9 || item.Scope == 13
|| item.Scope == 14 || item.Scope == 5 || item.Scope == 12 || item.Scope == 6))
{
SendGiveItem(id, pokemonUid);
_itemUseTimeout.Set();
}
}
}
public void TakeItem(int pokemonUid)
{
if (!(pokemonUid >= 0 && pokemonUid <= 6))
{
return;
}
if (!(_itemUseTimeout.IsActive))
{
SendTakeItem(pokemonUid);
_itemUseTimeout.Set();
}
} |
<<<<<<<
public event Action<string> LogMessage;
private const string Version = "Sinnoh";
=======
private const string Version = "Spooky";
>>>>>>>
public event Action<string> LogMessage;
private const string Version = "Spooky"; |
<<<<<<<
if (boleto.Carteira.Equals("17-019") || boleto.Carteira.Equals("17-027") || boleto.Carteira.Equals("17-035"))
_segmentoP += "7";
else
_segmentoP += "0";
=======
if (boleto.ModalidadeCobranca == 0) {
if (boleto.Carteira.Equals("17-019") || boleto.Carteira.Equals("17-027"))
_segmentoP += "7";
else
_segmentoP += "0";
} else {
_segmentoP += boleto.ModalidadeCobranca.ToString();
}
>>>>>>>
if (boleto.ModalidadeCobranca == 0) {
if (boleto.Carteira.Equals("17-019") || boleto.Carteira.Equals("17-027") || boleto.Carteira.Equals("17-035"))
_segmentoP += "7";
else
_segmentoP += "0";
} else {
_segmentoP += boleto.ModalidadeCobranca.ToString();
} |
<<<<<<<
AuthenticationOptions = new FileAuthenticationOptions();
=======
HttpHandlerOptions = new FileHttpHandlerOptions();
>>>>>>>
AuthenticationOptions = new FileAuthenticationOptions();
HttpHandlerOptions = new FileHttpHandlerOptions();
<<<<<<<
public FileAuthenticationOptions AuthenticationOptions { get; set; }
=======
public FileHttpHandlerOptions HttpHandlerOptions { get; set; }
>>>>>>>
public FileAuthenticationOptions AuthenticationOptions { get; set; }
public FileHttpHandlerOptions HttpHandlerOptions { get; set; } |
<<<<<<<
public ReRouteBuilder WithAuthenticationProviderKey(string authenticationProviderKey)
{
_authenticationProviderKey = authenticationProviderKey;
return this;
}
=======
public ReRouteBuilder WithHttpHandlerOptions(HttpHandlerOptions input)
{
_httpHandlerOptions = input;
return this;
}
>>>>>>>
public ReRouteBuilder WithAuthenticationProviderKey(string authenticationProviderKey)
{
_authenticationProviderKey = authenticationProviderKey;
return this;
}
public ReRouteBuilder WithHttpHandlerOptions(HttpHandlerOptions input)
{
_httpHandlerOptions = input;
return this;
}
<<<<<<<
_rateLimitOptions,
_authenticationProviderKey);
=======
_rateLimitOptions,
_httpHandlerOptions);
>>>>>>>
_rateLimitOptions,
_httpHandlerOptions); |
<<<<<<<
private int _exceptionsAllowedBeforeBreaking;
private int _durationOfBreak;
private int _timeoutValue;
=======
private string _loadBalancer;
private string _serviceProviderHost;
private int _serviceProviderPort;
>>>>>>>
private int _exceptionsAllowedBeforeBreaking;
private int _durationOfBreak;
private int _timeoutValue;
private string _loadBalancer;
private string _serviceProviderHost;
private int _serviceProviderPort;
<<<<<<<
public ReRouteBuilder WithExceptionsAllowedBeforeBreaking(int exceptionsAllowedBeforeBreaking)
{
_exceptionsAllowedBeforeBreaking = exceptionsAllowedBeforeBreaking;
return this;
}
public ReRouteBuilder WithDurationOfBreak(int durationOfBreak)
{
_durationOfBreak = durationOfBreak;
return this;
}
public ReRouteBuilder WithTimeoutValue(int timeoutValue)
{
_timeoutValue = timeoutValue;
return this;
}
public ReRoute Build()
=======
public ReRouteBuilder WithLoadBalancerKey(string loadBalancerKey)
>>>>>>>
public ReRouteBuilder WithExceptionsAllowedBeforeBreaking(int exceptionsAllowedBeforeBreaking)
{
_exceptionsAllowedBeforeBreaking = exceptionsAllowedBeforeBreaking;
return this;
}
public ReRouteBuilder WithDurationOfBreak(int durationOfBreak)
{
_durationOfBreak = durationOfBreak;
return this;
}
public ReRouteBuilder WithTimeoutValue(int timeoutValue)
{
_timeoutValue = timeoutValue;
return this;
}
public ReRouteBuilder WithLoadBalancerKey(string loadBalancerKey)
<<<<<<<
_isAuthorised, _claimToQueries, _requestIdHeaderKey, _isCached, _fileCacheOptions, _serviceName,
_useServiceDiscovery, _serviceDiscoveryAddress, _serviceDiscoveryProvider, downstreamHostFunc, _downstreamScheme,
_exceptionsAllowedBeforeBreaking,_durationOfBreak, _timeoutValue);
=======
_isAuthorised, _claimToQueries, _requestIdHeaderKey, _isCached, _fileCacheOptions, _downstreamScheme, _loadBalancer,
_downstreamHost, _dsPort, _loadBalancerKey, new ServiceProviderConfiguraion(_serviceName, _downstreamHost, _dsPort, _useServiceDiscovery, _serviceDiscoveryProvider, _serviceProviderHost, _serviceProviderPort));
>>>>>>>
_isAuthorised, _claimToQueries, _requestIdHeaderKey, _isCached, _fileCacheOptions, _downstreamScheme, _loadBalancer,
_downstreamHost, _dsPort, _loadBalancerKey, new ServiceProviderConfiguraion(_serviceName, _downstreamHost, _dsPort, _useServiceDiscovery, _serviceDiscoveryProvider, _serviceProviderHost, _serviceProviderPort),
_exceptionsAllowedBeforeBreaking,_durationOfBreak, _timeoutValue); |
<<<<<<<
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Ocelot.Errors;
using Ocelot.Infrastructure.RequestData;
using Ocelot.Logging;
using Ocelot.Middleware;
namespace Ocelot.Responder.Middleware
{
/// <summary>
/// Completes and returns the request and request body, if any pipeline errors occured then sets the appropriate HTTP status code instead.
/// </summary>
public class ResponderMiddleware : OcelotMiddleware
{
private readonly RequestDelegate _next;
private readonly IHttpResponder _responder;
private readonly IErrorsToHttpStatusCodeMapper _codeMapper;
private readonly IOcelotLogger _logger;
public ResponderMiddleware(RequestDelegate next,
IHttpResponder responder,
IOcelotLoggerFactory loggerFactory,
IRequestScopedDataRepository requestScopedDataRepository,
IErrorsToHttpStatusCodeMapper codeMapper)
:base(requestScopedDataRepository)
{
_next = next;
_responder = responder;
_codeMapper = codeMapper;
_logger = loggerFactory.CreateLogger<ResponderMiddleware>();
}
public async Task Invoke(HttpContext context)
{
_logger.LogTrace($"entered {MiddlwareName}");
_logger.LogTrace($"invoking next middleware from {MiddlwareName}");
await _next.Invoke(context);
_logger.LogTrace($"returned to {MiddlwareName} after next middleware completed");
if (PipelineError)
{
var errors = PipelineErrors;
_logger.LogError($"{errors.Count} pipeline errors found in {MiddlwareName}. Setting error response status code");
SetErrorResponse(context, errors);
}
else
{
_logger.LogDebug("no pipeline errors, setting and returning completed response");
await _responder.SetResponseOnHttpContext(context, HttpResponseMessage);
}
_logger.LogTrace($"completed {MiddlwareName}");
}
private void SetErrorResponse(HttpContext context, List<Error> errors)
{
var statusCode = _codeMapper.Map(errors);
if (!statusCode.IsError)
{
_responder.SetErrorResponseOnContext(context, statusCode.Data);
}
else
{
_responder.SetErrorResponseOnContext(context, 500);
}
}
}
=======
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Ocelot.Errors;
using Ocelot.Infrastructure.RequestData;
using Ocelot.Logging;
using Ocelot.Middleware;
namespace Ocelot.Responder.Middleware
{
public class ResponderMiddleware : OcelotMiddleware
{
private readonly RequestDelegate _next;
private readonly IHttpResponder _responder;
private readonly IErrorsToHttpStatusCodeMapper _codeMapper;
private readonly IOcelotLogger _logger;
public ResponderMiddleware(RequestDelegate next,
IHttpResponder responder,
IOcelotLoggerFactory loggerFactory,
IRequestScopedDataRepository requestScopedDataRepository,
IErrorsToHttpStatusCodeMapper codeMapper)
: base(requestScopedDataRepository)
{
_next = next;
_responder = responder;
_codeMapper = codeMapper;
_logger = loggerFactory.CreateLogger<ResponderMiddleware>();
}
public async Task Invoke(HttpContext context)
{
_logger.LogDebug("started error responder middleware");
await _next.Invoke(context);
_logger.LogDebug("calling next middleware");
if (PipelineError)
{
_logger.LogDebug("there is a pipeline error, getting errors");
var errors = PipelineErrors;
_logger.LogDebug("received errors setting error response");
SetErrorResponse(context, errors);
}
else
{
_logger.LogDebug("no pipeline error, setting response");
await _responder.SetResponseOnHttpContext(context, HttpResponseMessage);
}
}
private void SetErrorResponse(HttpContext context, List<Error> errors)
{
var statusCode = _codeMapper.Map(errors);
_responder.SetErrorResponseOnContext(context, statusCode);
}
}
>>>>>>>
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Ocelot.Errors;
using Ocelot.Infrastructure.RequestData;
using Ocelot.Logging;
using Ocelot.Middleware;
namespace Ocelot.Responder.Middleware
{
/// <summary>
/// Completes and returns the request and request body, if any pipeline errors occured then sets the appropriate HTTP status code instead.
/// </summary>
public class ResponderMiddleware : OcelotMiddleware
{
private readonly RequestDelegate _next;
private readonly IHttpResponder _responder;
private readonly IErrorsToHttpStatusCodeMapper _codeMapper;
private readonly IOcelotLogger _logger;
public ResponderMiddleware(RequestDelegate next,
IHttpResponder responder,
IOcelotLoggerFactory loggerFactory,
IRequestScopedDataRepository requestScopedDataRepository,
IErrorsToHttpStatusCodeMapper codeMapper)
:base(requestScopedDataRepository)
{
_next = next;
_responder = responder;
_codeMapper = codeMapper;
_logger = loggerFactory.CreateLogger<ResponderMiddleware>();
}
public async Task Invoke(HttpContext context)
{
_logger.LogTrace($"entered {MiddlwareName}");
_logger.LogTrace($"invoking next middleware from {MiddlwareName}");
await _next.Invoke(context);
_logger.LogTrace($"returned to {MiddlwareName} after next middleware completed");
if (PipelineError)
{
var errors = PipelineErrors;
_logger.LogError($"{errors.Count} pipeline errors found in {MiddlwareName}. Setting error response status code");
SetErrorResponse(context, errors);
}
else
{
_logger.LogDebug("no pipeline errors, setting and returning completed response");
await _responder.SetResponseOnHttpContext(context, HttpResponseMessage);
}
_logger.LogTrace($"completed {MiddlwareName}");
}
private void SetErrorResponse(HttpContext context, List<Error> errors)
{
var statusCode = _codeMapper.Map(errors);
_responder.SetErrorResponseOnContext(context, statusCode);
}
} |
<<<<<<<
Func<HostAndPort> downstreamHostAndPortFunc = () => new HostAndPort(reRoute.DownstreamHost.Trim('/'), reRoute.DownstreamPort);
=======
//note - not sure if this is the correct key, but this is probably the only unique key i can think of given my poor brain
var loadBalancerKey = $"{fileReRoute.UpstreamTemplate}{fileReRoute.UpstreamHttpMethod}";
ReRoute reRoute;
>>>>>>>
Func<HostAndPort> downstreamHostAndPortFunc = () => new HostAndPort(reRoute.DownstreamHost.Trim('/'), reRoute.DownstreamPort);
//note - not sure if this is the correct key, but this is probably the only unique key i can think of given my poor brain
var loadBalancerKey = $"{fileReRoute.UpstreamTemplate}{fileReRoute.UpstreamHttpMethod}";
ReRoute reRoute; |
<<<<<<<
if (!DoesVirtualDirectoryExist(site))
{
result.AddAlert("'{0}' doesn't exist. creating.", VirtualDirectoryPath);
CreateVirtualDirectory(site, iisManager);
result.AddGood("'{0}' was created", VirtualDirectoryPath);
}
iisManager.CommitChanges();
LogCoarseGrain("[iis7] {0}", Name);
=======
BuildVirtualDirectory(site, iisManager, result);
try
{
iisManager.CommitChanges();
IisUtility.WaitForIisToCompleteAnyOperations();
}
catch (COMException ex)
{
if (ProcessModelIdentityType == ProcessModelIdentityType.SpecificUser)
throw new DeploymentException("An exception occurred trying to apply deployment changes. If you are attempting to set the IIS " +
"Process Model's identity to a specific user then ensure that you are running DropKick with elevated privileges, or UAC is disabled.", ex);
throw;
}
LogCoarseGrain("[iis7] {0}", Name);
>>>>>>>
BuildVirtualDirectory(site, iisManager, result);
try
{
result.AddAlert("'{0}' doesn't exist. creating.", VdirPath);
iisManager.CommitChanges();
result.AddGood("'{0}' was created", VdirPath);
}
catch (COMException ex)
{
if (ProcessModelIdentityType == ProcessModelIdentityType.SpecificUser)
throw new DeploymentException("An exception occurred trying to apply deployment changes. If you are attempting to set the IIS " +
"Process Model's identity to a specific user then ensure that you are running DropKick with elevated privileges, or UAC is disabled.", ex);
throw;
}
LogCoarseGrain("[iis7] {0}", Name);
<<<<<<<
if (UseClassicPipeline) pool.ManagedPipelineMode = ManagedPipelineMode.Classic;
=======
result.AddGood("App pool '{0}' updated.", AppPoolName);
>>>>>>>
result.AddGood("App pool '{0}' updated.", AppPoolName);
<<<<<<<
var appPath = "/" + VirtualDirectoryPath;
foreach (var app in site.Applications)
{
if (app.Path.Equals(appPath))
{
LogIis("[iis7] Found the application '{0}'".FormatWith(VirtualDirectoryPath));
return;
}
}
var application = site.Applications.Add(appPath, PathOnServer);
LogIis("[iis7] Created application '{0}'", VirtualDirectoryPath);
application.ApplicationPoolName = AppPoolName;
LogFineGrain("[iis7] Set the ApplicationPool for '{0}' to '{1}'", VirtualDirectoryPath, AppPoolName);
}
void CheckVersionOfWindowsAndIis(DeploymentResult result)
{
int shouldBe6 = Environment.OSVersion.Version.Major;
if (shouldBe6 != 6) result.AddAlert("This machine does not have IIS7 on it");
}
=======
var appPath = "/" + VdirPath;
var application = site.Applications.FirstOrDefault(x => x.Path == appPath);
if (application == null)
{
result.AddAlert("'{0}' doesn't exist. creating.", VdirPath);
application = site.Applications.Add(appPath, PathOnServer);
LogFineGrain("[iis7] Created application '{0}'", VdirPath);
}
else
{
result.AddNote("'{0}' already exists. Updating settings.", VdirPath);
}
if (application.ApplicationPoolName != AppPoolName)
{
application.ApplicationPoolName = AppPoolName;
LogFineGrain("[iis7] Set the ApplicationPool for '{0}' to '{1}'", VdirPath, AppPoolName);
}
var vdir = application.VirtualDirectories["/"];
if (vdir.PhysicalPath != PathOnServer)
{
vdir.PhysicalPath = PathOnServer;
LogFineGrain("[iis7] Updated physical path for '{0}' to '{1}'", VdirPath, PathOnServer);
}
result.AddGood("'{0}' was created", VdirPath);
}
>>>>>>>
var appPath = "/" + VirtualDirectoryPath;
var application = site.Applications.FirstOrDefault(x => x.Path == appPath);
if (application == null)
{
result.AddAlert("'{0}' doesn't exist. creating.", VirtualDirectoryPath);
application = site.Applications.Add(appPath, PathOnServer);
LogFineGrain("[iis7] Created application '{0}'", VirtualDirectoryPath);
}
else
{
result.AddNote("'{0}' already exists. Updating settings.", VirtualDirectoryPath);
}
if (application.ApplicationPoolName != AppPoolName)
{
application.ApplicationPoolName = AppPoolName;
LogFineGrain("[iis7] Set the ApplicationPool for '{0}' to '{1}'", VirtualDirectoryPath, AppPoolName);
}
var vdir = application.VirtualDirectories["/"];
if (vdir.PhysicalPath != PathOnServer)
{
vdir.PhysicalPath = PathOnServer;
LogFineGrain("[iis7] Updated physical path for '{0}' to '{1}'", VirtualDirectoryPath, PathOnServer);
}
result.AddGood("'{0}' was created", VdirPath);
} |
<<<<<<<
ce.RegisterFunction("COT", 1, Cot);
=======
ce.RegisterFunction("CSCH", 1, Csch);
>>>>>>>
ce.RegisterFunction("COT", 1, Cot);
ce.RegisterFunction("CSCH", 1, Csch);
<<<<<<<
private static object Cot(List<Expression> p)
{
var tan = (double)Math.Tan(p[0]);
if (tan == 0)
throw new DivisionByZeroException();
return 1 / tan;
}
=======
private static object Csch(List<Expression> p)
{
if (Math.Abs((double)p[0].Evaluate()) < Double.Epsilon)
throw new DivisionByZeroException();
return 1 / Math.Sinh(p[0]);
}
>>>>>>>
private static object Cot(List<Expression> p)
{
var tan = (double)Math.Tan(p[0]);
if (tan == 0)
throw new DivisionByZeroException();
return 1 / tan;
}
private static object Csch(List<Expression> p)
{
if (Math.Abs((double)p[0].Evaluate()) < Double.Epsilon)
throw new DivisionByZeroException();
return 1 / Math.Sinh(p[0]);
} |
<<<<<<<
return string.Format("inline void {0} ({1} {2}, {3} {4}, out {5} {6})", GetFunctionName(),
ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot1Id).concreteValueType), argIn1,
ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot2Id).concreteValueType), argIn2,
ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), argOut);
=======
return string.Format("inline {0} {1} ({2} {3}, {4} {5})", NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot2Id).concreteValueType), GetFunctionName(), NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot1Id).concreteValueType), arg1Name, NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot2Id).concreteValueType), arg2Name);
>>>>>>>
return string.Format("inline void {0} ({1} {2}, {3} {4}, out {5} {6})", GetFunctionName(),
NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot1Id).concreteValueType), argIn1,
NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot2Id).concreteValueType), argIn2,
NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), argOut);
<<<<<<<
string outputValue = GetSlotValue(OutputSlotId, generationMode);
visitor.AddShaderChunk(string.Format("{0} {1};", ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), GetVariableNameForSlot(OutputSlotId)), true);
visitor.AddShaderChunk(GetFunctionCallBody(input1Value, input2Value, outputValue), true);
=======
visitor.AddShaderChunk(string.Format("{0} {1} = {2};", NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot2Id).concreteValueType), GetVariableNameForSlot(OutputSlotId), GetFunctionCallBody(input1Value, input2Value)), true);
>>>>>>>
string outputValue = GetSlotValue(OutputSlotId, generationMode);
visitor.AddShaderChunk(string.Format("{0} {1};", NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), GetVariableNameForSlot(OutputSlotId)), true);
visitor.AddShaderChunk(GetFunctionCallBody(input1Value, input2Value, outputValue), true);
<<<<<<<
string vectorString = "Vector";
int inputChannelCount = (int)SlotValueHelper.GetChannelCount(FindSlot<MaterialSlot>(InputSlot1Id).concreteValueType);
if (inputChannelCount == 1)
{
int outputChannelCount = (int)SlotValueHelper.GetChannelCount(FindSlot<MaterialSlot>(OutputSlotId).concreteValueType);
vectorString += ".";
for(int i = 0; i < outputChannelCount; i++)
vectorString += "x";
}
var outputString = new ShaderGenerator();
outputString.AddShaderChunk(GetFunctionPrototype("Vector", "Matrix", "Out"), false);
outputString.AddShaderChunk("{", false);
outputString.Indent();
outputString.AddShaderChunk(string.Format("Out = mul({0}, Matrix);", vectorString), false);
outputString.Deindent();
outputString.AddShaderChunk("}", false);
visitor.AddShaderChunk(outputString.GetShaderString(0), true);
=======
registry.ProvideFunction(GetFunctionName(), s =>
{
s.AppendLine(GetFunctionPrototype("arg1", "arg2"));
using (s.BlockScope())
{
s.AppendLine("return mul(arg1, arg2);");
}
});
>>>>>>>
string vectorString = "Vector";
int inputChannelCount = (int)SlotValueHelper.GetChannelCount(FindSlot<MaterialSlot>(InputSlot1Id).concreteValueType);
if (inputChannelCount == 1)
{
int outputChannelCount = (int)SlotValueHelper.GetChannelCount(FindSlot<MaterialSlot>(OutputSlotId).concreteValueType);
vectorString += ".";
for(int i = 0; i < outputChannelCount; i++)
vectorString += "x";
}
registry.ProvideFunction(GetFunctionName(), s =>
{
s.AppendLine("void {0} ({1} Vector, {2} Matrix, out {3} Out)",
GetFunctionName(),
NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot1Id).concreteValueType),
NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindInputSlot<MaterialSlot>(InputSlot2Id).concreteValueType),
NodeUtils.ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType));
using (s.BlockScope())
{
s.AppendLine("Out = mul({0}, Matrix);", vectorString);
}
}); |
<<<<<<<
/// <summary>
/// Sample implementation of a token cache which persists tokens specific to a user to Redis to be used in multi-tenanted scenarios
/// the key is the users object unique object identifier.
/// </summary>
=======
// sample implementation of a token cache which persists tokens specific to a user to redis to be used in multi tenanted scenarios
>>>>>>>
/// <summary>
/// Sample implementation of a token cache which persists tokens specific to a user to Redis to be used in multi-tenanted scenarios
/// the key is the users object unique object identifier.
/// </summary>
<<<<<<<
/// <summary>
/// Factory method to create instances of <see cref="MultiTenantSurveyApp.TokenStorage.RedisTokenCache"/>. The constructor
/// is intentionally made private. Since we need to do some async initialization, the instance of the class is not ready
/// for use at the completion of the constructor.
/// </summary>
/// <param name="connection">An instance of <see cref="StackExchange.Redis.IConnectionMultiplexer"/> to use for a connection to Redis.</param>
/// <param name="key">An instance of <see cref="MultiTenantSurveyApp.TokenStorage.TokenCacheKey"/> containing the key for the new cache.</param>
/// <param name="logger">An instance of <see cref="Microsoft.Extensions.Logging.ILogger"/> to use for logging.</param>
/// <returns>An initialized instance of <see cref="MultiTenantSurveyApp.TokenStorage.TokenCacheKey"/>.</returns>
=======
/// <summary>
/// This factory method loads up the dictionary in the base TokenCache class with the tokens read from redis.
/// Read http://www.cloudidentity.com/blog/2014/07/09/the-new-token-cache-in-adal-v2/ for more details on writing a custom token cache.
/// The post above explains why we need to load up the base class token cache dictionary as soon as the cache is created.
/// We want to do this asynchronously and this requires the factory method.
/// </summary>
/// <param name="connection"></param>
/// <param name="key"></param>
/// <param name="logger"></param>
/// <returns></returns>
>>>>>>>
/// <summary>
/// This factory method loads up the dictionary in the base TokenCache class with the tokens read from redis.
/// Read http://www.cloudidentity.com/blog/2014/07/09/the-new-token-cache-in-adal-v2/ for more details on writing a custom token cache.
/// The post above explains why we need to load up the base class token cache dictionary as soon as the cache is created.
/// This factory method is used to create instances of <see cref="MultiTenantSurveyApp.TokenStorage.RedisTokenCache"/>. The constructor
/// is intentionally made private, since we need to do some async initialization and the instance of the class is not ready
/// for use at the completion of the constructor.
/// </summary>
/// <param name="connection">An instance of <see cref="StackExchange.Redis.IConnectionMultiplexer"/> to use for a connection to Redis.</param>
/// <param name="key">An instance of <see cref="MultiTenantSurveyApp.TokenStorage.TokenCacheKey"/> containing the key for the new cache.</param>
/// <param name="logger">An instance of <see cref="Microsoft.Extensions.Logging.ILogger"/> to use for logging.</param>
/// <returns>An initialized instance of <see cref="MultiTenantSurveyApp.TokenStorage.TokenCacheKey"/>.</returns>
<<<<<<<
var cache = new RedisTokenCache(connection, key, logger);
await cache.InitializeAsync();
return cache;
=======
Guard.ArgumentNotNull(connection, "IConnectionMultiplexer");
Guard.ArgumentNotNull(key, "key");
Guard.ArgumentNotNull(logger, "logger");
var redisTokenCache = new RedisTokenCache();
await redisTokenCache.InitializeAsync(connection, key, logger).ConfigureAwait(false);
return redisTokenCache;
>>>>>>>
Guard.ArgumentNotNull(connection, "IConnectionMultiplexer");
Guard.ArgumentNotNull(key, "key");
Guard.ArgumentNotNull(logger, "logger");
var cache = new RedisTokenCache(connection, key, logger);
await cache.InitializeAsync()
.ConfigureAwait(false);
return cache;
<<<<<<<
=======
_cache = _connection.GetDatabase();
>>>>>>>
<<<<<<<
=======
await LoadFromStoreAsync().ConfigureAwait(false);
>>>>>>>
<<<<<<<
/// <summary>
/// Handles the AfterAccessNotification event, which is triggered right after ADAL accesses the cache.
/// </summary>
/// <param name="args">An instance of <see cref="Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCacheNotificationArgs"/> containing information for this event.</param>
=======
// Triggered right after ADAL accessed the cache.
>>>>>>>
/// <summary>
/// Handles the AfterAccessNotification event, which is triggered right after ADAL accesses the cache.
/// </summary>
/// <param name="args">An instance of <see cref="Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCacheNotificationArgs"/> containing information for this event.</param> |
<<<<<<<
private static string _clientId;
private static string[] _initScopes = new string[0];
private static Api[] _initApis = new Api[0];
private static readonly string[] DefaultScopes = new []
{
Scopes.Profile
};
=======
private static string _serverClientId;
private static string _clientId;
>>>>>>>
private static string _serverClientId;
private static string _clientId;
private static string[] _initScopes = new string[0];
private static Api[] _initApis = new Api[0];
private static readonly string[] DefaultScopes = new []
{
Scopes.Profile
};
<<<<<<<
gopBuilder.RequestIdToken(_clientId);
foreach (var s in _initScopes)
{
gopBuilder.RequestScopes(new Scope(s));
=======
gopBuilder.RequestServerAuthCode(_serverClientId, false);
}
if(!string.IsNullOrWhiteSpace(_clientId))
{
gopBuilder.requestIdToken(_clientId);
>>>>>>>
gopBuilder.RequestServerAuthCode(_serverClientId, false);
}
if(!string.IsNullOrWhiteSpace(_clientId))
{
gopBuilder.RequestIdToken(_clientId);
}
foreach (var s in _initScopes)
{
gopBuilder.RequestScopes(new Scope(s));
<<<<<<<
public static void Initialize(
Activity activity,
string clientId = null,
Api[] apis = null,
string[] scopes = null)
=======
public static void Initialize(Activity activity, string serverClientId = null, string clientId = null )
>>>>>>>
public static void Initialize(
Activity activity,
string serverClientId = null,
string clientId = null,
Api[] apis = null,
string[] scopes = null) |
<<<<<<<
if (extension == null) throw new ArgumentException("Empty extension is not supported.");
=======
if (extension == null) throw new Exception("Empty extension is not supported.");
extension = extension.Substring(1).ToLowerInvariant();
>>>>>>>
if (extension == null) throw new ArgumentException("Empty extension is not supported.");
extension = extension.Substring(1).ToLowerInvariant();
<<<<<<<
throw new ArgumentException(String.Format("Extension '{0}' is not supported. Supported extensions are '.xlsx' and '.xslm'.", extension));
=======
}
>>>>>>>
} |
<<<<<<<
=======
player.transform.LookAt(new Vector3(mousePos.x, player.transform.position.y, mousePos.z));
>>>>>>>
player.transform.LookAt(new Vector3(mousePos.x, player.transform.position.y, mousePos.z)); |
<<<<<<<
using System;
namespace NuGetPe
{
public static class Constants
{
internal const string PackageServiceEntitySetName = "Packages";
internal const string PackageRelationshipNamespace = "http://schemas.microsoft.com/packaging/2010/07/";
public static readonly string PackageExtension = ".nupkg";
public static readonly string ManifestExtension = ".nuspec";
public static readonly string ContentDirectory = "content";
public static readonly string LibDirectory = "lib";
public static readonly string ToolsDirectory = "tools";
public static readonly string BuildDirectory = "build";
// Starting from nuget 2.0, we use a file with the special name '_._' to represent an empty folder.
public const string PackageEmptyFileName = "_._";
// This is temporary until we fix the gallery to have proper first class support for this.
// The magic unpublished date is 1900-01-01T00:00:00
public static readonly DateTimeOffset Unpublished = new DateTimeOffset(1900, 1, 1, 0, 0, 0, TimeSpan.FromHours(-8));
}
=======
using System;
namespace NuGet
{
public static class Constants
{
internal const string PackageServiceEntitySetName = "Packages";
internal const string PackageRelationshipNamespace = "http://schemas.microsoft.com/packaging/2010/07/";
public static readonly string PackageExtension = ".nupkg";
public static readonly string ManifestExtension = ".nuspec";
public static readonly string ContentDirectory = "content";
public static readonly string LibDirectory = "lib";
public static readonly string ToolsDirectory = "tools";
public static readonly string BuildDirectory = "build";
// Starting from nuget 2.0, we use a file with the special name '_._' to represent an empty folder.
public const string PackageEmptyFileName = "_._";
// This is temporary until we fix the gallery to have proper first class support for this.
// The magic unpublished date is 1900-01-01T00:00:00
public static readonly DateTimeOffset Unpublished = new DateTimeOffset(1900, 1, 1, 0, 0, 0, TimeZoneInfo.Local.BaseUtcOffset);
}
>>>>>>>
using System;
namespace NuGetPe
{
public static class Constants
{
internal const string PackageServiceEntitySetName = "Packages";
internal const string PackageRelationshipNamespace = "http://schemas.microsoft.com/packaging/2010/07/";
public static readonly string PackageExtension = ".nupkg";
public static readonly string ManifestExtension = ".nuspec";
public static readonly string ContentDirectory = "content";
public static readonly string LibDirectory = "lib";
public static readonly string ToolsDirectory = "tools";
public static readonly string BuildDirectory = "build";
// Starting from nuget 2.0, we use a file with the special name '_._' to represent an empty folder.
public const string PackageEmptyFileName = "_._";
// This is temporary until we fix the gallery to have proper first class support for this.
// The magic unpublished date is 1900-01-01T00:00:00
public static readonly DateTimeOffset Unpublished = new DateTimeOffset(1900, 1, 1, 0, 0, 0, TimeZoneInfo.Local.BaseUtcOffset);
} |
<<<<<<<
=======
private void OnPackageRowDetailsLoaded(object sender, RoutedEventArgs e)
{
// align the nested ListView's columns with the parent DataGrid's columns
var packageRowDetails = (PackageRowDetails)sender;
packageRowDetails.ApplyBindings(PackageGrid);
}
private void OnPackageDoubleClick(object sender, RoutedEventArgs e)
{
var gridRow = (DataGridRow)sender;
var viewModel = (PackageInfoViewModel)gridRow.DataContext;
if (!viewModel.ShowingAllVersions)
{
viewModel.OpenCommand.Execute(null);
}
}
>>>>>>>
private void OnPackageDoubleClick(object sender, RoutedEventArgs e)
{
var gridRow = (DataGridRow)sender;
var viewModel = (PackageInfoViewModel)gridRow.DataContext;
if (!viewModel.ShowingAllVersions)
{
viewModel.OpenCommand.Execute(null);
}
} |
<<<<<<<
[assembly: AssemblyVersion("2.0.0")]
[assembly: AssemblyFileVersion("2.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0-alpha-0002")]
[assembly: AssemblyCopyright("Copyright © 2013-2016 Patrick Lioi")]
=======
[assembly: AssemblyVersion("1.0.1")]
[assembly: AssemblyFileVersion("1.0.1")]
[assembly: AssemblyInformationalVersion("1.0.1")]
[assembly: AssemblyCopyright("Copyright © 2013-2017 Patrick Lioi")]
>>>>>>>
[assembly: AssemblyVersion("2.0.0")]
[assembly: AssemblyFileVersion("2.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0-alpha-0002")]
[assembly: AssemblyCopyright("Copyright © 2013-2017 Patrick Lioi")] |
<<<<<<<
public class BasePage
{
protected readonly IApp app;
protected readonly bool OnAndroid;
protected readonly bool OniOS;
protected Func<AppQuery, AppQuery> Trait;
protected BasePage()
{
app = AppInitializer.App;
OnAndroid = app.GetType() == typeof(AndroidApp);
OniOS = app.GetType() == typeof(iOSApp);
InitializeCommonQueries();
}
protected BasePage(Func<AppQuery, AppQuery> androidTrait, Func<AppQuery, AppQuery> iOSTrait)
: this()
{
if (OnAndroid)
Trait = androidTrait;
if (OniOS)
Trait = iOSTrait;
AssertOnPage(TimeSpan.FromSeconds(30));
app.Screenshot("On " + this.GetType().Name);
}
protected BasePage(string androidTrait, string iOSTrait)
: this(x => x.Marked(androidTrait), x => x.Marked(iOSTrait))
{
}
/// <summary>
/// Verifies that the trait is still present. Defaults to no wait.
/// </summary>
/// <param name="timeout">Time to wait before the assertion fails</param>
public void AssertOnPage(TimeSpan? timeout = default(TimeSpan?))
{
if (Trait == null)
throw new NullReferenceException("Trait not set");
var message = "Unable to verify on page: " + this.GetType().Name;
if (timeout == null)
Assert.IsNotEmpty(app.Query(Trait), message);
else
Assert.DoesNotThrow(() => app.WaitForElement(Trait, timeout: timeout), message);
}
/// <summary>
/// Verifies that the trait is no longer present. Defaults to a two second wait.
/// </summary>
/// <param name="timeout">Time to wait before the assertion fails</param>
protected void WaitForPageToLeave(TimeSpan? timeout = default(TimeSpan?))
{
if (Trait == null)
throw new NullReferenceException("Trait not set");
timeout = timeout ?? TimeSpan.FromSeconds(2);
var message = "Unable to verify *not* on page: " + this.GetType().Name;
Assert.DoesNotThrow(() => app.WaitForNoElement(Trait, timeout: timeout), message);
}
=======
public class BasePage
{
protected readonly IApp App;
protected readonly bool OnAndroid;
protected readonly bool OniOS;
protected Func<AppQuery, AppQuery> Trait;
protected BasePage()
{
App = AppInitializer.App;
OnAndroid = App.GetType() == typeof (AndroidApp);
OniOS = App.GetType() == typeof (iOSApp);
InitializeCommonQueries();
}
protected BasePage(Func<AppQuery, AppQuery> androidTrait, Func<AppQuery, AppQuery> iOSTrait)
: this()
{
if (OnAndroid)
Trait = androidTrait;
if (OniOS)
Trait = iOSTrait;
AssertOnPage(TimeSpan.FromSeconds(30));
App.Screenshot("On " + GetType().Name);
}
protected BasePage(string androidTrait, string iOSTrait)
: this(x => x.Marked(androidTrait), x => x.Marked(iOSTrait))
{
}
/// <summary>
/// Verifies that the trait is still present. Defaults to no wait.
/// </summary>
/// <param name="timeout">Time to wait before the assertion fails</param>
protected void AssertOnPage(TimeSpan? timeout = default(TimeSpan?))
{
if (Trait == null)
throw new NullReferenceException("Trait not set");
var message = "Unable to verify on page: " + GetType().Name;
if (timeout == null)
Assert.IsNotEmpty(App.Query(Trait), message);
else
Assert.DoesNotThrow(() => App.WaitForElement(Trait, timeout: timeout), message);
}
/// <summary>
/// Verifies that the trait is no longer present. Defaults to a two second wait.
/// </summary>
/// <param name="timeout">Time to wait before the assertion fails</param>
protected void WaitForPageToLeave(TimeSpan? timeout = default(TimeSpan?))
{
if (Trait == null)
throw new NullReferenceException("Trait not set");
timeout = timeout ?? TimeSpan.FromSeconds(2);
var message = "Unable to verify *not* on page: " + GetType().Name;
Assert.DoesNotThrow(() => App.WaitForNoElement(Trait, timeout: timeout), message);
}
>>>>>>>
public class BasePage
{
protected readonly IApp App;
protected readonly bool OnAndroid;
protected readonly bool OniOS;
protected Func<AppQuery, AppQuery> Trait;
protected BasePage()
{
App = AppInitializer.App;
OnAndroid = App.GetType() == typeof(AndroidApp);
OniOS = App.GetType() == typeof(iOSApp);
InitializeCommonQueries();
}
protected BasePage(Func<AppQuery, AppQuery> androidTrait, Func<AppQuery, AppQuery> iOSTrait)
: this()
{
if (OnAndroid)
Trait = androidTrait;
if (OniOS)
Trait = iOSTrait;
AssertOnPage(TimeSpan.FromSeconds(30));
App.Screenshot("On " + this.GetType().Name);
}
protected BasePage(string androidTrait, string iOSTrait)
: this(x => x.Marked(androidTrait), x => x.Marked(iOSTrait))
{
}
/// <summary>
/// Verifies that the trait is still present. Defaults to no wait.
/// </summary>
/// <param name="timeout">Time to wait before the assertion fails</param>
public void AssertOnPage(TimeSpan? timeout = default(TimeSpan?))
{
if (Trait == null)
throw new NullReferenceException("Trait not set");
var message = "Unable to verify on page: " + this.GetType().Name;
if (timeout == null)
Assert.IsNotEmpty(App.Query(Trait), message);
else
Assert.DoesNotThrow(() => App.WaitForElement(Trait, timeout: timeout), message);
}
/// <summary>
/// Verifies that the trait is no longer present. Defaults to a two second wait.
/// </summary>
/// <param name="timeout">Time to wait before the assertion fails</param>
protected void WaitForPageToLeave(TimeSpan? timeout = default(TimeSpan?))
{
if (Trait == null)
throw new NullReferenceException("Trait not set");
timeout = timeout ?? TimeSpan.FromSeconds(2);
var message = "Unable to verify *not* on page: " + this.GetType().Name;
Assert.DoesNotThrow(() => App.WaitForNoElement(Trait, timeout: timeout), message);
}
<<<<<<<
Hamburger = x => x.Marked("Navigate up");
Tab = name => x => x.Id("design_menu_item_text").Text(name);
=======
_hamburger = x => x.Class("ImageButton").Marked("OK");
_tab = name => x => x.Class("NavigationMenuItemView").Text(name);
>>>>>>>
_hamburger = x => x.Marked("Navigate up");
_tab = name => x => x.Id("design_menu_item_text").Text(name); |
<<<<<<<
Acr.UserDialogs.IProgressDialog progress = null;
if (CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.Android ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.iOS ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.WindowsPhone)
{
progress = Acr.UserDialogs.UserDialogs.Instance.Progress("Saving trip...", show: false, maskType: Acr.UserDialogs.MaskType.Clear);
progress.IsDeterministic = false;
}
=======
var progress = Acr.UserDialogs.UserDialogs.Instance.Loading("Saving trip...", show: false, maskType: Acr.UserDialogs.MaskType.Clear);
>>>>>>>
var progress = Acr.UserDialogs.UserDialogs.Instance.Loading("Saving trip...", show: false, maskType: Acr.UserDialogs.MaskType.Clear);
if (CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.Android ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.iOS)
{
progress = Acr.UserDialogs.UserDialogs.Instance.Progress("Saving trip...", show: false, maskType: Acr.UserDialogs.MaskType.Clear);
progress.IsDeterministic = false;
}
<<<<<<<
if (CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.Android ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.iOS ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.WindowsPhone )
{
=======
>>>>>>>
if (CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.Android ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.iOS)
{
<<<<<<<
if (CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.Android ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.iOS ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.WindowsPhone)
{
=======
>>>>>>>
if (CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.Android ||
CrossDeviceInfo.Current.Platform == Plugin.DeviceInfo.Abstractions.Platform.iOS)
{ |
<<<<<<<
closedXMLFill.BackgroundColor = openXMLFill.PatternFill.BackgroundColor.ToClosedXMLColor(_colorList);
=======
closedXMLFill.BackgroundColor = GetColor(openXMLFill.PatternFill.BackgroundColor);
else
closedXMLFill.BackgroundColor = XLColor.FromIndex(64);
>>>>>>>
closedXMLFill.BackgroundColor = openXMLFill.PatternFill.BackgroundColor.ToClosedXMLColor(_colorList);
else
closedXMLFill.BackgroundColor = XLColor.FromIndex(64);
<<<<<<<
closedXMLFill.BackgroundColor = openXMLFill.PatternFill.ForegroundColor.ToClosedXMLColor(_colorList);
=======
closedXMLFill.BackgroundColor = GetColor(openXMLFill.PatternFill.ForegroundColor);
else
closedXMLFill.BackgroundColor = XLColor.FromIndex(64);
>>>>>>>
closedXMLFill.BackgroundColor = openXMLFill.PatternFill.ForegroundColor.ToClosedXMLColor(_colorList);
else
closedXMLFill.BackgroundColor = XLColor.FromIndex(64);
<<<<<<<
closedXMLFill.BackgroundColor = openXMLFill.PatternFill.BackgroundColor.ToClosedXMLColor(_colorList);
=======
closedXMLFill.BackgroundColor = GetColor(openXMLFill.PatternFill.BackgroundColor);
else
closedXMLFill.BackgroundColor = XLColor.FromIndex(64);
>>>>>>>
closedXMLFill.BackgroundColor = openXMLFill.PatternFill.BackgroundColor.ToClosedXMLColor(_colorList);
else
closedXMLFill.BackgroundColor = XLColor.FromIndex(64); |
<<<<<<<
[TestFixture(Platform.Android)]
[TestFixture(Platform.iOS)]
public abstract class AbstractSetup
{
protected IApp app;
protected Platform platform;
protected bool OnAndroid;
protected bool OniOS;
public AbstractSetup(Platform platform)
{
this.platform = platform;
}
[SetUp]
public virtual void BeforeEachTest()
{
app = AppInitializer.StartApp(platform);
OnAndroid = app.GetType() == typeof(AndroidApp);
OniOS = app.GetType() == typeof(iOSApp);
if (app.Query("Login with Facebook").Any())
{
new LoginPage ()
.SkipAuthentication ();
Thread.Sleep(2000);
}
=======
[TestFixture(Platform.iOS)]
public abstract class AbstractSetup
{
[SetUp]
public virtual void BeforeEachTest()
{
App = AppInitializer.StartApp(Platform);
OnAndroid = App.GetType() == typeof (AndroidApp);
OniOS = App.GetType() == typeof (iOSApp);
if (App.Query("Login with Facebook").Any())
{
new LoginPage()
.SkipAuthentication();
Thread.Sleep(2000);
}
>>>>>>>
[TestFixture(Platform.Android)]
[TestFixture(Platform.iOS)]
public abstract class AbstractSetup
{
protected IApp App;
protected Platform platform;
protected bool OnAndroid;
protected bool OniOS;
public AbstractSetup(Platform platform)
{
this.platform = platform;
}
[SetUp]
public virtual void BeforeEachTest()
{
App = AppInitializer.StartApp(platform);
OnAndroid = App.GetType() == typeof(AndroidApp);
OniOS = App.GetType() == typeof(iOSApp);
if (App.Query("Login with Facebook").Any())
{
new LoginPage ()
.SkipAuthentication ();
Thread.Sleep(2000);
}
<<<<<<<
}
else
{
if (!app.Query("LoginWithFacebook").Any())
{
app.TestServer.Post("/keychain", new object());
app = ConfigureApp.iOS.InstalledApp("com.microsoft.mydriving").StartApp();
}
}
}
}
=======
if (!App.Query("LoginWithFacebook").Any())
{
App.TestServer.Post("/keychain", new object());
App = ConfigureApp.iOS.StartApp();
}
}
}
>>>>>>>
}
else
{
if (!App.Query("LoginWithFacebook").Any())
{
App.TestServer.Post("/keychain", new object());
App = ConfigureApp.iOS.InstalledApp("com.microsoft.mydriving").StartApp();
}
}
}
} |
<<<<<<<
var typeface = Typeface.CreateFromAsset(Assets, "fonts/Corbert-Regular.otf");
FindViewById<TextView>(Resource.Id.text_app_name).Typeface = typeface;
//When the first screen of the app is launched after user has logged in, initialize the processor that manages connection to OBD Device and to the IOT Hub
MyTrips.Services.OBDDataProcessor.GetProcessor().Initialize(viewModel.StoreManager);
=======
>>>>>>>
var typeface = Typeface.CreateFromAsset(Assets, "fonts/Corbert-Regular.otf");
FindViewById<TextView>(Resource.Id.text_app_name).Typeface = typeface; |
<<<<<<<
Temperature = "N/A";
obdDataProcessor = new OBDDataProcessor();
}
=======
EngineLoad = "N/A";
this.obdDataProcessor = new OBDDataProcessor();
this.obdDataProcessor.OnOBDDeviceDisconnected += ObdDataProcessor_OnOBDDeviceDisconnected;
}
>>>>>>>
EngineLoad = "N/A";
obdDataProcessor = new OBDDataProcessor();
}
<<<<<<<
CurrentTrip.MainPhotoUrl = $"http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/{CurrentPosition.Latitude.ToString(CultureInfo.InvariantCulture)},{CurrentPosition.Longitude.ToString(CultureInfo.InvariantCulture)}/15?mapSize=500,220&key=J0glkbW63LO6FSVcKqr3~_qnRwBJkAvFYgT0SK7Nwyw~An57C8LonIvP00ncUAQrkNd_PNYvyT4-EnXiV0koE1KdDddafIAPFaL7NzXnELRn";
=======
//TODO: use real city here
CurrentTrip.MainPhotoUrl = $"http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/{CurrentPosition.Latitude.ToString(CultureInfo.InvariantCulture)},{CurrentPosition.Longitude.ToString(CultureInfo.InvariantCulture)}/13?mapSize=500,220&key=J0glkbW63LO6FSVcKqr3~_qnRwBJkAvFYgT0SK7Nwyw~An57C8LonIvP00ncUAQrkNd_PNYvyT4-EnXiV0koE1KdDddafIAPFaL7NzXnELRn";
>>>>>>>
CurrentTrip.MainPhotoUrl = $"http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/{CurrentPosition.Latitude.ToString(CultureInfo.InvariantCulture)},{CurrentPosition.Longitude.ToString(CultureInfo.InvariantCulture)}/15?mapSize=500,220&key=J0glkbW63LO6FSVcKqr3~_qnRwBJkAvFYgT0SK7Nwyw~An57C8LonIvP00ncUAQrkNd_PNYvyT4-EnXiV0koE1KdDddafIAPFaL7NzXnELRn";
<<<<<<<
foreach (var photo in photos)
{
photo.TripId = CurrentTrip.Id;
await StoreManager.PhotoStore.InsertAsync(photo);
}
try
{
//Store the packaged trip and OBD data locally before attempting to send to the IOT Hub
await obdDataProcessor.AddTripDataPointToBuffer(CurrentTrip);
=======
//Store the packaged trip and OBD data locally before attempting to send to the IOT Hub
await this.obdDataProcessor.AddTripDataPointToBuffer(CurrentTrip);
//Push the trip data packaged with the OBD data to the IOT Hub
await this.obdDataProcessor.PushTripDataToIOTHub();
>>>>>>>
foreach (var photo in photos)
{
photo.TripId = CurrentTrip.Id;
await StoreManager.PhotoStore.InsertAsync(photo);
}
try
{
//Store the packaged trip and OBD data locally before attempting to send to the IOT Hub
await obdDataProcessor.AddTripDataPointToBuffer(CurrentTrip); |
<<<<<<<
#if !BACKEND
=======
public DateTime RecordedTimeStamp { get; set; }
public int Rating { get; set; }
>>>>>>>
namespace MyTrips.DataObjects
{
/// <summary>
/// Note that this is the structure that was discussed with Haishi - is subject to change.
/// </summary>
public class Trip : BaseDataObject
{
public Trip()
{
Points = new List<TripPoint>();
Tips = new List<Tip>();
}
public string Name { get; set; }
public string UserId { get; set; }
public IList<TripPoint> Points { get; set; }
public IList<Tip> Tips { get; set; }
public DateTime RecordedTimeStamp { get; set; }
public int Rating { get; set; }
public bool IsComplete { get; set; }
public double AverageSpeed { get; set; }
public double Emissions { get; set; }
public double FuelUsed { get; set; }
public string MainPhotoUrl { get; set; }
#if BACKEND
public double Distance { get; set; }
#else
double distance;
/// <summary>
/// Gets or sets the total distance in miles.
/// </summary>
/// <value>The total distance.</value>
public double Distance
{
get { return distance; }
set { SetProperty(ref distance, value); }
}
<<<<<<<
public string EndTimeDisplay => (Points?.Count).GetValueOrDefault() > 0 ? Points[Points.Count - 1].TimeStamp.ToLocalTime().ToString("t") : string.Empty;
=======
public string EndTimeDisplay => (Trail?.Count).GetValueOrDefault() > 0 ? Trail[Trail.Count - 1].RecordedTimeStamp.ToLocalTime().ToString("t") : string.Empty;
>>>>>>>
public string EndTimeDisplay => (Points?.Count).GetValueOrDefault() > 0 ? Points[Points.Count - 1].RecordedTimeStamp.ToLocalTime().ToString("t") : string.Empty;
<<<<<<<
=======
public class Trail : BaseDataObject
{
public int SequenceId { get; set; }
public double Latitude { get; set; }
public double Longitude { get; set; }
public DateTime RecordedTimeStamp { get; set; }
public Dictionary<String, String> OBDData { get; set; }
}
public class Telemetry : BaseDataObject
{
public string Key { get; set; }
public string Value { get; set; }
}
//TODO: Conflicting with structure discussed with Haishi - commenting out for now and can discuss in next sync meeting
//public class Point : BaseDataObject
//{
// public string Elevation { get; set; }
// public DateTime Time { get; set; }
// public string Latitude { get; set; }
// public string Longitude { get; set; }
//}
//public class Trip : BaseDataObject
//{
// public string Name { get; set; }
// public List<Point> Points { get; set; }
// public double Distance { get; set; }
// public Feedback Feedback { get; set; }
// public DateTime StartTime { get; set; }
// public DateTime EndTime { get; set; }
// public double MPG { get; set; }
// public double Gallons { get; set; }
// public double Cost { get; set; }
//}
>>>>>>> |
<<<<<<<
using System;
using System.Drawing;
namespace ClosedXML.Excel
{
public enum XLColorType
{
Color,
Theme,
Indexed
}
public enum XLThemeColor
{
Background1,
Text1,
Background2,
Text2,
Accent1,
Accent2,
Accent3,
Accent4,
Accent5,
Accent6,
Hyperlink,
FollowedHyperlink
}
public partial class XLColor : IEquatable<XLColor>
{
private readonly XLColorType _colorType;
private int _hashCode;
private readonly Int32 _indexed;
private readonly XLThemeColor _themeColor;
private readonly Double _themeTint;
private Color _color;
public Boolean HasValue { get; private set; }
public XLColorType ColorType
{
get { return _colorType; }
}
public Color Color
{
get
{
if (_colorType == XLColorType.Theme)
throw new InvalidOperationException("Cannot convert theme color to Color.");
if (_colorType == XLColorType.Indexed)
return IndexedColors[_indexed].Color;
return _color;
}
}
public Int32 Indexed
{
get
{
if (ColorType == XLColorType.Theme)
throw new InvalidOperationException("Cannot convert theme color to indexed color.");
if (ColorType == XLColorType.Indexed)
return _indexed;
throw new InvalidOperationException("Cannot convert Color to indexed color.");
}
}
public XLThemeColor ThemeColor
{
get
{
if (ColorType == XLColorType.Theme)
return _themeColor;
if (ColorType == XLColorType.Indexed)
throw new InvalidOperationException("Cannot convert indexed color to theme color.");
throw new InvalidOperationException("Cannot convert Color to theme color.");
}
}
public Double ThemeTint
{
get
{
if (ColorType == XLColorType.Theme)
return _themeTint;
if (ColorType == XLColorType.Indexed)
throw new InvalidOperationException("Cannot extract theme tint from an indexed color.");
return _color.A/255.0;
}
}
#region IEquatable<XLColor> Members
public bool Equals(XLColor other)
{
if (_colorType == other._colorType)
{
if (_colorType == XLColorType.Color)
{
// .NET Color.Equals() will return false for Color.FromArgb(255, 255, 255, 255) == Color.White
// Therefore we compare the ToArgb() values
return _color.ToArgb() == other._color.ToArgb();
}
if (_colorType == XLColorType.Theme)
{
return _themeColor == other._themeColor
&& Math.Abs(_themeTint - other._themeTint) < XLHelper.Epsilon;
}
return _indexed == other._indexed;
}
return false;
}
#endregion
public override bool Equals(object obj)
{
return Equals((XLColor) obj);
}
public override int GetHashCode()
{
if (_hashCode == 0)
{
if (_colorType == XLColorType.Color)
_hashCode = _color.GetHashCode();
else if (_colorType == XLColorType.Theme)
_hashCode = _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
else
_hashCode = _indexed;
}
return _hashCode;
}
public override string ToString()
{
if (_colorType == XLColorType.Color)
return Color.ToHex();
if (_colorType == XLColorType.Theme)
return String.Format("Color Theme: {0}, Tint: {1}", _themeColor.ToString(), _themeTint.ToString());
return "Color Index: " + _indexed;
}
public static Boolean operator ==(XLColor left, XLColor right)
{
// If both are null, or both are same instance, return true.
if (ReferenceEquals(left, right)) return true;
// If one is null, but not both, return false.
if ((left as object) == null || (right as Object) == null) return false;
return left.Equals(right);
}
public static Boolean operator !=(XLColor left, XLColor right)
{
return !(left == right);
}
}
=======
using System;
using System.Drawing;
namespace ClosedXML.Excel
{
public enum XLColorType
{
Color,
Theme,
Indexed
}
public enum XLThemeColor
{
Background1,
Text1,
Background2,
Text2,
Accent1,
Accent2,
Accent3,
Accent4,
Accent5,
Accent6,
Hyperlink,
FollowedHyperlink
}
public partial class XLColor : IEquatable<XLColor>
{
/// <summary>
/// Usually indexed colors are limited to max 63
/// Index 81 is some special case.
/// Some people claim it's the index for tooltip color.
/// We'll return normal black when index 81 is found.
/// </summary>
private const Int32 TOOLTIPCOLORINDEX = 81;
private readonly XLColorType _colorType;
private int _hashCode;
private readonly Int32 _indexed;
private readonly XLThemeColor _themeColor;
private readonly Double _themeTint;
private Color _color;
public Boolean HasValue { get; private set; }
public XLColorType ColorType
{
get { return _colorType; }
}
public Color Color
{
get
{
if (_colorType == XLColorType.Theme)
throw new Exception("Cannot convert theme color to Color.");
if (_colorType == XLColorType.Indexed)
if (_indexed == TOOLTIPCOLORINDEX)
return Color.FromArgb(255, Color.Black);
else
return IndexedColors[_indexed].Color;
return _color;
}
}
public Int32 Indexed
{
get
{
if (ColorType == XLColorType.Theme)
throw new Exception("Cannot convert theme color to indexed color.");
if (ColorType == XLColorType.Indexed)
return _indexed;
throw new Exception("Cannot convert Color to indexed color.");
}
}
public XLThemeColor ThemeColor
{
get
{
if (ColorType == XLColorType.Theme)
return _themeColor;
if (ColorType == XLColorType.Indexed)
throw new Exception("Cannot convert indexed color to theme color.");
throw new Exception("Cannot convert Color to theme color.");
}
}
public Double ThemeTint
{
get
{
if (ColorType == XLColorType.Theme)
return _themeTint;
if (ColorType == XLColorType.Indexed)
throw new Exception("Cannot extract theme tint from an indexed color.");
return _color.A/255.0;
}
}
#region IEquatable<XLColor> Members
public bool Equals(XLColor other)
{
if (_colorType == other._colorType)
{
if (_colorType == XLColorType.Color)
{
// .NET Color.Equals() will return false for Color.FromArgb(255, 255, 255, 255) == Color.White
// Therefore we compare the ToArgb() values
return _color.ToArgb() == other._color.ToArgb();
}
if (_colorType == XLColorType.Theme)
{
return _themeColor == other._themeColor
&& Math.Abs(_themeTint - other._themeTint) < XLHelper.Epsilon;
}
return _indexed == other._indexed;
}
return false;
}
#endregion
public override bool Equals(object obj)
{
return Equals((XLColor) obj);
}
public override int GetHashCode()
{
if (_hashCode == 0)
{
if (_colorType == XLColorType.Color)
_hashCode = _color.GetHashCode();
else if (_colorType == XLColorType.Theme)
_hashCode = _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
else
_hashCode = _indexed;
}
return _hashCode;
}
public override string ToString()
{
if (_colorType == XLColorType.Color)
return Color.ToHex();
if (_colorType == XLColorType.Theme)
return String.Format("Color Theme: {0}, Tint: {1}", _themeColor.ToString(), _themeTint.ToString());
return "Color Index: " + _indexed;
}
public static Boolean operator ==(XLColor left, XLColor right)
{
// If both are null, or both are same instance, return true.
if (ReferenceEquals(left, right)) return true;
// If one is null, but not both, return false.
if ((left as object) == null || (right as Object) == null) return false;
return left.Equals(right);
}
public static Boolean operator !=(XLColor left, XLColor right)
{
return !(left == right);
}
}
>>>>>>>
using System;
using System.Drawing;
namespace ClosedXML.Excel
{
public enum XLColorType
{
Color,
Theme,
Indexed
}
public enum XLThemeColor
{
Background1,
Text1,
Background2,
Text2,
Accent1,
Accent2,
Accent3,
Accent4,
Accent5,
Accent6,
Hyperlink,
FollowedHyperlink
}
public partial class XLColor : IEquatable<XLColor>
{
/// <summary>
/// Usually indexed colors are limited to max 63
/// Index 81 is some special case.
/// Some people claim it's the index for tooltip color.
/// We'll return normal black when index 81 is found.
/// </summary>
private const Int32 TOOLTIPCOLORINDEX = 81;
private readonly XLColorType _colorType;
private int _hashCode;
private readonly Int32 _indexed;
private readonly XLThemeColor _themeColor;
private readonly Double _themeTint;
private Color _color;
public Boolean HasValue { get; private set; }
public XLColorType ColorType
{
get { return _colorType; }
}
public Color Color
{
get
{
if (_colorType == XLColorType.Theme)
throw new InvalidOperationException("Cannot convert theme color to Color.");
if (_colorType == XLColorType.Indexed)
if (_indexed == TOOLTIPCOLORINDEX)
return Color.FromArgb(255, Color.Black);
else
return IndexedColors[_indexed].Color;
return _color;
}
}
public Int32 Indexed
{
get
{
if (ColorType == XLColorType.Theme)
throw new InvalidOperationException("Cannot convert theme color to indexed color.");
if (ColorType == XLColorType.Indexed)
return _indexed;
throw new InvalidOperationException("Cannot convert Color to indexed color.");
}
}
public XLThemeColor ThemeColor
{
get
{
if (ColorType == XLColorType.Theme)
return _themeColor;
if (ColorType == XLColorType.Indexed)
throw new InvalidOperationException("Cannot convert indexed color to theme color.");
throw new InvalidOperationException("Cannot convert Color to theme color.");
}
}
public Double ThemeTint
{
get
{
if (ColorType == XLColorType.Theme)
return _themeTint;
if (ColorType == XLColorType.Indexed)
throw new InvalidOperationException("Cannot extract theme tint from an indexed color.");
return _color.A/255.0;
}
}
#region IEquatable<XLColor> Members
public bool Equals(XLColor other)
{
if (_colorType == other._colorType)
{
if (_colorType == XLColorType.Color)
{
// .NET Color.Equals() will return false for Color.FromArgb(255, 255, 255, 255) == Color.White
// Therefore we compare the ToArgb() values
return _color.ToArgb() == other._color.ToArgb();
}
if (_colorType == XLColorType.Theme)
{
return _themeColor == other._themeColor
&& Math.Abs(_themeTint - other._themeTint) < XLHelper.Epsilon;
}
return _indexed == other._indexed;
}
return false;
}
#endregion
public override bool Equals(object obj)
{
return Equals((XLColor) obj);
}
public override int GetHashCode()
{
if (_hashCode == 0)
{
if (_colorType == XLColorType.Color)
_hashCode = _color.GetHashCode();
else if (_colorType == XLColorType.Theme)
_hashCode = _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
else
_hashCode = _indexed;
}
return _hashCode;
}
public override string ToString()
{
if (_colorType == XLColorType.Color)
return Color.ToHex();
if (_colorType == XLColorType.Theme)
return String.Format("Color Theme: {0}, Tint: {1}", _themeColor.ToString(), _themeTint.ToString());
return "Color Index: " + _indexed;
}
public static Boolean operator ==(XLColor left, XLColor right)
{
// If both are null, or both are same instance, return true.
if (ReferenceEquals(left, right)) return true;
// If one is null, but not both, return false.
if ((left as object) == null || (right as Object) == null) return false;
return left.Equals(right);
}
public static Boolean operator !=(XLColor left, XLColor right)
{
return !(left == right);
}
} |
<<<<<<<
ICommand startTrackingTripCommand;
public ICommand StartTrackingTripCommand =>
startTrackingTripCommand ?? (startTrackingTripCommand = new RelayCommand(async () => await ExecuteStartTrackingTripCommandAsync()));
public async Task ExecuteStartTrackingTripCommandAsync ()
{
if(IsBusy || Geolocator.IsListening)
return;
try
{
=======
public async Task ExecuteStartTrackingTripCommandAsync()
{
if (IsBusy)
return;
>>>>>>>
public async Task ExecuteStartTrackingTripCommandAsync ()
{
if(IsBusy || Geolocator.IsListening)
return;
<<<<<<<
//every second, 5 meters
await Geolocator.StartListeningAsync(1000, 5);
}
else
{
Acr.UserDialogs.UserDialogs.Instance.Alert("Please ensure that geolocation is enabled and permissions are allowed for MyTrips to start a recording.",
"Geolcoation Disabled", "OK");
}
}
catch (Exception ex)
{
Logger.Instance.Report(ex);
}
finally
{
}
}
ICommand stopTrackingTripCommand;
public ICommand StopTrackingTripCommand =>
stopTrackingTripCommand ?? (stopTrackingTripCommand = new RelayCommand(async () => await ExecuteStopTrackingTripCommandAsync()));
public async Task ExecuteStopTrackingTripCommandAsync ()
{
if(IsBusy || !IsRecording)
return;
try
{
=======
await Geolocator.StartListeningAsync(1, 1);
}
else
{
Acr.UserDialogs.UserDialogs.Instance.Alert("Please ensure that geolocation is enabled and permissions are allowed for MyTrips to start a recording.",
"Geolcoation Disabled", "OK");
}
//Connect to the OBD device
await this.obdDataProcessor.Initialize();
await this.obdDataProcessor.ConnectToOBDDevice();
}
catch (Exception ex)
{
Logger.Instance.Report(ex);
}
finally
{
}
}
ICommand stopTrackingTripCommand;
public ICommand StopTrackingTripCommand =>
stopTrackingTripCommand ?? (stopTrackingTripCommand = new RelayCommand(async () => await ExecuteStopTrackingTripCommandAsync()));
public async Task ExecuteStopTrackingTripCommandAsync()
{
if (IsBusy || !IsRecording)
return;
try
{
>>>>>>>
//every second, 5 meters
await Geolocator.StartListeningAsync(1000, 5);
}
else
{
Acr.UserDialogs.UserDialogs.Instance.Alert("Please ensure that geolocation is enabled and permissions are allowed for MyTrips to start a recording.",
"Geolcoation Disabled", "OK");
}
//Connect to the OBD device
await this.obdDataProcessor.Initialize();
await this.obdDataProcessor.ConnectToOBDDevice();
}
catch (Exception ex)
{
Logger.Instance.Report(ex);
}
finally
{
}
}
ICommand stopTrackingTripCommand;
public ICommand StopTrackingTripCommand =>
stopTrackingTripCommand ?? (stopTrackingTripCommand = new RelayCommand(async () => await ExecuteStopTrackingTripCommandAsync()));
public async Task ExecuteStopTrackingTripCommandAsync()
{
if (IsBusy || !IsRecording)
return;
try
{
<<<<<<<
var timeDif = trail.TimeStamp - CurrentTrip.TimeStamp;
//track minutes first and then calculat the hours
if (timeDif.TotalMinutes < 1)
ElapsedTime = $"{timeDif.Seconds}s";
else if (timeDif.TotalHours > 0)
=======
var timeDif = trail.RecordedTimeStamp - CurrentTrip.RecordedTimeStamp;
//track minutes first and then calculat the hours
if (timeDif.TotalHours > 0)
>>>>>>>
var timeDif = trail.RecordedTimeStamp - CurrentTrip.RecordedTimeStamp;
//track minutes first and then calculat the hours
if (timeDif.TotalMinutes < 1)
ElapsedTime = $"{timeDif.Seconds}s";
else if (timeDif.TotalHours > 0) |
<<<<<<<
private static readonly string _defaultCopyrightWord = "Copyright";
private static readonly string _symbolLower = "(c)";
private static readonly string _symbolUpper = "(C)";
private readonly AssemblyCopyrightAttribute attribute;
/// <summary>
/// Initializes a new instance of the <see cref="CommandLine.Text.CopyrightInfo"/> class
/// with an assembly attribute, this overrides all formatting.
/// </summary>
/// <param name="attribute">The attribute which text to use.</param>
private CopyrightInfo(AssemblyCopyrightAttribute attribute)
{
this.attribute = attribute;
}
=======
private const string DefaultCopyrightWord = "Copyright";
private const string SymbolLower = "(c)";
private const string SymbolUpper = "(C)";
private readonly int _builderSize;
>>>>>>>
private const string DefaultCopyrightWord = "Copyright";
private const string SymbolLower = "(c)";
private const string SymbolUpper = "(C)";
private readonly int _builderSize;
private readonly AssemblyCopyrightAttribute _attribute;
/// <summary>
/// Initializes a new instance of the <see cref="CommandLine.Text.CopyrightInfo"/> class
/// with an assembly attribute, this overrides all formatting.
/// </summary>
/// <param name="attribute">The attribute which text to use.</param>
private CopyrightInfo(AssemblyCopyrightAttribute attribute)
{
_attribute = attribute;
}
<<<<<<<
=======
_builderSize = CopyrightWord.Length + author.Length + (4 * years.Length) + extraLength;
>>>>>>>
_builderSize = CopyrightWord.Length + author.Length + (4 * years.Length) + extraLength;
<<<<<<<
if (attribute != null)
{
return attribute.Copyright;
}
var builder = new StringBuilder();
builder.Append (CopyrightWord);
builder.Append (' ');
=======
var builder = new StringBuilder(_builderSize);
builder.Append (CopyrightWord);
builder.Append (' ');
>>>>>>>
if (_attribute != null)
{
return _attribute.Copyright;
}
var builder = new StringBuilder(_builderSize);
builder.Append (CopyrightWord);
builder.Append (' '); |
<<<<<<<
var preprocessorErrors = (
argumentsList.Any()
? argumentsList.Preprocess(PreprocessorGuards.Lookup(nameComparer))
: Enumerable.Empty<Error>()
).Memorize();
=======
var preprocessorErrors = arguments.Any()
? arguments.Preprocess(PreprocessorGuards.Lookup(nameComparer, autoHelp, autoVersion))
: Enumerable.Empty<Error>();
>>>>>>>
var preprocessorErrors = (
argumentsList.Any()
? arguments.Preprocess(PreprocessorGuards.Lookup(nameComparer, autoHelp, autoVersion))
: Enumerable.Empty<Error>()
).Memorize(); |
<<<<<<<
: MatchVerb(tokenizer, verbs, arguments, nameComparer, ignoreValueCase, parsingCulture, nonFatalErrors);
=======
: MatchVerb(tokenizer, verbs, arguments, nameComparer, parsingCulture, autoHelp, autoVersion, nonFatalErrors);
>>>>>>>
: MatchVerb(tokenizer, verbs, arguments, nameComparer, ignoreValueCase, parsingCulture, autoHelp, autoVersion, nonFatalErrors); |
<<<<<<<
firstDay = firstDay.Date;
lastDay = lastDay.Date;
if (firstDay > lastDay)
return -BusinessDaysUntil(lastDay, firstDay, bankHolidays);
=======
return DateTime.Now;
}
>>>>>>>
return DateTime.Now;
}
<<<<<<<
=======
if (daysRequired < 0) throw new ArgumentOutOfRangeException("DaysRequired must be >= 0.");
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
[Test]
public void AttributeNamespaceTest()
{
const string expectedResult =
@"<w:font w:name=""Arial"" xmlns:w=""http://example.com/namespace"" />";
var serializer = new YAXSerializer(typeof(AttributeWithNamespace), YAXExceptionHandlingPolicies.DoNotThrow, YAXExceptionTypes.Warning, YAXSerializationOptions.SerializeNullObjects);
string got = serializer.Serialize(AttributeWithNamespace.GetSampleInstance());
Assert.That(got, Is.EqualTo(expectedResult));
}
=======
[Test]
public void CollectionWithExtraPropertiesTest()
{
var container = CollectionWithExtraProperties.GetSampleInstance();
var ser = new YAXSerializer(typeof(CollectionWithExtraProperties));
string result = ser.Serialize(container);
const string expectedResult =
@"<CollectionWithExtraProperties>
<Property1>Property1</Property1>
<Property2>1.234</Property2>
<Int32>1</Int32>
<Int32>2</Int32>
<Int32>3</Int32>
<Int32>4</Int32>
</CollectionWithExtraProperties>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void CollectionWithExtraPropertiesAttributedAsNotCollectionTest()
{
var container = CollectionWithExtraPropertiesAttributedAsNotCollection.GetSampleInstance();
var ser = new YAXSerializer(typeof(CollectionWithExtraPropertiesAttributedAsNotCollection));
string result = ser.Serialize(container);
const string expectedResult =
@"<CollectionWithExtraPropertiesAttributedAsNotCollection>
<Property1>Property1</Property1>
<Property2>1.234</Property2>
</CollectionWithExtraPropertiesAttributedAsNotCollection>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void DictionaryWithExtraPropertiesTest()
{
var container = DictionaryWithExtraProperties.GetSampleInstance();
var ser = new YAXSerializer(typeof(DictionaryWithExtraProperties));
string result = ser.Serialize(container);
const string expectedResult =
@"<DictionaryWithExtraProperties>
<Prop1>Prop1</Prop1>
<Prop2>2.234</Prop2>
<Pair>
<Key>1</Key>
<Value>One</Value>
</Pair>
<Pair>
<Key>2</Key>
<Value>Two</Value>
</Pair>
<Pair>
<Key>3</Key>
<Value>Three</Value>
</Pair>
</DictionaryWithExtraProperties>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void DictionaryWithExtraPropertiesAttributedAsNotCollectionTest()
{
var container = DictionaryWithExtraPropertiesAttributedAsNotCollection.GetSampleInstance();
var ser = new YAXSerializer(typeof(DictionaryWithExtraPropertiesAttributedAsNotCollection));
string result = ser.Serialize(container);
const string expectedResult =
@"<DictionaryWithExtraPropertiesAttributedAsNotCollection>
<Prop1>Prop1</Prop1>
<Prop2>2.234</Prop2>
</DictionaryWithExtraPropertiesAttributedAsNotCollection>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void AttributeInheritanceTest()
{
const string result =
@"<Child>
<TheAge>30.2</TheAge>
<TheName>John</TheName>
</Child>";
var serializer = new YAXSerializer(typeof(AttributeInheritance), YAXExceptionHandlingPolicies.DoNotThrow, YAXExceptionTypes.Warning, YAXSerializationOptions.SerializeNullObjects);
string got = serializer.Serialize(AttributeInheritance.GetSampleInstance());
Assert.That(got, Is.EqualTo(result));
}
[Test]
public void ListOfPolymorphicObjectsTest()
{
var ser = new YAXSerializer(typeof(PolymorphicSampleList));
string result = ser.Serialize(PolymorphicSampleList.GetSampleInstance());
const string expectedResult =
@"<samples xmlns:yaxlib=""http://www.sinairv.com/yaxlib/"">
<sample yaxlib:realtype=""YAXLibTests.SampleClasses.PolymorphicOneSample"" />
<sample yaxlib:realtype=""YAXLibTests.SampleClasses.PolymorphicTwoSample"" />
</samples>";
Assert.AreEqual(expectedResult, result);
}
>>>>>>>
[Test]
public void CollectionWithExtraPropertiesTest()
{
var container = CollectionWithExtraProperties.GetSampleInstance();
var ser = new YAXSerializer(typeof(CollectionWithExtraProperties));
string result = ser.Serialize(container);
const string expectedResult =
@"<CollectionWithExtraProperties>
<Property1>Property1</Property1>
<Property2>1.234</Property2>
<Int32>1</Int32>
<Int32>2</Int32>
<Int32>3</Int32>
<Int32>4</Int32>
</CollectionWithExtraProperties>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void CollectionWithExtraPropertiesAttributedAsNotCollectionTest()
{
var container = CollectionWithExtraPropertiesAttributedAsNotCollection.GetSampleInstance();
var ser = new YAXSerializer(typeof(CollectionWithExtraPropertiesAttributedAsNotCollection));
string result = ser.Serialize(container);
const string expectedResult =
@"<CollectionWithExtraPropertiesAttributedAsNotCollection>
<Property1>Property1</Property1>
<Property2>1.234</Property2>
</CollectionWithExtraPropertiesAttributedAsNotCollection>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void DictionaryWithExtraPropertiesTest()
{
var container = DictionaryWithExtraProperties.GetSampleInstance();
var ser = new YAXSerializer(typeof(DictionaryWithExtraProperties));
string result = ser.Serialize(container);
const string expectedResult =
@"<DictionaryWithExtraProperties>
<Prop1>Prop1</Prop1>
<Prop2>2.234</Prop2>
<Pair>
<Key>1</Key>
<Value>One</Value>
</Pair>
<Pair>
<Key>2</Key>
<Value>Two</Value>
</Pair>
<Pair>
<Key>3</Key>
<Value>Three</Value>
</Pair>
</DictionaryWithExtraProperties>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void DictionaryWithExtraPropertiesAttributedAsNotCollectionTest()
{
var container = DictionaryWithExtraPropertiesAttributedAsNotCollection.GetSampleInstance();
var ser = new YAXSerializer(typeof(DictionaryWithExtraPropertiesAttributedAsNotCollection));
string result = ser.Serialize(container);
const string expectedResult =
@"<DictionaryWithExtraPropertiesAttributedAsNotCollection>
<Prop1>Prop1</Prop1>
<Prop2>2.234</Prop2>
</DictionaryWithExtraPropertiesAttributedAsNotCollection>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void AttributeInheritanceTest()
{
const string result =
@"<Child>
<TheAge>30.2</TheAge>
<TheName>John</TheName>
</Child>";
var serializer = new YAXSerializer(typeof(AttributeInheritance), YAXExceptionHandlingPolicies.DoNotThrow, YAXExceptionTypes.Warning, YAXSerializationOptions.SerializeNullObjects);
string got = serializer.Serialize(AttributeInheritance.GetSampleInstance());
Assert.That(got, Is.EqualTo(result));
}
[Test]
public void ListOfPolymorphicObjectsTest()
{
var ser = new YAXSerializer(typeof(PolymorphicSampleList));
string result = ser.Serialize(PolymorphicSampleList.GetSampleInstance());
const string expectedResult =
@"<samples xmlns:yaxlib=""http://www.sinairv.com/yaxlib/"">
<sample yaxlib:realtype=""YAXLibTests.SampleClasses.PolymorphicOneSample"" />
<sample yaxlib:realtype=""YAXLibTests.SampleClasses.PolymorphicTwoSample"" />
</samples>";
Assert.AreEqual(expectedResult, result);
}
[Test]
public void AttributeNamespaceTest()
{
const string expectedResult =
@"<w:font w:name=""Arial"" xmlns:w=""http://example.com/namespace"" />";
var serializer = new YAXSerializer(typeof(AttributeWithNamespace), YAXExceptionHandlingPolicies.DoNotThrow, YAXExceptionTypes.Warning, YAXSerializationOptions.SerializeNullObjects);
string got = serializer.Serialize(AttributeWithNamespace.GetSampleInstance());
Assert.That(got, Is.EqualTo(expectedResult));
} |
<<<<<<<
[TestMethod]
public void AttributeForClassTest()
{
AttributeContainerSample container = new AttributeContainerSample
{
Range = new AttributeSample
{
From = 1,
To = 3,
}
};
var ser = new YAXSerializer(typeof(AttributeContainerSample));
string result = ser.Serialize(container);
const string expectedResult =
@"<container>
<range from=""1"" to=""3"" />
</container>";
Assert.AreEqual(expectedResult, result);
}
[TestMethod]
public void AttributeForKeyInDictionaryTest()
{
DictionarySample dictionary = new DictionarySample
{
{ "key1", new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)},
{ "key2", 1234 },
};
var ser = new YAXSerializer(typeof(DictionarySample));
string result = ser.Serialize(dictionary);
const string expectedResult =
@"<items>
<item key=""key1"" type=""guid"">00000001-0002-0003-0405-060708090a0b<</item>
<item key=""key2"" type=""int"">1234</item>
</items>";
/* NOTE: This fails partly because you can't decorate a class with [YAXDictionary] and
* because it's not possible to say that the value should be the content of <item/> while
* the key should be an attribute.
*/
Assert.AreEqual(expectedResult, result);
}
[TestMethod]
public void AttributeForKeyInDictionaryPropertyTest()
{
DictionaryContainerSample container = new DictionaryContainerSample
{
Items = new DictionarySample
{
{ "key1", new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)},
{ "key2", 1234 },
}
};
var ser = new YAXSerializer(typeof(DictionaryContainerSample));
string result = ser.Serialize(container);
const string expectedResult =
@"<container>
<items>
<item key=""key1"" type=""guid"">00000001-0002-0003-0405-060708090a0b<</item>
<item key=""key2"" type=""int"">1234</item>
</items>
</container>";
/* NOTE: This fails partly because you can't decorate a class with [YAXDictionary] and
* because it's not possible to say that the value should be the content of <item/> while
* the key should be an attribute.
*/
Assert.AreEqual(expectedResult, result);
}
=======
[TestMethod]
public void DashPreservationTest()
{
const string expectedResult = @"<dashed-sample dashed-name=""Name"" />";
DashedSample sample = new DashedSample
{
DashedName = "Name"
};
YAXSerializer ser = new YAXSerializer(typeof(DashedSample));
string got = ser.Serialize(sample);
Assert.AreEqual(expectedResult, got);
}
>>>>>>>
[TestMethod]
public void DashPreservationTest()
{
const string expectedResult = @"<dashed-sample dashed-name=""Name"" />";
DashedSample sample = new DashedSample
{
DashedName = "Name"
};
YAXSerializer ser = new YAXSerializer(typeof(DashedSample));
string got = ser.Serialize(sample);
Assert.AreEqual(expectedResult, got);
}
[TestMethod]
public void AttributeForClassTest()
{
AttributeContainerSample container = new AttributeContainerSample
{
Range = new AttributeSample
{
From = 1,
To = 3,
}
};
var ser = new YAXSerializer(typeof(AttributeContainerSample));
string result = ser.Serialize(container);
const string expectedResult =
@"<container>
<range from=""1"" to=""3"" />
</container>";
Assert.AreEqual(expectedResult, result);
}
[TestMethod]
public void AttributeForKeyInDictionaryTest()
{
DictionarySample dictionary = new DictionarySample
{
{ "key1", new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)},
{ "key2", 1234 },
};
var ser = new YAXSerializer(typeof(DictionarySample));
string result = ser.Serialize(dictionary);
const string expectedResult =
@"<items>
<item key=""key1"" type=""guid"">00000001-0002-0003-0405-060708090a0b<</item>
<item key=""key2"" type=""int"">1234</item>
</items>";
/* NOTE: This fails partly because you can't decorate a class with [YAXDictionary] and
* because it's not possible to say that the value should be the content of <item/> while
* the key should be an attribute.
*/
Assert.AreEqual(expectedResult, result);
}
[TestMethod]
public void AttributeForKeyInDictionaryPropertyTest()
{
DictionaryContainerSample container = new DictionaryContainerSample
{
Items = new DictionarySample
{
{ "key1", new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)},
{ "key2", 1234 },
}
};
var ser = new YAXSerializer(typeof(DictionaryContainerSample));
string result = ser.Serialize(container);
const string expectedResult =
@"<container>
<items>
<item key=""key1"" type=""guid"">00000001-0002-0003-0405-060708090a0b<</item>
<item key=""key2"" type=""int"">1234</item>
</items>
</container>";
/* NOTE: This fails partly because you can't decorate a class with [YAXDictionary] and
* because it's not possible to say that the value should be the content of <item/> while
* the key should be an attribute.
*/
Assert.AreEqual(expectedResult, result);
} |
<<<<<<<
return HttpHelper.Post<Dictionary<string, object>, string>(
string.Format("/templates/{0}.json", clientID), null,
new Dictionary<string, object>()
{
{ "Name", name },
{ "HtmlPageURL", htmlPageUrl },
{ "ZipFileUrl", zipUrl },
{ "ScreenshotUrl", screenshotUrl }
});
=======
string json = HttpHelper.Post(string.Format("/templates/{0}.json", clientID), null, JavaScriptConvert.SerializeObject(
new Dictionary<string, object>() { { "Name", name }, { "HtmlPageURL", htmlPageUrl }, { "ZipFileUrl", zipUrl } })
);
return JavaScriptConvert.DeserializeObject<string>(json);
>>>>>>>
return HttpHelper.Post<Dictionary<string, object>, string>(
string.Format("/templates/{0}.json", clientID), null,
new Dictionary<string, object>()
{
{ "Name", name },
{ "HtmlPageURL", htmlPageUrl },
{ "ZipFileUrl", zipUrl }
});
<<<<<<<
HttpHelper.Put<Dictionary<string, object>, string>(
string.Format("/templates/{0}.json", TemplateID), null,
new Dictionary<string, object>()
{
{ "Name", name },
{ "HtmlPageURL", htmlPageUrl },
{ "ZipFileUrl", zipUrl },
{ "ScreenshotUrl", screenshotUrl }
});
=======
HttpHelper.Put(string.Format("/templates/{0}.json", TemplateID), null, JavaScriptConvert.SerializeObject(
new Dictionary<string, object>() { { "Name", name }, { "HtmlPageURL", htmlPageUrl }, { "ZipFileUrl", zipUrl } })
);
>>>>>>>
HttpHelper.Put<Dictionary<string, object>, string>(
string.Format("/templates/{0}.json", TemplateID), null,
new Dictionary<string, object>()
{
{ "Name", name },
{ "HtmlPageURL", htmlPageUrl },
{ "ZipFileUrl", zipUrl }
}); |
<<<<<<<
using ClosedXML.Excel;
using ClosedXML.Excel.CalcEngine;
=======
using ClosedXML.Excel;
>>>>>>>
using ClosedXML.Excel;
using ClosedXML.Excel.CalcEngine; |
<<<<<<<
if (CodeScannerThread != null)
{
Stop(true);
}
=======
decodeInterrupted = false;
>>>>>>>
if (CodeScannerThread != null)
{
Stop(true);
}
decodeInterrupted = false;
<<<<<<<
CodeScannerThread.Abort();
CodeScannerThread = null;
=======
decodeInterrupted = true;
CodeScannerThread.Join();
>>>>>>>
decodeInterrupted = true;
CodeScannerThread.Join();
CodeScannerThread = null; |
<<<<<<<
// This file is part of Silk.NET.
//
// You may modify and distribute Silk.NET under the terms
// of the MIT license. See the LICENSE file for details.
using System;
using Silk.NET.Core.Platform;
using Silk.NET.Input.Common;
using Silk.NET.Input.Desktop;
using Silk.NET.Windowing.Common;
namespace Silk.NET.Input
{
/// <summary>
/// Extensions related to input contexts and windows.
/// </summary>
public static class InputWindowExtensions
{
static InputWindowExtensions()
{
SilkManager.Register<IInputPlatform>(new GlfwInputPlatform());
}
/// <summary>
/// Get an input context for the given window.
/// </summary>
/// <param name="window">The window to create an input context for.</param>
/// <returns>An input context for the provided window.</returns>
public static IInputContext GetInput(this IWindow window)
{
return SilkManager.GetOrDefault<IInputPlatform>()?.GetInput(window)
?? throw new NotSupportedException("Couldn't find a suitable input platform for this window.");
}
}
=======
// This file is part of Silk.NET.
//
// You may modify and distribute Silk.NET under the terms
// of the MIT license. See the LICENSE file for details.
using System;
using Silk.NET.Core.Platform;
using Silk.NET.Input.Common;
using Silk.NET.Input.Desktop;
using Silk.NET.Windowing.Common;
namespace Silk.NET.Input
{
public static class InputWindowExtensions
{
static InputWindowExtensions()
{
SilkManager.Register<IInputPlatform>(GlfwInputPlatform.Instance);
}
public static IInputContext GetInput(this IWindow window)
{
return SilkManager.GetOrDefault<IInputPlatform>()?.CreateInput(window)
?? throw new NotSupportedException("Couldn't find a suitable input platform for this window.");
}
}
>>>>>>>
// This file is part of Silk.NET.
//
// You may modify and distribute Silk.NET under the terms
// of the MIT license. See the LICENSE file for details.
using System;
using Silk.NET.Core.Platform;
using Silk.NET.Input.Common;
using Silk.NET.Input.Desktop;
using Silk.NET.Windowing.Common;
namespace Silk.NET.Input
{
/// <summary>
/// Extensions related to input contexts and windows.
/// </summary>
public static class InputWindowExtensions
{
static InputWindowExtensions()
{
SilkManager.Register<IInputPlatform>(GlfwInputPlatform.Instance);
}
/// <summary>
/// Get an input context for the given window.
/// </summary>
/// <param name="window">The window to create an input context for.</param>
/// <returns>An input context for the provided window.</returns>
public static IInputContext GetInput(this IWindow window)
{
return SilkManager.GetOrDefault<IInputPlatform>()?.CreateInput(window)
?? throw new NotSupportedException("Couldn't find a suitable input platform for this window.");
}
} |
<<<<<<<
differentialFormat.Append(GetNewFont(new FontInfo { Font = cf.Style.Value.Font }, false));
=======
var diffFont = GetNewFont(new FontInfo { Font = cf.Style.Font as XLFont }, false);
if (diffFont?.HasChildren ?? false)
differentialFormat.Append(diffFont);
>>>>>>>
var diffFont = GetNewFont(new FontInfo { Font = cf.Style.Font as XLFont }, false);
if (diffFont?.HasChildren ?? false)
differentialFormat.Append(diffFont);
<<<<<<<
differentialFormat.Append(GetNewFill(new FillInfo { Fill = cf.Style.Value.Fill }, differentialFillFormat: true, ignoreMod: false));
differentialFormat.Append(GetNewBorder(new BorderInfo { Border = cf.Style.Value.Border }, false));
=======
var diffFill = GetNewFill(new FillInfo { Fill = cf.Style.Fill as XLFill }, differentialFillFormat: true, ignoreMod: false);
if (diffFill?.HasChildren ?? false)
differentialFormat.Append(diffFill);
var diffBorder = GetNewBorder(new BorderInfo { Border = cf.Style.Border as XLBorder }, false);
if (diffBorder?.HasChildren ?? false)
differentialFormat.Append(diffBorder);
>>>>>>>
var diffFill = GetNewFill(new FillInfo { Fill = cf.Style.Value.Fill }, differentialFillFormat: true, ignoreMod: false);
if (diffFill?.HasChildren ?? false)
differentialFormat.Append(diffFill);
var diffBorder = GetNewBorder(new BorderInfo { Border = cf.Style.Value.Border }, false);
if (diffBorder?.HasChildren ?? false)
differentialFormat.Append(diffBorder);
<<<<<<<
var diffFont = GetNewFont(new FontInfo {Font = style.Font}, false);
if (diffFont.HasChildren)
differentialFormat.Append(diffFont);
=======
var diffFont = GetNewFont(new FontInfo { Font = style.Font as XLFont }, false);
if (diffFont?.HasChildren ?? false)
differentialFormat.Append(diffFont);
>>>>>>>
var diffFont = GetNewFont(new FontInfo { Font = style.Font as XLFont }, false);
if (diffFont?.HasChildren ?? false)
differentialFormat.Append(diffFont);
<<<<<<<
var diffFill = GetNewFill(new FillInfo {Fill = style.Fill}, differentialFillFormat: true, ignoreMod: false);
if (diffFill.HasChildren)
differentialFormat.Append(diffFill);
var diffBorder = GetNewBorder(new BorderInfo {Border = style.Border}, false);
if (diffBorder.HasChildren)
differentialFormat.Append(diffBorder);
=======
var diffFill = GetNewFill(new FillInfo { Fill = style.Fill as XLFill }, differentialFillFormat: true, ignoreMod: false);
if (diffFill?.HasChildren ?? false)
differentialFormat.Append(diffFill);
var diffBorder = GetNewBorder(new BorderInfo { Border = style.Border as XLBorder }, false);
if (diffBorder?.HasChildren ?? false)
differentialFormat.Append(diffBorder);
>>>>>>>
var diffFill = GetNewFill(new FillInfo {Fill = style.Fill}, differentialFillFormat: true, ignoreMod: false);
if (diffFill?.HasChildren ?? false)
differentialFormat.Append(diffFill);
var diffBorder = GetNewBorder(new BorderInfo {Border = style.Border}, false);
if (diffBorder?.HasChildren ?? false)
differentialFormat.Append(diffBorder); |
<<<<<<<
=======
#region OpenedFile
static Dictionary<FileName, OpenedFile> openedFileDict = new Dictionary<FileName, OpenedFile>();
/// <summary>
/// Gets a collection containing all currently opened files.
/// The returned collection is a read-only copy of the currently opened files -
/// it will not reflect future changes of the list of opened files.
/// </summary>
public static ICollection<OpenedFile> OpenedFiles {
get {
return openedFileDict.Values.ToArray();
}
}
/// <summary>
/// Gets an opened file, or returns null if the file is not opened.
/// </summary>
public static OpenedFile GetOpenedFile(string fileName)
{
return GetOpenedFile(FileName.Create(fileName));
}
/// <summary>
/// Gets an opened file, or returns null if the file is not opened.
/// </summary>
public static OpenedFile GetOpenedFile(FileName fileName)
{
if (fileName == null)
throw new ArgumentNullException("fileName");
WorkbenchSingleton.AssertMainThread();
OpenedFile file;
openedFileDict.TryGetValue(fileName, out file);
return file;
}
/// <summary>
/// Gets or creates an opened file.
/// Warning: the opened file will be a file without any views attached.
/// Make sure to attach a view to it, or call CloseIfAllViewsClosed on the OpenedFile to
/// unload the OpenedFile instance if no views were attached to it.
/// </summary>
public static OpenedFile GetOrCreateOpenedFile(string fileName)
{
return GetOrCreateOpenedFile(FileName.Create(fileName));
}
/// <summary>
/// Gets or creates an opened file.
/// Warning: the opened file will be a file without any views attached.
/// Make sure to attach a view to it, or call CloseIfAllViewsClosed on the OpenedFile to
/// unload the OpenedFile instance if no views were attached to it.
/// </summary>
public static OpenedFile GetOrCreateOpenedFile(FileName fileName)
{
if (fileName == null)
throw new ArgumentNullException("fileName");
OpenedFile file;
if (!openedFileDict.TryGetValue(fileName, out file)) {
openedFileDict[fileName] = file = new FileServiceOpenedFile(fileName);
}
return file;
}
/// <summary>
/// Creates a new untitled OpenedFile.
/// </summary>
public static OpenedFile CreateUntitledOpenedFile(string defaultName, byte[] content)
{
if (defaultName == null)
throw new ArgumentNullException("defaultName");
OpenedFile file = new FileServiceOpenedFile(content);
file.FileName = new FileName(file.GetHashCode() + "/" + defaultName);
openedFileDict[file.FileName] = file;
return file;
}
/// <summary>Called by OpenedFile.set_FileName to update the dictionary.</summary>
internal static void OpenedFileFileNameChange(OpenedFile file, FileName oldName, FileName newName)
{
if (oldName == null) return; // File just created with NewFile where name is being initialized.
LoggingService.Debug("OpenedFileFileNameChange: " + oldName + " => " + newName);
if (openedFileDict[oldName] != file)
throw new ArgumentException("file must be registered as oldName");
if (openedFileDict.ContainsKey(newName)) {
OpenedFile oldFile = openedFileDict[newName];
if (oldFile.CurrentView != null) {
oldFile.CurrentView.WorkbenchWindow.CloseWindow(true);
} else {
throw new ArgumentException("there already is a file with the newName");
}
}
openedFileDict.Remove(oldName);
openedFileDict[newName] = file;
}
/// <summary>Called by OpenedFile.UnregisterView to update the dictionary.</summary>
internal static void OpenedFileClosed(OpenedFile file)
{
OpenedFile existing;
if (openedFileDict.TryGetValue(file.FileName, out existing) && existing != file)
throw new ArgumentException("file must be registered");
openedFileDict.Remove(file.FileName);
LoggingService.Debug("OpenedFileClosed: " + file.FileName);
}
#endregion
>>>>>>>
<<<<<<<
OpenedFile file = SD.FileService.GetOrCreateOpenedFile(FileName.Create(fileName));
IViewContent newContent = binding.CreateContentForFile(file);
if (newContent != null) {
DisplayBindingService.AttachSubWindows(newContent, false);
WorkbenchSingleton.Workbench.ShowView(newContent, switchToOpenedView);
=======
OpenedFile file = FileService.GetOrCreateOpenedFile(FileName.Create(fileName));
try {
IViewContent newContent = binding.CreateContentForFile(file);
if (newContent != null) {
DisplayBindingService.AttachSubWindows(newContent, false);
WorkbenchSingleton.Workbench.ShowView(newContent, switchToOpenedView);
}
} finally {
file.CloseIfAllViewsClosed();
>>>>>>>
OpenedFile file = SD.FileService.GetOrCreateOpenedFile(FileName.Create(fileName));
try {
IViewContent newContent = binding.CreateContentForFile(file);
if (newContent != null) {
DisplayBindingService.AttachSubWindows(newContent, false);
WorkbenchSingleton.Workbench.ShowView(newContent, switchToOpenedView);
}
} finally {
file.CloseIfAllViewsClosed(); |
<<<<<<<
else
NewLine();
=======
} else {
if (!(clause is QueryContinuationClause))
NewLine();
}
>>>>>>>
else
if (!(clause is QueryContinuationClause))
NewLine(); |
<<<<<<<
public void FindReferencesInFile(SearchScope searchScope, CSharpParsedFile parsedFile, CompilationUnit compilationUnit, ITypeResolveContext context)
=======
/// <param name="callback">Callback used to report the references that were found.</param>
public void FindReferencesInFile(IFindReferenceSearchScope searchScope, ParsedFile parsedFile, CompilationUnit compilationUnit,
ITypeResolveContext context, FoundReferenceCallback callback)
>>>>>>>
/// <param name="callback">Callback used to report the references that were found.</param>
public void FindReferencesInFile(IFindReferenceSearchScope searchScope, CSharpParsedFile parsedFile, CompilationUnit compilationUnit,
ITypeResolveContext context, FoundReferenceCallback callback)
<<<<<<<
public void FindReferencesInFile(IList<SearchScope> searchScopes, CSharpParsedFile parsedFile, CompilationUnit compilationUnit, ITypeResolveContext context)
=======
/// <param name="callback">Callback used to report the references that were found.</param>
public void FindReferencesInFile(IList<IFindReferenceSearchScope> searchScopes, ParsedFile parsedFile, CompilationUnit compilationUnit,
ITypeResolveContext context, FoundReferenceCallback callback)
>>>>>>>
/// <param name="callback">Callback used to report the references that were found.</param>
public void FindReferencesInFile(IList<IFindReferenceSearchScope> searchScopes, CSharpParsedFile parsedFile, CompilationUnit compilationUnit,
ITypeResolveContext context, FoundReferenceCallback callback) |
<<<<<<<
SetSearchOptions();
if (lastResult != null) {
ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider;
=======
SetSearchOptions(monitor);
if (lastResult != null && WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
ITextEditorControlProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorControlProvider;
>>>>>>>
SetSearchOptions(monitor);
if (lastResult != null) {
ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider; |
<<<<<<<
string directory = Path.Combine(PropertyService.ConfigDirectory, "preferences");
string fileName = projectFileName.Substring(3).Replace('/', '.').Replace('\\', '.').Replace(Path.DirectorySeparatorChar, '.');
string fullFileName = Path.Combine(directory, fileName + ".xml");
return fullFileName;
=======
string directory = PropertyService.ConfigDirectory + "preferences";
return Path.Combine(directory,
Path.GetFileName(projectFileName)
+ "." + projectFileName.ToLowerInvariant().GetHashCode().ToString("x")
+ ".xml");
>>>>>>>
string directory = Path.Combine(PropertyService.ConfigDirectory, "preferences");
return Path.Combine(directory,
Path.GetFileName(projectFileName)
+ "." + projectFileName.ToLowerInvariant().GetHashCode().ToString("x")
+ ".xml"); |
<<<<<<<
new ClassNode(Project, c).AddTo(path);
=======
new ClassNode(project, c.GetCompoundClass()).AddTo(path);
>>>>>>>
new ClassNode(Project, c.GetCompoundClass()).AddTo(path);
<<<<<<<
TreeNode node = GetNodeByPath(c.Namespace, true);
new ClassNode(Project, c).AddTo(node);
=======
TreeNode path = GetNodeByPath(c.Namespace, true);
TreeNode node = GetNodeByName(path.Nodes, c.Name);
if (node == null) {
new ClassNode(project, c.GetCompoundClass()).AddTo(path);
}
>>>>>>>
TreeNode path = GetNodeByPath(c.Namespace, true);
TreeNode node = GetNodeByName(path.Nodes, c.Name);
if (node == null) {
new ClassNode(Project, c.GetCompoundClass()).AddTo(path);
} |
<<<<<<<
configurations["Debug|*"]["BaseIntermediateOutputPath"] = @"obj\";
configurations["Debug|*"]["IntermediateOutputPath"] = @"obj\Debug\";
configurations["Debug|*"]["OutputPath"] = @"bin\Debug\";
=======
if (information.CreateProjectWithDefaultOutputPath) {
configurations["Debug|*"]["OutputPath"] = @"bin\Debug\";
}
>>>>>>>
configurations["Debug|*"]["BaseIntermediateOutputPath"] = @"obj\";
configurations["Debug|*"]["IntermediateOutputPath"] = @"obj\Debug\";
if (information.CreateProjectWithDefaultOutputPath) {
configurations["Debug|*"]["OutputPath"] = @"bin\Debug\";
}
<<<<<<<
configurations["Release|*"]["BaseIntermediateOutputPath"] = @"obj\";
configurations["Release|*"]["IntermediateOutputPath"] = @"obj\Release\";
configurations["Release|*"]["OutputPath"] = @"bin\Release\";
=======
if (information.CreateProjectWithDefaultOutputPath) {
configurations["Release|*"]["OutputPath"] = @"bin\Release\";
}
>>>>>>>
configurations["Release|*"]["BaseIntermediateOutputPath"] = @"obj\";
configurations["Release|*"]["IntermediateOutputPath"] = @"obj\Release\";
if (information.CreateProjectWithDefaultOutputPath) {
configurations["Release|*"]["OutputPath"] = @"bin\Release\";
} |
<<<<<<<
[Test]
public void XmlElement()
{
TestStatement("Dim xml = <Test />",
@"var xml = new XElement(""Test"");");
}
[Test]
public void XmlElement2()
{
TestStatement(@"Dim xml = <Test name=""test"" name2=<%= testVal %> />",
@"var xml = new XElement(""Test"", new XAttribute(""name"", ""test""), new XAttribute(""name2"", testVal));");
}
[Test]
public void XmlElement3()
{
TestStatement(@"Dim xml = <Test name=""test"" name2=<%= testVal %> <%= testVal2 %> />",
@"var xml = new XElement(""Test"", new XAttribute(""name"", ""test""), new XAttribute(""name2"", testVal), testVal2);");
}
[Test]
public void XmlNestedElement()
{
TestStatement("Dim xml = <Test> <Test2 /> </Test>",
@"var xml = new XElement(""Test"", new XElement(""Test2""));");
}
[Test]
public void XmlNestedElement2()
{
TestStatement("Dim xml = <Test> <Test2 /> hello </Test>",
@"var xml = new XElement(""Test"", new XElement(""Test2""), "" hello "");");
}
[Test]
public void XmlNestedElement3()
{
TestStatement("Dim xml = <Test> <Test2 a='b' /> hello </Test>",
@"var xml = new XElement(""Test"", new XElement(""Test2"", new XAttribute(""a"", ""b"")), "" hello "");");
}
[Test]
public void XmlNestedElement4()
{
TestStatement("Dim xml = <Test> <Test2 a='b' /> hello \t<![CDATA[any & <>]]></Test>",
@"var xml = new XElement(""Test"", new XElement(""Test2"", new XAttribute(""a"", ""b"")), "" hello \t"", new XCData(""any & <>""));");
}
[Test]
public void XmlComment()
{
TestStatement("Dim xml = <!-- test -->",
@"var xml = new XComment("" test "");");
}
[Test]
public void XmlCData()
{
TestStatement("Dim xml = <![CDATA[any & <> char]]>",
@"var xml = new XCData(""any & <> char"");");
}
[Test]
public void XmlProcessingInstruction()
{
TestStatement("Dim xml = <?target testcontent?>",
@"var xml = new XProcessingInstruction(""target"", "" testcontent"");");
}
[Test]
public void XmlDocumentTest()
{
TestStatement(@"Dim xml = <?xml version=""1.0""?><!-- test --><Data a='true'><A/></Data><!-- test -->",
@"var xml = new XDocument(new XDeclaration(""1.0"", null, null), new XComment("" test ""), new XElement(""Data"", new XAttribute(""a"", ""true""), new XElement(""A"")), new XComment("" test ""));");
}
[Test]
public void XmlDocumentTest2()
{
TestStatement(@"Dim xml = <?xml?><!-- test --><Data a='true'><A/></Data><!-- test -->",
@"var xml = new XDocument(new XDeclaration(null, null, null), new XComment("" test ""), new XElement(""Data"", new XAttribute(""a"", ""true""), new XElement(""A"")), new XComment("" test ""));");
}
[Test]
public void XmlDocumentTest3()
{
TestStatement(@"Dim xml = <?xml version=""1.0"" encoding=""utf-8""?><!-- test --><Data a='true'><A/></Data><!-- test -->",
@"var xml = new XDocument(new XDeclaration(""1.0"", ""utf-8"", null), new XComment("" test ""), new XElement(""Data"", new XAttribute(""a"", ""true""), new XElement(""A"")), new XComment("" test ""));");
}
[Test]
public void XmlDocumentTest4()
{
TestStatement(@"Dim xml = <?xml version=""1.0"" encoding=""utf-8"" standalone=""yes""?><!-- test --><Data a='true'><A <%= content %> /></Data><!-- test -->",
@"var xml = new XDocument(new XDeclaration(""1.0"", ""utf-8"", ""yes""), new XComment("" test ""), new XElement(""Data"", new XAttribute(""a"", ""true""), new XElement(""A"", content)), new XComment("" test ""));");
}
[Test]
public void XmlEmbeddedExpression()
{
TestStatement(@"Dim xml = <<%= name %>>Test</>",
@"var xml = new XElement(name, ""Test"");");
}
[Test]
public void XmlEmbeddedExpression2()
{
TestStatement(@"Dim xml = <<%= name %>><%= content %></>",
@"var xml = new XElement(name, content);");
}
[Test]
public void XmlEntityReference()
{
TestStatement(@"Dim xml = <A b="""""/>",
@"var xml = new XElement(""A"", new XAttribute(""b"", ""\""""));");
}
[Test]
public void XmlEntityReference2()
{
TestStatement(@"Dim xml = <A>"</A>",
@"var xml = new XElement(""A"", ""\"""");");
}
[Test]
public void SD2_1500a()
{
TestProgram(
@"Public Class Class1
Private PFoo As String
Public Property Foo() As String
Get
Foo = PFoo
End Get
Set(ByVal Value As String)
PFoo = Value
End Set
End Property
End Class",
@"public class Class1
{
private string PFoo;
public string Foo {
get { return PFoo; }
set { PFoo = value; }
}
}
"
);
}
[Test]
public void SD2_1500b()
{
TestMember(
@"Function Test As Integer
Test = 5
End Function",
@"public int Test()
{
return 5;
}"
);
}
[Test]
public void SD2_1500c()
{
TestMember(
@"Function Test As Integer
If True Then Test = 3
Test = 5
End Function",
@"public int Test()
{
int functionReturnValue = 0;
if (true)
functionReturnValue = 3;
functionReturnValue = 5;
return functionReturnValue;
}"
);
}
[Test]
public void SD2_1500d()
{
TestMember(
@"Function Test As Integer
If True Then
Test = 3
Exit Function
End If
Test = 5
End Function",
@"public int Test()
{
int functionReturnValue = 0;
if (true) {
functionReturnValue = 3;
return functionReturnValue;
}
functionReturnValue = 5;
return functionReturnValue;
}"
);
}
[Test]
public void SD2_1497()
{
TestMember(
@"Public Function Bug() As String
With New System.Text.StringBuilder(""Hi! "")
.Append(""you "")
.Append(""folks "")
.Append(""from "")
.Append(""sharpdevelop!"")
Return .ToString()
End With
End Function",
@"public string Bug()
{
var _with1 = new System.Text.StringBuilder(""Hi! "");
_with1.Append(""you "");
_with1.Append(""folks "");
_with1.Append(""from "");
_with1.Append(""sharpdevelop!"");
return _with1.ToString();
}
"
);
}
=======
[Test]
public void ConditionalExprPrecedence()
{
TestStatement("Dim x As Integer = If(If(a,b,c),d,e)", "int x = (a ? b : c) ? d : e;");
TestStatement("Dim x As Integer = If(a,If(b,c,d),e)", "int x = a ? b ? c : d : e;");
TestStatement("Dim x As Integer = If(a,b,If(c,d,e))", "int x = a ? b : c ? d : e;");
}
>>>>>>>
[Test]
public void ConditionalExprPrecedence()
{
TestStatement("Dim x As Integer = If(If(a,b,c),d,e)", "int x = (a ? b : c) ? d : e;");
TestStatement("Dim x As Integer = If(a,If(b,c,d),e)", "int x = a ? b ? c : d : e;");
TestStatement("Dim x As Integer = If(a,b,If(c,d,e))", "int x = a ? b : c ? d : e;");
}
[Test]
public void XmlElement()
{
TestStatement("Dim xml = <Test />",
@"var xml = new XElement(""Test"");");
}
[Test]
public void XmlElement2()
{
TestStatement(@"Dim xml = <Test name=""test"" name2=<%= testVal %> />",
@"var xml = new XElement(""Test"", new XAttribute(""name"", ""test""), new XAttribute(""name2"", testVal));");
}
[Test]
public void XmlElement3()
{
TestStatement(@"Dim xml = <Test name=""test"" name2=<%= testVal %> <%= testVal2 %> />",
@"var xml = new XElement(""Test"", new XAttribute(""name"", ""test""), new XAttribute(""name2"", testVal), testVal2);");
}
[Test]
public void XmlNestedElement()
{
TestStatement("Dim xml = <Test> <Test2 /> </Test>",
@"var xml = new XElement(""Test"", new XElement(""Test2""));");
}
[Test]
public void XmlNestedElement2()
{
TestStatement("Dim xml = <Test> <Test2 /> hello </Test>",
@"var xml = new XElement(""Test"", new XElement(""Test2""), "" hello "");");
}
[Test]
public void XmlNestedElement3()
{
TestStatement("Dim xml = <Test> <Test2 a='b' /> hello </Test>",
@"var xml = new XElement(""Test"", new XElement(""Test2"", new XAttribute(""a"", ""b"")), "" hello "");");
}
[Test]
public void XmlNestedElement4()
{
TestStatement("Dim xml = <Test> <Test2 a='b' /> hello \t<![CDATA[any & <>]]></Test>",
@"var xml = new XElement(""Test"", new XElement(""Test2"", new XAttribute(""a"", ""b"")), "" hello \t"", new XCData(""any & <>""));");
}
[Test]
public void XmlComment()
{
TestStatement("Dim xml = <!-- test -->",
@"var xml = new XComment("" test "");");
}
[Test]
public void XmlCData()
{
TestStatement("Dim xml = <![CDATA[any & <> char]]>",
@"var xml = new XCData(""any & <> char"");");
}
[Test]
public void XmlProcessingInstruction()
{
TestStatement("Dim xml = <?target testcontent?>",
@"var xml = new XProcessingInstruction(""target"", "" testcontent"");");
}
[Test]
public void XmlDocumentTest()
{
TestStatement(@"Dim xml = <?xml version=""1.0""?><!-- test --><Data a='true'><A/></Data><!-- test -->",
@"var xml = new XDocument(new XDeclaration(""1.0"", null, null), new XComment("" test ""), new XElement(""Data"", new XAttribute(""a"", ""true""), new XElement(""A"")), new XComment("" test ""));");
}
[Test]
public void XmlDocumentTest2()
{
TestStatement(@"Dim xml = <?xml?><!-- test --><Data a='true'><A/></Data><!-- test -->",
@"var xml = new XDocument(new XDeclaration(null, null, null), new XComment("" test ""), new XElement(""Data"", new XAttribute(""a"", ""true""), new XElement(""A"")), new XComment("" test ""));");
}
[Test]
public void XmlDocumentTest3()
{
TestStatement(@"Dim xml = <?xml version=""1.0"" encoding=""utf-8""?><!-- test --><Data a='true'><A/></Data><!-- test -->",
@"var xml = new XDocument(new XDeclaration(""1.0"", ""utf-8"", null), new XComment("" test ""), new XElement(""Data"", new XAttribute(""a"", ""true""), new XElement(""A"")), new XComment("" test ""));");
}
[Test]
public void XmlDocumentTest4()
{
TestStatement(@"Dim xml = <?xml version=""1.0"" encoding=""utf-8"" standalone=""yes""?><!-- test --><Data a='true'><A <%= content %> /></Data><!-- test -->",
@"var xml = new XDocument(new XDeclaration(""1.0"", ""utf-8"", ""yes""), new XComment("" test ""), new XElement(""Data"", new XAttribute(""a"", ""true""), new XElement(""A"", content)), new XComment("" test ""));");
}
[Test]
public void XmlEmbeddedExpression()
{
TestStatement(@"Dim xml = <<%= name %>>Test</>",
@"var xml = new XElement(name, ""Test"");");
}
[Test]
public void XmlEmbeddedExpression2()
{
TestStatement(@"Dim xml = <<%= name %>><%= content %></>",
@"var xml = new XElement(name, content);");
}
[Test]
public void XmlEntityReference()
{
TestStatement(@"Dim xml = <A b="""""/>",
@"var xml = new XElement(""A"", new XAttribute(""b"", ""\""""));");
}
[Test]
public void XmlEntityReference2()
{
TestStatement(@"Dim xml = <A>"</A>",
@"var xml = new XElement(""A"", ""\"""");");
}
[Test]
public void SD2_1500a()
{
TestProgram(
@"Public Class Class1
Private PFoo As String
Public Property Foo() As String
Get
Foo = PFoo
End Get
Set(ByVal Value As String)
PFoo = Value
End Set
End Property
End Class",
@"public class Class1
{
private string PFoo;
public string Foo {
get { return PFoo; }
set { PFoo = value; }
}
}
"
);
}
[Test]
public void SD2_1500b()
{
TestMember(
@"Function Test As Integer
Test = 5
End Function",
@"public int Test()
{
return 5;
}"
);
}
[Test]
public void SD2_1500c()
{
TestMember(
@"Function Test As Integer
If True Then Test = 3
Test = 5
End Function",
@"public int Test()
{
int functionReturnValue = 0;
if (true)
functionReturnValue = 3;
functionReturnValue = 5;
return functionReturnValue;
}"
);
}
[Test]
public void SD2_1500d()
{
TestMember(
@"Function Test As Integer
If True Then
Test = 3
Exit Function
End If
Test = 5
End Function",
@"public int Test()
{
int functionReturnValue = 0;
if (true) {
functionReturnValue = 3;
return functionReturnValue;
}
functionReturnValue = 5;
return functionReturnValue;
}"
);
}
[Test]
public void SD2_1497()
{
TestMember(
@"Public Function Bug() As String
With New System.Text.StringBuilder(""Hi! "")
.Append(""you "")
.Append(""folks "")
.Append(""from "")
.Append(""sharpdevelop!"")
Return .ToString()
End With
End Function",
@"public string Bug()
{
var _with1 = new System.Text.StringBuilder(""Hi! "");
_with1.Append(""you "");
_with1.Append(""folks "");
_with1.Append(""from "");
_with1.Append(""sharpdevelop!"");
return _with1.ToString();
}
"
);
} |
<<<<<<<
/// <summary>
/// For non-English locales, the default style ("Normal" in English) can be
/// another piece of text (e.g. Обычный in Russian).
/// This test ensures that the default style is correctly detected and
/// no style conflicts occur on save.
/// </summary>
[Test]
public void CanSaveFileWithDefaultStyleNameNotInEnglish()
{
using (var stream = TestHelper.GetStreamFromResource(TestHelper.GetResourcePath(@"Misc\FileWithDefaultStyleNameNotInEnglish.xlsx")))
using (var wb = new XLWorkbook(stream))
{
using (var ms = new MemoryStream())
{
wb.SaveAs(ms, true);
}
}
}
=======
[Test]
public void CanLoadBasicPivotTable()
{
using (var stream = TestHelper.GetStreamFromResource(TestHelper.GetResourcePath(@"Misc\LoadPivotTables.xlsx")))
using (var wb = new XLWorkbook(stream))
{
var ws = wb.Worksheet("PivotTable1");
var pt = ws.PivotTable("PivotTable1");
Assert.AreEqual("PivotTable1", pt.Name);
Assert.AreEqual(1, pt.RowLabels.Count());
Assert.AreEqual("Name", pt.RowLabels.Single().SourceName);
Assert.AreEqual(1, pt.ColumnLabels.Count());
Assert.AreEqual("Month", pt.ColumnLabels.Single().SourceName);
var pv = pt.Values.Single();
Assert.AreEqual("Sum of NumberOfOrders", pv.CustomName);
Assert.AreEqual("NumberOfOrders", pv.SourceName);
}
}
>>>>>>>
[Test]
public void CanLoadBasicPivotTable()
{
using (var stream = TestHelper.GetStreamFromResource(TestHelper.GetResourcePath(@"Misc\LoadPivotTables.xlsx")))
using (var wb = new XLWorkbook(stream))
{
var ws = wb.Worksheet("PivotTable1");
var pt = ws.PivotTable("PivotTable1");
Assert.AreEqual("PivotTable1", pt.Name);
Assert.AreEqual(1, pt.RowLabels.Count());
Assert.AreEqual("Name", pt.RowLabels.Single().SourceName);
Assert.AreEqual(1, pt.ColumnLabels.Count());
Assert.AreEqual("Month", pt.ColumnLabels.Single().SourceName);
var pv = pt.Values.Single();
Assert.AreEqual("Sum of NumberOfOrders", pv.CustomName);
Assert.AreEqual("NumberOfOrders", pv.SourceName);
}
}
/// <summary>
/// For non-English locales, the default style ("Normal" in English) can be
/// another piece of text (e.g. Обычный in Russian).
/// This test ensures that the default style is correctly detected and
/// no style conflicts occur on save.
/// </summary>
[Test]
public void CanSaveFileWithDefaultStyleNameNotInEnglish()
{
using (var stream = TestHelper.GetStreamFromResource(TestHelper.GetResourcePath(@"Misc\FileWithDefaultStyleNameNotInEnglish.xlsx")))
using (var wb = new XLWorkbook(stream))
{
using (var ms = new MemoryStream())
{
wb.SaveAs(ms, true);
}
}
} |
<<<<<<<
PermanentAnchor position;
bool hasLocation;
string contextMenuAddInTreeEntry = DefaultContextMenuAddInTreeEntry;
=======
int line;
int column;
string contextMenuAddInTreeEntry;
>>>>>>>
PermanentAnchor position;
bool hasLocation;
string contextMenuAddInTreeEntry; |
<<<<<<<
/// <summary>
/// Unloads the specified project content, causing it to be reloaded when
/// GetProjectContentForReference is called the next time.
/// Warning: do not unload project contents that are still in use! Doing so will result
/// in an ObjectDisposedException when the unloaded project content is used the next time!
/// </summary>
public void UnloadProjectContent(IProjectContent pc)
{
if (pc == null)
throw new ArgumentNullException("pc");
LoggingService.Debug("ProjectContentRegistry.UnloadProjectContent: " + pc);
lock (contents) {
// find all keys used for the project content - might be the short name/full name/file name
List<string> keys = new List<string>();
foreach (KeyValuePair<string, IProjectContent> pair in contents) {
if (pair.Value == pc) keys.Add(pair.Key);
}
foreach (string key in keys) {
contents.Remove(key);
}
}
pc.Dispose();
}
=======
[Obsolete("Use DomAssemblyName instead of AssemblyName")]
>>>>>>>
/// <summary>
/// Unloads the specified project content, causing it to be reloaded when
/// GetProjectContentForReference is called the next time.
/// Warning: do not unload project contents that are still in use! Doing so will result
/// in an ObjectDisposedException when the unloaded project content is used the next time!
/// </summary>
public void UnloadProjectContent(IProjectContent pc)
{
if (pc == null)
throw new ArgumentNullException("pc");
LoggingService.Debug("ProjectContentRegistry.UnloadProjectContent: " + pc);
lock (contents) {
// find all keys used for the project content - might be the short name/full name/file name
List<string> keys = new List<string>();
foreach (KeyValuePair<string, IProjectContent> pair in contents) {
if (pair.Value == pc) keys.Add(pair.Key);
}
foreach (string key in keys) {
contents.Remove(key);
}
}
pc.Dispose();
}
[Obsolete("Use DomAssemblyName instead of AssemblyName")] |
<<<<<<<
marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline;
marker.ForegroundColor = item.Foreground;
marker.BackgroundColor = item.Background;
=======
marker.MarkerType = TextMarkerType.SquigglyUnderline;
marker.MarkerColor = item.Foreground;
>>>>>>>
marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline;
marker.MarkerColor = item.Foreground;
<<<<<<<
marker.MarkerTypes = TextMarkerTypes.None;
marker.ForegroundColor = item.Foreground;
marker.BackgroundColor = item.Background;
=======
marker.MarkerType = TextMarkerType.None;
marker.MarkerColor = Colors.Transparent;
>>>>>>>
marker.MarkerTypes = TextMarkerTypes.None;
marker.MarkerColor = Colors.Transparent; |
<<<<<<<
/// <summary>
/// Gets if tabs should be converted to spaces.
/// </summary>
bool ConvertTabsToSpaces { get; }
/// <summary>
/// Gets the size of an indentation level.
/// </summary>
int IndendationSize { get; }
=======
/// <summary>
/// Gets whether a '}' should automatically be inserted when a block is opened.
/// </summary>
bool AutoInsertBlockEnd { get; }
>>>>>>>
/// <summary>
/// Gets whether a '}' should automatically be inserted when a block is opened.
/// </summary>
bool AutoInsertBlockEnd { get; }
/// <summary>
/// Gets if tabs should be converted to spaces.
/// </summary>
bool ConvertTabsToSpaces { get; }
/// <summary>
/// Gets the size of an indentation level.
/// </summary>
int IndendationSize { get; } |
<<<<<<<
/// <summary>
/// Gets the highlighting definition that is being used.
/// </summary>
IHighlightingDefinition HighlightingDefinition { get; }
/// <summary>
/// Adds an additional highlighting engine that runs in addition to the XSHD-based highlighting.
/// </summary>
void AddAdditionalHighlighter(IHighlighter highlighter);
/// <summary>
/// Removes an additional highlighting engine.
/// </summary>
void RemoveAdditionalHighlighter(IHighlighter highlighter);
/// <summary>
/// Invalidates a line, causing it to be re-highlighted.
/// </summary>
/// <remarks>
/// This method is intended to be called by additional highlighters that process external information
/// (e.g. semantic highlighting).
/// </remarks>
void InvalidateLine(IDocumentLine line);
/// <summary>
/// Invalidates all lines, causing-them to be re-highlighted.
/// </summary>
/// <remarks>
/// This method is intended to be called by additional highlighters that process external information
/// (e.g. semantic highlighting).
/// </remarks>
void InvalidateAll();
/// <summary>
/// Gets the document lines that are currently visible in the editor.
/// </summary>
IEnumerable<IDocumentLine> GetVisibleDocumentLines();
/// <summary>
/// Raised when the set of visible document lines has changed.
/// </summary>
event EventHandler VisibleDocumentLinesChanged;
=======
/// <summary>
/// Creates a <see cref="HighlightedInlineBuilder"/> for a specified line.
/// </summary>
HighlightedInlineBuilder BuildInlines(int lineNumber);
/// <summary>
/// Gets the default text color.
/// </summary>
HighlightingColor DefaultTextColor { get; }
>>>>>>>
/// <summary>
/// Gets the highlighting definition that is being used.
/// </summary>
IHighlightingDefinition HighlightingDefinition { get; }
/// <summary>
/// Adds an additional highlighting engine that runs in addition to the XSHD-based highlighting.
/// </summary>
void AddAdditionalHighlighter(IHighlighter highlighter);
/// <summary>
/// Removes an additional highlighting engine.
/// </summary>
void RemoveAdditionalHighlighter(IHighlighter highlighter);
/// <summary>
/// Invalidates a line, causing it to be re-highlighted.
/// </summary>
/// <remarks>
/// This method is intended to be called by additional highlighters that process external information
/// (e.g. semantic highlighting).
/// </remarks>
void InvalidateLine(IDocumentLine line);
/// <summary>
/// Invalidates all lines, causing-them to be re-highlighted.
/// </summary>
/// <remarks>
/// This method is intended to be called by additional highlighters that process external information
/// (e.g. semantic highlighting).
/// </remarks>
void InvalidateAll();
/// <summary>
/// Gets the document lines that are currently visible in the editor.
/// </summary>
IEnumerable<IDocumentLine> GetVisibleDocumentLines();
/// <summary>
/// Raised when the set of visible document lines has changed.
/// </summary>
event EventHandler VisibleDocumentLinesChanged;
/// <summary>
/// Creates a <see cref="HighlightedInlineBuilder"/> for a specified line.
/// </summary>
HighlightedInlineBuilder BuildInlines(int lineNumber);
/// <summary>
/// Gets the default text color.
/// </summary>
HighlightingColor DefaultTextColor { get; } |
<<<<<<<
Get<Button>("findAll").Click += FindAllButtonClicked;
=======
this.ParentForm.AcceptButton = Get<Button>("findNext");
>>>>>>>
Get<Button>("findAll").Click += FindAllButtonClicked;
this.ParentForm.AcceptButton = Get<Button>("findNext"); |
<<<<<<<
public void TestYieldAsIdentifier()
{
ILexer lexer = GenerateLexer(new StringReader("yield"));
Token t = lexer.NextToken();
Assert.AreEqual(Tokens.Yield, t.kind);
Assert.IsTrue(Tokens.IdentifierTokens[t.kind]);
Assert.AreEqual("yield", t.val);
}
[Test]
=======
public void TestIdentifierStartingWithUnderscore()
{
ILexer lexer = GenerateLexer(new StringReader("_Bc05"));
Token t = lexer.NextToken();
Assert.AreEqual(Tokens.Identifier, t.kind);
Assert.AreEqual("_Bc05", t.val);
}
[Test]
public void TestKeyWordAsIdentifier()
{
ILexer lexer = GenerateLexer(new StringReader("@int"));
Token t = lexer.NextToken();
Assert.AreEqual(Tokens.Identifier, t.kind);
Assert.AreEqual("int", t.val);
}
[Test]
public void TestKeyWordAsIdentifierStartingWithUnderscore()
{
ILexer lexer = GenerateLexer(new StringReader("@_int"));
Token t = lexer.NextToken();
Assert.AreEqual(Tokens.Identifier, t.kind);
Assert.AreEqual("_int", t.val);
}
[Test]
>>>>>>>
public void TestYieldAsIdentifier()
{
ILexer lexer = GenerateLexer(new StringReader("yield"));
Token t = lexer.NextToken();
Assert.AreEqual(Tokens.Yield, t.kind);
Assert.IsTrue(Tokens.IdentifierTokens[t.kind]);
Assert.AreEqual("yield", t.val);
}
[Test]
public void TestIdentifierStartingWithUnderscore()
{
ILexer lexer = GenerateLexer(new StringReader("_Bc05"));
Token t = lexer.NextToken();
Assert.AreEqual(Tokens.Identifier, t.kind);
Assert.AreEqual("_Bc05", t.val);
}
[Test]
public void TestKeyWordAsIdentifier()
{
ILexer lexer = GenerateLexer(new StringReader("@int"));
Token t = lexer.NextToken();
Assert.AreEqual(Tokens.Identifier, t.kind);
Assert.AreEqual("int", t.val);
}
[Test]
public void TestKeyWordAsIdentifierStartingWithUnderscore()
{
ILexer lexer = GenerateLexer(new StringReader("@_int"));
Token t = lexer.NextToken();
Assert.AreEqual(Tokens.Identifier, t.kind);
Assert.AreEqual("_int", t.val);
}
[Test] |
<<<<<<<
WriteKeyword ("__arglist");
=======
WriteKeyword("__arglist");
>>>>>>>
WriteKeyword ("__arglist");
<<<<<<<
StartNode (namedArgumentExpression);
WriteIdentifier (namedArgumentExpression.Identifier);
WriteToken (":", NamedArgumentExpression.Roles.Colon);
Space ();
namedArgumentExpression.Expression.AcceptVisitor (this, data);
return EndNode (namedArgumentExpression);
=======
StartNode(namedArgumentExpression);
WriteIdentifier(namedArgumentExpression.Identifier);
if (namedArgumentExpression.Parent is ArrayInitializerExpression) {
Space();
WriteToken("=", NamedArgumentExpression.Roles.Assign);
} else {
WriteToken(":", NamedArgumentExpression.Roles.Colon);
}
Space();
namedArgumentExpression.Expression.AcceptVisitor(this, data);
return EndNode(namedArgumentExpression);
>>>>>>>
StartNode (namedArgumentExpression);
WriteIdentifier (namedArgumentExpression.Identifier);
if (namedArgumentExpression.Parent is ArrayInitializerExpression) {
Space();
WriteToken("=", NamedArgumentExpression.Roles.Assign);
} else {
WriteToken(":", NamedArgumentExpression.Roles.Colon);
}
Space ();
namedArgumentExpression.Expression.AcceptVisitor (this, data);
return EndNode (namedArgumentExpression);
<<<<<<<
StartNode (objectCreateExpression);
WriteKeyword ("new");
objectCreateExpression.Type.AcceptVisitor (this, data);
Space (policy.SpaceBeforeMethodCallParentheses);
WriteCommaSeparatedListInParenthesis (objectCreateExpression.Arguments, policy.SpaceWithinMethodCallParentheses);
objectCreateExpression.Initializer.AcceptVisitor (this, data);
return EndNode (objectCreateExpression);
=======
StartNode(objectCreateExpression);
WriteKeyword("new");
objectCreateExpression.Type.AcceptVisitor(this, data);
bool useParenthesis = objectCreateExpression.Arguments.Any() || objectCreateExpression.Initializer.IsNull;
// also use parenthesis if there is an '(' token and this isn't an anonymous type
if (!objectCreateExpression.LParToken.IsNull && !objectCreateExpression.Type.IsNull)
useParenthesis = true;
if (useParenthesis) {
Space(policy.SpaceBeforeMethodCallParentheses);
WriteCommaSeparatedListInParenthesis(objectCreateExpression.Arguments, policy.SpaceWithinMethodCallParentheses);
}
objectCreateExpression.Initializer.AcceptVisitor(this, data);
return EndNode(objectCreateExpression);
>>>>>>>
StartNode (objectCreateExpression);
WriteKeyword ("new");
objectCreateExpression.Type.AcceptVisitor (this, data);
bool useParenthesis = objectCreateExpression.Arguments.Any() || objectCreateExpression.Initializer.IsNull;
// also use parenthesis if there is an '(' token and this isn't an anonymous type
if (!objectCreateExpression.LParToken.IsNull && !objectCreateExpression.Type.IsNull)
useParenthesis = true;
if (useParenthesis) {
Space (policy.SpaceBeforeMethodCallParentheses);
WriteCommaSeparatedListInParenthesis (objectCreateExpression.Arguments, policy.SpaceWithinMethodCallParentheses);
}
objectCreateExpression.Initializer.AcceptVisitor (this, data);
return EndNode (objectCreateExpression);
<<<<<<<
static string ConvertChar (char ch)
=======
/// <summary>
/// Gets the escape sequence for the specified character.
/// </summary>
/// <remarks>This method does not convert ' or ".</remarks>
public static string ConvertChar(char ch)
>>>>>>>
/// <summary>
/// Gets the escape sequence for the specified character.
/// </summary>
/// <remarks>This method does not convert ' or ".</remarks>
public static string ConvertChar(char ch)
<<<<<<<
StartNode (queryExpression);
=======
StartNode(queryExpression);
bool indent = !(queryExpression.Parent is QueryContinuationClause);
if (indent) {
formatter.Indent();
NewLine();
}
>>>>>>>
StartNode (queryExpression);
bool indent = !(queryExpression.Parent is QueryContinuationClause);
if (indent) {
formatter.Indent();
NewLine();
}
<<<<<<<
NewLine ();
}
clause.AcceptVisitor (this, data);
}
return EndNode (queryExpression);
}
public object VisitQueryContinuationClause (QueryContinuationClause queryContinuationClause, object data)
{
StartNode (queryContinuationClause);
queryContinuationClause.PrecedingQuery.AcceptVisitor (this, data);
Space ();
WriteKeyword ("into", QueryContinuationClause.IntoKeywordRole);
Space ();
WriteIdentifier (queryContinuationClause.Identifier);
return EndNode (queryContinuationClause);
}
public object VisitQueryFromClause (QueryFromClause queryFromClause, object data)
{
StartNode (queryFromClause);
WriteKeyword ("from", QueryFromClause.FromKeywordRole);
queryFromClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (queryFromClause.Identifier);
Space ();
WriteKeyword ("in", QueryFromClause.InKeywordRole);
Space ();
queryFromClause.Expression.AcceptVisitor (this, data);
return EndNode (queryFromClause);
}
public object VisitQueryLetClause (QueryLetClause queryLetClause, object data)
{
StartNode (queryLetClause);
WriteKeyword ("let");
Space ();
WriteIdentifier (queryLetClause.Identifier);
Space (policy.SpaceAroundAssignment);
WriteToken ("=", QueryLetClause.Roles.Assign);
Space (policy.SpaceAroundAssignment);
queryLetClause.Expression.AcceptVisitor (this, data);
return EndNode (queryLetClause);
}
public object VisitQueryWhereClause (QueryWhereClause queryWhereClause, object data)
{
StartNode (queryWhereClause);
WriteKeyword ("where");
Space ();
queryWhereClause.Condition.AcceptVisitor (this, data);
return EndNode (queryWhereClause);
}
public object VisitQueryJoinClause (QueryJoinClause queryJoinClause, object data)
{
StartNode (queryJoinClause);
WriteKeyword ("join", QueryJoinClause.JoinKeywordRole);
queryJoinClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (queryJoinClause.JoinIdentifier, QueryJoinClause.JoinIdentifierRole);
Space ();
WriteKeyword ("in", QueryJoinClause.InKeywordRole);
Space ();
queryJoinClause.InExpression.AcceptVisitor (this, data);
Space ();
WriteKeyword ("on", QueryJoinClause.OnKeywordRole);
Space ();
queryJoinClause.OnExpression.AcceptVisitor (this, data);
Space ();
WriteKeyword ("equals", QueryJoinClause.EqualsKeywordRole);
Space ();
queryJoinClause.EqualsExpression.AcceptVisitor (this, data);
=======
NewLine();
clause.AcceptVisitor(this, data);
}
if (indent)
formatter.Unindent();
return EndNode(queryExpression);
}
public object VisitQueryContinuationClause(QueryContinuationClause queryContinuationClause, object data)
{
StartNode(queryContinuationClause);
queryContinuationClause.PrecedingQuery.AcceptVisitor(this, data);
Space();
WriteKeyword("into", QueryContinuationClause.IntoKeywordRole);
Space();
WriteIdentifier(queryContinuationClause.Identifier);
return EndNode(queryContinuationClause);
}
public object VisitQueryFromClause(QueryFromClause queryFromClause, object data)
{
StartNode(queryFromClause);
WriteKeyword("from", QueryFromClause.FromKeywordRole);
queryFromClause.Type.AcceptVisitor(this, data);
Space();
WriteIdentifier(queryFromClause.Identifier);
Space();
WriteKeyword("in", QueryFromClause.InKeywordRole);
Space();
queryFromClause.Expression.AcceptVisitor(this, data);
return EndNode(queryFromClause);
}
public object VisitQueryLetClause(QueryLetClause queryLetClause, object data)
{
StartNode(queryLetClause);
WriteKeyword("let");
Space();
WriteIdentifier(queryLetClause.Identifier);
Space(policy.SpaceAroundAssignment);
WriteToken("=", QueryLetClause.Roles.Assign);
Space(policy.SpaceAroundAssignment);
queryLetClause.Expression.AcceptVisitor(this, data);
return EndNode(queryLetClause);
}
public object VisitQueryWhereClause(QueryWhereClause queryWhereClause, object data)
{
StartNode(queryWhereClause);
WriteKeyword("where");
Space();
queryWhereClause.Condition.AcceptVisitor(this, data);
return EndNode(queryWhereClause);
}
public object VisitQueryJoinClause(QueryJoinClause queryJoinClause, object data)
{
StartNode(queryJoinClause);
WriteKeyword("join", QueryJoinClause.JoinKeywordRole);
queryJoinClause.Type.AcceptVisitor(this, data);
Space();
WriteIdentifier(queryJoinClause.JoinIdentifier, QueryJoinClause.JoinIdentifierRole);
Space();
WriteKeyword("in", QueryJoinClause.InKeywordRole);
Space();
queryJoinClause.InExpression.AcceptVisitor(this, data);
Space();
WriteKeyword("on", QueryJoinClause.OnKeywordRole);
Space();
queryJoinClause.OnExpression.AcceptVisitor(this, data);
Space();
WriteKeyword("equals", QueryJoinClause.EqualsKeywordRole);
Space();
queryJoinClause.EqualsExpression.AcceptVisitor(this, data);
>>>>>>>
NewLine ();
}
clause.AcceptVisitor (this, data);
}
if (indent)
formatter.Unindent();
return EndNode (queryExpression);
}
public object VisitQueryContinuationClause (QueryContinuationClause queryContinuationClause, object data)
{
StartNode (queryContinuationClause);
queryContinuationClause.PrecedingQuery.AcceptVisitor (this, data);
Space ();
WriteKeyword ("into", QueryContinuationClause.IntoKeywordRole);
Space ();
WriteIdentifier (queryContinuationClause.Identifier);
return EndNode (queryContinuationClause);
}
public object VisitQueryFromClause (QueryFromClause queryFromClause, object data)
{
StartNode (queryFromClause);
WriteKeyword ("from", QueryFromClause.FromKeywordRole);
queryFromClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (queryFromClause.Identifier);
Space ();
WriteKeyword ("in", QueryFromClause.InKeywordRole);
Space ();
queryFromClause.Expression.AcceptVisitor (this, data);
return EndNode (queryFromClause);
}
public object VisitQueryLetClause (QueryLetClause queryLetClause, object data)
{
StartNode (queryLetClause);
WriteKeyword ("let");
Space ();
WriteIdentifier (queryLetClause.Identifier);
Space (policy.SpaceAroundAssignment);
WriteToken ("=", QueryLetClause.Roles.Assign);
Space (policy.SpaceAroundAssignment);
queryLetClause.Expression.AcceptVisitor (this, data);
return EndNode (queryLetClause);
}
public object VisitQueryWhereClause (QueryWhereClause queryWhereClause, object data)
{
StartNode (queryWhereClause);
WriteKeyword ("where");
Space ();
queryWhereClause.Condition.AcceptVisitor (this, data);
return EndNode (queryWhereClause);
}
public object VisitQueryJoinClause (QueryJoinClause queryJoinClause, object data)
{
StartNode (queryJoinClause);
WriteKeyword ("join", QueryJoinClause.JoinKeywordRole);
queryJoinClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (queryJoinClause.JoinIdentifier, QueryJoinClause.JoinIdentifierRole);
Space ();
WriteKeyword ("in", QueryJoinClause.InKeywordRole);
Space ();
queryJoinClause.InExpression.AcceptVisitor (this, data);
Space ();
WriteKeyword ("on", QueryJoinClause.OnKeywordRole);
Space ();
queryJoinClause.OnExpression.AcceptVisitor (this, data);
Space ();
WriteKeyword ("equals", QueryJoinClause.EqualsKeywordRole);
Space ();
queryJoinClause.EqualsExpression.AcceptVisitor (this, data);
<<<<<<<
StartNode (labelStatement);
WriteIdentifier (labelStatement.Label);
WriteToken (":", LabelStatement.Roles.Colon);
NewLine ();
return EndNode (labelStatement);
=======
StartNode(labelStatement);
WriteIdentifier(labelStatement.Label);
WriteToken(":", LabelStatement.Roles.Colon);
bool foundLabelledStatement = false;
for (AstNode tmp = labelStatement.NextSibling; tmp != null; tmp = tmp.NextSibling) {
if (tmp.Role == labelStatement.Role) {
foundLabelledStatement = true;
}
}
if (!foundLabelledStatement) {
// introduce an EmptyStatement so that the output becomes syntactically valid
WriteToken(";", LabelStatement.Roles.Semicolon);
}
NewLine();
return EndNode(labelStatement);
>>>>>>>
StartNode (labelStatement);
WriteIdentifier (labelStatement.Label);
WriteToken (":", LabelStatement.Roles.Colon);
bool foundLabelledStatement = false;
for (AstNode tmp = labelStatement.NextSibling; tmp != null; tmp = tmp.NextSibling) {
if (tmp.Role == labelStatement.Role) {
foundLabelledStatement = true;
}
}
if (!foundLabelledStatement) {
// introduce an EmptyStatement so that the output becomes syntactically valid
WriteToken(";", LabelStatement.Roles.Semicolon);
}
NewLine ();
return EndNode (labelStatement);
<<<<<<<
Space (policy.SpaceBeforeCatchParentheses);
LPar ();
Space (policy.SpacesWithinCatchParentheses);
catchClause.Type.AcceptVisitor (this, data);
Space ();
WriteIdentifier (catchClause.VariableName);
Space (policy.SpacesWithinCatchParentheses);
RPar ();
=======
Space(policy.SpaceBeforeCatchParentheses);
LPar();
Space(policy.SpacesWithinCatchParentheses);
catchClause.Type.AcceptVisitor(this, data);
if (!string.IsNullOrEmpty(catchClause.VariableName)) {
Space();
WriteIdentifier(catchClause.VariableName);
}
Space(policy.SpacesWithinCatchParentheses);
RPar();
>>>>>>>
Space (policy.SpaceBeforeCatchParentheses);
LPar ();
Space (policy.SpacesWithinCatchParentheses);
catchClause.Type.AcceptVisitor (this, data);
if (!string.IsNullOrEmpty(catchClause.VariableName)) {
Space ();
WriteIdentifier (catchClause.VariableName);
}
Space (policy.SpacesWithinCatchParentheses);
RPar ();
<<<<<<<
formatter.WriteComment (comment.CommentType, comment.Content);
=======
formatter.StartNode(comment);
formatter.WriteComment(comment.CommentType, comment.Content);
formatter.EndNode(comment);
>>>>>>>
formatter.StartNode(comment);
formatter.WriteComment (comment.CommentType, comment.Content);
formatter.EndNode(comment); |
<<<<<<<
using System.Collections.Generic;
=======
using System.IO;
using System.Text;
using System.Collections;
using System.Drawing;
using System.Diagnostics;
>>>>>>>
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Collections;
using System.Drawing;
using System.Diagnostics; |
<<<<<<<
public override object Control {
=======
/// <summary>
/// Returns the ProfilerView of this instance.
/// </summary>
public ProfilerView DataView {
get { return dataView; }
}
/// <summary>
/// The <see cref="System.Windows.Forms.Control"/> representing the view
/// </summary>
public override Control Control {
>>>>>>>
/// <summary>
/// Returns the ProfilerView of this instance.
/// </summary>
public ProfilerView DataView {
get { return dataView; }
}
public override object Control { |
<<<<<<<
foreach(var assembly in GacInterop.GetGacAssemblyFullNames()) {
if (assembly.ShortName == "Microsoft.Web.Administration") {
webAdministrationAssembly = Assembly.Load(assembly.FullName);
break;
=======
foreach(DomAssemblyName assembly in GacInterop.GetAssemblyList()) {
if (assembly.FullName.Contains("Microsoft.Web.Administration")) {
if (IsAssemblyForWebServer(webServer, assembly)) {
webAdministrationAssembly = Assembly.Load(assembly.FullName);
break;
}
>>>>>>>
foreach(var assembly in GacInterop.GetGacAssemblyFullNames()) {
if (assembly.ShortName == "Microsoft.Web.Administration") {
if (IsAssemblyForWebServer(webServer, assembly)) {
webAdministrationAssembly = Assembly.Load(assembly.FullName);
break; |
<<<<<<<
#line 2763 "VBNET.ATG"
=======
#line 2757 "VBNET.ATG"
>>>>>>>
#line 2765 "VBNET.ATG"
<<<<<<<
#line 2765 "VBNET.ATG"
=======
#line 2759 "VBNET.ATG"
>>>>>>>
#line 2767 "VBNET.ATG"
<<<<<<<
#line 2769 "VBNET.ATG"
=======
#line 2763 "VBNET.ATG"
>>>>>>>
#line 2771 "VBNET.ATG"
<<<<<<<
#line 2770 "VBNET.ATG"
=======
#line 2764 "VBNET.ATG"
>>>>>>>
#line 2772 "VBNET.ATG"
<<<<<<<
#line 2772 "VBNET.ATG"
=======
#line 2766 "VBNET.ATG"
>>>>>>>
#line 2774 "VBNET.ATG"
<<<<<<<
#line 2839 "VBNET.ATG"
=======
#line 2833 "VBNET.ATG"
>>>>>>>
#line 2841 "VBNET.ATG"
<<<<<<<
#line 2840 "VBNET.ATG"
=======
#line 2834 "VBNET.ATG"
>>>>>>>
#line 2842 "VBNET.ATG"
<<<<<<<
#line 2841 "VBNET.ATG"
=======
#line 2835 "VBNET.ATG"
>>>>>>>
#line 2843 "VBNET.ATG"
<<<<<<<
#line 2842 "VBNET.ATG"
=======
#line 2836 "VBNET.ATG"
>>>>>>>
#line 2844 "VBNET.ATG"
<<<<<<<
#line 2843 "VBNET.ATG"
=======
#line 2837 "VBNET.ATG"
>>>>>>>
#line 2845 "VBNET.ATG"
<<<<<<<
#line 2844 "VBNET.ATG"
=======
#line 2838 "VBNET.ATG"
>>>>>>>
#line 2846 "VBNET.ATG"
<<<<<<<
#line 2845 "VBNET.ATG"
=======
#line 2839 "VBNET.ATG"
>>>>>>>
#line 2847 "VBNET.ATG"
<<<<<<<
#line 2846 "VBNET.ATG"
=======
#line 2840 "VBNET.ATG"
>>>>>>>
#line 2848 "VBNET.ATG"
<<<<<<<
#line 2847 "VBNET.ATG"
=======
#line 2841 "VBNET.ATG"
>>>>>>>
#line 2849 "VBNET.ATG"
<<<<<<<
#line 2848 "VBNET.ATG"
=======
#line 2842 "VBNET.ATG"
>>>>>>>
#line 2850 "VBNET.ATG"
<<<<<<<
#line 2851 "VBNET.ATG"
=======
#line 2845 "VBNET.ATG"
>>>>>>>
#line 2853 "VBNET.ATG"
<<<<<<<
#line 2852 "VBNET.ATG"
=======
#line 2846 "VBNET.ATG"
>>>>>>>
#line 2854 "VBNET.ATG"
<<<<<<<
#line 2853 "VBNET.ATG"
=======
#line 2847 "VBNET.ATG"
>>>>>>>
#line 2855 "VBNET.ATG"
<<<<<<<
#line 2854 "VBNET.ATG"
=======
#line 2848 "VBNET.ATG"
>>>>>>>
#line 2856 "VBNET.ATG"
<<<<<<<
#line 2855 "VBNET.ATG"
=======
#line 2849 "VBNET.ATG"
>>>>>>>
#line 2857 "VBNET.ATG"
<<<<<<<
#line 2856 "VBNET.ATG"
=======
#line 2850 "VBNET.ATG"
>>>>>>>
#line 2858 "VBNET.ATG"
<<<<<<<
#line 2857 "VBNET.ATG"
=======
#line 2851 "VBNET.ATG"
>>>>>>>
#line 2859 "VBNET.ATG"
<<<<<<<
#line 2858 "VBNET.ATG"
=======
#line 2852 "VBNET.ATG"
>>>>>>>
#line 2860 "VBNET.ATG"
<<<<<<<
#line 2859 "VBNET.ATG"
=======
#line 2853 "VBNET.ATG"
>>>>>>>
#line 2861 "VBNET.ATG"
<<<<<<<
#line 2860 "VBNET.ATG"
=======
#line 2854 "VBNET.ATG"
>>>>>>>
#line 2862 "VBNET.ATG"
<<<<<<<
#line 2861 "VBNET.ATG"
=======
#line 2855 "VBNET.ATG"
>>>>>>>
#line 2863 "VBNET.ATG"
<<<<<<<
#line 2862 "VBNET.ATG"
=======
#line 2856 "VBNET.ATG"
>>>>>>>
#line 2864 "VBNET.ATG"
<<<<<<<
#line 2863 "VBNET.ATG"
=======
#line 2857 "VBNET.ATG"
>>>>>>>
#line 2865 "VBNET.ATG"
<<<<<<<
#line 2864 "VBNET.ATG"
=======
#line 2858 "VBNET.ATG"
>>>>>>>
#line 2866 "VBNET.ATG"
<<<<<<<
#line 2865 "VBNET.ATG"
=======
#line 2859 "VBNET.ATG"
>>>>>>>
#line 2867 "VBNET.ATG"
<<<<<<<
#line 2866 "VBNET.ATG"
=======
#line 2860 "VBNET.ATG"
>>>>>>>
#line 2868 "VBNET.ATG"
<<<<<<<
#line 2867 "VBNET.ATG"
=======
#line 2861 "VBNET.ATG"
>>>>>>>
#line 2869 "VBNET.ATG"
<<<<<<<
#line 2868 "VBNET.ATG"
=======
#line 2862 "VBNET.ATG"
>>>>>>>
#line 2870 "VBNET.ATG"
<<<<<<<
#line 2869 "VBNET.ATG"
=======
#line 2863 "VBNET.ATG"
>>>>>>>
#line 2871 "VBNET.ATG"
<<<<<<<
#line 2872 "VBNET.ATG"
=======
#line 2866 "VBNET.ATG"
>>>>>>>
#line 2874 "VBNET.ATG"
<<<<<<<
#line 2873 "VBNET.ATG"
=======
#line 2867 "VBNET.ATG"
>>>>>>>
#line 2875 "VBNET.ATG"
<<<<<<<
#line 2875 "VBNET.ATG"
=======
#line 2869 "VBNET.ATG"
>>>>>>>
#line 2877 "VBNET.ATG"
<<<<<<<
#line 2876 "VBNET.ATG"
=======
#line 2870 "VBNET.ATG"
>>>>>>>
#line 2878 "VBNET.ATG"
<<<<<<<
#line 2877 "VBNET.ATG"
=======
#line 2871 "VBNET.ATG"
>>>>>>>
#line 2879 "VBNET.ATG"
<<<<<<<
#line 2878 "VBNET.ATG"
=======
#line 2872 "VBNET.ATG"
>>>>>>>
#line 2880 "VBNET.ATG"
<<<<<<<
#line 2813 "VBNET.ATG"
=======
#line 2807 "VBNET.ATG"
>>>>>>>
#line 2815 "VBNET.ATG"
<<<<<<<
#line 2814 "VBNET.ATG"
=======
#line 2808 "VBNET.ATG"
>>>>>>>
#line 2816 "VBNET.ATG"
<<<<<<<
#line 2815 "VBNET.ATG"
=======
#line 2809 "VBNET.ATG"
>>>>>>>
#line 2817 "VBNET.ATG"
<<<<<<<
#line 2816 "VBNET.ATG"
=======
#line 2810 "VBNET.ATG"
>>>>>>>
#line 2818 "VBNET.ATG"
<<<<<<<
#line 2817 "VBNET.ATG"
=======
#line 2811 "VBNET.ATG"
>>>>>>>
#line 2819 "VBNET.ATG"
<<<<<<<
#line 2818 "VBNET.ATG"
=======
#line 2812 "VBNET.ATG"
>>>>>>>
#line 2820 "VBNET.ATG"
<<<<<<<
#line 2819 "VBNET.ATG"
=======
#line 2813 "VBNET.ATG"
>>>>>>>
#line 2821 "VBNET.ATG"
<<<<<<<
#line 2820 "VBNET.ATG"
=======
#line 2814 "VBNET.ATG"
>>>>>>>
#line 2822 "VBNET.ATG"
<<<<<<<
#line 2821 "VBNET.ATG"
=======
#line 2815 "VBNET.ATG"
>>>>>>>
#line 2823 "VBNET.ATG"
<<<<<<<
#line 2822 "VBNET.ATG"
=======
#line 2816 "VBNET.ATG"
>>>>>>>
#line 2824 "VBNET.ATG"
<<<<<<<
#line 2823 "VBNET.ATG"
=======
#line 2817 "VBNET.ATG"
>>>>>>>
#line 2825 "VBNET.ATG"
<<<<<<<
#line 2824 "VBNET.ATG"
=======
#line 2818 "VBNET.ATG"
>>>>>>>
#line 2826 "VBNET.ATG"
<<<<<<<
#line 2825 "VBNET.ATG"
=======
#line 2819 "VBNET.ATG"
>>>>>>>
#line 2827 "VBNET.ATG"
<<<<<<<
#line 2826 "VBNET.ATG"
=======
#line 2820 "VBNET.ATG"
>>>>>>>
#line 2828 "VBNET.ATG"
<<<<<<<
#line 2827 "VBNET.ATG"
=======
#line 2821 "VBNET.ATG"
>>>>>>>
#line 2829 "VBNET.ATG"
<<<<<<<
#line 2828 "VBNET.ATG"
=======
#line 2822 "VBNET.ATG"
>>>>>>>
#line 2830 "VBNET.ATG"
<<<<<<<
#line 2829 "VBNET.ATG"
=======
#line 2823 "VBNET.ATG"
>>>>>>>
#line 2831 "VBNET.ATG"
<<<<<<<
#line 2832 "VBNET.ATG"
=======
#line 2826 "VBNET.ATG"
>>>>>>>
#line 2834 "VBNET.ATG"
<<<<<<<
#line 2833 "VBNET.ATG"
=======
#line 2827 "VBNET.ATG"
>>>>>>>
#line 2835 "VBNET.ATG"
<<<<<<<
#line 2834 "VBNET.ATG"
=======
#line 2828 "VBNET.ATG"
>>>>>>>
#line 2836 "VBNET.ATG"
<<<<<<<
#line 2835 "VBNET.ATG"
=======
#line 2829 "VBNET.ATG"
>>>>>>>
#line 2837 "VBNET.ATG"
<<<<<<<
#line 2836 "VBNET.ATG"
=======
#line 2830 "VBNET.ATG"
>>>>>>>
#line 2838 "VBNET.ATG"
<<<<<<<
#line 2619 "VBNET.ATG"
=======
#line 2613 "VBNET.ATG"
>>>>>>>
#line 2621 "VBNET.ATG"
<<<<<<<
#line 2620 "VBNET.ATG"
=======
#line 2614 "VBNET.ATG"
>>>>>>>
#line 2622 "VBNET.ATG"
<<<<<<<
#line 2486 "VBNET.ATG"
List<CaseLabel> caseClauses = null;
=======
#line 2478 "VBNET.ATG"
List<CaseLabel> caseClauses = null; Location caseLocation = la.Location;
>>>>>>>
#line 2486 "VBNET.ATG"
List<CaseLabel> caseClauses = null; Location caseLocation = la.Location;
<<<<<<<
#line 2497 "VBNET.ATG"
=======
#line 2491 "VBNET.ATG"
>>>>>>>
#line 2499 "VBNET.ATG"
<<<<<<<
#line 2499 "VBNET.ATG"
=======
#line 2493 "VBNET.ATG"
>>>>>>>
#line 2501 "VBNET.ATG"
<<<<<<<
#line 2500 "VBNET.ATG"
=======
#line 2494 "VBNET.ATG"
>>>>>>>
#line 2502 "VBNET.ATG"
<<<<<<<
#line 2500 "VBNET.ATG"
=======
#line 2494 "VBNET.ATG"
>>>>>>>
#line 2502 "VBNET.ATG"
<<<<<<<
#line 2501 "VBNET.ATG"
=======
#line 2495 "VBNET.ATG"
>>>>>>>
#line 2503 "VBNET.ATG"
<<<<<<<
#line 2503 "VBNET.ATG"
=======
#line 2497 "VBNET.ATG"
>>>>>>>
#line 2505 "VBNET.ATG"
<<<<<<<
#line 2504 "VBNET.ATG"
=======
#line 2498 "VBNET.ATG"
>>>>>>>
#line 2506 "VBNET.ATG"
<<<<<<<
#line 2504 "VBNET.ATG"
=======
#line 2498 "VBNET.ATG"
>>>>>>>
#line 2506 "VBNET.ATG"
<<<<<<<
#line 2507 "VBNET.ATG"
=======
#line 2501 "VBNET.ATG"
>>>>>>>
#line 2509 "VBNET.ATG"
<<<<<<<
#line 2513 "VBNET.ATG"
=======
#line 2507 "VBNET.ATG"
>>>>>>>
#line 2515 "VBNET.ATG"
<<<<<<<
#line 2515 "VBNET.ATG"
=======
#line 2509 "VBNET.ATG"
>>>>>>>
#line 2517 "VBNET.ATG"
<<<<<<<
#line 2515 "VBNET.ATG"
=======
#line 2509 "VBNET.ATG"
>>>>>>>
#line 2517 "VBNET.ATG"
<<<<<<<
#line 2515 "VBNET.ATG"
=======
#line 2509 "VBNET.ATG"
>>>>>>>
#line 2517 "VBNET.ATG"
<<<<<<<
#line 2516 "VBNET.ATG"
=======
#line 2510 "VBNET.ATG"
>>>>>>>
#line 2518 "VBNET.ATG"
<<<<<<<
#line 2519 "VBNET.ATG"
=======
#line 2513 "VBNET.ATG"
>>>>>>>
#line 2521 "VBNET.ATG"
<<<<<<<
#line 2528 "VBNET.ATG"
=======
#line 2522 "VBNET.ATG"
>>>>>>>
#line 2530 "VBNET.ATG"
<<<<<<<
#line 2529 "VBNET.ATG"
=======
#line 2523 "VBNET.ATG"
>>>>>>>
#line 2531 "VBNET.ATG"
<<<<<<<
#line 2530 "VBNET.ATG"
=======
#line 2524 "VBNET.ATG"
>>>>>>>
#line 2532 "VBNET.ATG"
<<<<<<<
#line 2531 "VBNET.ATG"
=======
#line 2525 "VBNET.ATG"
>>>>>>>
#line 2533 "VBNET.ATG"
<<<<<<<
#line 2533 "VBNET.ATG"
=======
#line 2527 "VBNET.ATG"
>>>>>>>
#line 2535 "VBNET.ATG"
<<<<<<<
#line 2537 "VBNET.ATG"
=======
#line 2531 "VBNET.ATG"
>>>>>>>
#line 2539 "VBNET.ATG"
<<<<<<<
#line 2729 "VBNET.ATG"
=======
#line 2723 "VBNET.ATG"
>>>>>>>
#line 2731 "VBNET.ATG"
<<<<<<<
#line 2731 "VBNET.ATG"
=======
#line 2725 "VBNET.ATG"
>>>>>>>
#line 2733 "VBNET.ATG"
<<<<<<<
#line 2734 "VBNET.ATG"
=======
#line 2728 "VBNET.ATG"
>>>>>>>
#line 2736 "VBNET.ATG"
<<<<<<<
#line 2735 "VBNET.ATG"
=======
#line 2729 "VBNET.ATG"
>>>>>>>
#line 2737 "VBNET.ATG"
<<<<<<<
#line 2736 "VBNET.ATG"
=======
#line 2730 "VBNET.ATG"
>>>>>>>
#line 2738 "VBNET.ATG"
<<<<<<<
#line 2739 "VBNET.ATG"
=======
#line 2733 "VBNET.ATG"
>>>>>>>
#line 2741 "VBNET.ATG"
<<<<<<<
#line 2709 "VBNET.ATG"
=======
#line 2703 "VBNET.ATG"
>>>>>>>
#line 2711 "VBNET.ATG"
<<<<<<<
#line 2711 "VBNET.ATG"
=======
#line 2705 "VBNET.ATG"
>>>>>>>
#line 2713 "VBNET.ATG"
<<<<<<<
#line 2714 "VBNET.ATG"
=======
#line 2708 "VBNET.ATG"
>>>>>>>
#line 2716 "VBNET.ATG"
<<<<<<<
#line 2715 "VBNET.ATG"
=======
#line 2709 "VBNET.ATG"
>>>>>>>
#line 2717 "VBNET.ATG"
<<<<<<<
#line 2717 "VBNET.ATG"
=======
#line 2711 "VBNET.ATG"
>>>>>>>
#line 2719 "VBNET.ATG"
<<<<<<<
#line 2725 "VBNET.ATG"
=======
#line 2719 "VBNET.ATG"
>>>>>>>
#line 2727 "VBNET.ATG"
<<<<<<<
#line 2702 "VBNET.ATG"
=======
#line 2696 "VBNET.ATG"
>>>>>>>
#line 2704 "VBNET.ATG"
<<<<<<<
#line 2703 "VBNET.ATG"
=======
#line 2697 "VBNET.ATG"
>>>>>>>
#line 2705 "VBNET.ATG"
<<<<<<<
#line 2704 "VBNET.ATG"
=======
#line 2698 "VBNET.ATG"
>>>>>>>
#line 2706 "VBNET.ATG"
<<<<<<<
#line 2705 "VBNET.ATG"
=======
#line 2699 "VBNET.ATG"
>>>>>>>
#line 2707 "VBNET.ATG"
<<<<<<<
#line 2545 "VBNET.ATG"
=======
#line 2539 "VBNET.ATG"
>>>>>>>
#line 2547 "VBNET.ATG"
<<<<<<<
#line 2546 "VBNET.ATG"
=======
#line 2540 "VBNET.ATG"
>>>>>>>
#line 2548 "VBNET.ATG"
<<<<<<<
#line 2550 "VBNET.ATG"
=======
#line 2544 "VBNET.ATG"
>>>>>>>
#line 2552 "VBNET.ATG"
<<<<<<<
#line 2554 "VBNET.ATG"
=======
#line 2548 "VBNET.ATG"
>>>>>>>
#line 2556 "VBNET.ATG"
<<<<<<<
#line 2624 "VBNET.ATG"
=======
#line 2618 "VBNET.ATG"
>>>>>>>
#line 2626 "VBNET.ATG"
<<<<<<<
#line 2626 "VBNET.ATG"
=======
#line 2620 "VBNET.ATG"
>>>>>>>
#line 2628 "VBNET.ATG"
<<<<<<<
#line 2627 "VBNET.ATG"
=======
#line 2621 "VBNET.ATG"
>>>>>>>
#line 2629 "VBNET.ATG"
<<<<<<<
#line 2662 "VBNET.ATG"
=======
#line 2656 "VBNET.ATG"
>>>>>>>
#line 2664 "VBNET.ATG"
<<<<<<<
#line 2664 "VBNET.ATG"
=======
#line 2658 "VBNET.ATG"
>>>>>>>
#line 2666 "VBNET.ATG"
<<<<<<<
#line 2565 "VBNET.ATG"
=======
#line 2559 "VBNET.ATG"
>>>>>>>
#line 2567 "VBNET.ATG"
<<<<<<<
#line 2567 "VBNET.ATG"
=======
#line 2561 "VBNET.ATG"
>>>>>>>
#line 2569 "VBNET.ATG"
<<<<<<<
#line 2573 "VBNET.ATG"
=======
#line 2567 "VBNET.ATG"
>>>>>>>
#line 2575 "VBNET.ATG"
<<<<<<<
#line 2575 "VBNET.ATG"
=======
#line 2569 "VBNET.ATG"
>>>>>>>
#line 2577 "VBNET.ATG"
<<<<<<<
#line 2597 "VBNET.ATG"
=======
#line 2591 "VBNET.ATG"
>>>>>>>
#line 2599 "VBNET.ATG"
<<<<<<<
#line 2603 "VBNET.ATG"
=======
#line 2597 "VBNET.ATG"
>>>>>>>
#line 2605 "VBNET.ATG"
<<<<<<<
#line 2605 "VBNET.ATG"
=======
#line 2599 "VBNET.ATG"
>>>>>>>
#line 2607 "VBNET.ATG"
<<<<<<<
#line 2651 "VBNET.ATG"
=======
#line 2645 "VBNET.ATG"
>>>>>>>
#line 2653 "VBNET.ATG"
<<<<<<<
#line 2653 "VBNET.ATG"
=======
#line 2647 "VBNET.ATG"
>>>>>>>
#line 2655 "VBNET.ATG"
<<<<<<<
#line 2656 "VBNET.ATG"
=======
#line 2650 "VBNET.ATG"
>>>>>>>
#line 2658 "VBNET.ATG"
<<<<<<<
#line 2657 "VBNET.ATG"
=======
#line 2651 "VBNET.ATG"
>>>>>>>
#line 2659 "VBNET.ATG"
<<<<<<<
#line 2658 "VBNET.ATG"
=======
#line 2652 "VBNET.ATG"
>>>>>>>
#line 2660 "VBNET.ATG"
<<<<<<<
#line 2658 "VBNET.ATG"
=======
#line 2652 "VBNET.ATG"
>>>>>>>
#line 2660 "VBNET.ATG"
<<<<<<<
#line 2630 "VBNET.ATG"
=======
#line 2624 "VBNET.ATG"
>>>>>>>
#line 2632 "VBNET.ATG"
<<<<<<<
#line 2631 "VBNET.ATG"
=======
#line 2625 "VBNET.ATG"
>>>>>>>
#line 2633 "VBNET.ATG"
<<<<<<<
#line 2634 "VBNET.ATG"
=======
#line 2628 "VBNET.ATG"
>>>>>>>
#line 2636 "VBNET.ATG"
<<<<<<<
#line 2635 "VBNET.ATG"
=======
#line 2629 "VBNET.ATG"
>>>>>>>
#line 2637 "VBNET.ATG"
<<<<<<<
#line 2638 "VBNET.ATG"
=======
#line 2632 "VBNET.ATG"
>>>>>>>
#line 2640 "VBNET.ATG"
<<<<<<<
#line 2640 "VBNET.ATG"
=======
#line 2634 "VBNET.ATG"
>>>>>>>
#line 2642 "VBNET.ATG"
<<<<<<<
#line 2672 "VBNET.ATG"
=======
#line 2666 "VBNET.ATG"
>>>>>>>
#line 2674 "VBNET.ATG"
<<<<<<<
#line 2674 "VBNET.ATG"
=======
#line 2668 "VBNET.ATG"
>>>>>>>
#line 2676 "VBNET.ATG"
<<<<<<<
#line 2680 "VBNET.ATG"
=======
#line 2674 "VBNET.ATG"
>>>>>>>
#line 2682 "VBNET.ATG"
<<<<<<<
#line 2688 "VBNET.ATG"
=======
#line 2682 "VBNET.ATG"
>>>>>>>
#line 2690 "VBNET.ATG"
<<<<<<<
#line 2689 "VBNET.ATG"
=======
#line 2683 "VBNET.ATG"
>>>>>>>
#line 2691 "VBNET.ATG"
<<<<<<<
#line 2695 "VBNET.ATG"
=======
#line 2689 "VBNET.ATG"
>>>>>>>
#line 2697 "VBNET.ATG"
<<<<<<<
#line 2695 "VBNET.ATG"
=======
#line 2689 "VBNET.ATG"
>>>>>>>
#line 2697 "VBNET.ATG"
<<<<<<<
#line 2697 "VBNET.ATG"
=======
#line 2691 "VBNET.ATG"
>>>>>>>
#line 2699 "VBNET.ATG"
<<<<<<<
#line 2744 "VBNET.ATG"
=======
#line 2738 "VBNET.ATG"
>>>>>>>
#line 2746 "VBNET.ATG"
<<<<<<<
#line 2746 "VBNET.ATG"
=======
#line 2740 "VBNET.ATG"
>>>>>>>
#line 2748 "VBNET.ATG"
<<<<<<<
#line 2754 "VBNET.ATG"
=======
#line 2748 "VBNET.ATG"
>>>>>>>
#line 2756 "VBNET.ATG"
<<<<<<<
#line 2754 "VBNET.ATG"
=======
#line 2748 "VBNET.ATG"
>>>>>>>
#line 2756 "VBNET.ATG"
<<<<<<<
#line 2755 "VBNET.ATG"
=======
#line 2749 "VBNET.ATG"
>>>>>>>
#line 2757 "VBNET.ATG" |
<<<<<<<
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Linq;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.PackageManagement.EnvDTE;
using NUnit.Framework;
namespace PackageManagement.Tests.EnvDTE
{
[TestFixture]
public class CodeDelegateTests : CodeModelTestBase
{
CodeDelegate codeDelegate;
void CreateDelegate(string code)
{
AddCodeFile("delegate.cs", code);
codeDelegate = new CodeDelegate(
codeModelContext,
assemblyModel.TopLevelTypeDefinitions.First().Resolve());
}
[Test]
public void Access_PublicDelegate_ReturnsPublic()
{
CreateDelegate("public delegate void MyDelegate(string param1);");
global::EnvDTE.vsCMAccess access = codeDelegate.Access;
Assert.AreEqual(global::EnvDTE.vsCMAccess.vsCMAccessPublic, access);
}
[Test]
public void Access_PrivateDelegate_ReturnsPrivate()
{
CreateDelegate("delegate void MyDelegate(string param1);");
global::EnvDTE.vsCMAccess access = codeDelegate.Access;
Assert.AreEqual(global::EnvDTE.vsCMAccess.vsCMAccessPrivate, access);
}
[Test]
public void Kind_PublicDelegate_ReturnsDelegate()
{
CreateDelegate("public delegate void MyDelegate(string param1);");
global::EnvDTE.vsCMElement kind = codeDelegate.Kind;
Assert.AreEqual(global::EnvDTE.vsCMElement.vsCMElementDelegate, kind);
}
}
}
=======
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//using System;
//using ICSharpCode.PackageManagement.EnvDTE;
//using ICSharpCode.SharpDevelop.Dom;
//using NUnit.Framework;
//using PackageManagement.Tests.Helpers;
//
//namespace PackageManagement.Tests.EnvDTE
//{
// [TestFixture]
// public class CodeDelegateTests
// {
// CodeDelegate codeDelegate;
// ProjectContentHelper helper;
// IClass fakeDelegate;
//
// [SetUp]
// public void Init()
// {
// helper = new ProjectContentHelper();
// }
//
// void CreatePublicDelegate(string name)
// {
// fakeDelegate = helper.AddPublicDelegateToProjectContent(name);
// CreateDelegate();
// }
//
// void CreatePrivateDelegate(string name)
// {
// fakeDelegate = helper.AddPrivateDelegateToProjectContent(name);
// CreateDelegate();
// }
//
// void CreateDelegate()
// {
// codeDelegate = new CodeDelegate(helper.ProjectContent, fakeDelegate);
// }
//
// [Test]
// public void Access_PublicDelegate_ReturnsPublic()
// {
// CreatePublicDelegate("MyDelegate");
//
// global::EnvDTE.vsCMAccess access = codeDelegate.Access;
//
// Assert.AreEqual(global::EnvDTE.vsCMAccess.vsCMAccessPublic, access);
// }
//
// [Test]
// public void Access_PrivateDelegate_ReturnsPrivate()
// {
// CreatePrivateDelegate("MyDelegate");
//
// global::EnvDTE.vsCMAccess access = codeDelegate.Access;
//
// Assert.AreEqual(global::EnvDTE.vsCMAccess.vsCMAccessPrivate, access);
// }
//
// [Test]
// public void Kind_PublicDelegate_ReturnsClass()
// {
// CreatePublicDelegate("MyDelegate");
//
// global::EnvDTE.vsCMElement kind = codeDelegate.Kind;
//
// Assert.AreEqual(global::EnvDTE.vsCMElement.vsCMElementDelegate, kind);
// }
// }
//}
>>>>>>>
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Linq;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.PackageManagement.EnvDTE;
using NUnit.Framework;
namespace PackageManagement.Tests.EnvDTE
{
[TestFixture]
public class CodeDelegateTests : CodeModelTestBase
{
CodeDelegate codeDelegate;
void CreateDelegate(string code)
{
AddCodeFile("delegate.cs", code);
codeDelegate = new CodeDelegate(
codeModelContext,
assemblyModel.TopLevelTypeDefinitions.First().Resolve());
}
[Test]
public void Access_PublicDelegate_ReturnsPublic()
{
CreateDelegate("public delegate void MyDelegate(string param1);");
global::EnvDTE.vsCMAccess access = codeDelegate.Access;
Assert.AreEqual(global::EnvDTE.vsCMAccess.vsCMAccessPublic, access);
}
[Test]
public void Access_PrivateDelegate_ReturnsPrivate()
{
CreateDelegate("delegate void MyDelegate(string param1);");
global::EnvDTE.vsCMAccess access = codeDelegate.Access;
Assert.AreEqual(global::EnvDTE.vsCMAccess.vsCMAccessPrivate, access);
}
[Test]
public void Kind_PublicDelegate_ReturnsDelegate()
{
CreateDelegate("public delegate void MyDelegate(string param1);");
global::EnvDTE.vsCMElement kind = codeDelegate.Kind;
Assert.AreEqual(global::EnvDTE.vsCMElement.vsCMElementDelegate, kind);
}
}
} |
<<<<<<<
[CLSCompliant(false)]
=======
[NonSerialized]
>>>>>>>
[CLSCompliant(false)]
[NonSerialized] |
<<<<<<<
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Linq;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.SharpDevelop;
namespace ICSharpCode.PackageManagement.EnvDTE
{
public class CodeProperty2 : CodeProperty, global::EnvDTE.CodeProperty2
{
public CodeProperty2()
{
}
public CodeProperty2(CodeModelContext context, IProperty property)
: base(context, property)
{
}
public global::EnvDTE.vsCMPropertyKind ReadWrite {
get { return GetPropertyKind(); }
}
global::EnvDTE.vsCMPropertyKind GetPropertyKind()
{
if (property.CanSet && property.CanGet) {
return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindReadWrite;
} else if (property.CanSet) {
return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindWriteOnly;
}
return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindReadOnly;
}
public global::EnvDTE.CodeElements Parameters {
get {
var parameters = new CodeElementsList<CodeElement>();
parameters.AddRange(property.Parameters.Select(parameter => new CodeParameter2(context, parameter)));
return parameters;
}
}
}
}
=======
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//using System;
//using ICSharpCode.SharpDevelop.Dom;
//
//namespace ICSharpCode.PackageManagement.EnvDTE
//{
// public class CodeProperty2 : CodeProperty, global::EnvDTE.CodeProperty2
// {
// public CodeProperty2()
// {
// }
//
// public CodeProperty2(IProperty property)
// : base(property)
// {
// }
//
// public global::EnvDTE.vsCMPropertyKind ReadWrite {
// get { return GetPropertyKind(); }
// }
//
// global::EnvDTE.vsCMPropertyKind GetPropertyKind()
// {
// if (Property.CanSet && Property.CanGet) {
// return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindReadWrite;
// } else if (Property.CanSet) {
// return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindWriteOnly;
// }
// return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindReadOnly;
// }
//
// public global::EnvDTE.CodeElements Parameters {
// get { return new CodeParameters(null, Property.Parameters); }
// }
// }
//}
>>>>>>>
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Linq;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.SharpDevelop;
namespace ICSharpCode.PackageManagement.EnvDTE
{
public class CodeProperty2 : CodeProperty, global::EnvDTE.CodeProperty2
{
public CodeProperty2()
{
}
public CodeProperty2(CodeModelContext context, IProperty property)
: base(context, property)
{
}
public global::EnvDTE.vsCMPropertyKind ReadWrite {
get { return GetPropertyKind(); }
}
global::EnvDTE.vsCMPropertyKind GetPropertyKind()
{
if (property.CanSet && property.CanGet) {
return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindReadWrite;
} else if (property.CanSet) {
return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindWriteOnly;
}
return global::EnvDTE.vsCMPropertyKind.vsCMPropertyKindReadOnly;
}
public global::EnvDTE.CodeElements Parameters {
get {
var parameters = new CodeElementsList<CodeElement>();
parameters.AddRange(property.Parameters.Select(parameter => new CodeParameter2(context, parameter)));
return parameters;
}
}
}
} |
<<<<<<<
/// <summary>
/// Gets the project content associated with this project.
/// </summary>
/// <remarks>
/// This property must always return the same value for the same project.
/// This property may return null.
///
/// This member is thread-safe.
/// </remarks>
IProjectContent ProjectContent { get; }
/// <summary>
/// Gets the default namespace to use for a file with the specified name.
/// </summary>
/// <param name="fileName">Full file name for a new file being added to the project.</param>
/// <returns>Namespace name to use for the new file</returns>
string GetDefaultNamespace(string fileName);
/// <summary>
/// Creates a CodeDomProvider for this project's language.
/// Returns null when no CodeDomProvider is available for the language.
/// </summary>
System.CodeDom.Compiler.CodeDomProvider CreateCodeDomProvider();
/// <summary>
/// Generates code for a CodeDom compile unit.
/// This method is used by CustomToolContext.WriteCodeDomToFile.
/// </summary>
void GenerateCodeFromCodeDom(System.CodeDom.CodeCompileUnit compileUnit, TextWriter writer);
/// <summary>
/// Creates a new ambience for this project.
/// </summary>
/// <remarks>
/// This member is thread-safe.
/// As ambiences are not thread-safe, this method always returns a new ambience instance.
/// Never returns null.
/// </remarks>
IAmbience GetAmbience();
/// <summary>
/// Prepares searching for references to the specified entity.
/// This method should calculate the amount of work to be done (e.g. using the number of files to search through),
/// it should not perform the actual search.
/// </summary>
/// <returns>
/// An object that can be used to perform the search; or null if this project does not support symbol searches.
/// </returns>
Refactoring.ISymbolSearch PrepareSymbolSearch(IEntity entity);
/// <summary>
/// Occurs whenever parse information for this project was updated. This event is raised on the main thread.
/// </summary>
event EventHandler<ParseInformationEventArgs> ParseInformationUpdated;
/// <summary>
/// Notifies the project that the parse information was updated.
/// This method is called by the parser service <b>within a per-file lock</b>.
/// </summary>
void OnParseInformationUpdated(ParseInformationEventArgs args);
=======
// TODO:
// bool HasProjectType(Guid projectTypeGuid);
>>>>>>>
// TODO:
bool HasProjectType(Guid projectTypeGuid);
/// <summary>
/// Gets the project content associated with this project.
/// </summary>
/// <remarks>
/// This property must always return the same value for the same project.
/// This property may return null.
///
/// This member is thread-safe.
/// </remarks>
IProjectContent ProjectContent { get; }
/// <summary>
/// Gets the default namespace to use for a file with the specified name.
/// </summary>
/// <param name="fileName">Full file name for a new file being added to the project.</param>
/// <returns>Namespace name to use for the new file</returns>
string GetDefaultNamespace(string fileName);
/// <summary>
/// Creates a CodeDomProvider for this project's language.
/// Returns null when no CodeDomProvider is available for the language.
/// </summary>
System.CodeDom.Compiler.CodeDomProvider CreateCodeDomProvider();
/// <summary>
/// Generates code for a CodeDom compile unit.
/// This method is used by CustomToolContext.WriteCodeDomToFile.
/// </summary>
void GenerateCodeFromCodeDom(System.CodeDom.CodeCompileUnit compileUnit, TextWriter writer);
/// <summary>
/// Creates a new ambience for this project.
/// </summary>
/// <remarks>
/// This member is thread-safe.
/// As ambiences are not thread-safe, this method always returns a new ambience instance.
/// Never returns null.
/// </remarks>
IAmbience GetAmbience();
/// <summary>
/// Prepares searching for references to the specified entity.
/// This method should calculate the amount of work to be done (e.g. using the number of files to search through),
/// it should not perform the actual search.
/// </summary>
/// <returns>
/// An object that can be used to perform the search; or null if this project does not support symbol searches.
/// </returns>
Refactoring.ISymbolSearch PrepareSymbolSearch(IEntity entity);
/// <summary>
/// Occurs whenever parse information for this project was updated. This event is raised on the main thread.
/// </summary>
event EventHandler<ParseInformationEventArgs> ParseInformationUpdated;
/// <summary>
/// Notifies the project that the parse information was updated.
/// This method is called by the parser service <b>within a per-file lock</b>.
/// </summary>
void OnParseInformationUpdated(ParseInformationEventArgs args); |
<<<<<<<
if (createKey.ShowDialog(WorkbenchSingleton.MainWin32Window) == DialogResult.OK) {
keyFile.Text = createKey.KeyFile;
=======
if (createKey.ShowDialog(WorkbenchSingleton.MainForm) == DialogResult.OK) {
keyFile.Text = MSBuildInternals.Escape(createKey.KeyFile);
>>>>>>>
if (createKey.ShowDialog(WorkbenchSingleton.MainWin32Window) == DialogResult.OK) {
keyFile.Text = MSBuildInternals.Escape(createKey.KeyFile); |
<<<<<<<
foreach (IUnresolvedTypeDefinition c in SearchClasses(text)) {
AddItem(c, GetMatchType(text, c.Name));
=======
foreach (IClass c in SearchClasses(text)) {
AddItem(c, GetMatchType(text, c.Name), false);
>>>>>>>
foreach (IUnresolvedTypeDefinition c in SearchClasses(text)) {
AddItem(c, GetMatchType(text, c.Name), false);
<<<<<<<
foreach (IUnresolvedTypeDefinition c in parseInfo.TopLevelTypeDefinitions) {
AddAllMembersMatchingText(c, text);
=======
foreach (IClass c in parseInfo.CompilationUnit.Classes) {
AddAllMembersMatchingText(c, text, true);
>>>>>>>
foreach (IUnresolvedTypeDefinition c in parseInfo.TopLevelTypeDefinitions) {
AddAllMembersMatchingText(c, text, true);
<<<<<<<
num = Math.Min(editor.Document.LineCount, Math.Max(1, num));
AddItem(StringParser.Parse("${res:Dialog.Goto.GotoLine} ") + num, ClassBrowserIconService.GotoArrow, num, int.MaxValue);
=======
num = Math.Min(editor.Document.TotalNumberOfLines, Math.Max(1, num));
AddItem(StringParser.Parse("${res:Dialog.Goto.GotoLine} ") + num, ClassBrowserIconService.GotoArrow, num, int.MaxValue, false);
>>>>>>>
num = Math.Min(editor.Document.LineCount, Math.Max(1, num));
AddItem(StringParser.Parse("${res:Dialog.Goto.GotoLine} ") + num, ClassBrowserIconService.GotoArrow, num, int.MaxValue, false);
<<<<<<<
foreach (IUnresolvedTypeDefinition c in projectContent.GetAllTypeDefinitions()) {
string className = c.Name;
if (className.Length >= text.Length) {
if (className.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0) {
list.Add(c);
}
}
=======
AddClasses(needle, member, list, projectContent.Classes);
}
}
}
return list;
}
void AddClasses(string classPart, string memberPart, ArrayList list, IEnumerable<IClass> classes)
{
foreach (IClass c in classes) {
string className = c.Name;
if (className.Length >= classPart.Length) {
if (className.IndexOf(classPart, StringComparison.OrdinalIgnoreCase) >= 0) {
if (memberPart.Length > 0) {
AddAllMembersMatchingText(c, memberPart, false);
} else {
list.Add(c);
>>>>>>>
foreach (IUnresolvedTypeDefinition c in projectContent.GetAllTypeDefinitions()) {
string className = c.Name;
if (className.Length >= text.Length) {
if (className.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0) {
list.Add(c);
}
}
<<<<<<<
void AddItem(IUnresolvedTypeDefinition c, int matchType)
=======
void AddItem(IClass c, int matchType, bool inCurrentFile)
>>>>>>>
void AddItem(IUnresolvedTypeDefinition c, int matchType, bool inCurrentFile)
<<<<<<<
void AddItemIfMatchText(string text, IUnresolvedMember member, IImage image)
=======
void AddItemIfMatchText(string text, IMember member, IImage image, bool inCurrentFile)
>>>>>>>
void AddItemIfMatchText(string text, IUnresolvedMember member, IImage image, bool inCurrentFile) |
<<<<<<<
using ICSharpCode.SharpDevelop.Parser;
=======
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Util;
>>>>>>>
using ICSharpCode.SharpDevelop.Parser;
using ICSharpCode.SharpDevelop.Util; |
<<<<<<<
var start = document.GetLocation(result.Offset);
var end = document.GetLocation(result.EndOffset);
return new AvalonEditSearchResultMatch(file, start, end, result.Offset, result.Length, null, result);
=======
var start = document.OffsetToPosition(result.Offset);
var end = document.OffsetToPosition(result.EndOffset);
return new AvalonEditSearchResultMatch(file, start, end, result.Offset, result.Length, null, null, result);
>>>>>>>
var start = document.GetLocation(result.Offset);
var end = document.GetLocation(result.EndOffset);
return new AvalonEditSearchResultMatch(file, start, end, result.Offset, result.Length, null, null, result); |
<<<<<<<
using ICSharpCode.SharpDevelop.Parser;
using ICSharpCode.SharpDevelop.Refactoring;
=======
>>>>>>>
using ICSharpCode.SharpDevelop.Parser;
using ICSharpCode.SharpDevelop.Refactoring; |
<<<<<<<
foreach (SDBookmark bookmark in GetBookmarks(editor.FileName)) {
=======
WorkbenchSingleton.AssertMainThread();
foreach (SDBookmark bookmark in GetBookmarks(new FileName(editor.FileName))) {
>>>>>>>
WorkbenchSingleton.AssertMainThread();
foreach (SDBookmark bookmark in GetBookmarks(editor.FileName)) { |
<<<<<<<
if (projectBehavior != null)
return projectBehavior;
CppProjectBehavior behavior = new CppProjectBehavior(this, new DotNetStartBehavior(this, new DefaultProjectBehavior(this)));
projectBehavior = ProjectBehaviorService.LoadBehaviorsForProject(this, behavior);
return projectBehavior;
}
public override ICSharpCode.NRefactory.TypeSystem.IProjectContent ProjectContent {
get { return null; }
}
protected override ICSharpCode.NRefactory.TypeSystem.IProjectContent CreateProjectContent()
{
throw new NotSupportedException();
}
=======
return new CppProjectBehavior(this, base.CreateDefaultBehavior());
}
>>>>>>>
return new CppProjectBehavior(this, base.CreateDefaultBehavior());
}
public override ICSharpCode.NRefactory.TypeSystem.IProjectContent ProjectContent {
get { return null; }
}
protected override ICSharpCode.NRefactory.TypeSystem.IProjectContent CreateProjectContent()
{
throw new NotSupportedException();
} |
<<<<<<<
if (this.loader == null || !this.loader.Loading) {
shouldUpdateSelectableObjects = true;
}
=======
bool loading = this.loader != null && this.loader.Loading;
LoggingService.Debug("Forms designer: Component added/removed/renamed, Loading=" + loading + ", Unloading=" + this.unloading);
if (!loading && !unloading) {
shouldUpdateSelectableObjects = true;
this.MakeDirty();
}
>>>>>>>
bool loading = this.loader != null && this.loader.Loading;
LoggingService.Debug("Forms designer: Component added/removed/renamed, Loading=" + loading + ", Unloading=" + this.unloading);
if (!loading && !unloading) {
shouldUpdateSelectableObjects = true;
this.MakeDirty();
}
<<<<<<<
this.UserContent = this.pleaseWaitLabel;
=======
this.reloadPending = false;
this.unloading = false;
this.UserControl = this.pleaseWaitLabel;
>>>>>>>
this.reloadPending = false;
this.unloading = false;
this.UserContent = this.pleaseWaitLabel; |
<<<<<<<
public override string GetDefaultNamespace(string fileName)
{
// use root namespace everywhere, ignore the folder name
return this.RootNamespace;
}
public override System.CodeDom.Compiler.CodeDomProvider CreateCodeDomProvider()
{
return new Microsoft.VisualBasic.VBCodeProvider();
}
public override void GenerateCodeFromCodeDom(CodeCompileUnit compileUnit, TextWriter writer)
{
// the root namespace is implicit in VB
string rootNamespace = this.RootNamespace;
foreach (CodeNamespace ns in ccu.Namespaces) {
if (string.Equals(ns.Name, rootNamespace, StringComparison.OrdinalIgnoreCase)) {
ns.Name = string.Empty;
} else if (ns.Name.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase)) {
ns.Name = ns.Name.Substring(rootNamespace.Length + 1);
}
}
base.GenerateCodeFromCodeDom(compileUnit, writer);
}
protected override ProjectBehavior GetOrCreateBehavior()
=======
protected override ProjectBehavior CreateDefaultBehavior()
>>>>>>>
public override string GetDefaultNamespace(string fileName)
{
// use root namespace everywhere, ignore the folder name
return this.RootNamespace;
}
public override System.CodeDom.Compiler.CodeDomProvider CreateCodeDomProvider()
{
return new Microsoft.VisualBasic.VBCodeProvider();
}
public override void GenerateCodeFromCodeDom(CodeCompileUnit compileUnit, TextWriter writer)
{
// the root namespace is implicit in VB
string rootNamespace = this.RootNamespace;
foreach (CodeNamespace ns in ccu.Namespaces) {
if (string.Equals(ns.Name, rootNamespace, StringComparison.OrdinalIgnoreCase)) {
ns.Name = string.Empty;
} else if (ns.Name.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase)) {
ns.Name = ns.Name.Substring(rootNamespace.Length + 1);
}
}
base.GenerateCodeFromCodeDom(compileUnit, writer);
}
protected override ProjectBehavior CreateDefaultBehavior() |
<<<<<<<
readonly CSharpFormattingOptionsPersistence persistenceHelper;
bool isDirty;
=======
readonly CSharpFormattingPolicy formattingPolicy;
>>>>>>>
readonly CSharpFormattingPolicy formattingPolicy;
bool isDirty;
<<<<<<<
this.persistenceHelper = persistenceHelper;
this.isDirty = false;
=======
this.formattingPolicy = persistenceHelper;
>>>>>>>
this.formattingPolicy = persistenceHelper;
this.isDirty = false;
<<<<<<<
formattingEditor.OptionsContainer = persistenceHelper.StartEditing();
formattingEditor.OptionsContainer.PropertyChanged += ContainerPropertyChanged;
}
void ContainerPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
isDirty = true;
=======
formattingEditor.OptionsContainer = formattingPolicy.StartEditing();
>>>>>>>
formattingEditor.OptionsContainer = formattingPolicy.StartEditing();
formattingEditor.OptionsContainer.PropertyChanged += ContainerPropertyChanged;
}
void ContainerPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
isDirty = true;
<<<<<<<
// Only save container, if some option really has changed
formattingEditor.OptionsContainer.PropertyChanged -= ContainerPropertyChanged;
return (!isDirty || persistenceHelper.Save()) && base.SaveOptions();
=======
return formattingPolicy.Save() && base.SaveOptions();
>>>>>>>
// Only save container, if some option really has changed
formattingEditor.OptionsContainer.PropertyChanged -= ContainerPropertyChanged;
return (!isDirty || formattingPolicy.Save()) && base.SaveOptions(); |
<<<<<<<
=======
using System.Linq;
using ICSharpCode.SharpDevelop.Internal.Templates;
>>>>>>>
using System.Linq; |
<<<<<<<
OnPropertyChanged();
=======
UpdateClassGenerationModifier();
base.RaisePropertyChanged(() => SelectedModifier);
>>>>>>>
UpdateClassGenerationModifier();
OnPropertyChanged();
<<<<<<<
generateAsyncOperations = value;
OnPropertyChanged();
=======
options.GenerateAsyncOperations = value;
base.RaisePropertyChanged(() => GenerateAsyncOperations);
>>>>>>>
options.GenerateAsyncOperations = value;
OnPropertyChanged();
<<<<<<<
generateMessageContract = value;
OnPropertyChanged();
=======
options.GenerateMessageContract = value;
base.RaisePropertyChanged(() => GenerateMessageContract);
>>>>>>>
options.GenerateMessageContract = value;
OnPropertyChanged();
<<<<<<<
collectionType = value;
OnPropertyChanged();
=======
options.ArrayCollectionType = value;
base.RaisePropertyChanged(() => CollectionType);
>>>>>>>
options.ArrayCollectionType = value;
OnPropertyChanged();
<<<<<<<
dictionaryCollectionType = value;
OnPropertyChanged();
=======
options.DictionaryCollectionType = value;
base.RaisePropertyChanged(() => DictionaryCollectionType);
>>>>>>>
options.DictionaryCollectionType = value;
OnPropertyChanged();
<<<<<<<
OnPropertyChanged();
=======
if (!useReferencedAssemblies)
ReuseReferencedTypes = false;
base.RaisePropertyChanged(() => UseReferencedAssemblies);
>>>>>>>
if (!useReferencedAssemblies)
ReuseReferencedTypes = false;
OnPropertyChanged();
<<<<<<<
reuseTypes = value;
OnPropertyChanged();
=======
options.UseTypesInProjectReferences = value;
base.RaisePropertyChanged(() => ReuseTypes);
>>>>>>>
options.UseTypesInProjectReferences = value;
OnPropertyChanged(); |
<<<<<<<
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.PackageManagement.EnvDTE
{
public class CodeModel : MarshalByRefObject, global::EnvDTE.CodeModel
{
Project project;
CodeElementsInNamespace codeElements;
CodeModelContext context;
public CodeModel(CodeModelContext context, Project project)
{
this.context = context;
this.project = project;
}
public global::EnvDTE.CodeElements CodeElements {
get {
if (codeElements == null) {
codeElements = new CodeElementsInNamespace(context);
}
return codeElements;
}
}
public global::EnvDTE.CodeType CodeTypeFromFullName(string name)
{
ITypeDefinition typeDefinition = GetTypeDefinition(name);
if (typeDefinition != null) {
return CreateCodeTypeForTypeDefinition(typeDefinition);
}
return null;
}
ITypeDefinition GetTypeDefinition(string name)
{
ICompilation compilation = project.GetCompilationUnit();
var typeName = new TopLevelTypeName(name);
foreach (IAssembly assembly in compilation.Assemblies) {
ITypeDefinition typeDefinition = assembly.GetTypeDefinition(typeName);
if (typeDefinition != null) {
return typeDefinition;
}
}
return null;
}
CodeType CreateCodeTypeForTypeDefinition(ITypeDefinition typeDefinition)
{
if (typeDefinition.Kind == TypeKind.Interface) {
return new CodeInterface(context, typeDefinition);
}
return new CodeClass2(context, typeDefinition);
}
public string Language {
get { return project.MSBuildProject.GetCodeModelLanguage(); }
}
}
}
=======
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//using System;
//using ICSharpCode.SharpDevelop.Dom;
//
//namespace ICSharpCode.PackageManagement.EnvDTE
//{
// public class CodeModel : MarshalByRefObject, global::EnvDTE.CodeModel
// {
// IProjectContent projectContent;
// CodeElementsInNamespace codeElements;
//
// public CodeModel(IProjectContent projectContent)
// {
// this.projectContent = projectContent;
// }
//
// public global::EnvDTE.CodeElements CodeElements {
// get {
// if (codeElements == null) {
// codeElements = new CodeElementsInNamespace(projectContent, String.Empty);
// }
// return codeElements;
// }
// }
//
// public global::EnvDTE.CodeType CodeTypeFromFullName(string name)
// {
// IClass matchedClass = projectContent.GetClass(name, 0);
// if (matchedClass != null) {
// return CreateCodeTypeForClass(matchedClass);
// }
// return null;
// }
//
// CodeType CreateCodeTypeForClass(IClass c)
// {
// if (c.ClassType == ClassType.Interface) {
// return new CodeInterface(projectContent, c);
// }
// return new CodeClass2(projectContent, c);
// }
//
// public string Language {
// get { return projectContent.GetCodeModelLanguage(); }
// }
// }
//}
>>>>>>>
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.PackageManagement.EnvDTE
{
public class CodeModel : MarshalByRefObject, global::EnvDTE.CodeModel
{
Project project;
CodeElementsInNamespace codeElements;
CodeModelContext context;
public CodeModel(CodeModelContext context, Project project)
{
this.context = context;
this.project = project;
}
public global::EnvDTE.CodeElements CodeElements {
get {
if (codeElements == null) {
codeElements = new CodeElementsInNamespace(context);
}
return codeElements;
}
}
public global::EnvDTE.CodeType CodeTypeFromFullName(string name)
{
ITypeDefinition typeDefinition = GetTypeDefinition(name);
if (typeDefinition != null) {
return CreateCodeTypeForTypeDefinition(typeDefinition);
}
return null;
}
ITypeDefinition GetTypeDefinition(string name)
{
ICompilation compilation = project.GetCompilationUnit();
var typeName = new TopLevelTypeName(name);
foreach (IAssembly assembly in compilation.Assemblies) {
ITypeDefinition typeDefinition = assembly.GetTypeDefinition(typeName);
if (typeDefinition != null) {
return typeDefinition;
}
}
return null;
}
CodeType CreateCodeTypeForTypeDefinition(ITypeDefinition typeDefinition)
{
if (typeDefinition.Kind == TypeKind.Interface) {
return new CodeInterface(context, typeDefinition);
}
return new CodeClass2(context, typeDefinition);
}
public string Language {
get { return project.MSBuildProject.GetCodeModelLanguage(); }
}
}
} |
<<<<<<<
args.LogicalPosition = pos.Value;
=======
args.LogicalPosition = AvalonEditDocumentAdapter.ToLocation(pos.Value.Location);
>>>>>>>
args.LogicalPosition = pos.Value.Location;
<<<<<<<
throw new NotImplementedException();
//Core.AnalyticsMonitorService.TrackFeature(typeof(GoToDefinition).FullName, "Ctrl+Click");
//var goToDefinitionCommand = new GoToDefinition();
//goToDefinitionCommand.Run(this.Adapter, this.Document.GetOffset(position.Value));
=======
Core.AnalyticsMonitorService.TrackFeature(typeof(GoToDefinition).FullName, "Ctrl+Click");
this.GotoDefinitionCommand.Run(this.Adapter, this.Document.GetOffset(position.Value.Location));
>>>>>>>
throw new NotImplementedException();
//Core.AnalyticsMonitorService.TrackFeature(typeof(GoToDefinition).FullName, "Ctrl+Click");
//var goToDefinitionCommand = new GoToDefinition();
//goToDefinitionCommand.Run(this.Adapter, this.Document.GetOffset(position.Value));
<<<<<<<
#region CTRL+W extend selection
protected override void OnKeyUp(KeyEventArgs e)
{
base.OnKeyUp(e);
if (e.Handled) return;
#warning Reimplement CodeManipulation
// TODO put these in some menu so that they are discoverable
/*
if (e.Key == Key.W && Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) {
CodeManipulation.ExtendSelection(this.Adapter);
}
if (e.SystemKey == Key.Up && Keyboard.Modifiers.HasFlag(ModifierKeys.Alt)) {
// Left Alt + Up (probably will have different shortcut)
CodeManipulation.MoveStatementUp(this.Adapter);
}
if (e.SystemKey == Key.Down && Keyboard.Modifiers.HasFlag(ModifierKeys.Alt)) {
// Left Alt + Down (probably will have different shortcut)
CodeManipulation.MoveStatementDown(this.Adapter);
}*/
}
#endregion
=======
>>>>>>> |
<<<<<<<
using ICSharpCode.SharpDevelop.Parser;
=======
using ICSharpCode.SharpDevelop.Widgets.MyersDiff;
>>>>>>>
using ICSharpCode.SharpDevelop.Parser;
using ICSharpCode.SharpDevelop.Widgets.MyersDiff; |
<<<<<<<
#region Format-Message
string header = (data == null || data.Length < 1) ? "0:" : data.Length + ":";
var headerBytes = Encoding.UTF8.GetBytes(header);
int messageLen = headerBytes.Length;
if (data != null && data.Length > 0) messageLen += data.Length;
var message = new byte[messageLen];
Buffer.BlockCopy(headerBytes, 0, message, 0, headerBytes.Length);
if (data != null && data.Length > 0) Buffer.BlockCopy(data, 0, message, headerBytes.Length, data.Length);
#endregion
=======
>>>>>>> |
<<<<<<<
using System.Linq.Expressions;
=======
using System.Reflection;
>>>>>>>
using System.Reflection;
using System.Linq.Expressions;
<<<<<<<
private void DebuggingUI(HDRenderPipeline renderContext)
{
EditorGUILayout.LabelField(styles.debugging);
// Global debug parameters
EditorGUI.indentLevel++;
m_DebugOverlayRatio.floatValue = EditorGUILayout.Slider(styles.debugOverlayRatio, m_DebugOverlayRatio.floatValue, 0.1f, 1.0f);
EditorGUI.indentLevel--;
EditorGUILayout.Space();
DebugParametersUI(renderContext);
ShadowDebugParametersUI(renderContext);
}
=======
static void HackSetDirty(RenderPipelineAsset asset)
{
EditorUtility.SetDirty(asset);
var method = typeof(RenderPipelineAsset).GetMethod("OnValidate", BindingFlags.FlattenHierarchy | BindingFlags.NonPublic | BindingFlags.Instance);
if (method != null)
method.Invoke(asset, new object[0]);
}
>>>>>>>
static void HackSetDirty(RenderPipelineAsset asset)
{
EditorUtility.SetDirty(asset);
var method = typeof(RenderPipelineAsset).GetMethod("OnValidate", BindingFlags.FlattenHierarchy | BindingFlags.NonPublic | BindingFlags.Instance);
if (method != null)
method.Invoke(asset, new object[0]);
}
private void DebuggingUI(HDRenderPipeline renderContext)
{
EditorGUILayout.LabelField(styles.debugging);
// Global debug parameters
EditorGUI.indentLevel++;
m_DebugOverlayRatio.floatValue = EditorGUILayout.Slider(styles.debugOverlayRatio, m_DebugOverlayRatio.floatValue, 0.1f, 1.0f);
EditorGUI.indentLevel--;
EditorGUILayout.Space();
DebugParametersUI(renderContext);
ShadowDebugParametersUI(renderContext);
}
<<<<<<<
private void ShadowDebugParametersUI(HDRenderPipeline renderContext)
{
m_ShowDebugShadow.boolValue = EditorGUILayout.Foldout(m_ShowDebugShadow.boolValue, styles.shadowDebugParameters);
if (!m_ShowDebugShadow.boolValue)
return;
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_DebugShadowEnabled, styles.shadowDebugEnable);
EditorGUILayout.PropertyField(m_DebugShadowVisualizationMode, styles.shadowDebugVisualizationMode);
if (!m_DebugShadowVisualizationMode.hasMultipleDifferentValues)
{
if ((ShadowDebugMode)m_DebugShadowVisualizationMode.intValue == ShadowDebugMode.VisualizeShadowMap)
{
EditorGUILayout.IntSlider(m_DebugShadowVisualizeShadowIndex, 0, renderContext.GetCurrentShadowCount() - 1, styles.shadowDebugVisualizeShadowIndex);
}
}
EditorGUI.indentLevel--;
}
=======
private void SkySettingsUI(HDRenderPipeline pipe)
{
EditorGUILayout.Space();
EditorGUILayout.LabelField(styles.skyParams);
EditorGUI.BeginChangeCheck();
EditorGUI.indentLevel++;
pipe.skyParameters = (SkyParameters) EditorGUILayout.ObjectField(new GUIContent("Sky Settings"), pipe.skyParameters, typeof(SkyParameters), false);
pipe.lightLoopProducer = (LightLoopProducer) EditorGUILayout.ObjectField(new GUIContent("Light Loop"), pipe.lightLoopProducer, typeof(LightLoopProducer), false);
EditorGUI.indentLevel--;
if (EditorGUI.EndChangeCheck())
{
HackSetDirty(pipe); // Repaint
}
}
>>>>>>>
private void SkySettingsUI(HDRenderPipeline pipe)
{
EditorGUILayout.Space();
EditorGUILayout.LabelField(styles.skyParams);
EditorGUI.BeginChangeCheck();
EditorGUI.indentLevel++;
pipe.skyParameters = (SkyParameters) EditorGUILayout.ObjectField(new GUIContent("Sky Settings"), pipe.skyParameters, typeof(SkyParameters), false);
pipe.lightLoopProducer = (LightLoopProducer) EditorGUILayout.ObjectField(new GUIContent("Light Loop"), pipe.lightLoopProducer, typeof(LightLoopProducer), false);
EditorGUI.indentLevel--;
if (EditorGUI.EndChangeCheck())
{
HackSetDirty(pipe); // Repaint
}
}
private void ShadowDebugParametersUI(HDRenderPipeline renderContext)
{
m_ShowDebugShadow.boolValue = EditorGUILayout.Foldout(m_ShowDebugShadow.boolValue, styles.shadowDebugParameters);
if (!m_ShowDebugShadow.boolValue)
return;
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_DebugShadowEnabled, styles.shadowDebugEnable);
EditorGUILayout.PropertyField(m_DebugShadowVisualizationMode, styles.shadowDebugVisualizationMode);
if (!m_DebugShadowVisualizationMode.hasMultipleDifferentValues)
{
if ((ShadowDebugMode)m_DebugShadowVisualizationMode.intValue == ShadowDebugMode.VisualizeShadowMap)
{
EditorGUILayout.IntSlider(m_DebugShadowVisualizeShadowIndex, 0, 5/*renderContext.GetCurrentShadowCount() - 1*/, styles.shadowDebugVisualizeShadowIndex);
}
}
EditorGUI.indentLevel--;
}
<<<<<<<
serializedObject.Update();
DebuggingUI(renderContext);
=======
DebugParametersUI(renderContext);
SkySettingsUI(renderContext);
>>>>>>>
serializedObject.Update();
SkySettingsUI(renderContext);
DebuggingUI(renderContext);
<<<<<<<
TilePassUI(renderContext);
serializedObject.ApplyModifiedProperties();
=======
//TilePassUI(renderContext);
>>>>>>>
//TilePassUI(renderContext);
serializedObject.ApplyModifiedProperties(); |
<<<<<<<
=======
private string title = string.Empty;
public const string TitlePropertyName = "Title";
/// <summary>
/// Gets or sets the "Title" property
/// </summary>
/// <value>The title.</value>
public string Title
{
get { return title; }
set { SetProperty (ref title, value);}
}
private string subTitle = string.Empty;
/// <summary>
/// Gets or sets the "Subtitle" property
/// </summary>
public const string SubtitlePropertyName = "Subtitle";
public string Subtitle
{
get { return subTitle; }
set { SetProperty (ref subTitle, value);}
}
private string icon = null;
/// <summary>
/// Gets or sets the "Icon" of the viewmodel
/// </summary>
public const string IconPropertyName = "Icon";
public string Icon
{
get { return icon; }
set { SetProperty (ref icon, value);}
}
private bool isBusy;
/// <summary>
/// Gets or sets if the view is busy.
/// </summary>
public const string IsBusyPropertyName = "IsBusy";
public bool IsBusy
{
get { return isBusy; }
set { SetProperty (ref isBusy, value);}
}
private bool canLoadMore = true;
/// <summary>
/// Gets or sets if we can load more.
/// </summary>
public const string CanLoadMorePropertyName = "CanLoadMore";
public bool CanLoadMore
{
get { return canLoadMore; }
set { SetProperty (ref canLoadMore, value);}
}
protected void SetProperty<T>(
ref T backingStore, T value,
[CallerMemberName]string propertyName = "",
Action onChanged = null)
{
if (EqualityComparer<T>.Default.Equals(backingStore, value))
return;
backingStore = value;
onChanged?.Invoke();
OnPropertyChanged(propertyName);
}
#region INotifyPropertyChanged implementation
public event PropertyChangedEventHandler PropertyChanged;
#endregion
public void OnPropertyChanged([CallerMemberName]string propertyName = "") =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs (propertyName));
>>>>>>> |
<<<<<<<
private static readonly Regex s_frameworkVersionRegex = new Regex("(?<=Version=v)[\\d.]+");
private readonly Project _project;
=======
public Project Project { get; }
>>>>>>>
private static readonly Regex s_frameworkVersionRegex = new Regex("(?<=Version=v)[\\d.]+");
public Project Project { get; }
<<<<<<<
/// <summary>The version of the framework used by the project.</summary>
public string FrameworkVersion { get; }
#endregion
=======
>>>>>>>
/// <summary>The version of the framework used by the project.</summary>
public string FrameworkVersion { get; }
<<<<<<<
_project = project;
string targetFramework = project.Properties.Item("TargetFrameworkMoniker").Value.ToString();
FrameworkVersion = s_frameworkVersionRegex.Match(targetFramework).Value;
=======
Project = project;
>>>>>>>
Project = project;
string targetFramework = Project.Properties.Item("TargetFrameworkMoniker").Value.ToString();
FrameworkVersion = s_frameworkVersionRegex.Match(targetFramework).Value; |
<<<<<<<
Content = "AppEngine";
Icon = s_icon.Value;
=======
// TODO: Set the icon for AppEngine.
Content = "AppEngine";
// Show the items for the AppEngine hierarchy, to show first the loading message
// then the items once they are received.
IsExpanded = true;
>>>>>>>
// TODO: Set the icon for AppEngine.
Content = "AppEngine";
Icon = s_icon.Value;
// Show the items for the AppEngine hierarchy, to show first the loading message
// then the items once they are received.
IsExpanded = true; |
<<<<<<<
using System.Threading.Tasks;
=======
>>>>>>>
using System.Threading.Tasks; |
<<<<<<<
using GoogleCloudExtension.CloudExplorer;
=======
using GoogleCloudExtension.Analytics;
using GoogleCloudExtension.AppEngineApps;
>>>>>>>
using GoogleCloudExtension.CloudExplorer;
using GoogleCloudExtension.Analytics; |
<<<<<<<
using Microsoft.Toolkit.Uwp.Input.Gaze;
using System;
=======
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
>>>>>>>
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
using System; |
<<<<<<<
private const string GameFrameworkVersion = "3.0.1";
private static readonly IDictionary<string, Type> s_AssemblyGameFrameworkModules = new Dictionary<string, Type>();
=======
private const string GameFrameworkVersion = "3.0.0.p1";
>>>>>>>
private const string GameFrameworkVersion = "3.0.1"; |
<<<<<<<
=======
public string pretext;
public string text;
>>>>>>>
<<<<<<<
public string pretext;
public string author_name;
public string author_link;
public string author_icon;
public string title;
public string title_link;
public string text;
=======
public string author_name;
public string author_link;
public string author_icon;
public string title;
public string title_link;
>>>>>>>
public string pretext;
public string author_name;
public string author_link;
public string author_icon;
public string title;
public string title_link;
public string text;
<<<<<<<
=======
public string[] mrkdwn_in;
>>>>>>>
public string[] mrkdwn_in; |
<<<<<<<
this.userClient = new Lazy<SlackSocketClient>(() => this.GetClient(this.Config.UserAuthToken));
this.botClient = new Lazy<SlackSocketClient>(() => this.GetClient(this.Config.BotAuthToken));
this.userClientAsync = new Lazy<SlackTaskClient>(() => new SlackTaskClient(this.Config.UserAuthToken));
this.botClientAsync = new Lazy<SlackTaskClient>(() => new SlackTaskClient(this.Config.BotAuthToken));
=======
this.userClient = new Lazy<SlackSocketClient>(() => this.CreateClient(this.Config.UserAuthToken));
this.botClient = new Lazy<SlackSocketClient>(() => this.CreateClient(this.Config.BotAuthToken));
>>>>>>>
this.userClient = new Lazy<SlackSocketClient>(() => this.CreateClient(this.Config.UserAuthToken));
this.botClient = new Lazy<SlackSocketClient>(() => this.CreateClient(this.Config.BotAuthToken));
this.userClientAsync = new Lazy<SlackTaskClient>(() => new SlackTaskClient(this.Config.UserAuthToken));
this.botClientAsync = new Lazy<SlackTaskClient>(() => new SlackTaskClient(this.Config.BotAuthToken)); |
<<<<<<<
PrintedUpgradeIcons.Add(Upgrade.UpgradeType.Torpedoes);
PrintedUpgradeIcons.Add(Upgrade.UpgradeType.Torpedoes);
=======
PrintedUpgradeIcons.Add(Upgrade.UpgradeType.Astromech);
PrintedUpgradeIcons.Add(Upgrade.UpgradeType.Torpedo);
PrintedUpgradeIcons.Add(Upgrade.UpgradeType.Torpedo);
>>>>>>>
PrintedUpgradeIcons.Add(Upgrade.UpgradeType.Torpedo);
PrintedUpgradeIcons.Add(Upgrade.UpgradeType.Torpedo); |
<<<<<<<
public List<Bombs.BombDropTemplates> GetAvailableBombDropTemplates()
{
List<Bombs.BombDropTemplates> availableTemplates = new List<Bombs.BombDropTemplates>() { Bombs.BombDropTemplates.Straight1 };
if (OnGetAvailableBombDropTemplates != null) OnGetAvailableBombDropTemplates(availableTemplates);
return availableTemplates;
}
=======
public virtual bool CanAttackBumpedTarget(GenericShip defender)
{
return false;
}
>>>>>>>
public List<Bombs.BombDropTemplates> GetAvailableBombDropTemplates()
{
List<Bombs.BombDropTemplates> availableTemplates = new List<Bombs.BombDropTemplates>() { Bombs.BombDropTemplates.Straight1 };
if (OnGetAvailableBombDropTemplates != null) OnGetAvailableBombDropTemplates(availableTemplates);
return availableTemplates;
}
public virtual bool CanAttackBumpedTarget(GenericShip defender)
{
return false;
} |
<<<<<<<
using GSoft.Dynamite.Caching;
using GSoft.Dynamite.Catalogs;
using GSoft.Dynamite.Configuration;
=======
using GSoft.Dynamite.Caml;
>>>>>>>
using GSoft.Dynamite.Caching;
using GSoft.Dynamite.Caml;
using GSoft.Dynamite.Catalogs;
using GSoft.Dynamite.Configuration;
<<<<<<<
using Microsoft.Office.Server.Search;
=======
using GSoft.Dynamite.Monitoring;
>>>>>>>
using Microsoft.Office.Server.Search; |
<<<<<<<
_autoSuggestBox.CharacterReceived -= AutoSuggestBox_CharacterReceived;
_autoSuggestBox.PointerEntered -= AutoSuggestBox_PointerEntered;
_autoSuggestBox.PointerExited -= AutoSuggestBox_PointerExited;
_autoSuggestBox.PointerCanceled -= AutoSuggestBox_PointerExited;
_autoSuggestBox.PointerCaptureLost -= AutoSuggestBox_PointerExited;
_autoSuggestBox.GotFocus -= AutoSuggestBox_GotFocus;
_autoSuggestBox.LostFocus -= AutoSuggestBox_LostFocus;
=======
>>>>>>>
_autoSuggestBox.PointerEntered -= AutoSuggestBox_PointerEntered;
_autoSuggestBox.PointerExited -= AutoSuggestBox_PointerExited;
_autoSuggestBox.PointerCanceled -= AutoSuggestBox_PointerExited;
_autoSuggestBox.PointerCaptureLost -= AutoSuggestBox_PointerExited;
_autoSuggestBox.GotFocus -= AutoSuggestBox_GotFocus;
_autoSuggestBox.LostFocus -= AutoSuggestBox_LostFocus;
<<<<<<<
_autoSuggestBox.CharacterReceived += AutoSuggestBox_CharacterReceived;
_autoSuggestBox.PointerEntered += AutoSuggestBox_PointerEntered;
_autoSuggestBox.PointerExited += AutoSuggestBox_PointerExited;
_autoSuggestBox.PointerCanceled += AutoSuggestBox_PointerExited;
_autoSuggestBox.PointerCaptureLost += AutoSuggestBox_PointerExited;
_autoSuggestBox.GotFocus += AutoSuggestBox_GotFocus;
_autoSuggestBox.LostFocus += AutoSuggestBox_LostFocus;
=======
>>>>>>>
_autoSuggestBox.PointerEntered += AutoSuggestBox_PointerEntered;
_autoSuggestBox.PointerExited += AutoSuggestBox_PointerExited;
_autoSuggestBox.PointerCanceled += AutoSuggestBox_PointerExited;
_autoSuggestBox.PointerCaptureLost += AutoSuggestBox_PointerExited;
_autoSuggestBox.GotFocus += AutoSuggestBox_GotFocus;
_autoSuggestBox.LostFocus += AutoSuggestBox_LostFocus;
<<<<<<<
private void AutoSuggestBox_PointerEntered(object sender, PointerRoutedEventArgs e)
{
VisualStateManager.GoToState(this, PART_PointerOverState, true);
}
private void AutoSuggestBox_PointerExited(object sender, PointerRoutedEventArgs e)
{
VisualStateManager.GoToState(this, PART_NormalState, true);
}
private void AutoSuggestBox_LostFocus(object sender, RoutedEventArgs e)
{
VisualStateManager.GoToState(this, PART_UnfocusedState, true);
}
private void AutoSuggestBox_GotFocus(object sender, RoutedEventArgs e)
{
VisualStateManager.GoToState(this, PART_FocusedState, true);
}
private void AutoSuggestBox_CharacterReceived(UIElement sender, CharacterReceivedRoutedEventArgs args)
{
if (args.Character.ToString() == TokenDelimiter && sender is AutoSuggestBox autoSuggestBox)
{
AddToken(autoSuggestBox.Text);
autoSuggestBox.Text = string.Empty;
autoSuggestBox.Focus(FocusState.Programmatic);
}
}
=======
>>>>>>>
private void AutoSuggestBox_PointerEntered(object sender, PointerRoutedEventArgs e)
{
VisualStateManager.GoToState(this, PART_PointerOverState, true);
}
private void AutoSuggestBox_PointerExited(object sender, PointerRoutedEventArgs e)
{
VisualStateManager.GoToState(this, PART_NormalState, true);
}
private void AutoSuggestBox_LostFocus(object sender, RoutedEventArgs e)
{
VisualStateManager.GoToState(this, PART_UnfocusedState, true);
}
private void AutoSuggestBox_GotFocus(object sender, RoutedEventArgs e)
{
VisualStateManager.GoToState(this, PART_FocusedState, true);
} |
<<<<<<<
var parentScope = this.containerProvider.CurrentSite;
var scopeKindTag = SPLifetimeTag.Web;
var childScopePerContainerUniqueKey = SPLifetimeTag.Web + SPContext.Current.Web.ID;
=======
var parentScope = this.ContainerProvider.CurrentSite;
var childContainerKey = SPLifetime.Web + SPContext.Current.Web.ID;
>>>>>>>
var parentScope = this.ContainerProvider.CurrentSite;
var scopeKindTag = SPLifetimeTag.Web;
var childContainerKey = scopeKindTag + SPContext.Current.Web.ID; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.