conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
var encodeLogger = StaticResolver.Resolve<AppLoggerFactory>().ResolveEncodeLogger(job.FinalOutputPath);
jobViewModel.Logger = encodeLogger;
=======
var encodeLogger = new AppLogger(this.logger, Path.GetFileName(job.FinalOutputPath));
jobViewModel.EncodeLogger = encodeLogger;
>>>>>>>
var encodeLogger = StaticResolver.Resolve<AppLoggerFactory>().ResolveEncodeLogger(job.FinalOutputPath);
jobViewModel.EncodeLogger = encodeLogger; |
<<<<<<<
this.StartCopyImpl(this.attributes, sourceSnapshot, default(string) /* contentMD5 */, true /*incrementalCopy */, false /* syncCopy */, default(PremiumPageBlobTier?) /* premiumPageBlobTier */, default(StandardBlobTier?) /* standardBlockBlobTier */, default(RehydratePriority?) /* rehydratePriority */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
=======
this.StartCopyImpl(this.attributes, sourceSnapshot, Checksum.None, true /*incrementalCopy */, false /* syncCopy */, null /* pageBlobTier */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
>>>>>>>
this.StartCopyImpl(this.attributes, sourceSnapshot, Checksum.None, true /*incrementalCopy */, false /* syncCopy */, default(PremiumPageBlobTier?) /* premiumPageBlobTier */, default(StandardBlobTier?) /* standardBlockBlobTier */, default(RehydratePriority?) /* rehydratePriority */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
<<<<<<<
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(pageData, offset, length, contentMD5, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutPage(uri, serverTimeout, pageRange, pageWrite, accessCondition, cnt, ctx,
this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
=======
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(pageData, offset, length, contentChecksum, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) => BlobHttpRequestMessageFactory.PutPage(uri, serverTimeout, pageRange, pageWrite, accessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials);
>>>>>>>
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(pageData, offset, length, contentChecksum, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutPage(uri, serverTimeout, pageRange, pageWrite, accessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
<<<<<<<
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutPage(uri, sourceUri, offset, count, sourceContentMd5, serverTimeout, pageRange, sourceAccessCondition, destAccessCondition, cnt, ctx,
this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
=======
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) => BlobHttpRequestMessageFactory.PutPage(uri, sourceUri, offset, count, sourceContentChecksum, serverTimeout, pageRange, sourceAccessCondition, destAccessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials);
>>>>>>>
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutPage(uri, sourceUri, offset, count, sourceContentChecksum, serverTimeout, pageRange, sourceAccessCondition, destAccessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
}; |
<<<<<<<
// We should always call AsStreamForWrite with bufferSize=0 to prevent buffering. Our
// stream copier only writes 64K buffers at a time anyway, so no buffering is needed.
await sourceAsStream.WriteToAsync(fileStream, length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken).ConfigureAwait(false);
await fileStream.CommitAsync().ConfigureAwait(false);
}
=======
using (CloudFileStream fileStream = await this.OpenWriteAsync(length, accessCondition, options, operationContext, cancellationToken))
{
// We should always call AsStreamForWrite with bufferSize=0 to prevent buffering. Our
// stream copier only writes 64K buffers at a time anyway, so no buffering is needed.
#if NETCORE
await sourceAsStream.WriteToAsync(new AggregatingProgressIncrementer(progressHandler).CreateProgressIncrementingStream(fileStream), length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken);
#else
await sourceAsStream.WriteToAsync(fileStream, length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken);
#endif
await fileStream.CommitAsync();
}
}, cancellationToken);
>>>>>>>
// We should always call AsStreamForWrite with bufferSize=0 to prevent buffering. Our
// stream copier only writes 64K buffers at a time anyway, so no buffering is needed.
#if NETCORE
await sourceAsStream.WriteToAsync(new AggregatingProgressIncrementer(progressHandler).CreateProgressIncrementingStream(fileStream), length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken).ConfigureAwait(false);
#else
await sourceAsStream.WriteToAsync(fileStream, length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken).ConfigureAwait(false);
#endif
await fileStream.CommitAsync().ConfigureAwait(false);
}
<<<<<<<
await this.UploadFromStreamAsync(stream, accessCondition, options, operationContext, cancellationToken).ConfigureAwait(false);
}
=======
using (Stream stream = new FileStream(path, FileMode.Open, FileAccess.Read))
{
await this.UploadFromStreamAsync(stream, accessCondition, options, operationContext, progressHandler, cancellationToken);
}
}, cancellationToken);
>>>>>>>
await this.UploadFromStreamAsync(stream, accessCondition, options, operationContext, progressHandler, cancellationToken).ConfigureAwait(false);
}
<<<<<<<
await this.DownloadToStreamAsync(stream, accessCondition, options, operationContext, cancellationToken).ConfigureAwait(false);
=======
using (stream)
{
await this.DownloadToStreamAsync(stream, accessCondition, options, operationContext, progressHandler, cancellationToken);
}
>>>>>>>
await this.DownloadToStreamAsync(stream, accessCondition, options, operationContext, progressHandler, cancellationToken).ConfigureAwait(false);
<<<<<<<
return Executor.ExecuteAsyncNullReturn(
=======
return Task.Run(async () => await Executor.ExecuteAsyncNullReturn(
#if NETCORE
this.GetFileImpl(new AggregatingProgressIncrementer(progressHandler).CreateProgressIncrementingStream(target), offset, length, accessCondition, modifiedOptions),
#else
>>>>>>>
return Executor.ExecuteAsyncNullReturn(
#if NETCORE
this.GetFileImpl(new AggregatingProgressIncrementer(progressHandler).CreateProgressIncrementingStream(target), offset, length, accessCondition, modifiedOptions),
#else
<<<<<<<
public virtual async Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? fileOffset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
=======
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? fileOffset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif
>>>>>>>
public virtual async Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? fileOffset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif
<<<<<<<
await this.DownloadRangeToStreamAsync(stream, fileOffset, length, accessCondition, options, operationContext, cancellationToken).ConfigureAwait(false);
return (int)stream.Position;
}
=======
using (SyncMemoryStream stream = new SyncMemoryStream(target, index))
{
#if NETCORE
await this.DownloadRangeToStreamAsync(stream, fileOffset, length, accessCondition, options, operationContext, progressHandler, cancellationToken);
#else
await this.DownloadRangeToStreamAsync(stream, fileOffset, length, accessCondition, options, operationContext, cancellationToken);
#endif
return (int)stream.Position;
}
}, cancellationToken);
>>>>>>>
#if NETCORE
await this.DownloadRangeToStreamAsync(stream, fileOffset, length, accessCondition, options, operationContext, progressHandler, cancellationToken).ConfigureAwait(false);
#else
await this.DownloadRangeToStreamAsync(stream, fileOffset, length, accessCondition, options, operationContext, cancellationToken).ConfigureAwaite(false);
#endif
return (int)stream.Position;
}
<<<<<<<
public virtual async Task WriteRangeAsync(Stream rangeData, long startOffset, string contentMD5, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
=======
public virtual Task WriteRangeAsync(Stream rangeData, long startOffset, string contentMD5, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif
>>>>>>>
public virtual async Task WriteRangeAsync(Stream rangeData, long startOffset, string contentMD5, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif |
<<<<<<<
/// <summary>
/// Constructs a web request to set the tier on a page blob.
/// </summary>
/// <param name="uri">The absolute URI to the blob.</param>
/// <param name="timeout">The server timeout interval.</param>
/// <param name="blobTier">The blob tier to set.</param>
/// <param name="accessCondition">The access condition to apply to the request.</param>
/// <returns>A web request to use to perform the operation.</returns>
public static StorageRequestMessage SetBlobTier(Uri uri, int? timeout, string blobTier, AccessCondition accessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
{
UriQueryBuilder builder = new UriQueryBuilder();
builder.Add(Constants.QueryConstants.Component, "tier");
StorageRequestMessage request = HttpRequestMessageFactory.CreateRequestMessage(HttpMethod.Put, uri, timeout, builder, content, operationContext, canonicalizer, credentials);
request.Headers.Add(Constants.HeaderConstants.AccessTierHeader, blobTier);
request.ApplyAccessCondition(accessCondition);
request.ApplySequenceNumberCondition(accessCondition);
return request;
}
=======
/// <summary>
/// Constructs a web request to set the tier on a page blob.
/// </summary>
/// <param name="uri">The absolute URI to the blob.</param>
/// <param name="timeout">The server timeout interval.</param>
/// <param name="premiumBlobTier">The blob tier to set.</param>
/// <returns>A web request to use to perform the operation.</returns>
public static StorageRequestMessage SetBlobTier(Uri uri, int? timeout, string premiumBlobTier, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
{
UriQueryBuilder builder = new UriQueryBuilder();
builder.Add(Constants.QueryConstants.Component, "tier");
StorageRequestMessage request = HttpRequestMessageFactory.CreateRequestMessage(HttpMethod.Put, uri, timeout, builder, content, operationContext, canonicalizer, credentials);
request.Headers.Add(Constants.HeaderConstants.AccessTierHeader, premiumBlobTier);
return request;
}
>>>>>>>
/// <summary>
/// Constructs a web request to set the tier on a page blob.
/// </summary>
/// <param name="uri">The absolute URI to the blob.</param>
/// <param name="timeout">The server timeout interval.</param>
/// <param name="blobTier">The blob tier to set.</param>
/// <returns>A web request to use to perform the operation.</returns>
public static StorageRequestMessage SetBlobTier(Uri uri, int? timeout, string blobTier, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
{
UriQueryBuilder builder = new UriQueryBuilder();
builder.Add(Constants.QueryConstants.Component, "tier");
StorageRequestMessage request = HttpRequestMessageFactory.CreateRequestMessage(HttpMethod.Put, uri, timeout, builder, content, operationContext, canonicalizer, credentials);
request.Headers.Add(Constants.HeaderConstants.AccessTierHeader, blobTier);
return request;
} |
<<<<<<<
=======
internal static IReadOnlyList<Type> GetAsyncDomainEventSubscriberSubscriptionTypes(this Type type)
{
//TODO
//Check generic arguments for sanity
//add checks for iaggregateroot
//add checks for iidentity
//add checks for iaggregatevent
var interfaces = type
.GetTypeInfo()
.GetInterfaces()
.Select(i => i.GetTypeInfo())
.ToList();
var domainEventTypes = interfaces
.Where(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(ISubscribeToAsync<,,>))
.Select(i => typeof(IDomainEvent<,,>).MakeGenericType(i.GetGenericArguments()[0],i.GetGenericArguments()[1],i.GetGenericArguments()[2]))
.ToList();
return domainEventTypes;
}
>>>>>>>
internal static IReadOnlyList<Type> GetAsyncDomainEventSubscriberSubscriptionTypes(this Type type)
{
//TODO
//Check generic arguments for sanity
//add checks for iaggregateroot
//add checks for iidentity
//add checks for iaggregatevent
var interfaces = type
.GetTypeInfo()
.GetInterfaces()
.Select(i => i.GetTypeInfo())
.ToList();
var domainEventTypes = interfaces
.Where(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(ISubscribeToAsync<,,>))
.Select(i => typeof(IDomainEvent<,,>).MakeGenericType(i.GetGenericArguments()[0],i.GetGenericArguments()[1],i.GetGenericArguments()[2]))
.ToList();
return domainEventTypes;
}
<<<<<<<
=======
>>>>>>> |
<<<<<<<
public partial class HDRenderPipeline : RenderPipeline
=======
public class GBufferManager
{
public const int k_MaxGbuffer = 8;
public int gbufferCount { get; set; }
RenderTargetIdentifier[] m_ColorMRTs;
RenderTargetIdentifier[] m_RTIDs = new RenderTargetIdentifier[k_MaxGbuffer];
public void InitGBuffers(RenderTextureDescriptor rtDesc, RenderPipelineMaterial deferredMaterial, bool enableBakeShadowMask, CommandBuffer cmd)
{
// Init Gbuffer description
gbufferCount = deferredMaterial.GetMaterialGBufferCount();
RenderTextureFormat[] rtFormat;
RenderTextureReadWrite[] rtReadWrite;
deferredMaterial.GetMaterialGBufferDescription(out rtFormat, out rtReadWrite);
rtDesc.depthBufferBits = 0;
for (int gbufferIndex = 0; gbufferIndex < gbufferCount; ++gbufferIndex)
{
cmd.ReleaseTemporaryRT(HDShaderIDs._GBufferTexture[gbufferIndex]);
rtDesc.colorFormat = rtFormat[gbufferIndex];
rtDesc.sRGB = (rtReadWrite[gbufferIndex] != RenderTextureReadWrite.Linear);
cmd.GetTemporaryRT(HDShaderIDs._GBufferTexture[gbufferIndex], rtDesc, FilterMode.Point);
m_RTIDs[gbufferIndex] = new RenderTargetIdentifier(HDShaderIDs._GBufferTexture[gbufferIndex]);
}
if (enableBakeShadowMask)
{
cmd.ReleaseTemporaryRT(HDShaderIDs._ShadowMaskTexture);
rtDesc.colorFormat = Builtin.GetShadowMaskBufferFormat();
rtDesc.sRGB = (Builtin.GetShadowMaskBufferReadWrite() != RenderTextureReadWrite.Linear);
cmd.GetTemporaryRT(HDShaderIDs._ShadowMaskTexture, rtDesc, FilterMode.Point);
m_RTIDs[gbufferCount++] = new RenderTargetIdentifier(HDShaderIDs._ShadowMaskTexture);
}
}
public RenderTargetIdentifier[] GetGBuffers()
{
// TODO: check with THomas or Tim if wa can simply return m_ColorMRTs with null for extra RT
if (m_ColorMRTs == null || m_ColorMRTs.Length != gbufferCount)
m_ColorMRTs = new RenderTargetIdentifier[gbufferCount];
for (int index = 0; index < gbufferCount; index++)
{
m_ColorMRTs[index] = m_RTIDs[index];
}
return m_ColorMRTs;
}
}
public class DBufferManager
{
public const int k_MaxDbuffer = 4;
public int dbufferCount { get; set; }
public int vsibleDecalCount { get; set; }
RenderTargetIdentifier[] m_ColorMRTs;
RenderTargetIdentifier[] m_RTIDs = new RenderTargetIdentifier[k_MaxDbuffer];
public void InitDBuffers(RenderTextureDescriptor rtDesc, CommandBuffer cmd)
{
dbufferCount = Decal.GetMaterialDBufferCount();
RenderTextureFormat[] rtFormat;
RenderTextureReadWrite[] rtReadWrite;
Decal.GetMaterialDBufferDescription(out rtFormat, out rtReadWrite);
rtDesc.depthBufferBits = 0;
for (int dbufferIndex = 0; dbufferIndex < dbufferCount; ++dbufferIndex)
{
cmd.ReleaseTemporaryRT(HDShaderIDs._DBufferTexture[dbufferIndex]);
rtDesc.colorFormat = rtFormat[dbufferIndex];
rtDesc.sRGB = (rtReadWrite[dbufferIndex] != RenderTextureReadWrite.Linear);
cmd.GetTemporaryRT(HDShaderIDs._DBufferTexture[dbufferIndex], rtDesc, FilterMode.Point);
m_RTIDs[dbufferIndex] = new RenderTargetIdentifier(HDShaderIDs._DBufferTexture[dbufferIndex]);
}
}
public RenderTargetIdentifier[] GetDBuffers()
{
if (m_ColorMRTs == null || m_ColorMRTs.Length != dbufferCount)
m_ColorMRTs = new RenderTargetIdentifier[dbufferCount];
for (int index = 0; index < dbufferCount; index++)
{
m_ColorMRTs[index] = m_RTIDs[index];
}
return m_ColorMRTs;
}
public void ClearNormalTarget(Color clearColor, CommandBuffer cmd)
{
// index 1 is normals
CoreUtils.SetRenderTarget(cmd, m_ColorMRTs[1], ClearFlag.Color, clearColor);
}
public void PushGlobalParams(CommandBuffer cmd)
{
cmd.SetGlobalInt(HDShaderIDs._EnableDBuffer, vsibleDecalCount > 0 ? 1 : 0);
}
}
public class HDRenderPipeline : RenderPipeline
>>>>>>>
public class HDRenderPipeline : RenderPipeline
<<<<<<<
=======
m_DepthPyramidBuffer = HDShaderIDs._PyramidDepthTexture;
m_DepthPyramidBufferRT = new RenderTargetIdentifier(m_DepthPyramidBuffer);
m_DepthPyramidBufferDesc = new RenderTextureDescriptor(2, 2, RenderTextureFormat.RFloat, 0)
{
useMipMap = true,
autoGenerateMips = false
};
m_DeferredShadowBuffer = HDShaderIDs._DeferredShadowTexture;
m_DeferredShadowBufferRT = new RenderTargetIdentifier(m_DeferredShadowBuffer);
>>>>>>>
<<<<<<<
if (m_VolumetricLightingPreset != VolumetricLightingPreset.Off)
ResizeVBuffer(viewId, hdCamera.actualWidth, hdCamera.actualHeight);
=======
m_VolumetricLightingModule.ResizeVBuffer(hdCamera, texWidth, texHeight);
>>>>>>>
m_VolumetricLightingModule.ResizeVBuffer(hdCamera, hdCamera.actualWidth, hdCamera.actualHeight);
<<<<<<<
PushColorPickerDebugTexture(cmd, m_CameraColorBuffer, hdCamera);
=======
PushFullScreenDebugTexture(cmd, m_CameraColorBuffer, hdCamera, FullScreenDebugMode.NanTracker);
PushColorPickerDebugTexture(cmd, m_CameraColorBufferRT, hdCamera);
>>>>>>>
PushFullScreenDebugTexture(cmd, m_CameraColorBuffer, hdCamera, FullScreenDebugMode.NanTracker);
PushColorPickerDebugTexture(cmd, m_CameraColorBuffer, hdCamera);
<<<<<<<
=======
// Caution: RenderDebug need to take into account that we have flip the screen (so anything capture before the flip will be flipped)
RenderDebug(hdCamera, cmd);
// Make sure to unbind every render texture here because in the next iteration of the loop we might have to reallocate render texture (if the camera size is different)
cmd.SetRenderTarget(new RenderTargetIdentifier(-1), new RenderTargetIdentifier(-1));
>>>>>>>
<<<<<<<
HDUtils.SetRenderTarget(cmd, camera, m_DbufferManager.GetBuffersRTI(), m_CameraDepthStencilBuffer, ClearFlag.Color, CoreUtils.clearColorAllBlack);
=======
// for alpha compositing, color is cleared to 0, alpha to 1
// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch23.html
Color clearColor = new Color(0.0f, 0.0f, 0.0f, 1.0f);
CoreUtils.SetRenderTarget(cmd, m_DbufferManager.GetDBuffers(), m_CameraDepthStencilBufferRT, ClearFlag.Color, clearColor);
// we need to do a separate clear for normals, because they are cleared to a different color
Color clearColorNormal = new Color(0.5f, 0.5f, 0.5f, 1.0f); // for normals 0.5 is neutral
m_DbufferManager.ClearNormalTarget(clearColorNormal, cmd);
CoreUtils.SetRenderTarget(cmd, m_DbufferManager.GetDBuffers(), m_CameraDepthStencilBufferRT); // do not clear anymore
>>>>>>>
// for alpha compositing, color is cleared to 0, alpha to 1
// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch23.html
Color clearColor = new Color(0.0f, 0.0f, 0.0f, 1.0f);
HDUtils.SetRenderTarget(cmd, camera, m_DbufferManager.GetBuffersRTI(), m_CameraDepthStencilBuffer, ClearFlag.Color, clearColor);
// we need to do a separate clear for normals, because they are cleared to a different color
Color clearColorNormal = new Color(0.5f, 0.5f, 0.5f, 1.0f); // for normals 0.5 is neutral
m_DbufferManager.ClearNormalTarget(cmd, camera, clearColorNormal);
HDUtils.SetRenderTarget(cmd, m_DbufferManager.GetBuffersRTI(), m_CameraDepthStencilBuffer); // do not clear anymore
<<<<<<<
HDUtils.BlitCameraTexture(cmd, hdCamera, m_CameraColorBuffer, BuiltinRenderTextureType.CameraTarget);
=======
// This Blit will flip the screen anything other than openGL
cmd.Blit(m_CameraColorBufferRT, BuiltinRenderTextureType.CameraTarget);
>>>>>>>
// This Blit will flip the screen anything other than openGL
HDUtils.BlitCameraTexture(cmd, hdCamera, m_CameraColorBuffer, BuiltinRenderTextureType.CameraTarget);
<<<<<<<
RenderTransparentRenderList(cullResults, hdCamera.camera, renderContext, cmd, m_ForwardErrorPassNames, 0, pass == ForwardPass.PreRefraction ? k_RenderQueue_PreRefraction : k_RenderQueue_Transparent, null, m_ErrorMaterial);
=======
RenderTransparentRenderList(cullResults, camera, renderContext, cmd, m_ForwardErrorPassNames, 0, pass == ForwardPass.PreRefraction ? HDRenderQueue.k_RenderQueue_PreRefraction : HDRenderQueue.k_RenderQueue_Transparent, null, m_ErrorMaterial);
>>>>>>>
RenderTransparentRenderList(cullResults, hdCamera, renderContext, cmd, m_ForwardErrorPassNames, 0, pass == ForwardPass.PreRefraction ? HDRenderQueue.k_RenderQueue_PreRefraction : HDRenderQueue.k_RenderQueue_Transparent, null, m_ErrorMaterial);
<<<<<<<
PushFullScreenDebugTextureMip(cmd, m_GaussianPyramidColorBuffer, lodCount, isPreRefraction ? FullScreenDebugMode.PreRefractionColorPyramid : FullScreenDebugMode.FinalColorPyramid);
=======
PushFullScreenDebugTextureMip(cmd, m_GaussianPyramidColorBufferRT, lodCount, m_GaussianPyramidColorBufferDesc, hdCamera, isPreRefraction ? FullScreenDebugMode.PreRefractionColorPyramid : FullScreenDebugMode.FinalColorPyramid);
>>>>>>>
PushFullScreenDebugTextureMip(cmd, m_GaussianPyramidColorBuffer, lodCount, m_GaussianPyramidColorBufferDesc, hdCamera, isPreRefraction ? FullScreenDebugMode.PreRefractionColorPyramid : FullScreenDebugMode.FinalColorPyramid);
<<<<<<<
public void PushColorPickerDebugTexture(CommandBuffer cmd, RTHandle textureID, HDCamera hdCamera)
=======
// allowFlip is false if we call the function after the FinalPass or cmd.Blit that flip the screen
public void PushColorPickerDebugTexture(CommandBuffer cmd, RenderTargetIdentifier textureID, HDCamera hdCamera)
>>>>>>>
// allowFlip is false if we call the function after the FinalPass or cmd.Blit that flip the screen
public void PushColorPickerDebugTexture(CommandBuffer cmd, RTHandle textureID, HDCamera hdCamera)
<<<<<<<
PushColorPickerDebugTexture(cmd, m_DebugFullScreenTempBuffer, hdCamera);
=======
PushColorPickerDebugTexture(cmd, (RenderTargetIdentifier)BuiltinRenderTextureType.CameraTarget, hdCamera);
>>>>>>>
PushColorPickerDebugTexture(cmd, (RenderTargetIdentifier)BuiltinRenderTextureType.CameraTarget, hdCamera); |
<<<<<<<
internal async Task UploadFromStreamAsyncHelper(Stream source, long? length, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
=======
internal Task UploadFromStreamAsyncHelper(Stream source, long? length, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif
>>>>>>>
internal async Task UploadFromStreamAsyncHelper(Stream source, long? length, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif
<<<<<<<
// We should always call AsStreamForWrite with bufferSize=0 to prevent buffering. Our
// stream copier only writes 64K buffers at a time anyway, so no buffering is needed.
await sourceAsStream.WriteToAsync(blobStream, length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken).ConfigureAwait(false);
await blobStream.CommitAsync().ConfigureAwait(false);
}
=======
using (CloudBlobStream blobStream = await this.OpenWriteAsync(length, premiumPageBlobTier, accessCondition, options, operationContext, cancellationToken))
{
// We should always call AsStreamForWrite with bufferSize=0 to prevent buffering. Our
// stream copier only writes 64K buffers at a time anyway, so no buffering is needed.
#if NETCORE
await sourceAsStream.WriteToAsync(progressIncrementer.CreateProgressIncrementingStream(blobStream), length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken);
#else
await sourceAsStream.WriteToAsync(blobStream, length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken);
#endif
await blobStream.CommitAsync();
}
}, cancellationToken);
>>>>>>>
// We should always call AsStreamForWrite with bufferSize=0 to prevent buffering. Our
// stream copier only writes 64K buffers at a time anyway, so no buffering is needed.
#if NETCORE
await sourceAsStream.WriteToAsync(progressIncrementer.CreateProgressIncrementingStream(blobStream), length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken).ConfigureAwait(false);
#else
await sourceAsStream.WriteToAsync(blobStream, length, null /* maxLength */, false, tempExecutionState, null /* streamCopyState */, cancellationToken);
#endif
await blobStream.CommitAsync().ConfigureAwait(false);
}
<<<<<<<
public virtual async Task UploadFromFileAsync(string path, PremiumPageBlobTier? premiumBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
=======
public virtual Task UploadFromFileAsync(string path, PremiumPageBlobTier? premiumBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
>>>>>>>
public virtual async Task UploadFromFileAsync(string path, PremiumPageBlobTier? premiumBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
<<<<<<<
await this.UploadFromStreamAsync(stream, premiumBlobTier, accessCondition, options, operationContext, cancellationToken).ConfigureAwait(false);
}
=======
using (Stream stream = new FileStream(path, FileMode.Open, FileAccess.Read))
{
await this.UploadFromStreamAsync(stream, premiumBlobTier, accessCondition, options, operationContext, progressHandler, cancellationToken);
}
}, cancellationToken);
>>>>>>>
await this.UploadFromStreamAsync(stream, premiumBlobTier, accessCondition, options, operationContext, progressHandler, cancellationToken).ConfigureAwait(false);
}
<<<<<<<
StreamDescriptor streamCopyState = new StreamDescriptor();
long startPosition = seekableStream.Position;
await pageDataAsStream.WriteToAsync(writeToStream, null /* copyLength */, Constants.MaxBlockSize, requiresContentMD5, tempExecutionState, streamCopyState, cancellationToken).ConfigureAwait(false);
seekableStream.Position = startPosition;
if (requiresContentMD5)
=======
await Executor.ExecuteAsyncNullReturn(
#if NETCORE
this.PutPageImpl(new AggregatingProgressIncrementer(progressHandler).CreateProgressIncrementingStream(seekableStream), startOffset, contentMD5, accessCondition, modifiedOptions),
#else
this.PutPageImpl(seekableStream, startOffset, contentMD5, accessCondition, modifiedOptions),
#endif
modifiedOptions.RetryPolicy,
operationContext,
cancellationToken);
}
finally
{
if (seekableStreamCreated)
>>>>>>>
StreamDescriptor streamCopyState = new StreamDescriptor();
long startPosition = seekableStream.Position;
await pageDataAsStream.WriteToAsync(writeToStream, null /* copyLength */, Constants.MaxBlockSize, requiresContentMD5, tempExecutionState, streamCopyState, cancellationToken).ConfigureAwait(false);
seekableStream.Position = startPosition;
if (requiresContentMD5) |
<<<<<<<
if (myUpdate.RemovedAlteredAttributes != null)
{
#region remove each attribute, which is no longer defined on type (f.e. after a alter type)
foreach (var attribute in myUpdate.RemovedAlteredAttributes)
{
switch (attribute.Kind)
{
case AttributeType.Property:
toBeDeletedStructured = toBeDeletedStructured ?? new List<long>();
toBeDeletedStructured.Add(attribute.ID);
break;
case AttributeType.BinaryProperty:
toBeDeletedBinaries = toBeDeletedBinaries ?? new List<long>();
toBeDeletedBinaries.Add(attribute.ID);
break;
case AttributeType.IncomingEdge:
//TODO: a better exception here.
throw new Exception("The edges on an incoming edge attribute can not be removed.");
case AttributeType.OutgoingEdge:
switch ((attribute as IOutgoingEdgeDefinition).Multiplicity)
{
case EdgeMultiplicity.HyperEdge:
case EdgeMultiplicity.MultiEdge:
toBeDeletedHyper = toBeDeletedHyper ?? new List<long>();
toBeDeletedHyper.Add(attribute.ID);
break;
case EdgeMultiplicity.SingleEdge:
toBeDeletedSingle = toBeDeletedSingle ?? new List<long>();
toBeDeletedSingle.Add(attribute.ID);
break;
default:
//TODO a better exception here
throw new Exception("The enumeration EdgeMultiplicity was changed, but not this switch statement.");
}
break;
default:
//TODO: a better exception here.
throw new Exception("The enumeration AttributeType was updated, but not this switch statement.");
}
}
#endregion
}
if (myUpdate.RemovedUnstructuredProperties != null)
{
#region remove each unstructured property
foreach (var name in myUpdate.RemovedUnstructuredProperties)
{
if ((myVertexType.HasAttribute(name)) && (myVertexType.GetAttributeDefinition(name).Kind == AttributeType.Property))
{
toBeDeletedUnstructured = toBeDeletedUnstructured ?? new List<String>();
toBeDeletedUnstructured.Add(name);
}
}
#endregion
}
=======
>>>>>>>
if (myUpdate.RemovedUnstructuredProperties != null)
{
#region remove each unstructured property
foreach (var name in myUpdate.RemovedUnstructuredProperties)
{
if ((myVertexType.HasAttribute(name)) && (myVertexType.GetAttributeDefinition(name).Kind == AttributeType.Property))
{
toBeDeletedUnstructured = toBeDeletedUnstructured ?? new List<String>();
toBeDeletedUnstructured.Add(name);
}
}
#endregion
} |
<<<<<<<
public virtual Task<IEnumerable<string>> EnumerateVersions(PackageURL purl)
{
throw new NotImplementedException("BaseProjectManager does not implement EnumerateVersions.");
}
=======
abstract public Task<IEnumerable<string>> EnumerateVersions(PackageURL purl);
>>>>>>>
public virtual Task<IEnumerable<string>> EnumerateVersions(PackageURL purl)
{
throw new NotImplementedException("BaseProjectManager does not implement EnumerateVersions.");
}
<<<<<<<
=======
>>>>>>> |
<<<<<<<
private System.Windows.Forms.Button openButton;
private System.Windows.Forms.Button saveButton;
private ShortcutListItem[] shortcutListItems;
=======
>>>>>>>
private System.Windows.Forms.Button openButton;
private System.Windows.Forms.Button saveButton;
<<<<<<<
this.removeShortcut.Image = Globals.MainForm.FindImage("153");
this.revertToDefault.Image = Globals.MainForm.FindImage("69");
this.revertAllToDefault.Image = Globals.MainForm.FindImage("224");
=======
this.removeShortcut.ShortcutKeyDisplayString = DataConverter.KeysToString(Keys.Delete);
>>>>>>>
this.removeShortcut.ShortcutKeyDisplayString = DataConverter.KeysToString(Keys.Delete);
this.removeShortcut.Image = Globals.MainForm.FindImage("153");
this.revertToDefault.Image = Globals.MainForm.FindImage("69");
this.revertAllToDefault.Image = Globals.MainForm.FindImage("224");
<<<<<<<
private void AssignNewShortcut(ShortcutListItem item, Keys shortcut, Boolean suppressWarning = false)
=======
void AssignNewShortcut(ShortcutListItem item, Keys shortcut)
>>>>>>>
void AssignNewShortcut(ShortcutListItem item, Keys shortcut, bool suppressWarning = false)
<<<<<<<
foreach (ShortcutListItem i in conflicts)
{
i.Conflicts = conflicts;
UpdateItemHighlightFont(i);
}
if (suppressWarning) return;
=======
>>>>>>>
if (suppressWarning) return;
<<<<<<<
=======
/// <summary>
/// [Deprecated] Filter the list view for custom items.
/// </summary>
void ViewCustomCheckedChanged(object sender, EventArgs e)
{
if (this.filterTextBox.Text.StartsWith(ViewCustomKey))
{
if (!this.viewCustom.Checked)
this.filterTextBox.Text = this.filterTextBox.Text.Substring(1);
}
else
{
if (this.viewCustom.Checked)
this.filterTextBox.Text = ViewCustomKey + this.filterTextBox.Text;
}
}
>>>>>>>
<<<<<<<
this.filterTextBox.Text = "";
=======
this.viewCustom.Checked = false;
this.filterTextBox.Text = string.Empty;
this.filterTextBox.Select();
>>>>>>>
this.filterTextBox.Text = string.Empty;
this.filterTextBox.Select();
<<<<<<<
/// Switch to a custom shortcut set.
/// </summary>
private void SelectCustomShortcut(Object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog
{
Filter = TextHelper.GetString("Info.ArgumentFilter") + "|*.fda",
InitialDirectory = PathHelper.ShortcutsDir,
Title = " " + TextHelper.GetString("Title.OpenFileDialog")
};
if (dialog.ShowDialog(this) == DialogResult.OK)
{
String extension = Path.GetExtension(dialog.FileName);
if (extension.Equals(".fda", StringComparison.OrdinalIgnoreCase))
{
Keys[] shortcuts = ShortcutManager.LoadCustomShortcuts(dialog.FileName, this.shortcutListItems);
if (shortcuts != null)
{
this.listView.BeginUpdate();
for (int i = 0; i < shortcuts.Length; i++)
{
this.AssignNewShortcut(this.shortcutListItems[i], shortcuts[i], true);
}
this.listView.EndUpdate();
}
}
}
}
/// <summary>
/// Save the current shortcut set to a file.
/// </summary>
private void SaveCustomShortcut(Object sender, EventArgs e)
{
SaveFileDialog dialog = new SaveFileDialog
{
AddExtension = true,
DefaultExt = ".fda",
Filter = TextHelper.GetString("Info.ArgumentFilter") + "|*.fda",
InitialDirectory = PathHelper.ShortcutsDir,
OverwritePrompt = true,
Title = " " + TextHelper.GetString("Title.SaveFileDialog")
};
if (dialog.ShowDialog(this) == DialogResult.OK)
{
ShortcutManager.SaveCustomShortcuts(dialog.FileName, this.shortcutListItems);
}
}
/// <summary>
/// Closes the shortcut dialog
=======
/// Closes the shortcut dialog.
>>>>>>>
/// Switch to a custom shortcut set.
/// </summary>
void SelectCustomShortcut(object sender, EventArgs e)
{
var dialog = new OpenFileDialog
{
Filter = TextHelper.GetString("Info.ArgumentFilter") + "|*.fda",
InitialDirectory = PathHelper.ShortcutsDir,
Title = " " + TextHelper.GetString("Title.OpenFileDialog")
};
if (dialog.ShowDialog(this) == DialogResult.OK)
{
string extension = Path.GetExtension(dialog.FileName);
if (extension.Equals(".fda", StringComparison.OrdinalIgnoreCase))
{
var shortcuts = ShortcutManager.LoadCustomShortcuts(dialog.FileName, this.shortcutListItems);
if (shortcuts != null)
{
this.listView.BeginUpdate();
for (int i = 0; i < shortcuts.Length; i++)
{
this.AssignNewShortcut(this.shortcutListItems[i], shortcuts[i], true);
}
this.listView.EndUpdate();
}
}
}
}
/// <summary>
/// Save the current shortcut set to a file.
/// </summary>
void SaveCustomShortcut(object sender, EventArgs e)
{
var dialog = new SaveFileDialog
{
AddExtension = true,
DefaultExt = ".fda",
Filter = TextHelper.GetString("Info.ArgumentFilter") + "|*.fda",
InitialDirectory = PathHelper.ShortcutsDir,
OverwritePrompt = true,
Title = " " + TextHelper.GetString("Title.SaveFileDialog")
};
if (dialog.ShowDialog(this) == DialogResult.OK)
{
ShortcutManager.SaveCustomShortcuts(dialog.FileName, this.shortcutListItems);
}
}
/// <summary>
/// Closes the shortcut dialog. |
<<<<<<<
Int32 end = item.ToolTipText.IndexOfOrdinal(" (");
String keytext = view ? " (" + DataConverter.KeysToString(keys) + ")" : String.Empty;
if (end != -1) item.ToolTipText = item.ToolTipText.Substring(0, end) + keytext;
else item.ToolTipText = item.ToolTipText + keytext;
=======
String id = String.Empty;
String[] ids = ((ItemData)item.Tag).Id.Split(';');
if (ids.Length == 2 && String.IsNullOrEmpty(ids[1]))
{
id = StripBarManager.GetMenuItemId(item);
}
else if (ids.Length == 2) id = ids[1];
else return; // No work for us here...
Keys keys = Globals.MainForm.GetShortcutItemKeys(id);
if (keys != Keys.None)
{
if (item is ToolStripMenuItem)
{
var casted = item as ToolStripMenuItem;
if (casted.ShortcutKeys == Keys.None)
{
String keytext = DataConverter.KeysToString(keys);
casted.ShortcutKeyDisplayString = view ? keytext : "";
}
}
else
{
Int32 end = item.ToolTipText.IndexOf(" (");
String keytext = view ? " (" + DataConverter.KeysToString(keys) + ")" : "";
if (end != -1) item.ToolTipText = item.ToolTipText.Substring(0, end) + keytext;
else item.ToolTipText = item.ToolTipText + keytext;
}
}
>>>>>>>
String id = String.Empty;
String[] ids = ((ItemData)item.Tag).Id.Split(';');
if (ids.Length == 2 && String.IsNullOrEmpty(ids[1]))
{
id = StripBarManager.GetMenuItemId(item);
}
else if (ids.Length == 2) id = ids[1];
else return; // No work for us here...
Keys keys = Globals.MainForm.GetShortcutItemKeys(id);
if (keys != Keys.None)
{
if (item is ToolStripMenuItem)
{
var casted = item as ToolStripMenuItem;
if (casted.ShortcutKeys == Keys.None)
{
String keytext = DataConverter.KeysToString(keys);
casted.ShortcutKeyDisplayString = view ? keytext : "";
}
}
else
{
Int32 end = item.ToolTipText.IndexOfOrdinal(" (");
String keytext = view ? " (" + DataConverter.KeysToString(keys) + ")" : "";
if (end != -1) item.ToolTipText = item.ToolTipText.Substring(0, end) + keytext;
else item.ToolTipText = item.ToolTipText + keytext;
}
} |
<<<<<<<
}
/// <summary>
/// Is the vertical scroll bar visible?
/// </summary>
public bool IsVScrollBar
{
get
{
return SPerform(2281, 0, 0) != 0;
}
set
{
SPerform(2280, value ? 1 : 0, 0);
}
}
=======
}
>>>>>>>
}
<<<<<<<
return SPerform(2224, line, 0);
}
=======
return (int)SPerform(2224, (uint)line, 0);
}
/// <summary>
/// Is a line visible?
/// </summary>
public bool GetLineVisible(Int32 line)
{
return SPerform(2228, (uint)line, 0) != 0;
}
>>>>>>>
return SPerform(2224, line, 0);
}
/// <summary>
/// Is a line visible?
/// </summary>
public bool GetLineVisible(Int32 line)
{
return SPerform(2228, line, 0) != 0;
} |
<<<<<<<
=======
/// <summary>
/// Checks if a file name matches a search filter mask, eg: filename.jpg matches f*.jpg
/// </summary>
/// <param name="fileName">The name of the file to check</param>
/// <param name="filterMask">The search filter to apply. You can use multiple masks by using ;</param>
public static bool FileMatchesSearchFilter(string fileName, string filterMask)
{
foreach (string mask in filterMask.Split(';'))
{
String convertedMask = "^" + Regex.Escape(mask).Replace("\\*", ".*").Replace("\\?", ".") + "$";
Regex regexMask = new Regex(convertedMask, RegexOptions.IgnoreCase);
if (regexMask.IsMatch(fileName)) return true;
}
return false;
}
public static bool IsHaxeExtension(string extension)
{
return extension == ".hx" || extension == ".hxp";
}
>>>>>>>
/// <summary>
/// Checks if a file name matches a search filter mask, eg: filename.jpg matches f*.jpg
/// </summary>
/// <param name="fileName">The name of the file to check</param>
/// <param name="filterMask">The search filter to apply. You can use multiple masks by using ;</param>
public static bool FileMatchesSearchFilter(string fileName, string filterMask)
{
foreach (string mask in filterMask.Split(';'))
{
String convertedMask = "^" + Regex.Escape(mask).Replace("\\*", ".*").Replace("\\?", ".") + "$";
Regex regexMask = new Regex(convertedMask, RegexOptions.IgnoreCase);
if (regexMask.IsMatch(fileName)) return true;
}
return false;
} |
<<<<<<<
if (!aPath.IsValid || aPath.Updating) continue;
string path = Path.Combine(aPath.Path, package);
if (!aPath.IsValid || !Directory.Exists(path)) continue;
renamePackagePath = path;
StartRename(inline, Path.GetFileName(path), newName);
return;
=======
if (aPath.IsValid && !aPath.Updating)
{
string path = Path.Combine(aPath.Path, package);
if (aPath.IsValid && Directory.Exists(path))
{
TargetName = Path.GetFileName(path);
this.NewName = string.IsNullOrEmpty(newName) ? GetNewName(TargetName) : newName;
if (string.IsNullOrEmpty(this.NewName)) return;
renamePackage = new Move(new Dictionary<string, string> { { path, this.NewName } }, true, true);
return;
}
}
>>>>>>>
if (!aPath.IsValid || aPath.Updating) continue;
string path = Path.Combine(aPath.Path, package);
if (!aPath.IsValid || !Directory.Exists(path)) continue;
TargetName = Path.GetFileName(path);
renamePackagePath = path;
StartRename(inline, TargetName, newName);
return;
//if (aPath.IsValid && !aPath.Updating)
//{
// string path = Path.Combine(aPath.Path, package);
// if (aPath.IsValid && Directory.Exists(path))
// {
// TargetName = Path.GetFileName(path);
// this.NewName = string.IsNullOrEmpty(newName) ? GetNewName(TargetName) : newName;
// if (string.IsNullOrEmpty(this.NewName)) return;
// renamePackage = new Move(new Dictionary<string, string> { { path, this.NewName } }, true, true);
// return;
// }
//}
<<<<<<<
isRenamePackage = false;
string oldName = RefactoringHelper.GetRefactorTargetName(target);
=======
TargetName = RefactoringHelper.GetRefactorTargetName(target);
this.NewName = !string.IsNullOrEmpty(newName) ? newName : GetNewName(TargetName);
if (string.IsNullOrEmpty(this.NewName)) return;
>>>>>>>
isRenamePackage = false;
TargetName = RefactoringHelper.GetRefactorTargetName(target);
<<<<<<<
return isRenamePackage ? renamePackage.IsValid() : !string.IsNullOrEmpty(NewName);
=======
return renamePackage != null ? renamePackage.IsValid() : !string.IsNullOrEmpty(this.NewName);
>>>>>>>
return isRenamePackage ? renamePackage.IsValid() : !string.IsNullOrEmpty(NewName);
<<<<<<<
bool ValidateTargets()
=======
void OnRenamePackageComplete(object sender, RefactorCompleteEventArgs<IDictionary<string, List<SearchMatch>>> args)
{
Results = args.Results;
FireOnRefactorComplete();
}
private bool ValidateTargets()
>>>>>>>
void OnRenamePackageComplete(object sender, RefactorCompleteEventArgs<IDictionary<string, List<SearchMatch>>> args)
{
Results = args.Results;
FireOnRefactorComplete();
}
bool ValidateTargets()
<<<<<<<
FileModel inFile;
string originName;
if (isEnum || isClass)
{
inFile = target.Type.InFile;
originName = target.Type.Name;
}
else
{
inFile = target.Member.InFile;
originName = target.Member.Name;
}
=======
var member = isEnum || isClass ? target.Type : target.Member;
FileModel inFile = member.InFile;
>>>>>>>
var member = isEnum || isClass ? target.Type : target.Member;
FileModel inFile = member.InFile;
<<<<<<<
RefactoringHelper.ReplaceMatches(entry.Value, sci, NewName);
=======
RefactoringHelper.ReplaceMatches(entry.Value, sci, this.NewName);
>>>>>>>
RefactoringHelper.ReplaceMatches(entry.Value, sci, NewName); |
<<<<<<<
using ASCompletion.Completion;
=======
using ASCompletion.Helpers;
>>>>>>>
using ASCompletion.Completion;
using ASCompletion.Helpers; |
<<<<<<<
this.openButton.Text = TextHelper.GetString("Label.Open");
this.saveButton.Text = TextHelper.GetString("Label.SaveAs");
this.searchLabel.Text = TextHelper.GetString("Label.Search").Replace("&", "") + ":";
=======
this.viewCustom.Text = TextHelper.GetString("Label.ViewCustom");
this.searchLabel.Text = TextHelper.GetStringWithoutMnemonics("Label.Search") + ":";
>>>>>>>
this.openButton.Text = TextHelper.GetString("Label.Open");
this.saveButton.Text = TextHelper.GetString("Label.SaveAs");
this.searchLabel.Text = TextHelper.GetStringWithoutMnemonics("Label.Search") + ":"; |
<<<<<<<
const string ViewConflictsKey = "?";
const string ViewCustomKey = "*";
=======
private Timer updateTimer;
>>>>>>>
const string ViewConflictsKey = "?";
const string ViewCustomKey = "*";
private Timer updateTimer;
<<<<<<<
if (String.IsNullOrEmpty(filter) ||
item.Id.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0 ||
item.KeysString.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0)
=======
if (!this.listView.Items.ContainsKey(item.Id) &&
(item.Id.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0 ||
GetKeysAsString(item.Custom).IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0))
>>>>>>>
if (String.IsNullOrEmpty(filter) ||
item.Id.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0 ||
item.KeysString.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0)
<<<<<<<
this.PopulateListView(this.filterTextBox.Text);
=======
updateTimer.Enabled = false;
String searchText = this.filterTextBox.Text.Trim();
this.PopulateListView(searchText, viewCustom.Checked);
>>>>>>>
updateTimer.Enabled = false;
this.PopulateListView(this.filterTextBox.Text); |
<<<<<<<
using CodeRefactor.Commands;
using PluginCore;
using PluginCore.FRService;
=======
using PluginCore;
using PluginCore.Localization;
>>>>>>>
using CodeRefactor.Commands;
using PluginCore;
using PluginCore.FRService;
<<<<<<<
currentCommand.OnRefactorComplete -= OnRefactorComplete;
if (queue.Count == 0)
{
if (currentCommand.OutputResults)
{
PluginBase.MainForm.CallCommand("PluginCommand", "ResultsPanel.ShowResults");
}
currentCommand = null;
}
else ExecuteFirst();
=======
if (queue.Count > 0) ExecuteFirst();
else
{
if (startState != null) RestoreStartState();
currentCommand = null;
startState = null;
}
>>>>>>>
currentCommand.OnRefactorComplete -= OnRefactorComplete;
if (queue.Count == 0)
{
if (currentCommand.OutputResults)
{
PluginBase.MainForm.CallCommand("PluginCommand", "ResultsPanel.ShowResults");
}
if (startState != null) RestoreStartState();
currentCommand = null;
startState = null;
} |
<<<<<<<
/// <returns>Local vars dictionary (name, type)</returns>
static public MemberList ParseLocalVars(ASExpr expression)
=======
/// <returns>Local vars dictionnary (name, type)</returns>
public static MemberList ParseLocalVars(ASExpr expression)
>>>>>>>
/// <returns>Local vars dictionary (name, type)</returns>
public static MemberList ParseLocalVars(ASExpr expression)
<<<<<<<
/// <summary>
/// Text style is a literal.
/// </summary>
public static bool IsLiteralStyle(int style)
{
return IsNumericStyle(style) || IsStringStyle(style) || IsCharStyle(style);
}
/// <summary>
/// Text style is a numeric literal.
/// </summary>
public static bool IsNumericStyle(int style)
{
return style == 4;
}
/// <summary>
/// Text style is a string literal.
/// </summary>
public static bool IsStringStyle(int style)
{
return style == 6;
}
/// <summary>
/// Text style is character literal.
/// </summary>
public static bool IsCharStyle(int style)
{
return style == 7;
}
=======
public static bool IsLiteralStyle(int style)
{
return (style == 4) || (style == 6) || (style == 7);
}
>>>>>>>
/// <summary>
/// Text style is a literal.
/// </summary>
public static bool IsLiteralStyle(int style)
{
return IsNumericStyle(style) || IsStringStyle(style) || IsCharStyle(style);
}
/// <summary>
/// Text style is a numeric literal.
/// </summary>
public static bool IsNumericStyle(int style)
{
return style == 4;
}
/// <summary>
/// Text style is a string literal.
/// </summary>
public static bool IsStringStyle(int style)
{
return style == 6;
}
/// <summary>
/// Text style is character literal.
/// </summary>
public static bool IsCharStyle(int style)
{
return style == 7;
} |
<<<<<<<
string blobTierString = null;
string rehydrationStatusString = null;
=======
string premiumPageBlobTierString = null;
>>>>>>>
string blobTierString = null;
string rehydrationStatusString = null;
<<<<<<<
case Constants.AccessTierElement:
blobTierString = reader.ReadElementContentAsString();
break;
case Constants.ArchiveStatusElement:
rehydrationStatusString = reader.ReadElementContentAsString();
break;
=======
case Constants.AccessTierElement:
premiumPageBlobTierString = reader.ReadElementContentAsString();
break;
>>>>>>>
case Constants.AccessTierElement:
blobTierString = reader.ReadElementContentAsString();
break;
case Constants.ArchiveStatusElement:
rehydrationStatusString = reader.ReadElementContentAsString();
break;
<<<<<<<
if (!string.IsNullOrEmpty(blobTierString))
{
BlockBlobTier? blockBlobTier;
PageBlobTier? pageBlobTier;
BlobHttpResponseParsers.GetBlobTier(blob.Properties.BlobType, blobTierString, out blockBlobTier, out pageBlobTier);
blob.Properties.BlockBlobTier = blockBlobTier;
blob.Properties.PageBlobTier = pageBlobTier;
}
blob.Properties.RehydrationStatus = BlobHttpResponseParsers.GetRehydrationStatus(rehydrationStatusString);
=======
if (!string.IsNullOrEmpty(premiumPageBlobTierString))
{
PremiumPageBlobTier? premiumPageBlobTier;
BlobHttpResponseParsers.GetBlobTier(blob.Properties.BlobType, premiumPageBlobTierString, out premiumPageBlobTier);
blob.Properties.PremiumPageBlobTier = premiumPageBlobTier;
blob.Properties.BlobTierInferred = false;
}
>>>>>>>
if (!string.IsNullOrEmpty(blobTierString))
{
BlockBlobTier? blockBlobTier;
PremiumPageBlobTier? premiumPageBlobTier;
BlobHttpResponseParsers.GetBlobTier(blob.Properties.BlobType, blobTierString, out blockBlobTier, out premiumPageBlobTier);
blob.Properties.BlockBlobTier = blockBlobTier;
blob.Properties.PremiumPageBlobTier = premiumPageBlobTier;
blob.Properties.BlobTierInferred = false;
}
blob.Properties.RehydrationStatus = BlobHttpResponseParsers.GetRehydrationStatus(rehydrationStatusString); |
<<<<<<<
public class Slide : SentakkiLanedHitObject, IHasDuration
=======
// This is the main object used to summon slides, includes a TAP and one or more "SlideBodies"
public class Slide : SentakkiHitObject
>>>>>>>
public class Slide : SentakkiLanedHitObject
<<<<<<<
Progress = (float)progress
=======
Lane = SlideInfo.SlidePath.EndLane + Lane,
StartTime = StartTime,
SlideInfo = SlideInfo
>>>>>>>
Lane = SlideInfo.SlidePath.EndLane + Lane,
StartTime = StartTime,
SlideInfo = SlideInfo
<<<<<<<
AddNested(new SlideNode
{
StartTime = EndTime,
Lane = Lane + SlidePath.EndLane,
Progress = 1
});
AddNested(new Tap { Lane = Lane, StartTime = StartTime, Samples = Samples, IsBreak = IsBreak });
=======
>>>>>>>
<<<<<<<
public class SlideNode : SentakkiLanedHitObject
{
public virtual float Progress { get; set; }
public bool IsTailNote => Progress == 1;
protected override HitWindows CreateHitWindows() => IsTailNote ? new SentakkiSlideHitWindows() : HitWindows.Empty;
public override Judgement CreateJudgement() => IsTailNote ? new SentakkiJudgement() : (Judgement)new IgnoreJudgement();
}
=======
>>>>>>> |
<<<<<<<
.SetBasePath(appEnv.ApplicationBasePath)
.AddJsonFile(source =>
{
source.Path = "appsettings.json";
source.ReloadOnChange = true;
})
=======
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json")
>>>>>>>
.SetBasePath(env.ContentRootPath)
.AddJsonFile(source =>
{
source.Path = "appsettings.json";
source.ReloadOnChange = true;
}) |
<<<<<<<
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eto.Forms;
using sw = System.Windows;
using swc = System.Windows.Controls;
using swm = System.Windows.Media;
using swi = System.Windows.Input;
using Eto.Platform.Wpf.Drawing;
namespace Eto.Platform.Wpf.Forms.Menu
{
public class WpfMenuItem<C, W> : WidgetHandler<C, W>, IMenuActionItem, swi.ICommand
where C : swc.MenuItem
where W : MenuActionItem
{
Eto.Drawing.Icon icon;
Eto.Drawing.Image image;
swi.RoutedCommand command = new swi.RoutedCommand ();
bool openingHandled;
protected void Setup ()
{
Control.Click += delegate {
Widget.OnClick (EventArgs.Empty);
};
}
public Eto.Drawing.Icon Icon
{
get { return icon; }
set
{
icon = value;
if (icon != null)
Control.Icon = new swc.Image {
Source = ((IWpfImage)icon.Handler).GetIconClosestToSize (16),
MaxWidth = 16,
MaxHeight = 16
};
else
Control.Icon = null;
}
}
public Eto.Drawing.Image Image
{
get { return image; }
set
{
image = value;
/* TODO
if (image != null)
Control.Icon = new swc.Image
{
Source = ((IWpfImage)icon.Handler).GetIconClosestToSize(16),
MaxWidth = 16,
MaxHeight = 16
};
else
Control.Icon = null;*/
}
}
public string Text
{
get { return Conversions.ConvertMneumonicFromWPF (Control.Header); }
set { Control.Header = value.ToWpfMneumonic (); }
}
public string ToolTip
{
get { return Control.ToolTip as string; }
set { Control.ToolTip = value; }
}
public Key Shortcut
{
get
{
var keyBinding = Control.InputBindings.OfType<swi.KeyBinding> ().FirstOrDefault ();
if (keyBinding != null)
return KeyMap.Convert (keyBinding.Key, keyBinding.Modifiers);
return Key.None;
}
set
{
Control.InputBindings.Clear ();
if (value != Key.None) {
var key = KeyMap.ConvertKey (value);
var modifier = KeyMap.ConvertModifier (value);
Control.InputBindings.Add (new swi.KeyBinding { Key = key, Modifiers = modifier, Command = this });
Control.InputGestureText = KeyMap.KeyToString (value);
}
else
Control.InputGestureText = null;
}
}
public bool Enabled
{
get { return Control.IsEnabled; }
set
{
Control.IsEnabled = value;
OnCanExecuteChanged (EventArgs.Empty);
}
}
public override void AttachEvent (string handler)
{
switch (handler) {
case MenuActionItem.ValidateEvent:
// handled by parent
break;
default:
base.AttachEvent (handler);
break;
}
}
public void AddMenu (int index, MenuItem item)
{
Control.Items.Insert (index, item.ControlObject);
if (!openingHandled) {
Control.SubmenuOpened += HandleContextMenuOpening;
openingHandled = true;
}
}
public void RemoveMenu (MenuItem item)
{
Control.Items.Remove (item.ControlObject);
}
public void Clear ()
{
Control.Items.Clear ();
}
bool swi.ICommand.CanExecute (object parameter)
{
return this.Enabled;
}
void HandleContextMenuOpening (object sender, sw.RoutedEventArgs e)
{
var submenu = Widget as ISubMenuWidget;
if (submenu != null) {
foreach (var item in submenu.MenuItems.OfType<MenuActionItem>()) {
item.OnValidate (EventArgs.Empty);
}
}
}
public event EventHandler CanExecuteChanged;
protected virtual void OnCanExecuteChanged (EventArgs e)
{
if (CanExecuteChanged != null)
CanExecuteChanged (this, e);
}
void swi.ICommand.Execute (object parameter)
{
Widget.OnClick (EventArgs.Empty);
}
}
}
=======
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eto.Forms;
using sw = System.Windows;
using swc = System.Windows.Controls;
using swm = System.Windows.Media;
using swi = System.Windows.Input;
using Eto.Platform.Wpf.Drawing;
namespace Eto.Platform.Wpf.Forms.Menu
{
public class WpfMenuItem<C, W> : WidgetHandler<C, W>, IMenuActionItem, swi.ICommand
where C : swc.MenuItem
where W : MenuActionItem
{
Eto.Drawing.Icon icon;
swi.RoutedCommand command = new swi.RoutedCommand ();
bool openingHandled;
protected void Setup ()
{
Control.Click += delegate {
Widget.OnClick (EventArgs.Empty);
};
}
public Eto.Drawing.Icon Icon
{
get { return icon; }
set
{
icon = value;
if (icon != null)
Control.Icon = new swc.Image {
Source = ((IWpfImage)icon.Handler).GetImageClosestToSize (16),
MaxWidth = 16,
MaxHeight = 16
};
else
Control.Icon = null;
}
}
public string Text
{
get { return Conversions.ConvertMneumonicFromWPF (Control.Header); }
set { Control.Header = value.ToWpfMneumonic (); }
}
public string ToolTip
{
get { return Control.ToolTip as string; }
set { Control.ToolTip = value; }
}
public Key Shortcut
{
get
{
var keyBinding = Control.InputBindings.OfType<swi.KeyBinding> ().FirstOrDefault ();
if (keyBinding != null)
return KeyMap.Convert (keyBinding.Key, keyBinding.Modifiers);
return Key.None;
}
set
{
Control.InputBindings.Clear ();
if (value != Key.None) {
var key = KeyMap.ConvertKey (value);
var modifier = KeyMap.ConvertModifier (value);
Control.InputBindings.Add (new swi.KeyBinding { Key = key, Modifiers = modifier, Command = this });
Control.InputGestureText = KeyMap.KeyToString (value);
}
else
Control.InputGestureText = null;
}
}
public bool Enabled
{
get { return Control.IsEnabled; }
set
{
Control.IsEnabled = value;
OnCanExecuteChanged (EventArgs.Empty);
}
}
public override void AttachEvent (string handler)
{
switch (handler) {
case MenuActionItem.ValidateEvent:
// handled by parent
break;
default:
base.AttachEvent (handler);
break;
}
}
public void AddMenu (int index, MenuItem item)
{
Control.Items.Insert (index, item.ControlObject);
if (!openingHandled) {
Control.SubmenuOpened += HandleContextMenuOpening;
openingHandled = true;
}
}
public void RemoveMenu (MenuItem item)
{
Control.Items.Remove (item.ControlObject);
}
public void Clear ()
{
Control.Items.Clear ();
}
bool swi.ICommand.CanExecute (object parameter)
{
return this.Enabled;
}
void HandleContextMenuOpening (object sender, sw.RoutedEventArgs e)
{
var submenu = Widget as ISubMenuWidget;
if (submenu != null) {
foreach (var item in submenu.MenuItems.OfType<MenuActionItem>()) {
item.OnValidate (EventArgs.Empty);
}
}
}
public event EventHandler CanExecuteChanged;
protected virtual void OnCanExecuteChanged (EventArgs e)
{
if (CanExecuteChanged != null)
CanExecuteChanged (this, e);
}
void swi.ICommand.Execute (object parameter)
{
Widget.OnClick (EventArgs.Empty);
}
}
}
>>>>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eto.Forms;
using sw = System.Windows;
using swc = System.Windows.Controls;
using swm = System.Windows.Media;
using swi = System.Windows.Input;
using Eto.Platform.Wpf.Drawing;
namespace Eto.Platform.Wpf.Forms.Menu
{
public class WpfMenuItem<C, W> : WidgetHandler<C, W>, IMenuActionItem, swi.ICommand
where C : swc.MenuItem
where W : MenuActionItem
{
Eto.Drawing.Icon icon;
Eto.Drawing.Image image;
swi.RoutedCommand command = new swi.RoutedCommand ();
bool openingHandled;
protected void Setup ()
{
Control.Click += delegate {
Widget.OnClick (EventArgs.Empty);
};
}
public Eto.Drawing.Icon Icon
{
get { return icon; }
set
{
icon = value;
if (icon != null)
Control.Icon = new swc.Image {
Source = ((IWpfImage)icon.Handler).GetImageClosestToSize (16),
MaxWidth = 16,
MaxHeight = 16
};
else
Control.Icon = null;
}
}
public Eto.Drawing.Image Image
{
get { return image; }
set
{
image = value;
/* TODO
if (image != null)
Control.Icon = new swc.Image
{
Source = ((IWpfImage)icon.Handler).GetIconClosestToSize(16),
MaxWidth = 16,
MaxHeight = 16
};
else
Control.Icon = null;*/
}
}
public string Text
{
get { return Conversions.ConvertMneumonicFromWPF (Control.Header); }
set { Control.Header = value.ToWpfMneumonic (); }
}
public string ToolTip
{
get { return Control.ToolTip as string; }
set { Control.ToolTip = value; }
}
public Key Shortcut
{
get
{
var keyBinding = Control.InputBindings.OfType<swi.KeyBinding> ().FirstOrDefault ();
if (keyBinding != null)
return KeyMap.Convert (keyBinding.Key, keyBinding.Modifiers);
return Key.None;
}
set
{
Control.InputBindings.Clear ();
if (value != Key.None) {
var key = KeyMap.ConvertKey (value);
var modifier = KeyMap.ConvertModifier (value);
Control.InputBindings.Add (new swi.KeyBinding { Key = key, Modifiers = modifier, Command = this });
Control.InputGestureText = KeyMap.KeyToString (value);
}
else
Control.InputGestureText = null;
}
}
public bool Enabled
{
get { return Control.IsEnabled; }
set
{
Control.IsEnabled = value;
OnCanExecuteChanged (EventArgs.Empty);
}
}
public override void AttachEvent (string handler)
{
switch (handler) {
case MenuActionItem.ValidateEvent:
// handled by parent
break;
default:
base.AttachEvent (handler);
break;
}
}
public void AddMenu (int index, MenuItem item)
{
Control.Items.Insert (index, item.ControlObject);
if (!openingHandled) {
Control.SubmenuOpened += HandleContextMenuOpening;
openingHandled = true;
}
}
public void RemoveMenu (MenuItem item)
{
Control.Items.Remove (item.ControlObject);
}
public void Clear ()
{
Control.Items.Clear ();
}
bool swi.ICommand.CanExecute (object parameter)
{
return this.Enabled;
}
void HandleContextMenuOpening (object sender, sw.RoutedEventArgs e)
{
var submenu = Widget as ISubMenuWidget;
if (submenu != null) {
foreach (var item in submenu.MenuItems.OfType<MenuActionItem>()) {
item.OnValidate (EventArgs.Empty);
}
}
}
public event EventHandler CanExecuteChanged;
protected virtual void OnCanExecuteChanged (EventArgs e)
{
if (CanExecuteChanged != null)
CanExecuteChanged (this, e);
}
void swi.ICommand.Execute (object parameter)
{
Widget.OnClick (EventArgs.Empty);
}
}
} |
<<<<<<<
g.Add <IBitmap> (() => new BitmapHandler ());
g.Add <IFontFamily> (() => new FontFamilyHandler ());
g.Add <IFont> (() => new FontHandler ());
g.Add <IFonts> (() => new FontsHandler ());
g.Add <IGraphics> (() => new GraphicsHandler ());
g.Add <IGraphicsPath> (() => new GraphicsPathHandler ());
g.Add <IIcon> (() => new IconHandler ());
g.Add <IIndexedBitmap> (() => new IndexedBitmapHandler ());
g.Add <IMatrixHandler> (() => new MatrixHandler ());
=======
Add <IBitmap> (() => new BitmapHandler ());
Add <IFontFamily> (() => new FontFamilyHandler ());
Add <IFont> (() => new FontHandler ());
Add <IFonts> (() => new FontsHandler ());
Add <IGraphics> (() => new GraphicsHandler ());
Add <IGraphicsPathHandler> (() => new GraphicsPathHandler ());
Add <IIcon> (() => new IconHandler ());
Add <IIndexedBitmap> (() => new IndexedBitmapHandler ());
Add <IMatrixHandler> (() => new MatrixHandler ());
Add <IPen> (() => new PenHandler ());
Add <ISolidBrush> (() => new SolidBrushHandler ());
Add <ITextureBrush> (() => new TextureBrushHandler ());
Add<ILinearGradientBrush> (() => new LinearGradientBrushHandler ());
>>>>>>>
g.Add <IBitmap> (() => new BitmapHandler ());
g.Add <IFontFamily> (() => new FontFamilyHandler ());
g.Add <IFont> (() => new FontHandler ());
g.Add <IFonts> (() => new FontsHandler ());
g.Add <IGraphics> (() => new GraphicsHandler ());
g.Add <IGraphicsPathHandler> (() => new GraphicsPathHandler ());
g.Add <IIcon> (() => new IconHandler ());
g.Add <IIndexedBitmap> (() => new IndexedBitmapHandler ());
g.Add <IMatrixHandler> (() => new MatrixHandler ());
Add <IPen> (() => new PenHandler ());
Add <ISolidBrush> (() => new SolidBrushHandler ());
Add <ITextureBrush> (() => new TextureBrushHandler ());
Add<ILinearGradientBrush> (() => new LinearGradientBrushHandler ());
<<<<<<<
=======
>>>>>>>
<<<<<<<
#if FIX
internal static Matrix Convert(
CGAffineTransform t)
{
return Matrix.Create(
t.xx,
t.yx,
t.xy,
t.yy,
t.x0,
t.y0);
}
internal static CGAffineTransform Convert(
Matrix m)
{
var e = m.Elements;
return new CGAffineTransform(
e[0],
e[1],
e[2],
e[3],
e[4],
e[5]);
}
#endif
=======
>>>>>>>
#if FIX
internal static Matrix Convert(
CGAffineTransform t)
{
return Matrix.Create(
t.xx,
t.yx,
t.xy,
t.yy,
t.x0,
t.y0);
}
#endif |
<<<<<<<
using System;
using System.Collections.Generic;
#if XAML
using System.Windows.Markup;
#endif
using System.Collections.Specialized;
namespace Eto.Forms
{
public interface ITreeItem : IImageListItem, ITreeStore, ITreeItem<ITreeItem>
{
/// <summary>
/// Used only by the back-ends, maps to a TreeNode
/// or its equivalent
/// </summary>
object Handler { get; set; }
object Tag { get; set; }
object InternalTag { get; set; }
ITreeItem Clone();
}
public class TreeItemCollection : DataStoreCollection<ITreeItem>, ITreeStore
{
}
#if XAML
[ContentProperty("Children")]
#endif
public class TreeItem : ImageListItem, ITreeItem
{
TreeItemCollection children;
public TreeItemCollection Children
{
get {
if (children != null)
return children;
children = new TreeItemCollection ();
children.CollectionChanged += (sender, e) => {
if (e.Action == NotifyCollectionChangedAction.Add) {
foreach (ITreeItem item in e.NewItems) {
item.Parent = this;
}
}
};
return children;
}
}
public ITreeItem Parent { get; set; }
public virtual bool Expandable { get { return this.Count > 0; } }
public virtual bool Expanded { get; set; }
public virtual ITreeItem this[int index]
{
get { return children [index]; }
}
public virtual int Count {
get { return (children != null) ? children.Count : 0; }
}
public TreeItem ()
{
}
public TreeItem (IEnumerable<ITreeItem> children)
{
this.Children.AddRange (children);
}
public object Tag { get; set; }
/// <summary>
/// Used internally to reference the UI item
/// </summary>
public object InternalTag { get; set; }
public ITreeItem Clone()
{
throw new NotImplementedException();
}
public object Handler { get; set; }
}
}
=======
using System;
using System.Collections.Generic;
#if XAML
using System.Windows.Markup;
#endif
using System.Collections.Specialized;
namespace Eto.Forms
{
public interface ITreeItem : IImageListItem, ITreeStore, ITreeItem<ITreeItem>
{
}
public class TreeItemCollection : DataStoreCollection<ITreeItem>, ITreeStore
{
}
[ContentProperty("Children")]
public class TreeItem : ImageListItem, ITreeItem
{
TreeItemCollection children;
public TreeItemCollection Children
{
get {
if (children != null)
return children;
children = new TreeItemCollection ();
children.CollectionChanged += (sender, e) => {
if (e.Action == NotifyCollectionChangedAction.Add) {
foreach (ITreeItem item in e.NewItems) {
item.Parent = this;
}
}
};
return children;
}
}
public ITreeItem Parent { get; set; }
public virtual bool Expandable { get { return this.Count > 0; } }
public virtual bool Expanded { get; set; }
public virtual ITreeItem this[int index]
{
get { return children [index]; }
}
public virtual int Count {
get { return (children != null) ? children.Count : 0; }
}
public TreeItem ()
{
}
public TreeItem (IEnumerable<ITreeItem> children)
{
this.Children.AddRange (children);
}
}
}
>>>>>>>
using System;
using System.Collections.Generic;
#if XAML
using System.Windows.Markup;
#endif
using System.Collections.Specialized;
namespace Eto.Forms
{
public interface ITreeItem : IImageListItem, ITreeStore, ITreeItem<ITreeItem>
{
/// <summary>
/// Used only by the back-ends, maps to a TreeNode
/// or its equivalent
/// </summary>
object Handler { get; set; }
object Tag { get; set; }
object InternalTag { get; set; }
ITreeItem Clone();
}
public class TreeItemCollection : DataStoreCollection<ITreeItem>, ITreeStore
{
}
[ContentProperty("Children")]
public class TreeItem : ImageListItem, ITreeItem
{
TreeItemCollection children;
public TreeItemCollection Children
{
get {
if (children != null)
return children;
children = new TreeItemCollection ();
children.CollectionChanged += (sender, e) => {
if (e.Action == NotifyCollectionChangedAction.Add) {
foreach (ITreeItem item in e.NewItems) {
item.Parent = this;
}
}
};
return children;
}
}
public ITreeItem Parent { get; set; }
public virtual bool Expandable { get { return this.Count > 0; } }
public virtual bool Expanded { get; set; }
public virtual ITreeItem this[int index]
{
get { return children [index]; }
}
public virtual int Count {
get { return (children != null) ? children.Count : 0; }
}
public TreeItem ()
{
}
public TreeItem (IEnumerable<ITreeItem> children)
{
this.Children.AddRange (children);
}
public object Tag { get; set; }
/// <summary>
/// Used internally to reference the UI item
/// </summary>
public object InternalTag { get; set; }
public ITreeItem Clone()
{
throw new NotImplementedException();
}
public object Handler { get; set; }
}
} |
<<<<<<<
public int Width
{
get { return 0;/* TODO */ }
}
public int Height
{
get { return 0;/* TODO */ }
}
=======
public abstract UIImage GetUIImage ();
>>>>>>>
public abstract UIImage GetUIImage ();
public int Width
{
get { return 0;/* TODO */ }
}
public int Height
{
get { return 0;/* TODO */ }
} |
<<<<<<<
await this.DownloadToStreamAsync(stream, accessCondition, options, operationContext, cancellationToken).ConfigureAwait(false);
=======
using (stream)
{
await this.DownloadToStreamAsync(stream, accessCondition, options, operationContext, progressHandler, cancellationToken);
}
>>>>>>>
await this.DownloadToStreamAsync(stream, accessCondition, options, operationContext, progressHandler, cancellationToken).ConfigureAwait(false);
<<<<<<<
return Executor.ExecuteAsyncNullReturn(
=======
return Task.Run(async () => await Executor.ExecuteAsyncNullReturn(
#if NETCORE
this.GetBlobImpl(this.attributes, new AggregatingProgressIncrementer(progressHandler).CreateProgressIncrementingStream(target), offset, length, accessCondition, modifiedOptions),
#else
>>>>>>>
await Executor.ExecuteAsyncNullReturn(
#if NETCORE
this.GetBlobImpl(this.attributes, new AggregatingProgressIncrementer(progressHandler).CreateProgressIncrementingStream(target), offset, length, accessCondition, modifiedOptions),
#else
<<<<<<<
public virtual async Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
=======
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif
>>>>>>>
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif
<<<<<<<
await this.DownloadRangeToStreamAsync(stream, blobOffset, length, accessCondition, options, operationContext, cancellationToken).ConfigureAwait(false);
return (int)stream.Position;
}
=======
using (SyncMemoryStream stream = new SyncMemoryStream(target, index))
{
#if NETCORE
await this.DownloadRangeToStreamAsync(stream, blobOffset, length, accessCondition, options, operationContext, progressHandler, cancellationToken);
#else
await this.DownloadRangeToStreamAsync(stream, blobOffset, length, accessCondition, options, operationContext, cancellationToken);
#endif
return (int)stream.Position;
}
}, cancellationToken);
>>>>>>>
await this.DownloadRangeToStreamAsync(stream, blobOffset, length, accessCondition, options, operationContext, progressHandler, cancellationToken).ConfigureAwait(false);
return (int)stream.Position;
} |
<<<<<<<
Control.AddLines (new SD.PointF[] { Generator.ConvertF (point1), Generator.ConvertF (point2) });
=======
Control.AddLines (new sd.PointF[] { point1.ToSDPointF (), point2.ToSDPointF () });
>>>>>>>
Control.AddLines (new SD.PointF[] { point1.ToSDPointF (), point2.ToSDPointF () }); |
<<<<<<<
this.StartCopyImpl(this.attributes, sourceSnapshotUri, default(string) /* contentMD5 */, true /* incrementalCopy */, false /* syncCopy */, default(PremiumPageBlobTier?) /* premiumPageBlobTier */, default(StandardBlobTier?) /* standardBlockBlobTier */, default(RehydratePriority?) /* rehydratePriority */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
=======
this.StartCopyImpl(this.attributes, sourceSnapshotUri, Checksum.None, true /* incrementalCopy */, false /* syncCopy */, null /* pageBlobTier */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
>>>>>>>
this.StartCopyImpl(this.attributes, sourceSnapshotUri, Checksum.None, true /* incrementalCopy */, false /* syncCopy */, default(PremiumPageBlobTier?) /* premiumPageBlobTier */, default(StandardBlobTier?) /* standardBlockBlobTier */, default(RehydratePriority?) /* rehydratePriority */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
<<<<<<<
this.StartCopyImpl(this.attributes, sourceSnapshotUri, default(string) /* contentMD5 */, true /* incrementalCopy */, false /* syncCopy */, default(PremiumPageBlobTier?) /* premiumPageBlobTier */, default(StandardBlobTier?) /* standardBlockBlobTier */, default(RehydratePriority?) /* rehydratePriority */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
=======
this.StartCopyImpl(this.attributes, sourceSnapshotUri, Checksum.None, true /* incrementalCopy */, false /* syncCopy */, null /* pageBlobTier */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
>>>>>>>
this.StartCopyImpl(this.attributes, sourceSnapshotUri, Checksum.None, true /* incrementalCopy */, false /* syncCopy */, default(PremiumPageBlobTier?) /* premiumPageBlobTier */, default(StandardBlobTier?) /* standardBlockBlobTier */, default(RehydratePriority?) /* rehydratePriority */, null /* sourceAccessCondition */, destAccessCondition, modifiedOptions),
<<<<<<<
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(pageData, offset, length, contentMD5, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutPage(uri, serverTimeout, pageRange, pageWrite, accessCondition, cnt, ctx,
this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
=======
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(pageData, offset, length, contentChecksum, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) => BlobHttpRequestMessageFactory.PutPage(uri, serverTimeout, pageRange, pageWrite, accessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials);
>>>>>>>
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(pageData, offset, length, contentChecksum, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutPage(uri, serverTimeout, pageRange, pageWrite, accessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
<<<<<<<
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutPage(uri, sourceUri, offset, count, sourceContentMd5, serverTimeout, pageRange, sourceAccessCondition, destAccessCondition, cnt, ctx,
this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
=======
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) => BlobHttpRequestMessageFactory.PutPage(uri, sourceUri, offset, count, sourceContentChecksum, serverTimeout, pageRange, sourceAccessCondition, destAccessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials);
>>>>>>>
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutPage(uri, sourceUri, offset, count, sourceContentChecksum, serverTimeout, pageRange, sourceAccessCondition, destAccessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
}; |
<<<<<<<
public static StorageRequestMessage AppendBlock(Uri uri, Uri sourceUri, long? offset, long? count, string sourceContentMd5, int? timeout, AccessCondition sourceAccessCondition,
AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials, BlobRequestOptions options)
=======
public static StorageRequestMessage AppendBlock(Uri uri, Uri sourceUri, long? offset, long? count, Checksum sourceContentChecksum, int? timeout, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
>>>>>>>
public static StorageRequestMessage AppendBlock(Uri uri, Uri sourceUri, long? offset, long? count, Checksum sourceContentChecksum, int? timeout, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials, BlobRequestOptions options)
<<<<<<<
request.AddOptionalHeader(Constants.HeaderConstants.SourceContentMD5Header, sourceContentMd5);
BlobRequest.ApplyCustomerProvidedKey(request, options, isSource: false);
=======
request.ApplySourceContentChecksumHeaders(sourceContentChecksum);
>>>>>>>
BlobRequest.ApplyCustomerProvidedKey(request, options, isSource: false);
request.ApplySourceContentChecksumHeaders(sourceContentChecksum);
<<<<<<<
public static StorageRequestMessage PutBlock(Uri uri, Uri sourceUri, long? offset, long? count, string sourceContentMd5, int? timeout, string blockId,
AccessCondition accessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials, BlobRequestOptions options)
=======
public static StorageRequestMessage PutBlock(Uri uri, Uri sourceUri, long? offset, long? count, Checksum sourceContentChecksum, int? timeout, string blockId, AccessCondition accessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
>>>>>>>
public static StorageRequestMessage PutBlock(Uri uri, Uri sourceUri, long? offset, long? count, Checksum sourceContentChecksum, int? timeout, string blockId, AccessCondition accessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials, BlobRequestOptions options)
<<<<<<<
public static StorageRequestMessage PutPage(Uri uri, Uri sourceUri, long? offset, long? count, string sourceContentMd5, int? timeout, PageRange pageRange,
AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials, BlobRequestOptions options)
=======
public static StorageRequestMessage PutPage(Uri uri, Uri sourceUri, long? offset, long? count, Checksum sourceContentChecksum, int? timeout, PageRange pageRange, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
>>>>>>>
public static StorageRequestMessage PutPage(Uri uri, Uri sourceUri, long? offset, long? count, Checksum sourceContentChecksum, int? timeout, PageRange pageRange, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials, BlobRequestOptions options)
<<<<<<<
internal static StorageRequestMessage CopyFrom(Uri uri, int? timeout, Uri source, string sourceContentMd5, bool incrementalCopy, bool syncCopy, PremiumPageBlobTier? premiumPageBlobTier, StandardBlobTier? standardBlockBlobTier, RehydratePriority? rehydratePriority, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
=======
public static StorageRequestMessage CopyFrom(Uri uri, int? timeout, Uri source, Checksum sourceContentChecksum, bool incrementalCopy, bool syncCopy, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
>>>>>>>
public static StorageRequestMessage CopyFrom(Uri uri, int? timeout, Uri source, Checksum sourceContentChecksum, bool incrementalCopy, bool syncCopy, PremiumPageBlobTier? premiumPageBlobTier, StandardBlobTier? standardBlockBlobTier, RehydratePriority? rehydratePriority, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
<<<<<<<
public static StorageRequestMessage Get(Uri uri, int? timeout, DateTimeOffset? snapshot, long? offset, long? count, bool rangeContentMD5, AccessCondition accessCondition,
HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials, BlobRequestOptions options)
=======
public static StorageRequestMessage Get(Uri uri, int? timeout, DateTimeOffset? snapshot, long? offset, long? count, ChecksumRequested rangeContentChecksumRequested, AccessCondition accessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
>>>>>>>
public static StorageRequestMessage Get(Uri uri, int? timeout, DateTimeOffset? snapshot, long? offset, long? count, ChecksumRequested rangeContentChecksumRequested, AccessCondition accessCondition, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials, BlobRequestOptions options) |
<<<<<<<
public string Text
{
get { return ""; }
set { ; }
}
=======
public Color TextColor
{
get { return Control.Foreground.ToEtoColor(); }
set { Control.Foreground = value.ToWpfBrush(Control.Foreground); }
}
>>>>>>>
public string Text
{
get { return ""; }
set { ; }
}
public Color TextColor
{
get { return Control.Foreground.ToEtoColor(); }
set { Control.Foreground = value.ToWpfBrush(Control.Foreground); }
} |
<<<<<<<
/// Header that specifies file permission.
/// </summary>
public const string FilePermission = PrefixForStorageHeader + "file-permission";
/// <summary>
/// Default header value for file permission.
/// </summary>
public const string FilePermissionInherit = "Inherit";
/// <summary>
/// Header that specifies file permission key.
/// </summary>
public const string FilePermissionKey = PrefixForStorageHeader + "file-permission-key";
/// <summary>
/// Header that specifies file attributes.
/// </summary>
public const string FileAttributes = PrefixForStorageHeader + "file-attributes";
/// <summary>
/// Default file attribute value for files.
/// </summary>
public const string FileAttributesNone = "None";
/// <summary>
/// Header that specifies file creation time.
/// </summary>
public const string FileCreationTime = PrefixForStorageHeader + "file-creation-time";
/// <summary>
/// Header that specifies file last write time.
/// </summary>
public const string FileLastWriteTime = PrefixForStorageHeader + "file-last-write-time";
/// <summary>
/// Header that specifies file change time.
/// </summary>
public const string FileChangeTime = PrefixForStorageHeader + "file-change-time";
/// <summary>
/// Default file creation and file last write time.
/// </summary>
public const string FileTimeNow = "Now";
/// <summary>
/// Default value for several SMB file headers.
/// </summary>
public const string Preserve = "Preserve";
/// <summary>
/// Header that specifies file id.
/// </summary>
public const string FileId = PrefixForStorageHeader + "file-id";
/// <summary>
/// Header that spcifies file parent id.
/// </summary>
public const string FileParentId = PrefixForStorageHeader + "file-parent-id";
/// <summary>
=======
/// Header for the blob rehydration priority.
/// </summary>
public const string RehydratePriorityHeader = PrefixForStorageHeader + "rehydrate-priority";
/// <summary>
>>>>>>>
/// Header that specifies file permission.
/// </summary>
public const string FilePermission = PrefixForStorageHeader + "file-permission";
/// <summary>
/// Default header value for file permission.
/// </summary>
public const string FilePermissionInherit = "Inherit";
/// <summary>
/// Header that specifies file permission key.
/// </summary>
public const string FilePermissionKey = PrefixForStorageHeader + "file-permission-key";
/// <summary>
/// Header that specifies file attributes.
/// </summary>
public const string FileAttributes = PrefixForStorageHeader + "file-attributes";
/// <summary>
/// Default file attribute value for files.
/// </summary>
public const string FileAttributesNone = "None";
/// <summary>
/// Header that specifies file creation time.
/// </summary>
public const string FileCreationTime = PrefixForStorageHeader + "file-creation-time";
/// <summary>
/// Header that specifies file last write time.
/// </summary>
public const string FileLastWriteTime = PrefixForStorageHeader + "file-last-write-time";
/// <summary>
/// Header that specifies file change time.
/// </summary>
public const string FileChangeTime = PrefixForStorageHeader + "file-change-time";
/// <summary>
/// Default file creation and file last write time.
/// </summary>
public const string FileTimeNow = "Now";
/// <summary>
/// Default value for several SMB file headers.
/// </summary>
public const string Preserve = "Preserve";
/// <summary>
/// Header that specifies file id.
/// </summary>
public const string FileId = PrefixForStorageHeader + "file-id";
/// <summary>
/// Header that spcifies file parent id.
/// </summary>
public const string FileParentId = PrefixForStorageHeader + "file-parent-id";
/// Header for the blob rehydration priority.
/// </summary>
public const string RehydratePriorityHeader = PrefixForStorageHeader + "rehydrate-priority";
/// <summary> |
<<<<<<<
return this.StartCopy(source, default(string) /* contentMD5 */, false /* syncCopy */, standardBlockBlobTier, rehydratePriority, sourceAccessCondition, destAccessCondition, options, operationContext);
=======
return this.StartCopy(source, Checksum.None, false /* syncCopy */, sourceAccessCondition, destAccessCondition, options, operationContext);
>>>>>>>
return this.StartCopy(source, Checksum.None, false /* syncCopy */, standardBlockBlobTier, rehydratePriority, sourceAccessCondition, destAccessCondition, options, operationContext);
<<<<<<<
private Task<string> StartCopyAsync(CloudBlockBlob source, string contentMD5, bool incrementalCopy, bool syncCopy, StandardBlobTier? standardBlockBlobTier, RehydratePriority? rehydratePriority, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
=======
private Task<string> StartCopyAsync(CloudBlockBlob source, Checksum contentChecksum, bool incrementalCopy, bool syncCopy, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
>>>>>>>
private Task<string> StartCopyAsync(CloudBlockBlob source, Checksum contentChecksum, bool incrementalCopy, bool syncCopy, StandardBlobTier? standardBlockBlobTier, RehydratePriority? rehydratePriority, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
<<<<<<<
this.StartCopyImpl(this.attributes, CloudBlob.SourceBlobToUri(source), contentMD5, incrementalCopy, syncCopy, default(PremiumPageBlobTier?), standardBlockBlobTier, rehydratePriority, sourceAccessCondition, destAccessCondition, modifiedOptions),
=======
this.StartCopyImpl(this.attributes, CloudBlob.SourceBlobToUri(source), contentChecksum, incrementalCopy, syncCopy, default(PremiumPageBlobTier?), sourceAccessCondition, destAccessCondition, modifiedOptions),
>>>>>>>
this.StartCopyImpl(this.attributes, CloudBlob.SourceBlobToUri(source), contentChecksum, incrementalCopy, syncCopy, default(PremiumPageBlobTier?), standardBlockBlobTier, rehydratePriority, sourceAccessCondition, destAccessCondition, modifiedOptions),
<<<<<<<
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(source, offset, length, contentMD5, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutBlock(uri, serverTimeout, blockId, accessCondition, cnt, ctx,
this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
=======
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(source, offset, length, contentChecksum, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) => BlobHttpRequestMessageFactory.PutBlock(uri, serverTimeout, blockId, accessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials);
>>>>>>>
putCmd.BuildContent = (cmd, ctx) => HttpContentFactory.BuildContentFromStream(source, offset, length, contentChecksum, cmd, ctx);
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutBlock(uri, serverTimeout, blockId, accessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
<<<<<<<
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutBlock(uri, sourceUri, offset, count, contentMD5, serverTimeout, blockId, accessCondition, cnt, ctx,
this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
};
=======
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) => BlobHttpRequestMessageFactory.PutBlock(uri, sourceUri, offset, count, contentChecksum, serverTimeout, blockId, accessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials);
>>>>>>>
putCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) =>
{
BlobRequest.VerifyHttpsCustomerProvidedKey(uri, options);
return BlobHttpRequestMessageFactory.PutBlock(uri, sourceUri, offset, count, contentChecksum, serverTimeout, blockId, accessCondition, cnt, ctx, this.ServiceClient.GetCanonicalizer(), this.ServiceClient.Credentials, options);
}; |
<<<<<<<
// Provided as a means of wrapping a WinForms control
public static T Create<T>(
object o)
where T:Control, new()
{
var r =
new T();
r.SetControl(o);
return r;
}
public void SetControl(object control)
{
Handler.SetControl(control);
}
=======
/// <summary>
/// Initializes a new instance of the Container with the specified handler
/// </summary>
/// <param name="generator">Generator for the widget</param>
/// <param name="handler">Pre-created handler to attach to this instance</param>
/// <param name="initialize">True to call handler's Initialze method, false otherwise</param>
protected Control (Generator generator, IControl handler, bool initialize = true)
: base (generator, handler, initialize)
{
}
>>>>>>>
/// <summary>
/// Initializes a new instance of the Container with the specified handler
/// </summary>
/// <param name="generator">Generator for the widget</param>
/// <param name="handler">Pre-created handler to attach to this instance</param>
/// <param name="initialize">True to call handler's Initialze method, false otherwise</param>
protected Control (Generator generator, IControl handler, bool initialize = true)
: base (generator, handler, initialize)
{
}
// Provided as a means of wrapping a WinForms control
public static T Create<T>(
object o)
where T:Control, new()
{
var r =
new T();
r.SetControl(o);
return r;
}
public void SetControl(object control)
{
Handler.SetControl(control);
} |
<<<<<<<
public swf.IWin32Window Win32Window
{
get { return Control; }
}
public override object ContainerObject
=======
public override swf.Control ContentContainer
>>>>>>>
public swf.IWin32Window Win32Window
{
get { return Control; }
}
public override swf.Control ContentContainer |
<<<<<<<
=======
public static Padding Convert(SWF.Padding padding)
{
return new Padding(padding.Left, padding.Top, padding.Right, padding.Bottom);
}
public static SWF.Padding Convert(Padding padding)
{
return new SWF.Padding(padding.Left, padding.Top, padding.Right, padding.Bottom);
}
public static Color Convert(SD.Color color)
{
return new Color(color.R / 255f, color.G / 255f, color.B / 255f);
}
public static SD.Color Convert(Color color)
{
return SD.Color.FromArgb((byte)(color.R * 255), (byte)(color.G * 255), (byte)(color.B * 255));
}
public static Size Convert(SD.Size size)
{
return new Size(size.Width, size.Height);
}
public static SD.Size Convert(Size size)
{
return new SD.Size(size.Width, size.Height);
}
public static Size ConvertF (SD.SizeF size)
{
return new Size ((int)size.Width, (int)size.Height);
}
public static SizeF Convert(SD.SizeF size)
{
return new SizeF(size.Width, size.Height);
}
public static SD.SizeF Convert(SizeF size)
{
return new SD.SizeF(size.Width, size.Height);
}
public static Point Convert(SD.Point point)
{
return new Point(point.X, point.Y);
}
public static SD.Point Convert(Point point)
{
return new SD.Point(point.X, point.Y);
}
public static Rectangle Convert(SD.Rectangle rect)
{
return new Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
}
public static SD.Rectangle Convert(Rectangle rect)
{
return new SD.Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
}
public static DialogResult Convert(SWF.DialogResult result)
{
DialogResult ret = DialogResult.None;
if (result == SWF.DialogResult.OK) ret = DialogResult.Ok;
else if (result == SWF.DialogResult.Cancel) ret = DialogResult.Cancel;
else if (result == SWF.DialogResult.Yes) ret = DialogResult.Yes;
else if (result == SWF.DialogResult.No) ret = DialogResult.No;
else if (result == SWF.DialogResult.Abort) ret = DialogResult.Cancel;
else if (result == SWF.DialogResult.Ignore) ret = DialogResult.Ignore;
else if (result == SWF.DialogResult.Retry) ret = DialogResult.Retry;
else if (result == SWF.DialogResult.None) ret = DialogResult.None;
return ret;
}
public static SD.Imaging.ImageFormat Convert(ImageFormat format)
{
switch (format)
{
case ImageFormat.Jpeg: return SD.Imaging.ImageFormat.Jpeg;
case ImageFormat.Bitmap: return SD.Imaging.ImageFormat.Bmp;
case ImageFormat.Gif: return SD.Imaging.ImageFormat.Gif;
case ImageFormat.Tiff: return SD.Imaging.ImageFormat.Tiff;
case ImageFormat.Png: return SD.Imaging.ImageFormat.Png;
default: throw new Exception("Invalid format specified");
}
}
public static ImageInterpolation Convert (SD.Drawing2D.InterpolationMode value)
{
switch (value) {
case SD.Drawing2D.InterpolationMode.NearestNeighbor:
return ImageInterpolation.None;
case SD.Drawing2D.InterpolationMode.Low:
return ImageInterpolation.Low;
case SD.Drawing2D.InterpolationMode.High:
return ImageInterpolation.Medium;
case SD.Drawing2D.InterpolationMode.HighQualityBilinear:
return ImageInterpolation.High;
case SD.Drawing2D.InterpolationMode.Default:
return ImageInterpolation.Default;
case SD.Drawing2D.InterpolationMode.HighQualityBicubic:
case SD.Drawing2D.InterpolationMode.Bicubic:
case SD.Drawing2D.InterpolationMode.Bilinear:
default:
throw new NotSupportedException();
}
}
public static SD.Drawing2D.InterpolationMode Convert (ImageInterpolation value)
{
switch (value) {
case ImageInterpolation.Default:
return SD.Drawing2D.InterpolationMode.Default;
case ImageInterpolation.None:
return SD.Drawing2D.InterpolationMode.NearestNeighbor;
case ImageInterpolation.Low:
return SD.Drawing2D.InterpolationMode.Low;
case ImageInterpolation.Medium:
return SD.Drawing2D.InterpolationMode.High;
case ImageInterpolation.High:
return SD.Drawing2D.InterpolationMode.HighQualityBilinear;
default:
throw new NotSupportedException();
}
}
public static FontStyle Convert (SD.FontStyle style)
{
var ret = FontStyle.Normal;
if (style.HasFlag(SD.FontStyle.Bold)) ret |= FontStyle.Bold;
if (style.HasFlag(SD.FontStyle.Italic)) ret |= FontStyle.Italic;
return ret;
}
public static SD.FontStyle Convert (FontStyle style)
{
var ret = SD.FontStyle.Regular;
if (style.HasFlag (FontStyle.Bold)) ret |= SD.FontStyle.Bold;
if (style.HasFlag (FontStyle.Italic)) ret |= SD.FontStyle.Italic;
return ret;
}
>>>>>>>
public static FontStyle Convert (SD.FontStyle style)
{
var ret = FontStyle.Normal;
if (style.HasFlag(SD.FontStyle.Bold)) ret |= FontStyle.Bold;
if (style.HasFlag(SD.FontStyle.Italic)) ret |= FontStyle.Italic;
return ret;
}
public static SD.FontStyle Convert (FontStyle style)
{
var ret = SD.FontStyle.Regular;
if (style.HasFlag (FontStyle.Bold)) ret |= SD.FontStyle.Bold;
if (style.HasFlag (FontStyle.Italic)) ret |= SD.FontStyle.Italic;
return ret;
} |
<<<<<<<
#region IImage Members
public int Width
{
get { return 0;/* TODO */ }
}
public int Height
{
get { return 0;/* TODO */ }
}
#endregion
}
=======
public override void DrawImage (GraphicsHandler graphics, RectangleF source, RectangleF destination)
{
var nsimage = this.Control;
var sourceRect = graphics.Translate (source.ToSD (), nsimage.Size.Height);
var destRect = graphics.TranslateView (destination.ToSD (), false);
nsimage.Draw (destRect, sourceRect, NSCompositingOperation.Copy, 1);
}
}
>>>>>>>
public override void DrawImage (GraphicsHandler graphics, RectangleF source, RectangleF destination)
{
var nsimage = this.Control;
var sourceRect = graphics.Translate (source.ToSD (), nsimage.Size.Height);
var destRect = graphics.TranslateView (destination.ToSD (), false);
nsimage.Draw (destRect, sourceRect, NSCompositingOperation.Copy, 1);
}
#region IImage Members
public int Width
{
get { return 0;/* TODO */ }
}
public int Height
{
get { return 0;/* TODO */ }
}
#endregion
} |
<<<<<<<
public string Text
{
get
{
return editable ? Control.Text : "";
}
set
{
if (editable && value != null)
{
Control.Text = value;
}
}
}
=======
public override Color BackgroundColor
{
get
{
var border = Control.FindChild<swc.Border>();
return border != null ? border.Background.ToEtoColor() : base.BackgroundColor;
}
set
{
var border = Control.FindChild<swc.Border>();
if (border != null)
{
border.Background = value.ToWpfBrush(border.Background);
}
}
}
public override Color TextColor
{
get
{
var block = Control.FindChild<swc.TextBlock>();
return block != null ? block.Foreground.ToEtoColor() : base.TextColor;
}
set
{
var block = Control.FindChild<swc.TextBlock>();
if (block != null)
block.Foreground = value.ToWpfBrush();
else
base.TextColor = value;
}
}
void CreateTemplate()
{
var template = new sw.DataTemplate();
template.VisualTree = new WpfTextBindingBlock(() => Widget.TextBinding, setMargin: false);
Control.ItemTemplate = template;
}
>>>>>>>
public string Text
{
get
{
return editable ? Control.Text : "";
}
set
{
if (editable && value != null)
{
Control.Text = value;
}
}
}
public override Color BackgroundColor
{
get
{
var border = Control.FindChild<swc.Border>();
return border != null ? border.Background.ToEtoColor() : base.BackgroundColor;
}
set
{
var border = Control.FindChild<swc.Border>();
if (border != null)
{
border.Background = value.ToWpfBrush(border.Background);
}
}
}
public override Color TextColor
{
get
{
var block = Control.FindChild<swc.TextBlock>();
return block != null ? block.Foreground.ToEtoColor() : base.TextColor;
}
set
{
var block = Control.FindChild<swc.TextBlock>();
if (block != null)
block.Foreground = value.ToWpfBrush();
else
base.TextColor = value;
}
}
void CreateTemplate()
{
var template = new sw.DataTemplate();
template.VisualTree = new WpfTextBindingBlock(() => Widget.TextBinding, setMargin: false);
Control.ItemTemplate = template;
} |
<<<<<<<
#endregion
#region IControl implementation
public Eto.Drawing.Point ScreenToWorld (Eto.Drawing.Point p)
{
throw new NotImplementedException ();
}
public Eto.Drawing.Point WorldToScreen (Eto.Drawing.Point p)
{
throw new NotImplementedException ();
}
public DragDropEffects DoDragDrop (object data, DragDropEffects allowedEffects)
{
throw new NotImplementedException ();
}
public void SetControl (object control)
{
throw new NotImplementedException ();
}
#endregion
#region IForm implementation
public Eto.Drawing.Color TransparencyKey {
get;
set;
}
public bool KeyPreview {
get;
set;
}
#endregion
=======
>>>>>>>
#region IControl implementation
public Eto.Drawing.Point ScreenToWorld (Eto.Drawing.Point p)
{
throw new NotImplementedException ();
}
public Eto.Drawing.Point WorldToScreen (Eto.Drawing.Point p)
{
throw new NotImplementedException ();
}
public DragDropEffects DoDragDrop (object data, DragDropEffects allowedEffects)
{
throw new NotImplementedException ();
}
public void SetControl (object control)
{
throw new NotImplementedException ();
}
#endregion
#region IForm implementation
public Eto.Drawing.Color TransparencyKey {
get;
set;
}
public bool KeyPreview {
get;
set;
}
#endregion |
<<<<<<<
public static void BlitTexture(CommandBuffer cmd, RTHandleSystem.RTHandle source, RTHandleSystem.RTHandle destination, Vector4 scaleBias, float mipLevel, bool bilinear)
=======
public static void BlitQuad(CommandBuffer cmd, Texture source, Vector4 scaleBiasTex, Vector4 scaleBiasRT, int mipLevelTex, bool bilinear)
{
s_PropertyBlock.SetTexture(HDShaderIDs._BlitTexture, source);
s_PropertyBlock.SetVector(HDShaderIDs._BlitScaleBias, scaleBiasTex);
s_PropertyBlock.SetVector(HDShaderIDs._BlitScaleBiasRt, scaleBiasRT);
s_PropertyBlock.SetFloat(HDShaderIDs._BlitMipLevel, mipLevelTex);
cmd.DrawProcedural(Matrix4x4.identity, GetBlitMaterial(), bilinear ? 2 : 3, MeshTopology.Quads, 4, 1, s_PropertyBlock);
}
public static void BlitTexture(CommandBuffer cmd, RTHandle source, RTHandle destination, Vector4 scaleBias, float mipLevel, bool bilinear)
>>>>>>>
public static void BlitQuad(CommandBuffer cmd, Texture source, Vector4 scaleBiasTex, Vector4 scaleBiasRT, int mipLevelTex, bool bilinear)
{
s_PropertyBlock.SetTexture(HDShaderIDs._BlitTexture, source);
s_PropertyBlock.SetVector(HDShaderIDs._BlitScaleBias, scaleBiasTex);
s_PropertyBlock.SetVector(HDShaderIDs._BlitScaleBiasRt, scaleBiasRT);
s_PropertyBlock.SetFloat(HDShaderIDs._BlitMipLevel, mipLevelTex);
cmd.DrawProcedural(Matrix4x4.identity, GetBlitMaterial(), bilinear ? 2 : 3, MeshTopology.Quads, 4, 1, s_PropertyBlock);
}
public static void BlitTexture(CommandBuffer cmd, RTHandleSystem.RTHandle source, RTHandleSystem.RTHandle destination, Vector4 scaleBias, float mipLevel, bool bilinear) |
<<<<<<<
g.Add <IButton> (() => new ButtonHandler ());
g.Add <ICheckBox> (() => new CheckBoxHandler ());
g.Add <IComboBox> (() => new ComboBoxHandler ());
g.Add <IDateTimePicker> (() => new DateTimePickerHandler ());
g.Add <IDrawable> (() => new DrawableHandler ());
g.Add <IGridColumn> (() => new GridColumnHandler ());
g.Add <IGridView> (() => new GridViewHandler ());
g.Add <IGroupBox> (() => new GroupBoxHandler ());
g.Add <IImageView> (() => new ImageViewHandler ());
g.Add <ILabel> (() => new LabelHandler ());
g.Add <IListBox> (() => new ListBoxHandler ());
g.Add <INumericUpDown> (() => new NumericUpDownHandler ());
g.Add <IPanel> (() => new PanelHandler ());
g.Add <IPasswordBox> (() => new PasswordBoxHandler ());
g.Add <IProgressBar> (() => new ProgressBarHandler ());
g.Add <IRadioButton> (() => new RadioButtonHandler ());
g.Add <IScrollable> (() => new ScrollableHandler ());
g.Add <ISlider> (() => new SliderHandler ());
g.Add <ISplitter> (() => new SplitterHandler ());
g.Add <ITabControl> (() => new TabControlHandler ());
g.Add <ITabPage> (() => new TabPageHandler ());
g.Add <ITextArea> (() => new TextAreaHandler ());
g.Add <ITextBox> (() => new TextBoxHandler ());
g.Add <ITreeGridView> (() => new TreeGridViewHandler ());
g.Add <ITreeView> (() => new TreeViewHandler ());
//g.Add <IWebView> (() => new WebViewHandler ());
=======
Add <IButton> (() => new ButtonHandler ());
Add <ICheckBox> (() => new CheckBoxHandler ());
Add <IComboBox> (() => new ComboBoxHandler ());
Add <IDateTimePicker> (() => new DateTimePickerHandler ());
Add <IDrawable> (() => new DrawableHandler ());
Add <IGridColumn> (() => new GridColumnHandler ());
Add <IGridView> (() => new GridViewHandler ());
Add <IGroupBox> (() => new GroupBoxHandler ());
Add <IImageView> (() => new ImageViewHandler ());
Add <ILabel> (() => new LabelHandler ());
Add <IListBox> (() => new ListBoxHandler ());
Add <INumericUpDown> (() => new NumericUpDownHandler ());
Add <IPanel> (() => new PanelHandler ());
Add <IPasswordBox> (() => new PasswordBoxHandler ());
Add <IProgressBar> (() => new ProgressBarHandler ());
Add <IRadioButton> (() => new RadioButtonHandler ());
Add <IScrollable> (() => new ScrollableHandler ());
Add <ISlider> (() => new SliderHandler ());
Add <ISplitter> (() => new SplitterHandler ());
Add <ITabControl> (() => new TabControlHandler ());
Add <ITabPage> (() => new TabPageHandler ());
Add <ITextArea> (() => new TextAreaHandler ());
Add <ITextBox> (() => new TextBoxHandler ());
Add <ITreeGridView> (() => new TreeGridViewHandler ());
Add <ITreeView> (() => new TreeViewHandler ());
//Add <IWebView> (() => new WebViewHandler ());
Add <IScreens> (() => new ScreensHandler ());
>>>>>>>
g.Add <IButton> (() => new ButtonHandler ());
g.Add <ICheckBox> (() => new CheckBoxHandler ());
g.Add <IComboBox> (() => new ComboBoxHandler ());
g.Add <IDateTimePicker> (() => new DateTimePickerHandler ());
g.Add <IDrawable> (() => new DrawableHandler ());
g.Add <IGridColumn> (() => new GridColumnHandler ());
g.Add <IGridView> (() => new GridViewHandler ());
g.Add <IGroupBox> (() => new GroupBoxHandler ());
g.Add <IImageView> (() => new ImageViewHandler ());
g.Add <ILabel> (() => new LabelHandler ());
g.Add <IListBox> (() => new ListBoxHandler ());
g.Add <INumericUpDown> (() => new NumericUpDownHandler ());
g.Add <IPanel> (() => new PanelHandler ());
g.Add <IPasswordBox> (() => new PasswordBoxHandler ());
g.Add <IProgressBar> (() => new ProgressBarHandler ());
g.Add <IRadioButton> (() => new RadioButtonHandler ());
g.Add <IScrollable> (() => new ScrollableHandler ());
g.Add <ISlider> (() => new SliderHandler ());
g.Add <ISplitter> (() => new SplitterHandler ());
g.Add <ITabControl> (() => new TabControlHandler ());
g.Add <ITabPage> (() => new TabPageHandler ());
g.Add <ITextArea> (() => new TextAreaHandler ());
g.Add <ITextBox> (() => new TextBoxHandler ());
g.Add <ITreeGridView> (() => new TreeGridViewHandler ());
g.Add <ITreeView> (() => new TreeViewHandler ());
//g.Add <IWebView> (() => new WebViewHandler ());
g.Add <IScreens> (() => new ScreensHandler ()); |
<<<<<<<
using System;
using System.IO;
using Eto.Drawing;
using MonoTouch.UIKit;
namespace Eto.Platform.iOS.Drawing
{
interface IImageHandler
{
void DrawImage (GraphicsHandler graphics, int x, int y);
void DrawImage (GraphicsHandler graphics, int x, int y, int width, int height);
void DrawImage (GraphicsHandler graphics, Rectangle source, Rectangle destination);
UIImage GetUIImage ();
}
public static class ImageExtensions
{
public static UIImage ToUIImage (this Image image)
{
if (image == null)
return null;
var handler = image.Handler as IImageHandler;
if (handler != null)
return handler.GetUIImage ();
else
return null;
}
}
public abstract class ImageHandler<T, W> : WidgetHandler<T, W>, IImage, IImageHandler
where T: class
where W: Image
{
public abstract Size Size { get; }
public virtual void DrawImage (GraphicsHandler graphics, int x, int y)
{
DrawImage (graphics, x, y, Size.Width, Size.Height);
}
public virtual void DrawImage (GraphicsHandler graphics, int x, int y, int width, int height)
{
DrawImage (graphics, new Rectangle (new Point (0, 0), Size), new Rectangle (x, y, width, height));
}
public abstract void DrawImage (GraphicsHandler graphics, Rectangle source, Rectangle destination);
public abstract UIImage GetUIImage ();
public int Width
{
get { return 0;/* TODO */ }
}
public int Height
{
get { return 0;/* TODO */ }
}
}
}
=======
using System;
using System.IO;
using Eto.Drawing;
using MonoTouch.UIKit;
namespace Eto.Platform.iOS.Drawing
{
interface IImageHandler
{
void DrawImage (GraphicsHandler graphics, float x, float y);
void DrawImage (GraphicsHandler graphics, float x, float y, float width, float height);
void DrawImage (GraphicsHandler graphics, RectangleF source, RectangleF destination);
UIImage GetUIImage ();
}
public static class ImageExtensions
{
public static UIImage ToUIImage (this Image image)
{
if (image == null)
return null;
var handler = image.Handler as IImageHandler;
if (handler != null)
return handler.GetUIImage ();
else
return null;
}
}
public abstract class ImageHandler<T, W> : WidgetHandler<T, W>, IImage, IImageHandler
where T: class
where W: Image
{
public abstract Size Size { get; }
public virtual void DrawImage (GraphicsHandler graphics, float x, float y)
{
DrawImage (graphics, x, y, Size.Width, Size.Height);
}
public virtual void DrawImage (GraphicsHandler graphics, float x, float y, float width, float height)
{
DrawImage (graphics, new RectangleF (Size), new RectangleF (x, y, width, height));
}
public abstract void DrawImage (GraphicsHandler graphics, RectangleF source, RectangleF destination);
public abstract UIImage GetUIImage ();
}
}
>>>>>>>
using System;
using System.IO;
using Eto.Drawing;
using MonoTouch.UIKit;
namespace Eto.Platform.iOS.Drawing
{
interface IImageHandler
{
void DrawImage (GraphicsHandler graphics, float x, float y);
void DrawImage (GraphicsHandler graphics, float x, float y, float width, float height);
void DrawImage (GraphicsHandler graphics, RectangleF source, RectangleF destination);
UIImage GetUIImage ();
}
public static class ImageExtensions
{
public static UIImage ToUIImage (this Image image)
{
if (image == null)
return null;
var handler = image.Handler as IImageHandler;
if (handler != null)
return handler.GetUIImage ();
else
return null;
}
}
public abstract class ImageHandler<T, W> : WidgetHandler<T, W>, IImage, IImageHandler
where T: class
where W: Image
{
public abstract Size Size { get; }
public virtual void DrawImage (GraphicsHandler graphics, float x, float y)
{
DrawImage (graphics, x, y, Size.Width, Size.Height);
}
public virtual void DrawImage (GraphicsHandler graphics, float x, float y, float width, float height)
{
DrawImage (graphics, new RectangleF (Size), new RectangleF (x, y, width, height));
}
public abstract void DrawImage (GraphicsHandler graphics, RectangleF source, RectangleF destination);
public abstract UIImage GetUIImage ();
public int Width
{
get { return 0;/* TODO */ }
}
public int Height
{
get { return 0;/* TODO */ }
}
}
} |
<<<<<<<
public static Point GetLocation (NSView view, NSEvent theEvent)
{
var loc = view.ConvertPointFromView (theEvent.LocationInWindow, null);
if (!view.IsFlipped)
loc.Y = view.Frame.Height - loc.Y;
return Generator.ConvertF (loc);
}
public override IDisposable ThreadStart ()
{
return new NSAutoreleasePool ();
}
public static System.Drawing.Size Convert (Size size)
{
return new System.Drawing.Size (size.Width, size.Height);
}
public static Size Convert (System.Drawing.Size size)
{
return new Size (size.Width, size.Height);
}
public static RectangleF Convert(System.Drawing.RectangleF rect)
{
return new RectangleF(rect.X, rect.Y, rect.Width, rect.Height);
}
public static System.Drawing.Point Convert (Point point)
{
return new System.Drawing.Point (point.X, point.Y);
}
public static Point Convert (System.Drawing.Point point)
{
return new Point (point.X, point.Y);
}
public static System.Drawing.SizeF ConvertF (Size size)
{
return new System.Drawing.SizeF (size.Width, size.Height);
}
public static Size ConvertF (System.Drawing.SizeF size)
{
return new Size ((int)size.Width, (int)size.Height);
}
public static System.Drawing.RectangleF ConvertF (System.Drawing.RectangleF frame, Size size)
{
frame.Size = ConvertF (size);
return frame;
}
public static Rectangle ConvertF (System.Drawing.RectangleF rect)
{
return new Rectangle ((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height);
}
public static System.Drawing.RectangleF ConvertF (Rectangle rect)
{
return new System.Drawing.RectangleF ((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height);
}
public static System.Drawing.RectangleF Convert(RectangleF rect)
{
return new System.Drawing.RectangleF(rect.X, rect.Y, rect.Width, rect.Height);
}
public static Point ConvertF (System.Drawing.PointF point)
{
return new Point ((int)point.X, (int)point.Y);
}
public static System.Drawing.PointF ConvertF (Point point)
{
return new System.Drawing.PointF ((int)point.X, (int)point.Y);
}
public static System.Drawing.PointF Convert(PointF point)
{
return new System.Drawing.PointF(point.X, point.Y);
}
public static PointF Convert(System.Drawing.PointF point)
{
return new PointF(point.X, point.Y);
}
public static NSRange Convert (Range range)
{
return new NSRange(range.Location, range.Length);
}
public static Range Convert (NSRange range)
{
return new Range (range.Location, range.Length);
}
=======
>>>>>>>
<<<<<<<
switch (value) {
case CGInterpolationQuality.Default:
return ImageInterpolation.Default;
case CGInterpolationQuality.None:
return ImageInterpolation.None;
case CGInterpolationQuality.Low:
return ImageInterpolation.Low;
case CGInterpolationQuality.Medium:
return ImageInterpolation.Medium;
case CGInterpolationQuality.High:
return ImageInterpolation.High;
default:
throw new NotSupportedException();
}
}
internal static Matrix Convert(
CGAffineTransform t)
{
return new Matrix(
t.xx,
t.yx,
t.xy,
t.yy,
t.x0,
t.y0);
}
internal static SD.PointF[] Convert(PointF[] points)
{
var result =
new SD.PointF[points.Length];
for (var i = 0;
i < points.Length;
++i)
{
var p = points[i];
result[i] =
new SD.PointF(p.X, p.Y);
}
return result;
}
internal static CGAffineTransform Convert(
Matrix m)
{
var e = m.Elements;
return new CGAffineTransform(
e[0],
e[1],
e[2],
e[3],
e[4],
e[5]);
}
}
=======
return new NSAutoreleasePool ();
}
}
>>>>>>>
return new NSAutoreleasePool ();
}
public static RectangleF Convert(System.Drawing.RectangleF rect)
{
return new RectangleF(rect.X, rect.Y, rect.Width, rect.Height);
}
public static System.Drawing.RectangleF Convert(RectangleF rect)
{
return new System.Drawing.RectangleF(rect.X, rect.Y, rect.Width, rect.Height);
}
public static System.Drawing.PointF Convert(PointF point)
{
return new System.Drawing.PointF(point.X, point.Y);
}
public static PointF Convert(System.Drawing.PointF point)
{
return new PointF(point.X, point.Y);
}
internal static Matrix Convert(
CGAffineTransform t)
{
return new Matrix(
t.xx,
t.yx,
t.xy,
t.yy,
t.x0,
t.y0);
}
internal static SD.PointF[] Convert(PointF[] points)
{
var result =
new SD.PointF[points.Length];
for (var i = 0;
i < points.Length;
++i)
{
var p = points[i];
result[i] =
new SD.PointF(p.X, p.Y);
}
return result;
}
internal static CGAffineTransform Convert(
Matrix m)
{
var e = m.Elements;
return new CGAffineTransform(
e[0],
e[1],
e[2],
e[3],
e[4],
e[5]);
}
} |
<<<<<<<
using SD = System.Drawing;
=======
using Eto.Platform.Mac.Forms.Controls;
using Eto.Platform.Mac.Forms.Printing;
using Eto.Platform.Mac.Forms;
using Eto.Platform.Mac.Forms.Menu;
>>>>>>>
using SD = System.Drawing;
using Eto.Platform.Mac.Forms.Controls;
using Eto.Platform.Mac.Forms.Printing;
using Eto.Platform.Mac.Forms;
using Eto.Platform.Mac.Forms.Menu; |
<<<<<<<
public static Generator Current
{
get
{
if (current == null)
throw new ApplicationException("Generator has not been initialized");
return current;
}
}
public static void Initialize(string assembly)
{
Initialize(GetGenerator(assembly));
}
=======
public static Generator Current
{
get
{
if (current == null)
throw new ApplicationException ("Generator has not been initialized");
return current;
}
}
>>>>>>>
public static Generator Current
{
get
{
if (current == null)
throw new ApplicationException("Generator has not been initialized");
return current;
}
}
public static void Initialize(string assembly)
{
Initialize(GetGenerator(assembly));
}
<<<<<<<
// A static dictionary of generator instances.
static Dictionary<Type, Generator> GeneratorInstances =
new Dictionary<Type, Generator>();
=======
>>>>>>>
// A static dictionary of generator instances.
static Dictionary<Type, Generator> GeneratorInstances =
new Dictionary<Type, Generator>();
<<<<<<<
try
{
Generator result = null;
if (!GeneratorInstances.TryGetValue(type, out result) ||
result == null)
{
result = (Generator)Activator.CreateInstance(type);
GeneratorInstances[type] = result;
}
return result;
}
catch (TargetInvocationException e)
{
=======
try {
return (Generator)Activator.CreateInstance (type);
} catch (TargetInvocationException e) {
>>>>>>>
try {
Generator result = null;
if (!GeneratorInstances.TryGetValue(type, out result) ||
result == null)
{
result = (Generator)Activator.CreateInstance(type);
GeneratorInstances[type] = result;
}
return result; |
<<<<<<<
public int GetCurrentShadowCount() { return m_ShadowsResult.shadowLights == null ? 0 : m_ShadowsResult.shadowLights.Length; }
ShadowRenderPass m_ShadowPass;
=======
// TODO: Find a way to automatically create/iterate through deferred material
// TODO TO CHECK: SebL I move allocation from Build() to here, but there was a comment "// Our object can be garbage collected, so need to be allocate here", it is still true ?
private readonly Lit.RenderLoop m_LitRenderLoop = new Lit.RenderLoop();
>>>>>>>
// TODO: Find a way to automatically create/iterate through deferred material
// TODO TO CHECK: SebL I move allocation from Build() to here, but there was a comment "// Our object can be garbage collected, so need to be allocate here", it is still true ?
private readonly Lit.RenderLoop m_LitRenderLoop = new Lit.RenderLoop();
<<<<<<<
Material m_DebugViewMaterialGBuffer;
Material m_DebugDisplayShadowMap;
=======
readonly Material m_DebugViewMaterialGBuffer;
readonly Material m_CombineSubsurfaceScattering;
>>>>>>>
readonly Material m_DebugViewMaterialGBuffer;
readonly Material m_CombineSubsurfaceScattering;
readonly Material m_DebugDisplayShadowMap;
<<<<<<<
Utilities.Destroy(m_DebugDisplayShadowMap);
=======
>>>>>>>
Utilities.Destroy(m_DebugDisplayShadowMap);
<<<<<<<
void NextOverlayCoord(ref float x, ref float y, float overlaySize, float width)
{
x += overlaySize;
// Go to next line if it goes outside the screen.
if (x + overlaySize > width)
{
x = 0;
y -= overlaySize;
}
}
void RenderDebugOverlay(Camera camera, ScriptableRenderContext renderContext)
{
CommandBuffer debugCB = new CommandBuffer();
debugCB.name = "Debug Overlay";
float x = 0;
float overlayRatio = globalDebugParameters.debugOverlayRatio;
float overlaySize = Math.Min(camera.pixelHeight, camera.pixelWidth) * overlayRatio;
float y = camera.pixelHeight - overlaySize;
MaterialPropertyBlock propertyBlock = new MaterialPropertyBlock();
ShadowDebugParameters shadowDebug = globalDebugParameters.shadowDebugParameters;
if (shadowDebug.visualizationMode != ShadowDebugMode.None)
{
if (shadowDebug.visualizationMode == ShadowDebugMode.VisualizeShadowMap)
{
ShadowLight shadowLight = m_ShadowsResult.shadowLights[shadowDebug.visualizeShadowMapIndex];
for (int slice = 0; slice < shadowLight.shadowSliceCount; ++slice)
{
ShadowSliceData sliceData = m_ShadowsResult.shadowSlices[shadowLight.shadowSliceIndex + slice];
Vector4 texcoordScaleBias = new Vector4((float)sliceData.shadowResolution / m_ShadowSettings.shadowAtlasWidth,
(float)sliceData.shadowResolution / m_ShadowSettings.shadowAtlasHeight,
(float)sliceData.atlasX / m_ShadowSettings.shadowAtlasWidth,
(float)sliceData.atlasY / m_ShadowSettings.shadowAtlasHeight);
propertyBlock.SetVector("_TextureScaleBias", texcoordScaleBias);
debugCB.SetViewport(new Rect(x, y, overlaySize, overlaySize));
debugCB.DrawProcedural(Matrix4x4.identity, m_DebugDisplayShadowMap, 0, MeshTopology.Triangles, 6, 1, propertyBlock);
NextOverlayCoord(ref x, ref y, overlaySize, camera.pixelWidth);
}
}
else if (shadowDebug.visualizationMode == ShadowDebugMode.VisualizeAtlas)
{
propertyBlock.SetVector("_TextureScaleBias", new Vector4(1.0f, 1.0f, 0.0f, 0.0f));
debugCB.SetViewport(new Rect(x, y, overlaySize, overlaySize));
debugCB.DrawProcedural(Matrix4x4.identity, m_DebugDisplayShadowMap, 0, MeshTopology.Triangles, 6, 1, propertyBlock);
NextOverlayCoord(ref x, ref y, overlaySize, camera.pixelWidth);
}
}
renderContext.ExecuteCommandBuffer(debugCB);
}
=======
>>>>>>>
void NextOverlayCoord(ref float x, ref float y, float overlaySize, float width)
{
x += overlaySize;
// Go to next line if it goes outside the screen.
if (x + overlaySize > width)
{
x = 0;
y -= overlaySize;
}
}
void RenderDebugOverlay(Camera camera, ScriptableRenderContext renderContext)
{
CommandBuffer debugCB = new CommandBuffer();
debugCB.name = "Debug Overlay";
float x = 0;
float overlayRatio = globalDebugParameters.debugOverlayRatio;
float overlaySize = Math.Min(camera.pixelHeight, camera.pixelWidth) * overlayRatio;
float y = camera.pixelHeight - overlaySize;
MaterialPropertyBlock propertyBlock = new MaterialPropertyBlock();
ShadowDebugParameters shadowDebug = globalDebugParameters.shadowDebugParameters;
if (shadowDebug.visualizationMode != ShadowDebugMode.None)
{
if (shadowDebug.visualizationMode == ShadowDebugMode.VisualizeShadowMap)
{
uint visualizeShadowIndex = Math.Min(shadowDebug.visualizeShadowMapIndex, (uint)(GetCurrentShadowCount() - 1));
ShadowLight shadowLight = m_ShadowsResult.shadowLights[visualizeShadowIndex];
for (int slice = 0; slice < shadowLight.shadowSliceCount; ++slice)
{
ShadowSliceData sliceData = m_ShadowsResult.shadowSlices[shadowLight.shadowSliceIndex + slice];
Vector4 texcoordScaleBias = new Vector4((float)sliceData.shadowResolution / m_Owner.shadowSettings.shadowAtlasWidth,
(float)sliceData.shadowResolution / m_Owner.shadowSettings.shadowAtlasHeight,
(float)sliceData.atlasX / m_Owner.shadowSettings.shadowAtlasWidth,
(float)sliceData.atlasY / m_Owner.shadowSettings.shadowAtlasHeight);
propertyBlock.SetVector("_TextureScaleBias", texcoordScaleBias);
debugCB.SetViewport(new Rect(x, y, overlaySize, overlaySize));
debugCB.DrawProcedural(Matrix4x4.identity, m_DebugDisplayShadowMap, 0, MeshTopology.Triangles, 6, 1, propertyBlock);
NextOverlayCoord(ref x, ref y, overlaySize, camera.pixelWidth);
}
}
else if (shadowDebug.visualizationMode == ShadowDebugMode.VisualizeAtlas)
{
propertyBlock.SetVector("_TextureScaleBias", new Vector4(1.0f, 1.0f, 0.0f, 0.0f));
debugCB.SetViewport(new Rect(x, y, overlaySize, overlaySize));
debugCB.DrawProcedural(Matrix4x4.identity, m_DebugDisplayShadowMap, 0, MeshTopology.Triangles, 6, 1, propertyBlock);
NextOverlayCoord(ref x, ref y, overlaySize, camera.pixelWidth);
}
}
renderContext.ExecuteCommandBuffer(debugCB);
}
<<<<<<<
m_lightLoop.PrepareLightsForGPU(m_ShadowSettings, cullResults, camera, ref m_ShadowsResult);
m_lightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthBufferRT); // TODO: Use async compute here to run light culling during shadow
=======
m_gbufferManager.InitGBuffers(w, h, cmd);
>>>>>>>
m_gbufferManager.InitGBuffers(w, h, cmd);
<<<<<<<
FinalPass(camera, renderContext);
RenderDebugOverlay(camera, renderContext);
=======
// Clear the HDR target
using (new Utilities.ProfilingSample("Clear HDR target", renderContext))
{
Utilities.SetRenderTarget(renderContext, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT, ClearFlag.ClearColor, Color.black);
>>>>>>>
// Clear the HDR target
using (new Utilities.ProfilingSample("Clear HDR target", renderContext))
{
Utilities.SetRenderTarget(renderContext, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT, ClearFlag.ClearColor, Color.black); |
<<<<<<<
=======
var isMe = PlayerDamageDealt.Source.User.Id.Id == PacketProcessor.Instance.PlayerTracker.Me().User.Id.Id;
var meCol100 = BasicTeraData.Instance.WindowData.PlayerColor;
var meCol30 = Color.FromArgb((byte) (meCol100.A == 0 ? 0 : 60), meCol100.R, meCol100.G, meCol100.B);
var meCol0 = Color.FromArgb(0, meCol100.R, meCol100.G, meCol100.B);
var dpsCol100 = BasicTeraData.Instance.WindowData.DpsColor;
var dpsCol30 = Color.FromArgb((byte)(dpsCol100.A == 0 ? 0 : 60), dpsCol100.R, dpsCol100.G, dpsCol100.B);
var dpsCol0 = Color.FromArgb(0, dpsCol100.R, dpsCol100.G, dpsCol100.B);
var tankCol100 = BasicTeraData.Instance.WindowData.TankColor;
var tankCol30 = Color.FromArgb((byte)(tankCol100.A == 0 ? 0 : 60), tankCol100.R, tankCol100.G, tankCol100.B);
var tankCol0 = Color.FromArgb(0, tankCol100.R, tankCol100.G, tankCol100.B);
var healCol100 = BasicTeraData.Instance.WindowData.HealerColor;
var healCol30 = Color.FromArgb((byte)(healCol100.A == 0 ? 0 : 60), healCol100.R, healCol100.G, healCol100.B);
var healCol0 = Color.FromArgb(0, healCol100.R, healCol100.G, healCol100.B);
var unkCol100 = Color.FromArgb(255, 200, 200, 200);
var unkCol30 = Color.FromArgb(60, 200, 200, 200);
var unkCol0 = Color.FromArgb(0, 200, 200, 200);
>>>>>>>
var isMe = PlayerDamageDealt.Source.User.Id.Id == PacketProcessor.Instance.PlayerTracker.Me().User.Id.Id;
var meCol100 = BasicTeraData.Instance.WindowData.PlayerColor;
var meCol30 = Color.FromArgb((byte) (meCol100.A == 0 ? 0 : 60), meCol100.R, meCol100.G, meCol100.B);
var meCol0 = Color.FromArgb(0, meCol100.R, meCol100.G, meCol100.B);
var dpsCol100 = BasicTeraData.Instance.WindowData.DpsColor;
var dpsCol30 = Color.FromArgb((byte)(dpsCol100.A == 0 ? 0 : 60), dpsCol100.R, dpsCol100.G, dpsCol100.B);
var dpsCol0 = Color.FromArgb(0, dpsCol100.R, dpsCol100.G, dpsCol100.B);
var tankCol100 = BasicTeraData.Instance.WindowData.TankColor;
var tankCol30 = Color.FromArgb((byte)(tankCol100.A == 0 ? 0 : 60), tankCol100.R, tankCol100.G, tankCol100.B);
var tankCol0 = Color.FromArgb(0, tankCol100.R, tankCol100.G, tankCol100.B);
var healCol100 = BasicTeraData.Instance.WindowData.HealerColor;
var healCol30 = Color.FromArgb((byte)(healCol100.A == 0 ? 0 : 60), healCol100.R, healCol100.G, healCol100.B);
var healCol0 = Color.FromArgb(0, healCol100.R, healCol100.G, healCol100.B);
var unkCol100 = Color.FromArgb(255, 200, 200, 200);
var unkCol30 = Color.FromArgb(60, 200, 200, 200);
var unkCol0 = Color.FromArgb(0, 200, 200, 200);
<<<<<<<
SetDpsIndicatorColor(Role.Dps);
=======
(DpsIndicator.Background as LinearGradientBrush).GradientStops[0] = new GradientStop(isMe? meCol30 : dpsCol30, 1);
(DpsIndicator.Background as LinearGradientBrush).GradientStops[1] = new GradientStop(isMe? meCol0 : dpsCol0, 0);
DpsIndicator.BorderBrush = new SolidColorBrush(isMe ? meCol100 : dpsCol100);
>>>>>>>
SetDpsIndicatorColor(Role.Dps);
<<<<<<<
SetDpsIndicatorColor(Role.Heal);
=======
(DpsIndicator.Background as LinearGradientBrush).GradientStops[0] = new GradientStop(isMe? meCol30 :healCol30, 1);
(DpsIndicator.Background as LinearGradientBrush).GradientStops[1] = new GradientStop(isMe ? meCol0 : healCol0, 0);
DpsIndicator.BorderBrush = new SolidColorBrush(isMe ? meCol100 : healCol100);
>>>>>>>
SetDpsIndicatorColor(Role.Heal);
<<<<<<<
SetDpsIndicatorColor(Role.Tank);
=======
(DpsIndicator.Background as LinearGradientBrush).GradientStops[0] = new GradientStop(isMe? meCol30 :tankCol30, 1);
(DpsIndicator.Background as LinearGradientBrush).GradientStops[1] = new GradientStop(isMe ? meCol0 : tankCol0, 0);
DpsIndicator.BorderBrush = new SolidColorBrush(isMe ? meCol100 : tankCol100);
>>>>>>>
SetDpsIndicatorColor(Role.Tank); |
<<<<<<<
private void ExcelSMADPSChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
=======
private void EnableSoundConsoleBeepFallback(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.SoundConsoleBeepFallback = true;
}
private void DisableSoundConsoleBeepFallback(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.SoundConsoleBeepFallback = false;
}
private void ExcelCMADPSChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
>>>>>>>
private void ExcelCMADPSChanged(object sender, RoutedPropertyChangedEventArgs<object> e) |
<<<<<<<
NoPaste.Status = BasicTeraData.Instance.WindowData.NoPaste;
NoAbnormalsInHUD.Status = BasicTeraData.Instance.WindowData.NoAbnormalsInHUD;
=======
NoPaste.IsChecked = BasicTeraData.Instance.WindowData.NoPaste;
NoAbnormalsInHUD.IsChecked = BasicTeraData.Instance.WindowData.NoAbnormalsInHUD;
EnableOverlayCheckbox.IsChecked = BasicTeraData.Instance.WindowData.EnableOverlay;
>>>>>>>
NoPaste.Status = BasicTeraData.Instance.WindowData.NoPaste;
NoAbnormalsInHUD.Status = BasicTeraData.Instance.WindowData.NoAbnormalsInHUD;
OverlaySwitch.Status = BasicTeraData.Instance.WindowData.EnableOverlay;
<<<<<<<
private void gitButton_Click(object sender, RoutedEventArgs e)
{
gitPopup.Placement = PlacementMode.Bottom;
gitPopup.PlacementTarget = gitButton;
var h = gitPopup.Height;
gitPopup.Height = 0;
var an = new DoubleAnimation(0, h, TimeSpan.FromMilliseconds(200)) { EasingFunction = new QuadraticEase() };
gitPopup.IsOpen = true;
gitPopup.BeginAnimation(HeightProperty, an);
}
private void gitPopup_MouseLeave(object sender, MouseEventArgs e)
{
gitPopup.IsOpen = false;
}
=======
private void EnableOverlay(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.EnableOverlay = true;
if (_mainWindow.DXrender!=null) return;
_mainWindow.DXrender = new Renderer();
}
private void DisableOverlay(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.EnableOverlay = false;
var render = _mainWindow.DXrender;
_mainWindow.DXrender = null;
render.Dispose();
}
>>>>>>>
private void gitButton_Click(object sender, RoutedEventArgs e)
{
gitPopup.Placement = PlacementMode.Bottom;
gitPopup.PlacementTarget = gitButton;
var h = gitPopup.Height;
gitPopup.Height = 0;
var an = new DoubleAnimation(0, h, TimeSpan.FromMilliseconds(200)) { EasingFunction = new QuadraticEase() };
gitPopup.IsOpen = true;
gitPopup.BeginAnimation(HeightProperty, an);
}
private void gitPopup_MouseLeave(object sender, MouseEventArgs e)
{
gitPopup.IsOpen = false;
}
private void EnableOverlay(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.EnableOverlay = true;
if (_mainWindow.DXrender!=null) return;
_mainWindow.DXrender = new Renderer();
}
private void DisableOverlay(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.EnableOverlay = false;
var render = _mainWindow.DXrender;
_mainWindow.DXrender = null;
render.Dispose();
} |
<<<<<<<
DpsWebsiteExport.Status = BasicTeraData.Instance.WindowData.SiteExport;
AuthTokenTextbox.Text = BasicTeraData.Instance.WindowData.TeraDpsToken;
SetAuthTokenRowVisibility(BasicTeraData.Instance.WindowData.SiteExport); //AuthTokenTextbox.Parent.SetValue(HeightProperty, BasicTeraData.Instance.WindowData.SiteExport ? double.NaN : 0);
AutoExcelExport.Status = BasicTeraData.Instance.WindowData.Excel;
=======
AutoExcelExport.IsChecked = BasicTeraData.Instance.WindowData.Excel;
>>>>>>>
AutoExcelExport.Status = BasicTeraData.Instance.WindowData.Excel;
<<<<<<<
PartyEvent.Status = BasicTeraData.Instance.WindowData.DisablePartyEvent;
ShowAfkIventsIngame.Status = BasicTeraData.Instance.WindowData.ShowAfkEventsIngame;
PrivateServerExport.Status = BasicTeraData.Instance.WindowData.PrivateServerExport;
ServerURLTextbox.Text = BasicTeraData.Instance.WindowData.PrivateDpsServers[0];
MuteSound.Status = BasicTeraData.Instance.WindowData.MuteSound;
ShowSelfOnTop.Status = BasicTeraData.Instance.WindowData.MeterUserOnTop;
=======
PartyEvent.IsChecked = BasicTeraData.Instance.WindowData.DisablePartyEvent;
ShowAfkIventsIngame.IsChecked = BasicTeraData.Instance.WindowData.ShowAfkEventsIngame;
MuteSound.IsChecked = BasicTeraData.Instance.WindowData.MuteSound;
ShowSelfOnTop.IsChecked = BasicTeraData.Instance.WindowData.MeterUserOnTop;
>>>>>>>
PartyEvent.Status = BasicTeraData.Instance.WindowData.DisablePartyEvent;
ShowAfkIventsIngame.Status = BasicTeraData.Instance.WindowData.ShowAfkEventsIngame;
MuteSound.Status = BasicTeraData.Instance.WindowData.MuteSound;
ShowSelfOnTop.Status = BasicTeraData.Instance.WindowData.MeterUserOnTop;
<<<<<<<
SetPrivateSrvExportRowVisibility(BasicTeraData.Instance.WindowData.PrivateServerExport); //ServerURLTextbox.Parent.SetValue(HeightProperty, BasicTeraData.Instance.WindowData.PrivateServerExport ? double.NaN : 0);
//PerformanceTabIcon.Source = BasicTeraData.Instance.ImageDatabase.Performance.Source;
SettingsTabIcon.Source = BasicTeraData.Instance.ImageDatabase.Settings.Source;
//LinksTabIcon.Source = BasicTeraData.Instance.ImageDatabase.Links.Source;
TopLeftLogo.Source = BasicTeraData.Instance.ImageDatabase.Icon;
CloseIcon.Source = BasicTeraData.Instance.ImageDatabase.Close.Source;
ChatBoxIcon.Source = BasicTeraData.Instance.ImageDatabase.Chat.Source;
SiteExportIcon.Source = BasicTeraData.Instance.ImageDatabase.Link.Source;
ExcelExportIcon.Source = BasicTeraData.Instance.ImageDatabase.Excel.Source;
ResetIcon.Source = BasicTeraData.Instance.ImageDatabase.Reset.Source;
UploadGlyphIcon.Source = BasicTeraData.Instance.ImageDatabase.Upload.Source;
GitHubIcon.Source = BasicTeraData.Instance.ImageDatabase.GitHub.Source;
DiscordIcon.Source = BasicTeraData.Instance.ImageDatabase.Discord.Source;
RankSitesIcon.Source = BasicTeraData.Instance.ImageDatabase.Cloud.Source;
MoongourdIcon.Source = BasicTeraData.Instance.ImageDatabase.Moongourd.Source;
TeralogsIcon.Source = BasicTeraData.Instance.ImageDatabase.Teralogs.Source;
=======
>>>>>>>
//PerformanceTabIcon.Source = BasicTeraData.Instance.ImageDatabase.Performance.Source;
SettingsTabIcon.Source = BasicTeraData.Instance.ImageDatabase.Settings.Source;
//LinksTabIcon.Source = BasicTeraData.Instance.ImageDatabase.Links.Source;
TopLeftLogo.Source = BasicTeraData.Instance.ImageDatabase.Icon;
CloseIcon.Source = BasicTeraData.Instance.ImageDatabase.Close.Source;
ChatBoxIcon.Source = BasicTeraData.Instance.ImageDatabase.Chat.Source;
SiteExportIcon.Source = BasicTeraData.Instance.ImageDatabase.Link.Source;
ExcelExportIcon.Source = BasicTeraData.Instance.ImageDatabase.Excel.Source;
ResetIcon.Source = BasicTeraData.Instance.ImageDatabase.Reset.Source;
UploadGlyphIcon.Source = BasicTeraData.Instance.ImageDatabase.Upload.Source;
GitHubIcon.Source = BasicTeraData.Instance.ImageDatabase.GitHub.Source;
DiscordIcon.Source = BasicTeraData.Instance.ImageDatabase.Discord.Source;
RankSitesIcon.Source = BasicTeraData.Instance.ImageDatabase.Cloud.Source;
MoongourdIcon.Source = BasicTeraData.Instance.ImageDatabase.Moongourd.Source;
TeralogsIcon.Source = BasicTeraData.Instance.ImageDatabase.Teralogs.Source;
<<<<<<<
private void EnablePServerExp(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.PrivateServerExport = true;
SetPrivateSrvExportRowVisibility(true); // ServerURLTextbox.Parent.SetValue(HeightProperty, BasicTeraData.Instance.WindowData.PrivateServerExport ? double.NaN : 0);
}
private void DisablePServerExp(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.PrivateServerExport = false;
SetPrivateSrvExportRowVisibility(false); // ServerURLTextbox.Parent.SetValue(HeightProperty, BasicTeraData.Instance.WindowData.PrivateServerExport ? double.NaN : 0);
}
private void ServerURLChanged(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.PrivateDpsServers[0] = ServerURLTextbox.Text;
}
=======
>>>>>>>
<<<<<<<
private void TokenChanged(object sender, RoutedEventArgs e)
{
BasicTeraData.Instance.WindowData.TeraDpsToken = AuthTokenTextbox.Text;
}
private void AuthTokenTextbox_OnKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter) { TokenChanged(this, new RoutedEventArgs()); }
}
private void ServerURLTextbox_OnKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter) { ServerURLChanged(this, new RoutedEventArgs()); }
}
private void NoPaste_OnUnchecked(object sender, RoutedEventArgs e) { BasicTeraData.Instance.WindowData.NoPaste = false; }
=======
private void NoPaste_OnUnchecked(object sender, RoutedEventArgs e) { BasicTeraData.Instance.WindowData.NoPaste=false; }
>>>>>>>
private void NoPaste_OnUnchecked(object sender, RoutedEventArgs e) { BasicTeraData.Instance.WindowData.NoPaste = false; } |
<<<<<<<
Parse("excel_sma_dps_seconds", "ExcelSMADPSSeconds");
=======
Parse("do_not_warn_on_crystalbind", "DoNotWarnOnCB");
Parse("excel_cma_dps_seconds", "ExcelCMADPSSeconds");
>>>>>>>
Parse("excel_cma_dps_seconds", "ExcelCMADPSSeconds"); |
<<<<<<<
var skilldamage = skill.Amount();
skillLog.SkillAverageCrit = Math.Round(skill.AvgCrit()) + "";
skillLog.SkillAverageWhite = Math.Round(skill.AvgWhite()) + "";
skillLog.SkillCritRate = skill.CritRate() + "";
skillLog.SkillDamagePercent = skill.DamagePercent() + "";
skillLog.SkillHighestCrit = skill.BiggestCrit() + "";
skillLog.SkillHits = skill.Hits() + "";
skillLog.SkillId= skill.Id() + "";
skillLog.SkillLowestCrit = skill.LowestCrit() + "";
skillLog.SkillTotalDamage = skilldamage + "";
=======
var skilldamage = skills.Amount(user.Source.User.Id, entity, skill.Id, timedEncounter);
skillLog.skillAverageCrit =
Math.Round(skills.AverageCrit(user.Source.User.Id, entity, skill.Id, timedEncounter)) + "";
skillLog.skillAverageWhite =
Math.Round(skills.AverageWhite(user.Source.User.Id, entity, skill.Id, timedEncounter)) + "";
skillLog.skillCritRate = skills.CritRate(user.Source.User.Id, entity, skill.Id, timedEncounter) + "";
skillLog.skillDamagePercent = skills.Amount(user.Source.User.Id, entity, skill.Id, timedEncounter)*100/
user.Amount + "";
skillLog.skillHighestCrit =
skills.BiggestCrit(user.Source.User.Id, entity, skill.Id, timedEncounter) + "";
skillLog.skillHits = skills.Hits(user.Source.User.Id, entity, skill.Id, timedEncounter) + "";
skillLog.skillId= skill.Id + "";
skillLog.skillLowestCrit =
skills.LowestCrit(user.Source.User.Id, entity, skill.Id, timedEncounter) + "";
skillLog.skillTotalDamage = skilldamage + "";
>>>>>>>
var skilldamage = skill.Amount();
skillLog.skillAverageCrit = Math.Round(skill.AvgCrit()) + "";
skillLog.skillAverageWhite = Math.Round(skill.AvgWhite()) + "";
skillLog.skillCritRate = skill.CritRate() + "";
skillLog.skillDamagePercent = skill.DamagePercent() + "";
skillLog.skillHighestCrit = skill.BiggestCrit() + "";
skillLog.skillHits = skill.Hits() + "";
skillLog.skillId= skill.Id() + "";
skillLog.skillLowestCrit = skill.LowestCrit() + "";
skillLog.skillTotalDamage = skilldamage + ""; |
<<<<<<<
public bool Attach = false;
public bool MessagesEnabled = false;
=======
public IReadOnlyDictionary<string, string> CustomProperties = null;
public bool Attach = false;
>>>>>>>
public bool Attach = false;
public bool MessagesEnabled = false;
public IReadOnlyDictionary<string, string> CustomProperties = null; |
<<<<<<<
#region License
//
// Copyright (c) 2007-2009, Sean Chambers <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion
using System.Data;
=======
using System.Data;
>>>>>>>
using System.Data;
<<<<<<<
public IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
=======
public override IMigrationProcessor Create(string connectionString)
>>>>>>>
public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
<<<<<<<
public IMigrationProcessor Create(IDbConnection connection, IAnnouncer announcer, IMigrationProcessorOptions options)
=======
public override IMigrationProcessor Create( IDbConnection connection )
>>>>>>>
public override IMigrationProcessor Create(IDbConnection connection, IAnnouncer announcer, IMigrationProcessorOptions options) |
<<<<<<<
VersionLoader.UpdateVersionInfo(migrationInfo.Version, migrationInfo.Description);
if (useTransaction) Processor.CommitTransaction();
=======
if (migrationInfo.IsAttributed()) VersionLoader.UpdateVersionInfo(migrationInfo.Version);
scope.Complete();
>>>>>>>
if (migrationInfo.IsAttributed()) VersionLoader.UpdateVersionInfo(migrationInfo.Version, migrationInfo.Description);
scope.Complete(); |
<<<<<<<
public void Process(AlterDefaultConstraintExpression expression)
{
Process(Generator.Generate(expression));
}
=======
public abstract void Process(PerformDBOperationExpression expression);
>>>>>>>
public void Process(AlterDefaultConstraintExpression expression)
{
Process(Generator.Generate(expression));
}
public abstract void Process(PerformDBOperationExpression expression); |
<<<<<<<
expression.ApplyConventions(Conventions);
Time(expression.ToString(), () => expression.ExecuteWith(Processor));
=======
expression.ApplyConventions( Conventions );
if (expression is InsertDataExpression) {
insertTicks += time(() => expression.ExecuteWith(Processor));
insertCount++;
}
else {
time(expression.ToString(), () => expression.ExecuteWith(Processor));
}
>>>>>>>
expression.ApplyConventions(Conventions);
if (expression is InsertDataExpression) {
insertTicks += time(() => expression.ExecuteWith(Processor));
insertCount++;
}
else {
Time(expression.ToString(), () => expression.ExecuteWith(Processor));
} |
<<<<<<<
public static string ListAvailableProcessorTypes()
{
IEnumerable<Type> processorTypes = typeof(IMigrationProcessorFactory).Assembly.GetExportedTypes()
.Where(t => typeof(IMigrationProcessorFactory).IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface);
string processorList = string.Empty;
foreach (Type processorType in processorTypes)
{
string name = processorType.Name;
if (!string.IsNullOrEmpty(processorList))
processorList = processorList + ", ";
processorList += name.Substring( 0, name.IndexOf( "ProcessorFactory" ) ).ToLowerInvariant();
}
return processorList;
}
private static Type FindMatchingProcessorIn(Assembly assembly, string processorName)
{
string fullProcessorName = string.Format("{0}ProcessorFactory", processorName);
=======
private static List<IMigrationProcessorFactory> factories;
public static IEnumerable<IMigrationProcessorFactory> Factories {
get {
if(factories == null) {
Assembly assembly = typeof(IMigrationProcessorFactory).Assembly;
var types = assembly.GetExportedTypes().Where(t => typeof (IMigrationProcessorFactory).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract ).ToList();
factories = new List<IMigrationProcessorFactory>(types.Count);
foreach (var type in types) {
var instance = Activator.CreateInstance(type) as IMigrationProcessorFactory;
if(instance != null) {
factories.Add(instance);
}
}
}
>>>>>>>
public static string ListAvailableProcessorTypes()
{
IEnumerable<Type> processorTypes = typeof(IMigrationProcessorFactory).Assembly.GetExportedTypes()
.Where(t => typeof(IMigrationProcessorFactory).IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface);
string processorList = string.Empty;
foreach (Type processorType in processorTypes)
{
string name = processorType.Name;
if (!string.IsNullOrEmpty(processorList))
processorList = processorList + ", ";
processorList += name.Substring( 0, name.IndexOf( "ProcessorFactory" ) ).ToLowerInvariant();
}
return processorList;
}
private static List<IMigrationProcessorFactory> factories;
public static IEnumerable<IMigrationProcessorFactory> Factories {
get {
if(factories == null) {
Assembly assembly = typeof(IMigrationProcessorFactory).Assembly;
var types = assembly.GetExportedTypes().Where(t => typeof (IMigrationProcessorFactory).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract ).ToList();
factories = new List<IMigrationProcessorFactory>(types.Count);
foreach (var type in types) {
var instance = Activator.CreateInstance(type) as IMigrationProcessorFactory;
if(instance != null) {
factories.Add(instance);
}
}
} |
<<<<<<<
{
return typeof(IMigration).IsAssignableFrom(type) && type.HasAttribute<MigrationAttribute>();
}
public static bool TypeIsProfile(Type type)
{
return typeof(IMigration).IsAssignableFrom(type) && type.HasAttribute<ProfileAttribute>();
}
public static bool TypeIsVersionTableMetaData(Type type)
{
return typeof(IVersionTableMetaData).IsAssignableFrom(type) && type.HasAttribute<VersionTableMetaDataAttribute>();
}
public static MigrationMetadata GetMetadataForMigration(Type type)
{
var migrationAttribute = type.GetOneAttribute<MigrationAttribute>();
var metadata = new MigrationMetadata { Type = type, Version = migrationAttribute.Version };
foreach (MigrationTraitAttribute traitAttribute in type.GetAllAttributes<MigrationTraitAttribute>())
metadata.AddTrait(traitAttribute.Name, traitAttribute.Value);
return metadata;
}
public static string GetWorkingDirectory()
{
return Environment.CurrentDirectory;
}
}
=======
{
return typeof(IMigration).IsAssignableFrom(type) && type.HasAttribute<MigrationAttribute>();
}
public static bool TypeIsProfile(Type type)
{
return typeof(IMigration).IsAssignableFrom(type) && type.HasAttribute<ProfileAttribute>();
}
public static bool TypeIsVersionTableMetaData(Type type)
{
return typeof(IVersionTableMetaData).IsAssignableFrom(type) && type.HasAttribute<VersionTableMetaDataAttribute>();
}
public static MigrationMetadata GetMetadataForMigration(Type type)
{
var migrationAttribute = type.GetOneAttribute<MigrationAttribute>();
var metadata = new MigrationMetadata { Type = type, Version = migrationAttribute.Version };
foreach (MigrationTraitAttribute traitAttribute in type.GetAllAttributes<MigrationTraitAttribute>())
metadata.AddTrait(traitAttribute.Name, traitAttribute.Value);
return metadata;
}
public static string GetConstraintName(ConstraintDefinition expression)
{
StringBuilder sb = new StringBuilder();
if (expression.IsPrimaryKeyConstraint)
{
sb.Append("PK_");
}
else
{
sb.Append("UC_");
}
sb.Append(expression.TableName);
foreach (var column in expression.Columns)
{
sb.Append("_" + column);
}
return sb.ToString();
}
public static string GetWorkingDirectory()
{
return Environment.CurrentDirectory;
}
}
>>>>>>>
{
return typeof(IMigration).IsAssignableFrom(type) && type.HasAttribute<MigrationAttribute>();
}
public static bool TypeIsProfile(Type type)
{
return typeof(IMigration).IsAssignableFrom(type) && type.HasAttribute<ProfileAttribute>();
}
public static bool TypeIsVersionTableMetaData(Type type)
{
return typeof(IVersionTableMetaData).IsAssignableFrom(type) && type.HasAttribute<VersionTableMetaDataAttribute>();
}
public static MigrationMetadata GetMetadataForMigration(Type type)
{
var migrationAttribute = type.GetOneAttribute<MigrationAttribute>();
var metadata = new MigrationMetadata { Type = type, Version = migrationAttribute.Version };
foreach (MigrationTraitAttribute traitAttribute in type.GetAllAttributes<MigrationTraitAttribute>())
metadata.AddTrait(traitAttribute.Name, traitAttribute.Value);
return metadata;
}
public static string GetWorkingDirectory()
{
return Environment.CurrentDirectory;
}
public static string GetConstraintName(ConstraintDefinition expression)
{
StringBuilder sb = new StringBuilder();
if (expression.IsPrimaryKeyConstraint)
{
sb.Append("PK_");
}
else
{
sb.Append("UC_");
}
sb.Append(expression.TableName);
foreach (var column in expression.Columns)
{
sb.Append("_" + column);
}
return sb.ToString();
}
} |
<<<<<<<
#region License
//
// Copyright (c) 2007-2009, Sean Chambers <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion
using FluentMigrator.Expressions;
namespace FluentMigrator.Runner.Generators.Base
{
public abstract class GeneratorBase : IMigrationGenerator
{
private readonly IColumn _column;
private readonly IQuoter _quoter;
public GeneratorBase(IColumn column, IQuoter quoter)
{
_column = column;
_quoter = quoter;
}
public abstract string Generate(CreateSchemaExpression expression);
public abstract string Generate(DeleteSchemaExpression expression);
public abstract string Generate(CreateTableExpression expression);
public abstract string Generate(AlterColumnExpression expression);
public abstract string Generate(CreateColumnExpression expression);
public abstract string Generate(DeleteTableExpression expression);
public abstract string Generate(DeleteColumnExpression expression);
public abstract string Generate(CreateForeignKeyExpression expression);
public abstract string Generate(DeleteForeignKeyExpression expression);
public abstract string Generate(CreateIndexExpression expression);
public abstract string Generate(DeleteIndexExpression expression);
public abstract string Generate(RenameTableExpression expression);
public abstract string Generate(RenameColumnExpression expression);
public abstract string Generate(InsertDataExpression expression);
public abstract string Generate(AlterDefaultConstraintExpression expression);
public abstract string Generate(DeleteDataExpression expression);
public abstract string Generate(UpdateDataExpression expression);
public abstract string Generate(AlterSchemaExpression expression);
public abstract string Generate(CreateSequenceExpression expression);
public abstract string Generate(DeleteSequenceExpression expression);
public virtual bool IsAdditionalFeatureSupported(string feature)
{
return false;
}
public string Generate(AlterTableExpression expression)
{
// returns nothing because the individual AddColumn and AlterColumn calls
// create CreateColumnExpression and AlterColumnExpression respectively
return string.Empty;
}
protected IColumn Column
{
get { return _column; }
}
protected IQuoter Quoter
{
get { return _quoter; }
}
}
}
=======
#region License
//
// Copyright (c) 2007-2009, Sean Chambers <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion
using FluentMigrator.Expressions;
namespace FluentMigrator.Runner.Generators.Base
{
public abstract class GeneratorBase : IMigrationGenerator
{
private readonly IColumn _column;
private readonly IQuoter _quoter;
public GeneratorBase(IColumn column, IQuoter quoter)
{
_column = column;
_quoter = quoter;
}
public abstract string Generate(CreateSchemaExpression expression);
public abstract string Generate(DeleteSchemaExpression expression);
public abstract string Generate(CreateTableExpression expression);
public abstract string Generate(AlterColumnExpression expression);
public abstract string Generate(CreateColumnExpression expression);
public abstract string Generate(DeleteTableExpression expression);
public abstract string Generate(DeleteColumnExpression expression);
public abstract string Generate(CreateForeignKeyExpression expression);
public abstract string Generate(DeleteForeignKeyExpression expression);
public abstract string Generate(CreateIndexExpression expression);
public abstract string Generate(DeleteIndexExpression expression);
public abstract string Generate(RenameTableExpression expression);
public abstract string Generate(RenameColumnExpression expression);
public abstract string Generate(InsertDataExpression expression);
public abstract string Generate(AlterDefaultConstraintExpression expression);
public abstract string Generate(DeleteDataExpression expression);
public abstract string Generate(UpdateDataExpression expression);
public abstract string Generate(AlterSchemaExpression expression);
public abstract string Generate(CreateSequenceExpression expression);
public abstract string Generate(DeleteSequenceExpression expression);
public abstract string Generate(CreateConstraintExpression expression);
public abstract string Generate(DeleteConstraintExpression expression);
public string Generate(AlterTableExpression expression)
{
// returns nothing because the individual AddColumn and AlterColumn calls
// create CreateColumnExpression and AlterColumnExpression respectively
return string.Empty;
}
protected IColumn Column
{
get { return _column; }
}
protected IQuoter Quoter
{
get { return _quoter; }
}
}
}
>>>>>>>
#region License
//
// Copyright (c) 2007-2009, Sean Chambers <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion
using FluentMigrator.Expressions;
namespace FluentMigrator.Runner.Generators.Base
{
public abstract class GeneratorBase : IMigrationGenerator
{
private readonly IColumn _column;
private readonly IQuoter _quoter;
public GeneratorBase(IColumn column, IQuoter quoter)
{
_column = column;
_quoter = quoter;
}
public abstract string Generate(CreateSchemaExpression expression);
public abstract string Generate(DeleteSchemaExpression expression);
public abstract string Generate(CreateTableExpression expression);
public abstract string Generate(AlterColumnExpression expression);
public abstract string Generate(CreateColumnExpression expression);
public abstract string Generate(DeleteTableExpression expression);
public abstract string Generate(DeleteColumnExpression expression);
public abstract string Generate(CreateForeignKeyExpression expression);
public abstract string Generate(DeleteForeignKeyExpression expression);
public abstract string Generate(CreateIndexExpression expression);
public abstract string Generate(DeleteIndexExpression expression);
public abstract string Generate(RenameTableExpression expression);
public abstract string Generate(RenameColumnExpression expression);
public abstract string Generate(InsertDataExpression expression);
public abstract string Generate(AlterDefaultConstraintExpression expression);
public abstract string Generate(DeleteDataExpression expression);
public abstract string Generate(UpdateDataExpression expression);
public abstract string Generate(AlterSchemaExpression expression);
public abstract string Generate(CreateSequenceExpression expression);
public abstract string Generate(DeleteSequenceExpression expression);
public abstract string Generate(CreateConstraintExpression expression);
public abstract string Generate(DeleteConstraintExpression expression);
public virtual bool IsAdditionalFeatureSupported(string feature)
{
return false;
}
public string Generate(AlterTableExpression expression)
{
// returns nothing because the individual AddColumn and AlterColumn calls
// create CreateColumnExpression and AlterColumnExpression respectively
return string.Empty;
}
protected IColumn Column
{
get { return _column; }
}
protected IQuoter Quoter
{
get { return _quoter; }
}
}
} |
<<<<<<<
[Test]
public void CallingUniqueAddsIndexExpressionToContext()
{
var collectionMock = new Mock<ICollection<IMigrationExpression>>();
=======
[TestCase(Rule.Cascade), TestCase(Rule.SetDefault), TestCase(Rule.SetNull), TestCase(Rule.None)]
public void CallingOnUpdateSetsOnUpdateOnForeignKeyExpression(Rule rule)
{
var builder = new AlterColumnExpressionBuilder(null, null) { CurrentForeignKey = new ForeignKeyDefinition() };
builder.OnUpdate(rule);
Assert.That(builder.CurrentForeignKey.OnUpdate, Is.EqualTo(rule));
Assert.That(builder.CurrentForeignKey.OnDelete, Is.EqualTo(Rule.None));
}
[TestCase(Rule.Cascade), TestCase(Rule.SetDefault), TestCase(Rule.SetNull), TestCase(Rule.None)]
public void CallingOnDeleteSetsOnDeleteOnForeignKeyExpression(Rule rule)
{
var builder = new AlterColumnExpressionBuilder(null, null) { CurrentForeignKey = new ForeignKeyDefinition() };
builder.OnDelete(rule);
Assert.That(builder.CurrentForeignKey.OnUpdate, Is.EqualTo(Rule.None));
Assert.That(builder.CurrentForeignKey.OnDelete, Is.EqualTo(rule));
}
[TestCase(Rule.Cascade), TestCase(Rule.SetDefault), TestCase(Rule.SetNull), TestCase(Rule.None)]
public void CallingOnDeleteOrUpdateSetsOnUpdateAndOnDeleteOnForeignKeyExpression(Rule rule)
{
var builder = new AlterColumnExpressionBuilder(null, null) { CurrentForeignKey = new ForeignKeyDefinition() };
builder.OnDeleteOrUpdate(rule);
Assert.That(builder.CurrentForeignKey.OnUpdate, Is.EqualTo(rule));
Assert.That(builder.CurrentForeignKey.OnDelete, Is.EqualTo(rule));
}
[Test]
public void CallingIdentitySetsIsIdentityToTrue()
{
VerifyColumnProperty(c => c.IsIdentity = true, b => b.Identity());
}
>>>>>>>
[TestCase(Rule.Cascade), TestCase(Rule.SetDefault), TestCase(Rule.SetNull), TestCase(Rule.None)]
public void CallingOnUpdateSetsOnUpdateOnForeignKeyExpression(Rule rule)
{
var builder = new AlterColumnExpressionBuilder(null, null) { CurrentForeignKey = new ForeignKeyDefinition() };
builder.OnUpdate(rule);
Assert.That(builder.CurrentForeignKey.OnUpdate, Is.EqualTo(rule));
Assert.That(builder.CurrentForeignKey.OnDelete, Is.EqualTo(Rule.None));
}
[TestCase(Rule.Cascade), TestCase(Rule.SetDefault), TestCase(Rule.SetNull), TestCase(Rule.None)]
public void CallingOnDeleteSetsOnDeleteOnForeignKeyExpression(Rule rule)
{
var builder = new AlterColumnExpressionBuilder(null, null) { CurrentForeignKey = new ForeignKeyDefinition() };
builder.OnDelete(rule);
Assert.That(builder.CurrentForeignKey.OnUpdate, Is.EqualTo(Rule.None));
Assert.That(builder.CurrentForeignKey.OnDelete, Is.EqualTo(rule));
}
[TestCase(Rule.Cascade), TestCase(Rule.SetDefault), TestCase(Rule.SetNull), TestCase(Rule.None)]
public void CallingOnDeleteOrUpdateSetsOnUpdateAndOnDeleteOnForeignKeyExpression(Rule rule)
{
var builder = new AlterColumnExpressionBuilder(null, null) { CurrentForeignKey = new ForeignKeyDefinition() };
builder.OnDeleteOrUpdate(rule);
Assert.That(builder.CurrentForeignKey.OnUpdate, Is.EqualTo(rule));
Assert.That(builder.CurrentForeignKey.OnDelete, Is.EqualTo(rule));
}
[Test]
public void CallingUniqueAddsIndexExpressionToContext()
{
var collectionMock = new Mock<ICollection<IMigrationExpression>>(); |
<<<<<<<
[Test]
public void CallingFilterExpressingInPostgres()
{
var additionalFeatures = new Dictionary<string, object>()
{
[PostgresExtensions.IndexFilter] = ""
};
var indexMock = new Mock<IndexDefinition>();
indexMock.Setup(x => x.AdditionalFeatures).Returns(additionalFeatures);
var expressionMock = new Mock<CreateIndexExpression>();
expressionMock.SetupGet(e => e.Index).Returns(indexMock.Object);
ICreateIndexOnColumnOrInSchemaSyntax builder = new CreateIndexExpressionBuilder(expressionMock.Object);
builder.WithOptions().Filter("someColumn = 'test'");
indexMock.VerifyGet(x => x.AdditionalFeatures);
expressionMock.VerifyGet(e => e.Index);
Assert.AreEqual("someColumn = 'test'", additionalFeatures[PostgresExtensions.IndexFilter]);
}
=======
[TestCase(arguments: true)]
[TestCase(arguments: false)]
[TestCase(arguments: null)]
public void CallingUsingAsConcurrentlyToExpressionInPostgres(bool? isConcurrently)
{
var collectionMock = new Mock<PostgresIndexConcurrentlyDefinition>();
var additionalFeatures = new Dictionary<string, object>()
{
[PostgresExtensions.Concurrently] = collectionMock.Object
};
var indexMock = new Mock<IndexDefinition>();
indexMock.Setup(x => x.AdditionalFeatures).Returns(additionalFeatures);
var expressionMock = new Mock<CreateIndexExpression>();
expressionMock.SetupGet(e => e.Index).Returns(indexMock.Object);
ICreateIndexOnColumnOrInSchemaSyntax builder = new CreateIndexExpressionBuilder(expressionMock.Object);
if (isConcurrently == null)
{
builder.WithOptions().AsConcurrently();
}
else
{
builder.WithOptions().AsConcurrently(isConcurrently.Value);
}
collectionMock.VerifySet(x => x.IsConcurrently = isConcurrently ?? true);
indexMock.VerifyGet(x => x.AdditionalFeatures);
expressionMock.VerifyGet(e => e.Index);
}
[TestCase(arguments: true)]
[TestCase(arguments: false)]
[TestCase(arguments: null)]
public void CallingUsingAsOnlyToExpressionInPostgres(bool? isOnly)
{
var collectionMock = new Mock<PostgresIndexOnlyDefinition>();
var additionalFeatures = new Dictionary<string, object>()
{
[PostgresExtensions.Only] = collectionMock.Object
};
var indexMock = new Mock<IndexDefinition>();
indexMock.Setup(x => x.AdditionalFeatures).Returns(additionalFeatures);
var expressionMock = new Mock<CreateIndexExpression>();
expressionMock.SetupGet(e => e.Index).Returns(indexMock.Object);
ICreateIndexOnColumnOrInSchemaSyntax builder = new CreateIndexExpressionBuilder(expressionMock.Object);
if (isOnly == null)
{
builder.WithOptions().AsOnly();
}
else
{
builder.WithOptions().AsOnly(isOnly.Value);
}
collectionMock.VerifySet(x => x.IsOnly = isOnly ?? true);
indexMock.VerifyGet(x => x.AdditionalFeatures);
expressionMock.VerifyGet(e => e.Index);
}
>>>>>>>
[Test]
public void CallingFilterExpressingInPostgres()
{
var additionalFeatures = new Dictionary<string, object>()
{
[PostgresExtensions.IndexFilter] = ""
};
var indexMock = new Mock<IndexDefinition>();
indexMock.Setup(x => x.AdditionalFeatures).Returns(additionalFeatures);
var expressionMock = new Mock<CreateIndexExpression>();
expressionMock.SetupGet(e => e.Index).Returns(indexMock.Object);
ICreateIndexOnColumnOrInSchemaSyntax builder = new CreateIndexExpressionBuilder(expressionMock.Object);
builder.WithOptions().Filter("someColumn = 'test'");
indexMock.VerifyGet(x => x.AdditionalFeatures);
expressionMock.VerifyGet(e => e.Index);
Assert.AreEqual("someColumn = 'test'", additionalFeatures[PostgresExtensions.IndexFilter]);
}
[TestCase(arguments: true)]
[TestCase(arguments: false)]
[TestCase(arguments: null)]
public void CallingUsingAsConcurrentlyToExpressionInPostgres(bool? isConcurrently)
{
var collectionMock = new Mock<PostgresIndexConcurrentlyDefinition>();
var additionalFeatures = new Dictionary<string, object>()
{
[PostgresExtensions.Concurrently] = collectionMock.Object
};
var indexMock = new Mock<IndexDefinition>();
indexMock.Setup(x => x.AdditionalFeatures).Returns(additionalFeatures);
var expressionMock = new Mock<CreateIndexExpression>();
expressionMock.SetupGet(e => e.Index).Returns(indexMock.Object);
ICreateIndexOnColumnOrInSchemaSyntax builder = new CreateIndexExpressionBuilder(expressionMock.Object);
if (isConcurrently == null)
{
builder.WithOptions().AsConcurrently();
}
else
{
builder.WithOptions().AsConcurrently(isConcurrently.Value);
}
collectionMock.VerifySet(x => x.IsConcurrently = isConcurrently ?? true);
indexMock.VerifyGet(x => x.AdditionalFeatures);
expressionMock.VerifyGet(e => e.Index);
}
[TestCase(arguments: true)]
[TestCase(arguments: false)]
[TestCase(arguments: null)]
public void CallingUsingAsOnlyToExpressionInPostgres(bool? isOnly)
{
var collectionMock = new Mock<PostgresIndexOnlyDefinition>();
var additionalFeatures = new Dictionary<string, object>()
{
[PostgresExtensions.Only] = collectionMock.Object
};
var indexMock = new Mock<IndexDefinition>();
indexMock.Setup(x => x.AdditionalFeatures).Returns(additionalFeatures);
var expressionMock = new Mock<CreateIndexExpression>();
expressionMock.SetupGet(e => e.Index).Returns(indexMock.Object);
ICreateIndexOnColumnOrInSchemaSyntax builder = new CreateIndexExpressionBuilder(expressionMock.Object);
if (isOnly == null)
{
builder.WithOptions().AsOnly();
}
else
{
builder.WithOptions().AsOnly(isOnly.Value);
}
collectionMock.VerifySet(x => x.IsOnly = isOnly ?? true);
indexMock.VerifyGet(x => x.AdditionalFeatures);
expressionMock.VerifyGet(e => e.Index);
} |
<<<<<<<
using FluentMigrator.Runner.Initialization;
=======
using FluentMigrator.Infrastructure;
>>>>>>>
using FluentMigrator.Infrastructure;
using FluentMigrator.Runner.Initialization;
<<<<<<<
public VersionLoader(IMigrationRunner runner, IRunnerContext runnerContext, Assembly assembly, IMigrationConventions conventions)
=======
public VersionLoader(IMigrationRunner runner, Assembly assembly, IMigrationConventions conventions)
: this(runner, new SingleAssembly(assembly), conventions)
{
}
public VersionLoader(IMigrationRunner runner, IAssemblyCollection assemblies, IMigrationConventions conventions)
>>>>>>>
public VersionLoader(IMigrationRunner runner, Assembly assembly, IMigrationConventions conventions)
: this(runner, new SingleAssembly(assembly), conventions)
{
}
public VersionLoader(IMigrationRunner runner, IAssemblyCollection assemblies, IMigrationConventions conventions) |
<<<<<<<
public string DescriptionColumnName
{
get { return "Description"; }
}
=======
public virtual bool OwnsSchema
{
get { return true; }
}
>>>>>>>
public string DescriptionColumnName
{
get { return "Description"; }
}
public virtual bool OwnsSchema
{
get { return true; }
} |
<<<<<<<
private void CreateProcessor()
{
IMigrationProcessorFactory processorFactory = ProcessorFactory.GetFactory(ProcessorType);
Processor = processorFactory.Create(Connection);
}
=======
>>>>>>>
<<<<<<<
{
if (!Path.IsPathRooted(TargetAssembly))
=======
{
var runner = new MigrationRunner(null, Processor);
if (!Path.IsPathRooted(TargetAssembly))
>>>>>>>
{
if (!Path.IsPathRooted(TargetAssembly))
<<<<<<<
Assembly assembly = Assembly.LoadFile(TargetAssembly);
var runner = new MigrationVersionRunner(new MigrationConventions(), Processor, new MigrationLoader(new MigrationConventions()), assembly);
runner.LoadAssemblyMigrations();
runner.UpgradeToLatest(true);
}
=======
Assembly assembly = Assembly.LoadFile(TargetAssembly);
Type[] types = assembly.GetTypes();
var migrations = new Dictionary<long, IMigration>();
foreach (Type type in types)
{
if (!type.IsDefined(typeof(MigrationAttribute), false))
continue;
var attributes = (MigrationAttribute[])type.GetCustomAttributes(typeof(MigrationAttribute), false);
migrations.Add(attributes[0].Version, (IMigration)assembly.CreateInstance(type.FullName));
}
foreach (long key in migrations.Keys.OrderBy(k => k))
{
runner.Up(migrations[key]);
}
}
>>>>>>>
Assembly assembly = Assembly.LoadFile(TargetAssembly);
var runner = new MigrationVersionRunner(new MigrationConventions(), Processor, new MigrationLoader(new MigrationConventions()), assembly);
runner.LoadAssemblyMigrations();
runner.UpgradeToLatest(true);
} |
<<<<<<<
=======
>>>>>>>
<<<<<<<
}
=======
ICreateConstraintOnTableSyntax PrimaryKey();
ICreateConstraintOnTableSyntax PrimaryKey(string primaryKeyName);
ICreateConstraintOnTableSyntax UniqueConstraint();
ICreateConstraintOnTableSyntax UniqueConstraint(string constraintName);
}
>>>>>>>
ICreateConstraintOnTableSyntax PrimaryKey();
ICreateConstraintOnTableSyntax PrimaryKey(string primaryKeyName);
ICreateConstraintOnTableSyntax UniqueConstraint();
ICreateConstraintOnTableSyntax UniqueConstraint(string constraintName);
} |
<<<<<<<
#region License
//
// Copyright (c) 2007-2009, Sean Chambers <[email protected]>
// Copyright (c) 2010, Nathan Brown
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion
using System.Data;
=======
using System.Data;
>>>>>>>
// Copyright (c) 2010, Nathan Brown
using System.Data;
<<<<<<<
public IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
=======
public override IMigrationProcessor Create(string connectionString)
>>>>>>>
public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
<<<<<<<
public IMigrationProcessor Create(IDbConnection connection, IAnnouncer announcer, IMigrationProcessorOptions options)
=======
public override IMigrationProcessor Create(IDbConnection connection)
>>>>>>>
public override IMigrationProcessor Create(IDbConnection connection, IAnnouncer announcer, IMigrationProcessorOptions options) |
<<<<<<<
=======
using System.Data;
using FluentMigrator.Expressions;
using FluentMigrator.Runner.Generators;
using FluentMigrator.Runner.Generators.Jet;
using NUnit.Framework;
using NUnit.Should;
>>>>>>> |
<<<<<<<
var runner = new MigrationVersionRunner(conventions, processor, typeof(MigrationVersionRunnerTests));
=======
var connection = new SqlConnection(connectionString);
connection.Open();
var processor = new SqlServerProcessor(connection, new SqlServerGenerator());
var runner = new MigrationVersionRunner(conventions, processor, new MigrationLoader(conventions), typeof(MigrationVersionRunnerTests));
>>>>>>>
var runner = new MigrationVersionRunner(conventions, processor, new MigrationLoader(conventions), typeof(MigrationVersionRunnerTests)); |
<<<<<<<
IAssemblyCollection MigrationAssemblies { get; }
=======
IMigrationInformationLoader MigrationLoader { get; set; }
Assembly MigrationAssembly { get; }
>>>>>>>
IMigrationInformationLoader MigrationLoader { get; set; }
IAssemblyCollection MigrationAssemblies { get; } |
<<<<<<<
internal OleDbConnection PersistentConnection { get; set; }
=======
internal TrimSpacesType TrimSpaces { get; set; }
>>>>>>>
internal OleDbConnection PersistentConnection { get; set; }
internal TrimSpacesType TrimSpaces { get; set; }
<<<<<<<
PersistentConnection = args.PersistentConnection;
=======
TrimSpaces = args.TrimSpaces;
>>>>>>>
PersistentConnection = args.PersistentConnection;
TrimSpaces = args.TrimSpaces;
<<<<<<<
return string.Format("FileName: '{0}'; WorksheetName: '{1}'; WorksheetIndex: {2}; StartRange: {3}; EndRange: {4}; NoHeader: {5}; ColumnMappings: {6}; Transformations: {7}, StrictMapping: {8}; PersistentConnection: {9}",
FileName, WorksheetName, WorksheetIndex, StartRange, EndRange, NoHeader, columnMappingsString, transformationsString, StrictMapping, persistentConnection);
=======
return string.Format("FileName: '{0}'; WorksheetName: '{1}'; WorksheetIndex: {2}; StartRange: {3}; EndRange: {4}; NoHeader: {5}; ColumnMappings: {6}; Transformations: {7}, StrictMapping: {8}, TrimSpaces: {9}",
FileName, WorksheetName, WorksheetIndex, StartRange, EndRange, NoHeader, columnMappingsString, transformationsString, StrictMapping, TrimSpaces);
>>>>>>>
return string.Format("FileName: '{0}'; WorksheetName: '{1}'; WorksheetIndex: {2}; StartRange: {3}; EndRange: {4}; NoHeader: {5}; ColumnMappings: {6}; Transformations: {7}, StrictMapping: {8}, PersistentConnection: {9}, TrimSpaces: {10}",
FileName, WorksheetName, WorksheetIndex, StartRange, EndRange, NoHeader, columnMappingsString, transformationsString, StrictMapping, persistentConnection, TrimSpaces); |
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Contains(new Company());
=======
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
select c).Contains(new Company()),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the Contains() method");
>>>>>>>
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Contains(new Company()),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the Contains() method");
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).DefaultIfEmpty().ToList();
=======
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
select c).DefaultIfEmpty();
Assert.That(() => companies.ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the DefaultIfEmpty()");
>>>>>>>
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).DefaultIfEmpty();
Assert.That(() => companies.ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the DefaultIfEmpty()");
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Except(new List<Company>()).ToList();
=======
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
select c).Except(new List<Company>()).ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the Group() method");
>>>>>>>
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Except(new List<Company>()).ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the Group() method");
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c.CEO).Intersect(
from d in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
=======
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
select c.CEO).Intersect(
from d in ExcelQueryFactory.Worksheet<Company>(null, "", null)
>>>>>>>
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c.CEO).Intersect(
from d in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).OfType<object>().ToList();
=======
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
select c).OfType<object>().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the OfType() method");
>>>>>>>
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).OfType<object>().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the OfType() method");
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Single();
=======
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
select c).Single(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the Single() method. Use the First() method instead");
>>>>>>>
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Single(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the Single() method. Use the First() method instead");
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Union(
from d in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
=======
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
select c).Union(
from d in ExcelQueryFactory.Worksheet<Company>(null, "", null)
>>>>>>>
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Union(
from d in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
join d in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
on c.CEO equals d.CEO
select d)
.ToList();
=======
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
join d in ExcelQueryFactory.Worksheet<Company>(null, "", null)
on c.CEO equals d.CEO
select d)
.ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the Join() method");
>>>>>>>
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
join d in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
on c.CEO equals d.CEO
select d)
.ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel does not provide support for the Join() method");
<<<<<<<
var companies = (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Distinct().ToList();
=======
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null)
select c).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
>>>>>>>
Assert.That(() => (from c in ExcelQueryFactory.Worksheet<Company>(null, "", null, new LogManagerFactory())
select c).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
<<<<<<<
var excel = new ExcelQueryFactory("", new LogManagerFactory());
var companies = (from c in excel.WorksheetNoHeader()
select c).Distinct().ToList();
=======
var excel = new ExcelQueryFactory("");
Assert.That(() => (from c in excel.WorksheetNoHeader()
select c).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
>>>>>>>
var excel = new ExcelQueryFactory("", new LogManagerFactory());
Assert.That(() => (from c in excel.WorksheetNoHeader()
select c).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
<<<<<<<
var excel = new ExcelQueryFactory("", new LogManagerFactory());
var companies = (from c in excel.WorksheetNoHeader()
select c[0]).Distinct().ToList();
=======
var excel = new ExcelQueryFactory("");
Assert.That(() => (from c in excel.WorksheetNoHeader()
select c[0]).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
>>>>>>>
var excel = new ExcelQueryFactory("", new LogManagerFactory());
Assert.That(() => (from c in excel.WorksheetNoHeader()
select c[0]).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
<<<<<<<
var excel = new ExcelQueryFactory("", new LogManagerFactory());
var companies = (from c in excel.Worksheet()
select c).Distinct().ToList();
=======
var excel = new ExcelQueryFactory("");
Assert.That(() => (from c in excel.Worksheet()
select c).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
>>>>>>>
var excel = new ExcelQueryFactory("", new LogManagerFactory());
Assert.That(() => (from c in excel.Worksheet()
select c).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
<<<<<<<
var excel = new ExcelQueryFactory("", new LogManagerFactory());
var companies = (from c in excel.Worksheet()
select c["Name"]).Distinct().ToList();
=======
var excel = new ExcelQueryFactory("");
Assert.That(() => (from c in excel.Worksheet()
select c["Name"]).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]");
>>>>>>>
var excel = new ExcelQueryFactory("", new LogManagerFactory());
Assert.That(() => (from c in excel.Worksheet()
select c["Name"]).Distinct().ToList(),
Throws.TypeOf<NotSupportedException>(), "LinqToExcel only provides support for the Distinct() method when it's mapped to a class and a single property is selected. [e.g. (from row in excel.Worksheet<Person>() select row.FirstName).Distinct()]"); |
<<<<<<<
if (columns.Contains(columnName))
{
var value = GetColumnValue(data, columnName, prop.Name).Cast(prop.PropertyType);
value = TrimStringValue(value);
result.SetProperty(prop.Name, value);
}
}
catch (Exception exception)
{
throw new Exceptions.ExcelException(currentRowNumber, columnName, exception);
=======
var value = GetColumnValue(data, columnName, prop.Name, fromType.Name).Cast(prop.PropertyType);
value = TrimStringValue(value);
result.SetProperty(prop.Name, value);
>>>>>>>
if (columns.Contains(columnName))
{
var value = GetColumnValue(data, columnName, prop.Name, fromType.Name).Cast(prop.PropertyType);
value = TrimStringValue(value);
result.SetProperty(prop.Name, value);
}
}
catch (Exception exception)
{
throw new Exceptions.ExcelException(currentRowNumber, columnName, exception); |
<<<<<<<
semaphorekey.Acquire(CancellationToken.None);
Assert.True(semaphorekey.IsHeld);
=======
await semaphorekey.Acquire(CancellationToken.None);
>>>>>>>
await semaphorekey.Acquire(CancellationToken.None);
Assert.True(semaphorekey.IsHeld);
<<<<<<<
another.Acquire();
Assert.True(another.IsHeld);
Assert.True(semaphorekey.IsHeld);
=======
await another.Acquire();
>>>>>>>
await another.Acquire();
Assert.True(another.IsHeld);
Assert.True(semaphorekey.IsHeld);
<<<<<<<
Assert.False(contender.IsHeld);
Assert.True(another.IsHeld);
Assert.True(semaphorekey.IsHeld);
semaphorekey.Release();
another.Release();
contender.Destroy();
=======
await semaphorekey.Release();
await another.Release();
await contender.Destroy();
>>>>>>>
Assert.False(contender.IsHeld);
Assert.True(another.IsHeld);
Assert.True(semaphorekey.IsHeld);
await semaphorekey.Release();
await another.Release();
await contender.Destroy(); |
<<<<<<<
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ToolStripMenuItem debugToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem textEditorToolStripMenuItem;
=======
private DigitalRune.Windows.Docking.DockPanel dockPanel;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton newUnitEditorButton;
private System.Windows.Forms.ToolStripButton newAbilityEditorButton;
private System.Windows.Forms.ToolStripButton newItemEditorButton;
>>>>>>>
private DigitalRune.Windows.Docking.DockPanel dockPanel;
private System.Windows.Forms.ToolStripMenuItem debugToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem textEditorToolStripMenuItem;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton newUnitEditorButton;
private System.Windows.Forms.ToolStripButton newAbilityEditorButton;
private System.Windows.Forms.ToolStripButton newItemEditorButton; |
<<<<<<<
this.IsCommand("run-console", "Run in console mode, treating each line of console input as a command.");
this.HasOption("strict", "Exit console mode if any command fails.", v => StrictMode = true);
=======
this.IsCommand("run-console", "Run lines within a console");
>>>>>>>
this.IsCommand("run-console", "Run in console mode, treating each line of console input as a command."); |
<<<<<<<
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WCell.Constants.Spells;
using WCell.Core.Initialization;
using WCell.RealmServer.Misc;
using WCell.RealmServer.Spells;
using WCell.RealmServer.Spells.Auras;
using WCell.RealmServer.Spells.Effects;
namespace WCell.Addons.Default.Spells.Warrior
{
public static class WarriorFuryFixes
{
[Initialization(InitializationPass.Second)]
public static void FixIt()
{
// Blood craze should only trigger on crit hit
SpellLineId.WarriorFuryBloodCraze.Apply(spell =>
{
spell.ProcTriggerFlags = ProcTriggerFlags.MeleeCriticalHit | ProcTriggerFlags.RangedCriticalHit;
});
// Improved Berserker Range can only be proc'ed by Berserker Rage
SpellLineId.WarriorFuryImprovedBerserkerRage.Apply(spell =>
{
spell.ProcTriggerFlags = ProcTriggerFlags.SpellCast;
spell.AddCasterProcSpells(SpellLineId.WarriorBerserkerRage);
});
// Blood Thirst deals damage in % of AP and triggers a proc aura
// It's proc'ed heal spell heals in % and not a flat value
SpellLineId.WarriorFuryBloodthirst.Apply(spell =>
{
var effect = spell.GetEffect(SpellEffectType.SchoolDamage);
effect.SpellEffectHandlerCreator = (cast, eff) => new SchoolDamageByAPPctEffectHandler(cast, eff);
var triggerEffect = spell.GetEffect(SpellEffectType.Dummy);
triggerEffect.EffectType = SpellEffectType.TriggerSpell;
triggerEffect.TriggerSpellId = SpellId.ClassSkillBloodthirst;
});
SpellHandler.Apply(spell =>
{
var effect = spell.GetEffect(SpellEffectType.Heal);
effect.EffectType = SpellEffectType.RestoreHealthPercent;
effect.BasePoints = 0; // only 1%
}, SpellId.EffectClassSkillBloodthirst);
}
}
}
=======
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WCell.Constants.Spells;
using WCell.Core.Initialization;
using WCell.RealmServer.Misc;
using WCell.RealmServer.Spells;
using WCell.RealmServer.Spells.Auras;
using WCell.RealmServer.Spells.Effects;
namespace WCell.Addons.Default.Spells.Warrior
{
public static class WarriorFuryFixes
{
[Initialization(InitializationPass.Second)]
public static void FixIt()
{
// Blood craze should only trigger on crit hit
SpellLineId.WarriorFuryBloodCraze.Apply(spell =>
{
spell.ProcTriggerFlags = ProcTriggerFlags.MeleeCriticalHit | ProcTriggerFlags.RangedCriticalHit;
});
// Improved Berserker Range can only be proc'ed by Berserker Rage
SpellLineId.WarriorFuryImprovedBerserkerRage.Apply(spell =>
{
spell.ProcTriggerFlags = ProcTriggerFlags.SpellCast;
spell.AddCasterProcSpells(SpellLineId.WarriorBerserkerRage);
});
// Blood Thirst deals damage in % of AP and triggers a proc aura
// It's proc'ed heal spell heals in % and not a flat value
SpellLineId.WarriorFuryBloodthirst.Apply(spell =>
{
var effect = spell.GetEffect(SpellEffectType.SchoolDamage);
effect.SpellEffectHandlerCreator = (cast, eff) => new SchoolDamageByAPPctEffectHandler(cast, eff);
var triggerEffect = spell.GetEffect(SpellEffectType.Dummy);
triggerEffect.EffectType = SpellEffectType.TriggerSpell;
triggerEffect.TriggerSpellId = SpellId.ClassSkillBloodthirst;
});
SpellHandler.Apply(spell =>
{
var effect = spell.GetEffect(SpellEffectType.Heal);
effect.EffectType = SpellEffectType.RestoreHealthPercent;
effect.BasePoints = 0; // only 1%
}, SpellId.EffectClassSkillBloodthirst);
// Intercept should also deal "${$AP*0.12} damage"
SpellLineId.WarriorIntercept.Apply(spell =>
{
var effect = spell.AddEffect(SpellEffectType.Dummy);
});
}
}
}
>>>>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WCell.Constants.Spells;
using WCell.Core.Initialization;
using WCell.RealmServer.Misc;
using WCell.RealmServer.Spells;
using WCell.RealmServer.Spells.Auras;
using WCell.RealmServer.Spells.Effects;
namespace WCell.Addons.Default.Spells.Warrior
{
public static class WarriorFuryFixes
{
[Initialization(InitializationPass.Second)]
public static void FixIt()
{
// Blood craze should only trigger on crit hit
SpellLineId.WarriorFuryBloodCraze.Apply(spell =>
{
spell.ProcTriggerFlags = ProcTriggerFlags.MeleeCriticalHit | ProcTriggerFlags.RangedCriticalHit;
});
// Improved Berserker Range can only be proc'ed by Berserker Rage
SpellLineId.WarriorFuryImprovedBerserkerRage.Apply(spell =>
{
spell.ProcTriggerFlags = ProcTriggerFlags.SpellCast;
spell.AddCasterProcSpells(SpellLineId.WarriorBerserkerRage);
});
// Blood Thirst deals damage in % of AP and triggers a proc aura
// It's proc'ed heal spell heals in % and not a flat value
SpellLineId.WarriorFuryBloodthirst.Apply(spell =>
{
var effect = spell.GetEffect(SpellEffectType.SchoolDamage);
effect.SpellEffectHandlerCreator = (cast, eff) => new SchoolDamageByAPPctEffectHandler(cast, eff);
var triggerEffect = spell.GetEffect(SpellEffectType.Dummy);
triggerEffect.EffectType = SpellEffectType.TriggerSpell;
triggerEffect.TriggerSpellId = SpellId.ClassSkillBloodthirst;
});
SpellHandler.Apply(spell =>
{
var effect = spell.GetEffect(SpellEffectType.Heal);
effect.EffectType = SpellEffectType.RestoreHealthPercent;
effect.BasePoints = 0; // only 1%
}, SpellId.EffectClassSkillBloodthirst);
// Intercept should also deal "${$AP*0.12} damage"
SpellLineId.WarriorIntercept.Apply(spell =>
{
var effect = spell.AddEffect(SpellEffectType.Dummy);
});
}
}
} |
<<<<<<<
internal IMessageHandler MessageHandler { get; }
=======
public JsonSerializer JsonSerializer { get; }
/// <summary>
/// Gets or sets a value indicating whether to cancel all methods dispatched locally
/// that accept a <see cref="CancellationToken"/> when the connection with the remote party is closed.
/// </summary>
public bool CancelLocallyInvokedMethodsWhenConnectionIsClosed
{
get => this.cancelLocallyInvokedMethodsWhenConnectionIsClosed;
set
{
// We don't typically allow changing this setting after listening has started because
// it would not have applied to requests that have already come in. Folks should opt in
// to that otherwise non-deterministic behavior, or simply set it before listening starts.
this.ThrowIfConfigurationLocked();
this.cancelLocallyInvokedMethodsWhenConnectionIsClosed = value;
}
}
private JsonSerializerSettings MessageJsonSerializerSettings { get; }
private JsonSerializerSettings MessageJsonDeserializerSettings { get; }
>>>>>>>
internal IMessageHandler MessageHandler { get; }
/// <summary>
/// Gets or sets a value indicating whether to cancel all methods dispatched locally
/// that accept a <see cref="CancellationToken"/> when the connection with the remote party is closed.
/// </summary>
public bool CancelLocallyInvokedMethodsWhenConnectionIsClosed
{
get => this.cancelLocallyInvokedMethodsWhenConnectionIsClosed;
set
{
// We don't typically allow changing this setting after listening has started because
// it would not have applied to requests that have already come in. Folks should opt in
// to that otherwise non-deterministic behavior, or simply set it before listening starts.
this.ThrowIfConfigurationLocked();
this.cancelLocallyInvokedMethodsWhenConnectionIsClosed = value;
}
} |
<<<<<<<
public async Task InvokeWithParameterObjectAsync_AndCancel()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithParameterObjectAsync<string>(nameof(Server.AsyncMethodWithJTokenAndCancellation), new { b = "a" }, cts.Token);
await this.server.ServerMethodReached.WaitAsync(this.TimeoutToken);
cts.Cancel();
await Assert.ThrowsAsync<RemoteInvocationException>(() => invokeTask);
}
}
[Fact]
public async Task InvokeWithParameterObjectAsync_AndComplete()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithParameterObjectAsync<string>(nameof(Server.AsyncMethodWithJTokenAndCancellation), new { b = "a" }, cts.Token);
this.server.AllowServerMethodToReturn.Set();
string result = await invokeTask;
Assert.Equal(@"{""b"":""a""}!", result);
}
}
[Fact]
public async Task InvokeWithCancellationAsync_AndCancel()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithCancellationAsync<string>(nameof(Server.AsyncMethodWithJTokenAndCancellation), new[] { "a" }, cts.Token);
await this.server.ServerMethodReached.WaitAsync(this.TimeoutToken);
cts.Cancel();
await Assert.ThrowsAsync<RemoteInvocationException>(() => invokeTask);
}
}
[Fact]
public async Task InvokeWithCancellationAsync_AndComplete()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithCancellationAsync<string>(nameof(Server.AsyncMethodWithJTokenAndCancellation), new[] { "a" }, cts.Token);
this.server.AllowServerMethodToReturn.Set();
string result = await invokeTask;
Assert.Equal(@"""a""!", result);
}
}
[Fact]
=======
public async Task CancelMayStillReturnErrorFromServer()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithCancellationAsync<string>(nameof(Server.AsyncMethodFaultsAfterCancellation), new[] { "a" }, cts.Token);
await this.server.ServerMethodReached.WaitAsync(this.TimeoutToken);
cts.Cancel();
this.server.AllowServerMethodToReturn.Set();
try
{
await invokeTask;
Assert.False(true, "Expected exception not thrown.");
}
catch (RemoteInvocationException ex)
{
Assert.Equal(Server.ThrowAfterCancellationMessage, ex.Message);
}
}
}
[Fact]
>>>>>>>
public async Task CancelMayStillReturnErrorFromServer()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithCancellationAsync<string>(nameof(Server.AsyncMethodFaultsAfterCancellation), new[] { "a" }, cts.Token);
await this.server.ServerMethodReached.WaitAsync(this.TimeoutToken);
cts.Cancel();
this.server.AllowServerMethodToReturn.Set();
try
{
await invokeTask;
Assert.False(true, "Expected exception not thrown.");
}
catch (RemoteInvocationException ex)
{
Assert.Equal(Server.ThrowAfterCancellationMessage, ex.Message);
}
}
}
[Fact]
public async Task InvokeWithParameterObjectAsync_AndCancel()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithParameterObjectAsync<string>(nameof(Server.AsyncMethodWithJTokenAndCancellation), new { b = "a" }, cts.Token);
await this.server.ServerMethodReached.WaitAsync(this.TimeoutToken);
cts.Cancel();
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => invokeTask);
}
}
[Fact]
public async Task InvokeWithParameterObjectAsync_AndComplete()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithParameterObjectAsync<string>(nameof(Server.AsyncMethodWithJTokenAndCancellation), new { b = "a" }, cts.Token);
this.server.AllowServerMethodToReturn.Set();
string result = await invokeTask;
Assert.Equal(@"{""b"":""a""}!", result);
}
}
[Fact]
public async Task InvokeWithCancellationAsync_AndCancel()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithCancellationAsync<string>(nameof(Server.AsyncMethodWithJTokenAndCancellation), new[] { "a" }, cts.Token);
await this.server.ServerMethodReached.WaitAsync(this.TimeoutToken);
cts.Cancel();
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => invokeTask);
}
}
[Fact]
public async Task InvokeWithCancellationAsync_AndComplete()
{
using (var cts = new CancellationTokenSource())
{
var invokeTask = this.clientRpc.InvokeWithCancellationAsync<string>(nameof(Server.AsyncMethodWithJTokenAndCancellation), new[] { "a" }, cts.Token);
this.server.AllowServerMethodToReturn.Set();
string result = await invokeTask;
Assert.Equal(@"""a""!", result);
}
}
[Fact]
<<<<<<<
public async Task<string> AsyncMethodWithJTokenAndCancellation(JToken paramObject, CancellationToken cancellationToken)
{
this.ServerMethodReached.Set();
// TODO: remove when https://github.com/Microsoft/vs-threading/issues/185 is fixed
if (this.DelayAsyncMethodWithCancellation)
{
await Task.Delay(UnexpectedTimeout).WithCancellation(cancellationToken);
}
await this.AllowServerMethodToReturn.WaitAsync(cancellationToken);
return paramObject.ToString(Formatting.None) + "!";
}
=======
public async Task<string> AsyncMethodFaultsAfterCancellation(string arg, CancellationToken cancellationToken)
{
this.ServerMethodReached.Set();
await this.AllowServerMethodToReturn.WaitAsync();
if (!cancellationToken.IsCancellationRequested)
{
var cancellationSignal = new AsyncManualResetEvent();
using (cancellationToken.Register(() => cancellationSignal.Set()))
{
await cancellationSignal;
}
}
throw new InvalidOperationException(ThrowAfterCancellationMessage);
}
>>>>>>>
public async Task<string> AsyncMethodWithJTokenAndCancellation(JToken paramObject, CancellationToken cancellationToken)
{
this.ServerMethodReached.Set();
// TODO: remove when https://github.com/Microsoft/vs-threading/issues/185 is fixed
if (this.DelayAsyncMethodWithCancellation)
{
await Task.Delay(UnexpectedTimeout).WithCancellation(cancellationToken);
}
await this.AllowServerMethodToReturn.WaitAsync(cancellationToken);
return paramObject.ToString(Formatting.None) + "!";
}
public async Task<string> AsyncMethodFaultsAfterCancellation(string arg, CancellationToken cancellationToken)
{
this.ServerMethodReached.Set();
await this.AllowServerMethodToReturn.WaitAsync();
if (!cancellationToken.IsCancellationRequested)
{
var cancellationSignal = new AsyncManualResetEvent();
using (cancellationToken.Register(() => cancellationSignal.Set()))
{
await cancellationSignal;
}
}
throw new InvalidOperationException(ThrowAfterCancellationMessage);
} |
<<<<<<<
=======
private void OnLoaded(object sender, RoutedEventArgs e)
{
if (_shadowCanvas != null)
{
_shadowCanvas.Draw += OnDraw;
}
}
>>>>>>> |
<<<<<<<
//如果除了作为主包外还被其他包引用那么就不释放
if (!dependenciesBundles.ContainsKey(assetbundlePath))
{
//防止assetbundle因为一些意外原因已经被释放了
if (loadAssetBundles[assetbundlePath].Bundle != null)
{
loadAssetBundles[assetbundlePath].Bundle.Unload(true);
}
}
loadAssetBundles.Remove(assetbundlePath);
=======
return false;
}
if (!loadAssetBundles.ContainsKey(assetbundlePath))
{
return true;
}
>>>>>>>
return false;
}
if (!loadAssetBundles.ContainsKey(assetbundlePath))
{
return true;
}
<<<<<<<
AssetBundle assetBundle = AssetBundle.LoadFromFile(envPath + Path.AltDirectorySeparatorChar + dependencies);
dependenciesBundles.Remove(dependencies);
dependenciesBundles.Add(dependencies, new DependenciesBundle(assetBundle));
}else{
=======
if (Disk.IsCrypt)
{
var file = Disk.File(envPath + Path.AltDirectorySeparatorChar + relPath, PathTypes.Absolute);
assetTarget = AssetBundle.LoadFromMemory(file.Read());
}
else
{
assetTarget = AssetBundle.LoadFromFile(envPath + Path.AltDirectorySeparatorChar + dependencies);
}
dependenciesBundles.Add(dependencies, new DependenciesBundle(assetTarget));
}
else
{
>>>>>>>
if (Disk.IsCrypt)
{
var file = Disk.File(envPath + Path.AltDirectorySeparatorChar + relPath, PathTypes.Absolute);
assetTarget = AssetBundle.LoadFromMemory(file.Read());
}
else
{
assetTarget = AssetBundle.LoadFromFile(envPath + Path.AltDirectorySeparatorChar + dependencies);
}
dependenciesBundles.Add(dependencies, new DependenciesBundle(assetTarget));
}
else
{
<<<<<<<
//保证bundle是有效的
if (dependenciesBundles[relPath].Bundle != null)
{
loadAssetBundles.Remove(relPath);
loadAssetBundles.Add(relPath, new MainBundle(dependenciesBundles[relPath].Bundle));
complete(loadAssetBundles[relPath].Bundle);
yield break;
}
=======
continue;
>>>>>>>
//保证bundle是有效的
if (dependenciesBundles[relPath].Bundle != null)
{
loadAssetBundles.Add(relPath, new MainBundle(dependenciesBundles[relPath].Bundle));
complete(loadAssetBundles[relPath].Bundle);
yield break;
}
<<<<<<<
//如果是其他依赖包发起的加载同时保证asset bundle是有效的,那么直接开始下一个依赖包的加载
if (dependenciesBundles.ContainsKey(dependencies) && dependenciesBundles[dependencies].Bundle != null) { continue; }
=======
//如果是其他依赖包发起的加载,那么直接开始下一个依赖包的加载
if (dependenciesBundles.ContainsKey(dependencies))
{
continue;
}
>>>>>>>
//如果是其他依赖包发起的加载,那么直接开始下一个依赖包的加载
if (dependenciesBundles.ContainsKey(dependencies))
{
if (dependenciesBundles[dependencies].Bundle != null)
{
continue;
}
dependenciesBundles.Remove(dependencies);
}
<<<<<<<
dependenciesBundles[assetbundlePath].RefCount--;
if (dependenciesBundles[assetbundlePath].RefCount <= 0)
{
//如果被依赖的资源包被当作主包,那么就不移除只删除依赖
if (!loadAssetBundles.ContainsKey(assetbundlePath))
{
//防止assetbundle因为一些意外原因已经被释放了
if (dependenciesBundles[assetbundlePath].Bundle != null)
{
dependenciesBundles[assetbundlePath].Bundle.Unload(true);
}
}
dependenciesBundles.Remove(assetbundlePath);
}
=======
return;
>>>>>>>
return; |
<<<<<<<
typeof(CoreProvider),
=======
typeof(TimeQueueProvider),
>>>>>>>
typeof(CoreProvider),
typeof(TimeQueueProvider), |
<<<<<<<
/// Resolve all references to SecuritySchemes
/// </summary>
/// <param name="securityRequirement"></param>
public override void Visit(OpenApiSecurityRequirement securityRequirement)
{
foreach (var scheme in securityRequirement.Keys.ToList())
{
ResolveObject(scheme, (resolvedScheme) => {
// If scheme was unresolved
// copy Scopes and remove old unresolved scheme
var scopes = securityRequirement[scheme];
securityRequirement.Remove(scheme);
securityRequirement.Add(resolvedScheme, scopes);
});
}
}
/// <summary>
=======
/// Resolve all references to parameters
/// </summary>
public override void Visit(IList<OpenApiParameter> parameters)
{
ResolveList(parameters);
}
/// <summary>
>>>>>>>
/// Resolve all references to SecuritySchemes
/// </summary>
public override void Visit(OpenApiSecurityRequirement securityRequirement)
{
foreach (var scheme in securityRequirement.Keys.ToList())
{
ResolveObject(scheme, (resolvedScheme) => {
// If scheme was unresolved
// copy Scopes and remove old unresolved scheme
var scopes = securityRequirement[scheme];
securityRequirement.Remove(scheme);
securityRequirement.Add(resolvedScheme, scopes);
});
}
}
/// <summary>
/// Resolve all references to parameters
/// </summary>
public override void Visit(IList<OpenApiParameter> parameters)
{
ResolveList(parameters);
}
/// <summary> |
<<<<<<<
context = new ParsingContext
{
ExtensionParsers = _settings.ExtensionParsers
};
return context.Parse(yamlDocument, diagnostic);
=======
// Parse the OpenAPI Document
context = new ParsingContext();
var document = context.Parse(yamlDocument, diagnostic);
// Validate the document
var errors = document.Validate();
foreach (var item in errors)
{
diagnostic.Errors.Add(new OpenApiError(item.ErrorPath, item.ErrorMessage));
}
return document;
>>>>>>>
context = new ParsingContext
{
ExtensionParsers = _settings.ExtensionParsers
};
// Parse the OpenAPI Document
var document = context.Parse(yamlDocument, diagnostic);
// Validate the document
var errors = document.Validate();
foreach (var item in errors)
{
diagnostic.Errors.Add(new OpenApiError(item.ErrorPath, item.ErrorMessage));
}
return document; |
<<<<<<<
using Microsoft.OpenApi.Any;
=======
>>>>>>>
using Microsoft.OpenApi.Any;
<<<<<<<
=======
// To Do compare schema as IOpenApiExtensible
>>>>>>> |
<<<<<<<
using NetBox.IO;
using NetBox;
=======
using System.Collections.Generic;
>>>>>>>
using NetBox.IO;
using NetBox;
using System.Collections.Generic; |
<<<<<<<
public object[] this[int row]
{
get
{
return Columns.Select(column => column.Values[row]).ToArray();
}
}
=======
/// <summary>
/// Used to get the row values
/// </summary>
/// <param name="row">The index of the row beginning with zero</param>
/// <returns>An object array</returns>
public object[] this[int row] => Columns.Select(column => column.Values[row]).ToArray();
/// <summary>
/// Returns a list of columns names
/// </summary>
public string[] ColumnNames => Columns.Select(column => column.Name).ToArray();
>>>>>>>
/// <summary>
/// Used to get the row values
/// </summary>
/// <param name="row">The index of the row beginning with zero</param>
/// <returns>An object array</returns>
public object[] this[int row] => Columns.Select(column => column.Values[row]).ToArray();
/// <summary>
/// Returns a list of columns names
/// </summary>
public string[] ColumnNames => Columns.Select(column => column.Name).ToArray();
public object[] this[int row]
{
get
{
return Columns.Select(column => column.Values[row]).ToArray();
}
} |
<<<<<<<
gitRepository.Expect(x => x.AssertValidBranchName(GIT_BRANCH_TO_INIT)).Return(GIT_BRANCH_TO_INIT).Repeat.Never();
gitRepository.Expect(x => x.CreateTfsRemote(null)).Callback<RemoteInfo>((info) => info.Id == GIT_BRANCH_TO_INIT && info.Url == "http://myTfsServer:8080/tfs" && info.Repository == "$/MyProject/MyBranch").Repeat.Never();
=======
gitRepository.Expect(x => x.CreateTfsRemote(null,null,null)).Callback<RemoteInfo,string,string>((info,autocrlf,ignorecase) => info.Id == GIT_BRANCH_TO_INIT && info.Url == "http://myTfsServer:8080/tfs" && info.Repository == "$/MyProject/MyBranch").Repeat.Never();
>>>>>>>
gitRepository.Expect(x => x.AssertValidBranchName(GIT_BRANCH_TO_INIT)).Return(GIT_BRANCH_TO_INIT).Repeat.Never();
gitRepository.Expect(x => x.CreateTfsRemote(null,null,null)).Callback<RemoteInfo,string,string>((info,autocrlf,ignorecase) => info.Id == GIT_BRANCH_TO_INIT && info.Url == "http://myTfsServer:8080/tfs" && info.Repository == "$/MyProject/MyBranch").Repeat.Never();
<<<<<<<
gitRepository.Expect(x => x.AssertValidBranchName(GIT_BRANCH_TO_INIT)).Return(GIT_BRANCH_TO_INIT).Repeat.Never();
gitRepository.Expect(x => x.CreateTfsRemote(null)).Callback<RemoteInfo>((info) => info.Id == GIT_BRANCH_TO_INIT && info.Url == "http://myTfsServer:8080/tfs" && info.Repository == "$/MyProject/MyBranch").Repeat.Never();
=======
gitRepository.Expect(x => x.CreateTfsRemote(null,null,null)).Callback<RemoteInfo,string,string>((info,autocrlf,ignorecase) => info.Id == GIT_BRANCH_TO_INIT && info.Url == "http://myTfsServer:8080/tfs" && info.Repository == "$/MyProject/MyBranch").Repeat.Never();
>>>>>>>
gitRepository.Expect(x => x.AssertValidBranchName(GIT_BRANCH_TO_INIT)).Return(GIT_BRANCH_TO_INIT).Repeat.Never();
gitRepository.Expect(x => x.CreateTfsRemote(null,null,null)).Callback<RemoteInfo,string,string>((info,autocrlf,ignorecase) => info.Id == GIT_BRANCH_TO_INIT && info.Url == "http://myTfsServer:8080/tfs" && info.Repository == "$/MyProject/MyBranch").Repeat.Never(); |
<<<<<<<
int FindMergeChangesetParent(string path, long firstChangeset, GitTfsRemote remote);
=======
/// <summary>
/// Creates and maps a workspace for the given remote with the given local -> server directory mappings, at the given Tfs version,
/// and then performs the action.
/// </summary>
/// <param name="localDirectory">The local base directory containing all the mappings</param>
/// <param name="remote">The owning remote</param>
/// <param name="mappings">The workspace mappings to create. Item1 is the relative path from the localDirectory, and Item2 is the TfsRepositoryPath</param>
/// <param name="versionToFetch">The TFS version to fetch from the server</param>
/// <param name="action">The action to perform</param>
void WithWorkspace(string localDirectory, IGitTfsRemote remote, IEnumerable<Tuple<string, string>> mappings, TfsChangesetInfo versionToFetch, Action<ITfsWorkspace> action);
>>>>>>>
int FindMergeChangesetParent(string path, long firstChangeset, GitTfsRemote remote);
/// <summary>
/// Creates and maps a workspace for the given remote with the given local -> server directory mappings, at the given Tfs version,
/// and then performs the action.
/// </summary>
/// <param name="localDirectory">The local base directory containing all the mappings</param>
/// <param name="remote">The owning remote</param>
/// <param name="mappings">The workspace mappings to create. Item1 is the relative path from the localDirectory, and Item2 is the TfsRepositoryPath</param>
/// <param name="versionToFetch">The TFS version to fetch from the server</param>
/// <param name="action">The action to perform</param>
void WithWorkspace(string localDirectory, IGitTfsRemote remote, IEnumerable<Tuple<string, string>> mappings, TfsChangesetInfo versionToFetch, Action<ITfsWorkspace> action); |
<<<<<<<
void CheckinTool(string head, TfsChangesetInfo parentChangeset);
=======
long Checkin(string treeish, TfsChangesetInfo parentChangeset);
}
public static partial class Ext
{
public static void Fetch(this IGitTfsRemote remote)
{
remote.Fetch(new Dictionary<long, string>());
}
>>>>>>>
void CheckinTool(string head, TfsChangesetInfo parentChangeset);
long Checkin(string treeish, TfsChangesetInfo parentChangeset);
}
public static partial class Ext
{
public static void Fetch(this IGitTfsRemote remote)
{
remote.Fetch(new Dictionary<long, string>());
} |
<<<<<<<
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Sep.Git.Tfs.Core;
=======
using Sep.Git.Tfs.Core;
>>>>>>>
using System;
using System.Linq;
using Sep.Git.Tfs.Core;
<<<<<<<
=======
[Fact]
public void GetsPathWithQuotepath()
{
var line = ":000000 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\t\"\\366\"\t\"\\337\"";
var info = GitChangeInfo.Parse(line);
Assert.Equal("ö", info.path);
}
[Fact]
public void GetsPathToWithQuotepath()
{
var line = ":000000 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\t\"\\366\"\t\"\\337\"";
var info = GitChangeInfo.Parse(line);
Assert.Equal("ß", info.pathTo);
}
>>>>>>>
<<<<<<<
var change = GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\0blah\0");
Assert.IsInstanceOfType(change, typeof(Add));
=======
var change = GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\tblah");
Assert.IsType<Add>(change);
>>>>>>>
var change = GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\0blah\0");
Assert.IsType<Add>(change);
<<<<<<<
var change = (Add)GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\0blah\0");
Assert.AreEqual("01234567ab01234567ab01234567ab01234567ab", change.NewSha);
=======
var change = (Add)GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\tblah");
Assert.Equal("01234567ab01234567ab01234567ab01234567ab", change.NewSha);
>>>>>>>
var change = (Add)GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\0blah\0");
Assert.Equal("01234567ab01234567ab01234567ab01234567ab", change.NewSha);
<<<<<<<
var change = (Add)GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\0blah\0");
Assert.AreEqual("blah", change.Path);
=======
var change = (Add)GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\tblah");
Assert.Equal("blah", change.Path);
>>>>>>>
var change = (Add)GetChangeItem(":000000 100644 0000000000000000000000000000000000000000 01234567ab01234567ab01234567ab01234567ab A\0blah\0");
Assert.Equal("blah", change.Path);
<<<<<<<
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab C100\0oldname\0newname\0");
Assert.IsInstanceOfType(change, typeof(Copy));
=======
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab C100\toldname\tnewname");
Assert.IsType<Copy>(change);
>>>>>>>
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab C100\0oldname\0newname\0");
Assert.IsType<Copy>(change);
<<<<<<<
var change = (Copy)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab C100\0oldname\0newname\0");
Assert.AreEqual("newname", change.Path);
=======
var change = (Copy)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab C100\toldname\tnewname");
Assert.Equal("newname", change.Path);
>>>>>>>
var change = (Copy)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab C100\0oldname\0newname\0");
Assert.Equal("newname", change.Path);
<<<<<<<
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\0blah\0");
Assert.IsInstanceOfType(change, typeof(Modify));
=======
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\tblah");
Assert.IsType<Modify>(change);
>>>>>>>
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\0blah\0");
Assert.IsType<Modify>(change);
<<<<<<<
var change = (Modify)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\0blah\0");
Assert.AreEqual("blah", change.Path);
=======
var change = (Modify)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\tblah");
Assert.Equal("blah", change.Path);
>>>>>>>
var change = (Modify)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\0blah\0");
Assert.Equal("blah", change.Path);
<<<<<<<
var change = (Modify)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\0blah\0");
Assert.AreEqual("01234567ab01234567ab01234567ab01234567ab", change.NewSha);
=======
var change = (Modify)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\tblah");
Assert.Equal("01234567ab01234567ab01234567ab01234567ab", change.NewSha);
>>>>>>>
var change = (Modify)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab M\0blah\0");
Assert.Equal("01234567ab01234567ab01234567ab01234567ab", change.NewSha);
<<<<<<<
var change = GetChangeItem(":100644 000000 abcdef0123abcdef0123abcdef0123abcdef0123 0000000000000000000000000000000000000000 D\0blah\0");
Assert.IsInstanceOfType(change, typeof(Delete));
=======
var change = GetChangeItem(":100644 000000 abcdef0123abcdef0123abcdef0123abcdef0123 0000000000000000000000000000000000000000 D\tblah");
Assert.IsType<Delete>(change);
>>>>>>>
var change = GetChangeItem(":100644 000000 abcdef0123abcdef0123abcdef0123abcdef0123 0000000000000000000000000000000000000000 D\0blah\0");
Assert.IsType<Delete>(change);
<<<<<<<
var change = (Delete)GetChangeItem(":100644 000000 abcdef0123abcdef0123abcdef0123abcdef0123 0000000000000000000000000000000000000000 D\0blah\0");
Assert.AreEqual("blah", change.Path);
=======
var change = (Delete)GetChangeItem(":100644 000000 abcdef0123abcdef0123abcdef0123abcdef0123 0000000000000000000000000000000000000000 D\tblah");
Assert.Equal("blah", change.Path);
>>>>>>>
var change = (Delete)GetChangeItem(":100644 000000 abcdef0123abcdef0123abcdef0123abcdef0123 0000000000000000000000000000000000000000 D\0blah\0");
Assert.Equal("blah", change.Path);
<<<<<<<
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\0blah\0newblah\0");
Assert.IsInstanceOfType(change, typeof(RenameEdit));
=======
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\tblah\tnewblah");
Assert.IsType<RenameEdit>(change);
>>>>>>>
var change = GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\0blah\0newblah\0");
Assert.IsType<RenameEdit>(change);
<<<<<<<
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\0blah\0newblah\0");
Assert.AreEqual("blah", change.Path);
=======
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\tblah\tnewblah");
Assert.Equal("blah", change.Path);
>>>>>>>
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\0blah\0newblah\0");
Assert.Equal("blah", change.Path);
<<<<<<<
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\0blah\0newblah\0");
Assert.AreEqual("newblah", change.PathTo);
=======
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\tblah\tnewblah");
Assert.Equal("newblah", change.PathTo);
>>>>>>>
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\0blah\0newblah\0");
Assert.Equal("newblah", change.PathTo);
<<<<<<<
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\0blah\0newblah\0");
Assert.AreEqual("01234567ab01234567ab01234567ab01234567ab", change.NewSha);
=======
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\tblah\tnewblah");
Assert.Equal("01234567ab01234567ab01234567ab01234567ab", change.NewSha);
>>>>>>>
var change = (RenameEdit)GetChangeItem(":100644 100644 abcdef0123abcdef0123abcdef0123abcdef0123 01234567ab01234567ab01234567ab01234567ab R001\0blah\0newblah\0");
Assert.Equal("01234567ab01234567ab01234567ab01234567ab", change.NewSha); |
<<<<<<<
[Fact]
public void TestEmptyFile()
=======
public AuthorsFileUnitTest()
{
//
// TODO: Add constructor logic here
//
}
private TestContext testContextInstance;
/// <summary>
///Gets or sets the test context which provides
///information about and functionality for the current test run.
///</summary>
public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
[TestMethod]
public void AuthorsFileEmptyFile()
>>>>>>>
[Fact]
public void AuthorsFileEmptyFile()
<<<<<<<
[Fact]
public void TestSimpleRecord()
=======
[TestMethod]
public void AuthorsFileSimpleRecord()
>>>>>>>
[Fact]
public void AuthorsFileSimpleRecord()
<<<<<<<
[Fact]
public void TestCaseInsensitiveRecord()
=======
[TestMethod]
public void AuthorsFileCaseInsensitiveRecord()
>>>>>>>
[Fact]
public void AuthorsFileCaseInsensitiveRecord()
<<<<<<<
[Fact]
public void TestMultiLineRecord()
=======
[TestMethod]
public void AuthorsFileMultiLineRecord()
>>>>>>>
[Fact]
public void AuthorsFileMultiLineRecord()
<<<<<<<
[Fact]
public void TestMultiLineRecordWithBlankLine()
=======
[TestMethod]
[ExpectedException(typeof(GitTfsException))]
public void AuthorsFileMultiLineRecordWithBlankLine()
>>>>>>>
[Fact]
public void AuthorsFileMultiLineRecordWithBlankLine()
<<<<<<<
[Fact]
public void TestBadRecord()
=======
[TestMethod]
[ExpectedException(typeof(GitTfsException))]
public void AuthorsFileTestBadRecord()
>>>>>>>
[Fact]
public void AuthorsFileTestBadRecord() |
<<<<<<<
public static object GetSolarPanelStatus(Vessel vessel)
{
bool atLeastOneSolarPanel = false; // No panels at all? Always return false
foreach (Part p in vessel.parts)
{
foreach (ModuleDeployableSolarPanel c in p.FindModulesImplementing<ModuleDeployableSolarPanel>())
{
atLeastOneSolarPanel = true;
if (c.panelState == ModuleDeployableSolarPanel.panelStates.RETRACTED)
{
// If just one panel is not deployed return false
return false;
}
}
}
return atLeastOneSolarPanel;
}
public static void SolarPanelCtrl(Vessel vessel, bool state)
{
vessel.rootPart.SendEvent(state ? "Extend" : "Retract");
}
=======
public static float GetVesselLattitude(Vessel vessel)
{
float retVal = (float)vessel.latitude;
if (retVal > 90) return 90;
if (retVal < -90) return -90;
return retVal;
}
public static float GetVesselLongitude(Vessel vessel)
{
float retVal = (float)vessel.longitude;
while (retVal > 180) retVal -= 360;
while (retVal < -180) retVal += 360;
return retVal;
}
>>>>>>>
public static object GetSolarPanelStatus(Vessel vessel)
{
bool atLeastOneSolarPanel = false; // No panels at all? Always return false
foreach (Part p in vessel.parts)
{
foreach (ModuleDeployableSolarPanel c in p.FindModulesImplementing<ModuleDeployableSolarPanel>())
{
atLeastOneSolarPanel = true;
if (c.panelState == ModuleDeployableSolarPanel.panelStates.RETRACTED)
{
// If just one panel is not deployed return false
return false;
}
}
}
return atLeastOneSolarPanel;
}
public static void SolarPanelCtrl(Vessel vessel, bool state)
{
vessel.rootPart.SendEvent(state ? "Extend" : "Retract");
}
public static float GetVesselLattitude(Vessel vessel)
{
float retVal = (float)vessel.latitude;
if (retVal > 90) return 90;
if (retVal < -90) return -90;
return retVal;
}
public static float GetVesselLongitude(Vessel vessel)
{
float retVal = (float)vessel.longitude;
while (retVal > 180) retVal -= 360;
while (retVal < -180) retVal += 360;
return retVal;
} |
<<<<<<<
FileData data = Util.GetFileData(titleID, "", SceneReleasesList);
SceneReleasesSelectedItems.Add(new Tuple<string, string>(titleID, ""), data);
=======
FileData data = Util.GetFileData(titleID, SceneReleasesList);
SceneReleasesSelectedItems.Add(titleID, data);
titleIDBase = data.TitleIDBaseGame;
>>>>>>>
FileData data = Util.GetFileData(titleID, "", SceneReleasesList);
SceneReleasesSelectedItems.Add(new Tuple<string, string>(titleID, ""), data);
titleIDBase = data.TitleIDBaseGame;
<<<<<<<
DisplayGameInformation(titleID, "", LocalFilesList, "scene"); //Has to be Locallist as we dont store scene info other than its xml file...
=======
DisplayGameInformation(titleID, titleIDBase, LocalFilesList, "scene"); //Has to be Locallist as we dont store scene info other than its xml file...
>>>>>>>
DisplayGameInformation(titleID, titleIDBase, "", LocalFilesList, "scene"); //Has to be Locallist as we dont store scene info other than its xml file...
<<<<<<<
DisplayGameInformation(titleID, version, SDCardList, "sdcard");
=======
DisplayGameInformation(titleID, titleIDBase, SDCardList, "sdcard");
>>>>>>>
DisplayGameInformation(titleID, titleIDBase, version, SDCardList, "sdcard");
<<<<<<<
DisplayGameInformation(titleID, version, LocalNSPFilesList, "eshop");
=======
*/
DisplayGameInformation(titleID, titleIDBaseGame, LocalNSPFilesList, "eshop");
>>>>>>>
*/
DisplayGameInformation(titleID, titleIDBaseGame, version, LocalNSPFilesList, "eshop"); |
<<<<<<<
string version = Convert.ToString(((FileData)((OLVListItem)item).RowObject).Version);
FileData data = Util.GetFileData(titleID, version, LocalFilesList);
LocalFilesListSelectedItems.Add(new Tuple<string, string>(titleID, version), data);
=======
data = Util.GetFileData(titleID, "", LocalFilesList);
LocalFilesListSelectedItems.Add(new Tuple<string, string>(titleID, ""), data);
>>>>>>>
string version = Convert.ToString(((FileData)((OLVListItem)item).RowObject).Version);
data = Util.GetFileData(titleID, version, LocalFilesList);
LocalFilesListSelectedItems.Add(new Tuple<string, string>(titleID, version), data); |
<<<<<<<
/*
var watch = new FileSystemWatcher();
watch.Path = AppDomain.CurrentDomain.BaseDirectory;
watch.Filter = Util.LOG_FILE;
watch.NotifyFilter = NotifyFilters.LastWrite; //more options
watch.Changed += new FileSystemEventHandler(OnLogChanged);
watch.EnableRaisingEvents = true;
*/
LocalFilesList = new Dictionary<Tuple<string, string>, FileData>();
LocalNSPFilesList = new Dictionary<Tuple<string, string>, FileData>();
SceneReleasesList = new Dictionary<Tuple<string, string>, FileData>();
SDCardList = new Dictionary<Tuple<string, string>, FileData>();
=======
LocalFilesList = new Dictionary<string, FileData>();
LocalNSPFilesList = new Dictionary<string, FileData>();
SceneReleasesList = new Dictionary<string, FileData>();
SDCardList = new Dictionary<string, FileData>();
>>>>>>>
LocalFilesList = new Dictionary<Tuple<string, string>, FileData>();
LocalNSPFilesList = new Dictionary<Tuple<string, string>, FileData>();
SceneReleasesList = new Dictionary<Tuple<string, string>, FileData>();
SDCardList = new Dictionary<Tuple<string, string>, FileData>(); |
<<<<<<<
// Consider removing the ambient lifetime concept. I thin the convenience might not outweight the potential confusion.
// Samples for different data sources (e.g. An azure table, a file system) // Lots of testing
=======
// Samples for different data sources (e.g. An azure table, a file system)
// Hook up the filter debouncer for the grid.
// Hook up the 'latest response' debouncer for the grid
// Finish converting events and property changed handlers to Events (with a capital E)
// Lots of testing
// Get rid of that time profiler experiment
>>>>>>>
// Consider removing the ambient lifetime concept. I thin the convenience might not outweight the potential confusion.
// Samples for different data sources (e.g. An azure table, a file system) // Lots of testing
// Samples for different data sources (e.g. An azure table, a file system)
// Hook up the filter debouncer for the grid.
// Hook up the 'latest response' debouncer for the grid
// Finish converting events and property changed handlers to Events (with a capital E)
// Lots of testing
// Get rid of that time profiler experiment |
<<<<<<<
RegisterDisplaySerializer(new PlainTextResultEncoder());
RegisterDisplaySerializer(new ListResultEncoder());
RegisterDisplaySerializer(new TableDisplaySerializer());
=======
RegisterDisplayEncoder(new PlainTextResultEncoder());
RegisterDisplayEncoder(new ListResultEncoder());
>>>>>>>
RegisterDisplayEncoder(new PlainTextResultEncoder());
RegisterDisplayEncoder(new ListResultEncoder());
RegisterDisplayEncoder(new TableDisplaySerializer());
<<<<<<<
public ExecutionResult Execute(string input, IChannel channel)
=======
public virtual ExecutionResult Execute(string input, Action<string> stdout, Action<string> stderr)
>>>>>>>
public virtual ExecutionResult Execute(string input, IChannel channel)
<<<<<<<
public ExecutionResult ExecuteMagic(string input, IChannel channel)
=======
public virtual ExecutionResult ExecuteMagic(string input, Action<string> stdout, Action<string> stderr)
>>>>>>>
public virtual ExecutionResult ExecuteMagic(string input, IChannel channel) |
<<<<<<<
using System;
using System.Collections.Generic;
namespace BepInEx.Logging
{
/// <summary>
/// A static <see cref="BaseLogger"/> instance.
/// </summary>
public static class Logger
{
public static ICollection<ILogListener> Listeners { get; } = new List<ILogListener>();
public static ICollection<ILogSource> Sources { get; } = new LogSourceCollection();
private static readonly ManualLogSource InternalLogSource = CreateLogSource("BepInEx");
internal static void InternalLogEvent(object sender, LogEventArgs eventArgs)
{
foreach (var listener in Listeners)
{
listener?.LogEvent(sender, eventArgs);
}
}
/// <summary>
/// Logs an entry to the current logger instance.
/// </summary>
/// <param name="level">The level of the entry.</param>
/// <param name="entry">The textual value of the entry.</param>
internal static void Log(LogLevel level, object data)
{
InternalLogSource.Log(level, data);
}
internal static void LogFatal(object data) => Log(LogLevel.Fatal, data);
internal static void LogError(object data) => Log(LogLevel.Error, data);
internal static void LogWarning(object data) => Log(LogLevel.Warning, data);
internal static void LogMessage(object data) => Log(LogLevel.Message, data);
internal static void LogInfo(object data) => Log(LogLevel.Info, data);
internal static void LogDebug(object data) => Log(LogLevel.Debug, data);
public static ManualLogSource CreateLogSource(string sourceName)
{
var source = new ManualLogSource(sourceName);
Sources.Add(source);
return source;
}
private class LogSourceCollection : List<ILogSource>, ICollection<ILogSource>
{
void ICollection<ILogSource>.Add(ILogSource item)
{
if (item == null)
throw new ArgumentNullException(nameof(item), "Log sources cannot be null when added to the source list.");
item.LogEvent += InternalLogEvent;
base.Add(item);
}
void ICollection<ILogSource>.Clear()
{
foreach (var item in base.ToArray())
{
((ICollection<ILogSource>)this).Remove(item);
}
}
bool ICollection<ILogSource>.Remove(ILogSource item)
{
if (item == null)
return false;
if (!base.Contains(item))
return false;
item.LogEvent -= InternalLogEvent;
base.Remove(item);
return true;
}
}
}
=======
using System;
using System.Collections.Generic;
namespace BepInEx.Logging
{
/// <summary>
/// A static <see cref="BaseLogger"/> instance.
/// </summary>
public static class Logger
{
public static ICollection<ILogListener> Listeners { get; } = new List<ILogListener>();
public static ICollection<ILogSource> Sources { get; } = new LogSourceCollection();
private static readonly ManualLogSource InternalLogSource = CreateLogSource("BepInEx");
internal static void InternalLogEvent(object sender, LogEventArgs eventArgs)
{
foreach (var listener in Listeners)
{
listener?.LogEvent(sender, eventArgs);
}
}
/// <summary>
/// Logs an entry to the current logger instance.
/// </summary>
/// <param name="level">The level of the entry.</param>
/// <param name="entry">The textual value of the entry.</param>
internal static void Log(LogLevel level, object data)
{
InternalLogSource.Log(level, data);
}
internal static void LogFatal(object data) => Log(LogLevel.Fatal, data);
internal static void LogError(object data) => Log(LogLevel.Error, data);
internal static void LogWarning(object data) => Log(LogLevel.Warning, data);
internal static void LogMessage(object data) => Log(LogLevel.Message, data);
internal static void LogInfo(object data) => Log(LogLevel.Info, data);
internal static void LogDebug(object data) => Log(LogLevel.Debug, data);
public static ManualLogSource CreateLogSource(string sourceName)
{
var source = new ManualLogSource(sourceName);
Sources.Add(source);
return source;
}
private class LogSourceCollection : List<ILogSource>, ICollection<ILogSource>
{
void ICollection<ILogSource>.Add(ILogSource item)
{
if (item == null)
throw new ArgumentNullException(nameof(item), "Log sources cannot be null when added to the source list.");
item.LogEvent += InternalLogEvent;
base.Add(item);
}
void ICollection<ILogSource>.Clear()
{
foreach (var item in base.ToArray())
{
((ICollection<ILogSource>)this).Remove(item);
}
}
bool ICollection<ILogSource>.Remove(ILogSource item)
{
if (item == null)
return false;
if (!base.Contains(item))
return false;
item.LogEvent -= InternalLogEvent;
base.Remove(item);
return true;
}
}
}
>>>>>>>
using System;
using System.Collections.Generic;
namespace BepInEx.Logging
{
/// <summary>
/// A static <see cref="BaseLogger"/> instance.
/// </summary>
public static class Logger
{
public static ICollection<ILogListener> Listeners { get; } = new List<ILogListener>();
public static ICollection<ILogSource> Sources { get; } = new LogSourceCollection();
private static readonly ManualLogSource InternalLogSource = CreateLogSource("BepInEx");
internal static void InternalLogEvent(object sender, LogEventArgs eventArgs)
{
foreach (var listener in Listeners)
{
listener?.LogEvent(sender, eventArgs);
}
}
/// <summary>
/// Logs an entry to the current logger instance.
/// </summary>
/// <param name="level">The level of the entry.</param>
/// <param name="entry">The textual value of the entry.</param>
internal static void Log(LogLevel level, object data)
{
InternalLogSource.Log(level, data);
}
internal static void LogFatal(object data) => Log(LogLevel.Fatal, data);
internal static void LogError(object data) => Log(LogLevel.Error, data);
internal static void LogWarning(object data) => Log(LogLevel.Warning, data);
internal static void LogMessage(object data) => Log(LogLevel.Message, data);
internal static void LogInfo(object data) => Log(LogLevel.Info, data);
internal static void LogDebug(object data) => Log(LogLevel.Debug, data);
public static ManualLogSource CreateLogSource(string sourceName)
{
var source = new ManualLogSource(sourceName);
Sources.Add(source);
return source;
}
private class LogSourceCollection : List<ILogSource>, ICollection<ILogSource>
{
void ICollection<ILogSource>.Add(ILogSource item)
{
if (item == null)
throw new ArgumentNullException(nameof(item), "Log sources cannot be null when added to the source list.");
item.LogEvent += InternalLogEvent;
base.Add(item);
}
void ICollection<ILogSource>.Clear()
{
foreach (var item in base.ToArray())
{
((ICollection<ILogSource>)this).Remove(item);
}
}
bool ICollection<ILogSource>.Remove(ILogSource item)
{
if (item == null)
return false;
if (!base.Contains(item))
return false;
item.LogEvent -= InternalLogEvent;
base.Remove(item);
return true;
}
}
} |
<<<<<<<
toolStripButton_DrawMode.Image = Resources.pencil;
toolStripButton_DrawMode.DisplayStyle = ToolStripItemDisplayStyle.Image;
toolStripButton_SelectionMode.Image = Resources.cursor_arrow;
toolStripButton_SelectionMode.DisplayStyle = ToolStripItemDisplayStyle.Image;
=======
toolStripButton_DragBoxFilter.Image = Resources.table_select_big;
toolStripButton_DragBoxFilter.DisplayStyle = ToolStripItemDisplayStyle.Image;
>>>>>>>
toolStripButton_DrawMode.Image = Resources.pencil;
toolStripButton_DrawMode.DisplayStyle = ToolStripItemDisplayStyle.Image;
toolStripButton_SelectionMode.Image = Resources.cursor_arrow;
toolStripButton_SelectionMode.DisplayStyle = ToolStripItemDisplayStyle.Image;
toolStripButton_DragBoxFilter.Image = Resources.table_select_big;
toolStripButton_DragBoxFilter.DisplayStyle = ToolStripItemDisplayStyle.Image; |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.