conflict_resolution
stringlengths
27
16k
<<<<<<< Logger.LogError(e, "Error while handling minority fork situation."); MessageHub.Instance.Publish(StateEvent.RollbackFinished); ======= _logger?.Error(e, "Error while handling minority fork situation."); >>>>>>> Logger.LogError(e, "Error while handling minority fork situation.");
<<<<<<< var boundBlockInfo = await crossChainInfo.GetBoundParentChainBlockInfoAsync(parentChainBlockRootInfo.Height); Assert.Equal(parentChainBlockData, boundBlockInfo); ======= var boundBlockInfo = await crossChainInfo.GetBoundParentChainBlockInfoAsync(chainId, parentChainBlockRootInfo.Height); Assert.Equal(parentChainBlockInfo, boundBlockInfo); >>>>>>> var boundBlockInfo = await crossChainInfo.GetBoundParentChainBlockInfoAsync(chainId, parentChainBlockRootInfo.Height); Assert.Equal(parentChainBlockData, boundBlockInfo);
<<<<<<< object remoteValue = DoRemote(ownerID); if (remoteValue != null || m_doRemoteOnly) return (List<Classified>)remoteValue; Dictionary<string, object> where = new Dictionary<string, object>(1); where["OwnerUUID"] = ownerID; ======= QueryFilter filter = new QueryFilter(); filter.andFilters["OwnerUUID"] = ownerID; >>>>>>> object remoteValue = DoRemote(ownerID); if (remoteValue != null || m_doRemoteOnly) return (List<Classified>)remoteValue; QueryFilter filter = new QueryFilter(); filter.andFilters["OwnerUUID"] = ownerID; <<<<<<< object remoteValue = DoRemote(queryClassifiedID); if (remoteValue != null || m_doRemoteOnly) return (Classified)remoteValue; Dictionary<string, object> where = new Dictionary<string, object>(1); where["ClassifiedUUID"] = queryClassifiedID; ======= QueryFilter filter = new QueryFilter(); filter.andFilters["ClassifiedUUID"] = queryClassifiedID; >>>>>>> object remoteValue = DoRemote(queryClassifiedID); if (remoteValue != null || m_doRemoteOnly) return (Classified)remoteValue; QueryFilter filter = new QueryFilter(); filter.andFilters["ClassifiedUUID"] = queryClassifiedID; <<<<<<< object remoteValue = DoRemote(queryPickID); if (remoteValue != null || m_doRemoteOnly) return (ProfilePickInfo)remoteValue; Dictionary<string, object> where = new Dictionary<string, object>(1); where["PickUUID"] = queryPickID; ======= QueryFilter filter = new QueryFilter(); filter.andFilters["PickUUID"] = queryPickID; >>>>>>> object remoteValue = DoRemote(queryPickID); if (remoteValue != null || m_doRemoteOnly) return (ProfilePickInfo)remoteValue; QueryFilter filter = new QueryFilter(); filter.andFilters["PickUUID"] = queryPickID; <<<<<<< object remoteValue = DoRemote(ownerID); if (remoteValue != null || m_doRemoteOnly) return (List<ProfilePickInfo>)remoteValue; Dictionary<string, object> where = new Dictionary<string, object>(1); where["OwnerUUID"] = ownerID; ======= QueryFilter filter = new QueryFilter(); filter.andFilters["OwnerUUID"] = ownerID; >>>>>>> object remoteValue = DoRemote(ownerID); if (remoteValue != null || m_doRemoteOnly) return (List<ProfilePickInfo>)remoteValue; QueryFilter filter = new QueryFilter(); filter.andFilters["OwnerUUID"] = ownerID;
<<<<<<< Logger.LogTrace($"Timeout to get cached data from chain {_targetChainId}"); ======= _logger?.Trace($"Timeout to get cached data from chain {_targetChainId.DumpBase58()}"); >>>>>>> Logger.LogTrace($"Timeout to get cached data from chain {_targetChainId.DumpBase58()}");
<<<<<<< Dictionary<DataPath, StateCache> changedDict = new Dictionary<DataPath, StateCache>(); if (!IsSuccessful()) ======= Dictionary<Hash, StateCache> changedDict = new Dictionary<Hash, StateCache>(); if (ExecutionStatus != ExecutionStatus.ExecutedButNotCommitted) >>>>>>> Dictionary<DataPath, StateCache> changedDict = new Dictionary<DataPath, StateCache>(); if (ExecutionStatus != ExecutionStatus.ExecutedButNotCommitted)
<<<<<<< services.AddSingleton<IBlockAcceptedLogEventProcessor, TransactionFeeCalculatorCoefficientUpdatedLogEventProcessor>(); services.AddSingleton<ITransactionFeeExemptionService, TransactionFeeExemptionService>(); ======= services .AddSingleton<IBlockAcceptedLogEventProcessor, TransactionFeeCalculatorCoefficientUpdatedLogEventProcessor>(); services .AddSingleton<ICachedBlockchainExecutedDataService<Dictionary<string, CalculateFunction>>, CalculateFunctionExecutedDataService>(); >>>>>>> services .AddSingleton<IBlockAcceptedLogEventProcessor, TransactionFeeCalculatorCoefficientUpdatedLogEventProcessor>(); services .AddSingleton<ICachedBlockchainExecutedDataService<Dictionary<string, CalculateFunction>>, CalculateFunctionExecutedDataService>(); services.AddSingleton<ITransactionFeeExemptionService, TransactionFeeExemptionService>();
<<<<<<< using Acs0; using Acs4; using AElf.Contracts.Consensus.DPoS.SideChain; ======= using AElf.Contracts.Consensus.AEDPoS; using AElf.Contracts.Genesis; >>>>>>> using Acs0; using AElf.Contracts.Consensus.AEDPoS; <<<<<<< internal ConsensusContractContainer.ConsensusContractReferenceState ConsensusContract { get; set; } internal ACS0Container.ACS0ReferenceState BasicContractZero { get; set; } ======= internal AEDPoSContractContainer.AEDPoSContractReferenceState ConsensusContract { get; set; } internal BasicContractZeroContainer.BasicContractZeroReferenceState BasicContractZero { get; set; } >>>>>>> internal AEDPoSContractContainer.AEDPoSContractReferenceState ConsensusContract { get; set; } internal ACS0Container.ACS0ReferenceState BasicContractZero { get; set; }
<<<<<<< ======= private const int MaxLenght = 200; public int InvalidBlockCount { get { int count; _rwLock.AcquireReaderLock(Timeout); try { count = _blockCache.Count; } finally { _rwLock.ReleaseReaderLock(); } return count; } } public int ExecutedBlockCount { get { int count; _rwLock.AcquireReaderLock(Timeout); try { count = _executedBlocks.Count; } finally { _rwLock.ReleaseReaderLock(); } return count; } } >>>>>>>
<<<<<<< // At this point the current sync source either doesn't have the next announcement // or has none at all. ======= >>>>>>> <<<<<<< Logger.LogDebug($"Peer {peer.Peer} has been removed, trying to find another peer to sync."); SyncNext(); ======= if (CurrentSyncSource != null && CurrentSyncSource.IsSyncingHistory) { IPeer nextHistSyncSource = _peers.FirstOrDefault(p => p.KnownHeight >= peer.Peer.SyncTarget); if (nextHistSyncSource == null) { _logger?.Warn("No other peer to sync from."); return; } CurrentSyncSource = nextHistSyncSource; nextHistSyncSource.SyncToHeight(LocalHeight+1, nextHistSyncSource.KnownHeight); } else { _logger?.Debug($"Peer {peer.Peer} has been removed, trying to find another peer to sync."); SyncNext(); } >>>>>>> if (CurrentSyncSource != null && CurrentSyncSource.IsSyncingHistory) { IPeer nextHistSyncSource = _peers.FirstOrDefault(p => p.KnownHeight >= peer.Peer.SyncTarget); if (nextHistSyncSource == null) { Logger.LogWarning("No other peer to sync from."); return; } CurrentSyncSource = nextHistSyncSource; nextHistSyncSource.SyncToHeight(LocalHeight+1, nextHistSyncSource.KnownHeight); } else { Logger.LogDebug($"Peer {peer.Peer} has been removed, trying to find another peer to sync."); SyncNext(); } <<<<<<< Logger.LogDebug($"Peer {args.Peer} has been removed, trying to find another peer to sync."); SyncNext(); ======= if (CurrentSyncSource != null && CurrentSyncSource.IsSyncingHistory) { IPeer nextHistSyncSource = _peers.FirstOrDefault(p => p.KnownHeight >= args.Peer.SyncTarget); if (nextHistSyncSource == null) { _logger?.Warn("No other peer to sync from."); return; } CurrentSyncSource = nextHistSyncSource; nextHistSyncSource.SyncToHeight(LocalHeight+1, nextHistSyncSource.KnownHeight); } else { _logger?.Debug($"Peer {args.Peer} has been removed, trying to find another peer to sync."); SyncNext(); } >>>>>>> if (CurrentSyncSource != null && CurrentSyncSource.IsSyncingHistory) { IPeer nextHistSyncSource = _peers.FirstOrDefault(p => p.KnownHeight >= args.Peer.SyncTarget); if (nextHistSyncSource == null) { Logger.LogWarning("No other peer to sync from."); return; } CurrentSyncSource = nextHistSyncSource; nextHistSyncSource.SyncToHeight(LocalHeight+1, nextHistSyncSource.KnownHeight); } else { Logger.LogDebug($"Peer {args.Peer} has been removed, trying to find another peer to sync."); SyncNext(); } <<<<<<< var next = _peers .Where(p => !p.IsDisposed && p.AnyStashed && p.KnownHeight > LocalHeight) .Select(p => new { PeerMinAnnouncement = p.GetLowestAnnouncement(), Peer = p }) .OrderBy(p => p.PeerMinAnnouncement) .FirstOrDefault(); if (next == null) { Logger.LogError($"An annoucement should be stashed."); return; } if (LocalHeight+1 != next.PeerMinAnnouncement) { CurrentSyncSource = next.Peer; Logger.LogDebug($"Re-sync because next, {CurrentSyncSource} is {next.PeerMinAnnouncement}."); CurrentSyncSource.SyncToHeight(LocalHeight+1, next.PeerMinAnnouncement-1); return; } ======= >>>>>>> <<<<<<< Logger.LogWarning($"Block {blockHash.ToHex()} already in network cache."); ======= _logger.Warn($"Block {blockHash.ToHex()} already in network cache."); DoNext(block); >>>>>>> Logger.LogWarning($"Block {blockHash.ToHex()} already in network cache."); DoNext(block);
<<<<<<< ConfigurationSmartContractAddressNameProvider.Name); list.AddGenesisSmartContract(AssociationContractCode, AssociationSmartContractAddressNameProvider.Name); ======= ConfigurationSmartContractAddressNameProvider.Name, new SystemContractDeploymentInput.Types.SystemTransactionMethodCallList { Value = { new SystemContractDeploymentInput.Types.SystemTransactionMethodCall { MethodName = nameof(ConfigurationContainer.ConfigurationStub.InitialTotalResourceTokens), Params = new ResourceTokenAmount { Value = { {"CPU", SmartContractTestConstants.ResourceSupply}, {"RAM", SmartContractTestConstants.ResourceSupply}, {"DISK", SmartContractTestConstants.ResourceSupply} } }.ToByteString() } } }); >>>>>>> ConfigurationSmartContractAddressNameProvider.Name, new SystemContractDeploymentInput.Types.SystemTransactionMethodCallList { Value = { new SystemContractDeploymentInput.Types.SystemTransactionMethodCall { MethodName = nameof(ConfigurationContainer.ConfigurationStub.InitialTotalResourceTokens), Params = new ResourceTokenAmount { Value = { {"CPU", SmartContractTestConstants.ResourceSupply}, {"RAM", SmartContractTestConstants.ResourceSupply}, {"DISK", SmartContractTestConstants.ResourceSupply} } }.ToByteString() } } }); list.AddGenesisSmartContract(AssociationContractCode, AssociationSmartContractAddressNameProvider.Name);
<<<<<<< var targetCandidate = State.CandidateInformationMap[input.CandidatePubkey]; Assert(targetCandidate != null && targetCandidate.IsCurrentCandidate, $"Candidate: {input.CandidatePubkey} dose not exist"); ======= var targetInformation = State.CandidateInformationMap[input.CandidatePubkey]; AssertValidCandidateInformation(targetInformation); >>>>>>> var targetInformation = State.CandidateInformationMap[input.CandidatePubkey]; AssertValidCandidateInformation(targetInformation); <<<<<<< ======= if (tokenInfo.TotalSupply.Sub(tokenInfo.Issued) <= amount) // Which means remain tokens not enough. { State.TokenContract.Transfer.Send(new TransferInput { Symbol = symbol, To = Context.Sender, Amount = amount, Memo = $"Transfer {symbol}." }); } else { State.TokenContract.Issue.Send(new IssueInput { Symbol = symbol, To = Context.Sender, Amount = amount, Memo = $"Issue {symbol}." }); } >>>>>>>
<<<<<<< public SingletonState<AuthorityStuff> MethodFeeController { get; set; } ======= public SingletonState<RequiredAcsInContracts> RequiredAcsInContracts { get; set; } >>>>>>> public SingletonState<RequiredAcsInContracts> RequiredAcsInContracts { get; set; } public SingletonState<AuthorityStuff> MethodFeeController { get; set; }
<<<<<<< ======= using AElf.ChainController.EventMessages; using AElf.Common.Attributes; >>>>>>> using AElf.ChainController.EventMessages; <<<<<<< using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; ======= using Easy.MessageHub; >>>>>>> using Easy.MessageHub; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; <<<<<<< //Logger.LogLog(LogLevel.Debug, $"Side Chain Server responsed IndexedInfo message of height {height}"); ======= >>>>>>> //Logger.LogLog(LogLevel.Debug, $"Side Chain Server responsed IndexedInfo message of height {height}");
<<<<<<< .Type(typeof(decimal).Name, Permission.Allowed) .Type(typeof(string).Name, Permission.Allowed) ======= .Type(typeof(string).Name, Permission.Allowed, member => member .Constructor(Permission.Denied)) >>>>>>> .Type(typeof(decimal).Name, Permission.Allowed) .Type(typeof(string).Name, Permission.Allowed, member => member .Constructor(Permission.Denied))
<<<<<<< public ILogger<ConsensusBlockValidationFilter> Logger {get;set;} private readonly Address _nodeAddress; private readonly ECKeyPair _nodeKeyPair; ======= private readonly ILogger _logger; private Address ConsensusContractAddress => ContractHelpers.GetConsensusContractAddress(Hash.LoadBase58(ChainConfig.Instance.ChainId)); >>>>>>> public ILogger<ConsensusBlockValidationFilter> Logger {get;set;} private Address ConsensusContractAddress => ContractHelpers.GetConsensusContractAddress(Hash.LoadBase58(ChainConfig.Instance.ChainId)); <<<<<<< _nodeAddress = Address.Parse(NodeConfig.Instance.NodeAccount); _nodeKeyPair = NodeConfig.Instance.ECKeyPair; Logger= NullLogger<ConsensusBlockValidationFilter>.Instance; ======= _logger = LogManager.GetLogger(nameof(ConsensusBlockValidationFilter)); >>>>>>> Logger= NullLogger<ConsensusBlockValidationFilter>.Instance; <<<<<<< if (contractAccountHash == null || keyPair == null || recipientAddress == null) { Logger.LogError("Something wrong happened to consensus verification filter."); return null; } ======= >>>>>>>
<<<<<<< ======= /* >>>>>>>
<<<<<<< while (Query(new byte[] { IscCodes.isc_info_svc_line }).Count != 0) { } } bool ProcessMessages(ArrayList items) { var message = GetMessage(items); if (message == null) return false; OnServiceOutput(message); return true; ======= >>>>>>>
<<<<<<< ======= _compression = compression; _srpClient = new SrpClient(); >>>>>>> _compression = compression; <<<<<<< if (operation == IscCodes.op_cond_accept || operation == IscCodes.op_accept_data) { var data = xdrStream.ReadBuffer(); var acceptPluginName = xdrStream.ReadString(); var isAuthenticated = xdrStream.ReadBoolean(); var keys = xdrStream.ReadString(); if (!isAuthenticated) { switch (acceptPluginName) { case SrpClient.PluginName: _authData = Encoding.ASCII.GetBytes(_srp.ClientProof(_userID, _password, data).ToHexString()); break; case SspiHelper.PluginName: _authData = _sspi.GetClientSecurity(data); break; default: throw new ArgumentOutOfRangeException(); } } } ======= if (_compression && !((_protocolMinimunType & IscCodes.pflag_compress) != 0)) { _compression = false; } >>>>>>> if (_compression && !((_protocolMinimunType & IscCodes.pflag_compress) != 0)) { _compression = false; } if (operation == IscCodes.op_cond_accept || operation == IscCodes.op_accept_data) { var data = xdrStream.ReadBuffer(); var acceptPluginName = xdrStream.ReadString(); var isAuthenticated = xdrStream.ReadBoolean(); var keys = xdrStream.ReadString(); if (!isAuthenticated) { switch (acceptPluginName) { case SrpClient.PluginName: _authData = Encoding.ASCII.GetBytes(_srp.ClientProof(_userID, _password, data).ToHexString()); break; case SspiHelper.PluginName: _authData = _sspi.GetClientSecurity(data); break; default: throw new ArgumentOutOfRangeException(); } } }
<<<<<<< this.hubScopeRefreshTokenTimer = new IOThreadTimer(s => ((IotHubConnection)s).OnRefreshTokenAsync(), this, false); this.iotHubLinkRefreshTokenTimers = new ConcurrentDictionary<string, IotHubLinkRefreshTokenTimer>(); this.useWebSocketOnly = useWebSocketOnly; ======= this.refreshTokenTimer = new IOThreadTimer(s => ((IotHubConnection)s).OnRefreshToken(), this, false); this.amqpTransportSettings = amqpTransportSettings; >>>>>>> this.hubScopeRefreshTokenTimer = new IOThreadTimer(s => ((IotHubConnection)s).OnRefreshTokenAsync(), this, false); this.iotHubLinkRefreshTokenTimers = new ConcurrentDictionary<string, IotHubLinkRefreshTokenTimer>(); this.amqpTransportSettings = amqpTransportSettings; <<<<<<< // Try only Amqp transport over WebSocket transport = await this.CreateClientWebSocketTransportAsync(timeoutHelper.RemainingTime()); } else { try { ======= case TransportType.Amqp_WebSocket_Only: transport = await this.CreateClientWebSocketTransport(timeoutHelper.RemainingTime()); break; case TransportType.Amqp_Tcp_Only: >>>>>>> case TransportType.Amqp_WebSocket_Only: transport = await this.CreateClientWebSocketTransportAsync(timeoutHelper.RemainingTime()); break; case TransportType.Amqp_Tcp_Only: <<<<<<< } catch (Exception e) { if (Fx.IsFatal(e)) { throw; } // Amqp transport over TCP failed. Retry Amqp transport over WebSocket if (timeoutHelper.RemainingTime() != TimeSpan.Zero) { transport = await this.CreateClientWebSocketTransportAsync(timeoutHelper.RemainingTime()); } else { throw; } } ======= break; default: throw new InvalidOperationException("AmqpTransportSettings must specify WebSocketOnly or TcpOnly"); >>>>>>> break; default: throw new InvalidOperationException("AmqpTransportSettings must specify WebSocketOnly or TcpOnly"); <<<<<<< } void CancelRefreshTokenTimers() { foreach (var iotHubLinkRefreshTokenTimer in this.iotHubLinkRefreshTokenTimers.Values) { iotHubLinkRefreshTokenTimer.Cancel(); } this.iotHubLinkRefreshTokenTimers.Clear(); ======= >>>>>>> } void CancelRefreshTokenTimers() { foreach (var iotHubLinkRefreshTokenTimer in this.iotHubLinkRefreshTokenTimers.Values) { iotHubLinkRefreshTokenTimer.Cancel(); } this.iotHubLinkRefreshTokenTimers.Clear();
<<<<<<< volatile bool closeCalled; #if !WINDOWS_UWP ======= #if !PCL >>>>>>> volatile bool closeCalled; #if !PCL <<<<<<< #if WINDOWS_UWP return Create(hostname, authenticationMethod, TransportType.Http1); #else ======= #if WINDOWS_UWP || PCL return Create(hostname, authenticationMethod, TransportType.Http1); #else >>>>>>> #if WINDOWS_UWP || PCL return Create(hostname, authenticationMethod, TransportType.Http1); #else <<<<<<< this.ThrowIfDisposed(); #if WINDOWS_UWP ======= #if PCL >>>>>>> this.ThrowIfDisposed(); #if PCL <<<<<<< this.closeCalled = true; #if !WINDOWS_UWP ======= #if !PCL >>>>>>> this.closeCalled = true; #if !PCL <<<<<<< #if !WINDOWS_UWP } return TaskHelpers.CompletedTask; ======= #if !PCL } >>>>>>> #if !PCL } <<<<<<< }); } ======= }).AsTaskOrAsyncOp(); } >>>>>>> }).AsTaskOrAsyncOp(); } <<<<<<< #if !WINDOWS_UWP } ======= #if !PCL } >>>>>>> #if !PCL } <<<<<<< await this.impl.CompleteAsync(message).AsTaskOrAsyncOp(); }); } ======= await this.impl.CompleteAsync(message); }).AsTaskOrAsyncOp(); } >>>>>>> await this.impl.CompleteAsync(message); }).AsTaskOrAsyncOp(); } <<<<<<< await this.impl.AbandonAsync(lockToken).AsTaskOrAsyncOp(); }); } ======= await this.impl.AbandonAsync(lockToken); }).AsTaskOrAsyncOp(); } >>>>>>> await this.impl.AbandonAsync(lockToken); }).AsTaskOrAsyncOp(); } <<<<<<< await this.impl.AbandonAsync(message).AsTaskOrAsyncOp(); }); } ======= await this.impl.AbandonAsync(message); }).AsTaskOrAsyncOp(); } >>>>>>> await this.impl.AbandonAsync(message); }).AsTaskOrAsyncOp(); } <<<<<<< #if !WINDOWS_UWP } ======= #if !PCL } >>>>>>> #if !PCL } <<<<<<< await this.impl.RejectAsync(message).AsTaskOrAsyncOp(); }); } ======= await this.impl.RejectAsync(message); }).AsTaskOrAsyncOp(); } >>>>>>> await this.impl.RejectAsync(message); }).AsTaskOrAsyncOp(); } <<<<<<< #if !WINDOWS_UWP } ======= #if !PCL } >>>>>>> #if !PCL }
<<<<<<< #endif ======= using Microsoft.Azure.Devices.Client.Exceptions; using Microsoft.Azure.Devices.Client.Extensions; >>>>>>> using Microsoft.Azure.Devices.Client.Exceptions; using Microsoft.Azure.Devices.Client.Extensions; <<<<<<< #if !WINDOWS_UWP readonly string hostName; readonly int port; ======= internal static readonly TimeSpan DefaultOperationTimeout = TimeSpan.FromMinutes(1); internal static readonly TimeSpan DefaultOpenTimeout = TimeSpan.FromMinutes(1); static readonly TimeSpan RefreshTokenBuffer = TimeSpan.FromMinutes(2); static readonly TimeSpan RefreshTokenRetryInterval = TimeSpan.FromSeconds(30); >>>>>>> readonly string hostName; readonly int port; <<<<<<< static readonly Lazy<bool> DisableServerCertificateValidation = new Lazy<bool>(InitializeDisableServerCertificateValidation); ======= readonly static Lazy<bool> DisableServerCertificateValidation = new Lazy<bool>(InitializeDisableServerCertificateValidation); readonly IotHubConnectionString connectionString; readonly AccessRights accessRights; readonly FaultTolerantAmqpObject<AmqpSession> faultTolerantSession; #if WINDOWS_UWP readonly IOThreadTimerSlim refreshTokenTimer; #else readonly IOThreadTimer refreshTokenTimer; #endif readonly AmqpTransportSettings amqpTransportSettings; public IotHubConnection(IotHubConnectionString connectionString, AccessRights accessRights, AmqpTransportSettings amqpTransportSettings) { this.connectionString = connectionString; this.accessRights = accessRights; this.faultTolerantSession = new FaultTolerantAmqpObject<AmqpSession>(this.CreateSessionAsync, this.CloseConnection); #if WINDOWS_UWP this.refreshTokenTimer = new IOThreadTimerSlim(s => ((IotHubConnection)s).OnRefreshToken(), this, false); #else this.refreshTokenTimer = new IOThreadTimer(s => ((IotHubConnection)s).OnRefreshToken(), this, false); #endif this.amqpTransportSettings = amqpTransportSettings; } >>>>>>> static readonly Lazy<bool> DisableServerCertificateValidation = new Lazy<bool>(InitializeDisableServerCertificateValidation); <<<<<<< TargetHost = this.hostName, ======= TargetHost = this.connectionString.HostName, #if !WINDOWS_UWP // Not supported in UWP >>>>>>> TargetHost = this.hostName, #if !WINDOWS_UWP // Not supported in UWP <<<<<<< CertificateValidationCallback = OnRemoteCertificateValidation ======= CertificateValidationCallback = this.OnRemoteCertificateValidation #endif >>>>>>> CertificateValidationCallback = OnRemoteCertificateValidation #endif <<<<<<< static bool OnRemoteCertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) ======= async Task SendCbsTokenAsync(AmqpCbsLink cbsLink, TimeSpan timeout) { string audience = this.ConnectionString.AmqpEndpoint.AbsoluteUri; string resource = this.ConnectionString.AmqpEndpoint.AbsoluteUri; var expiresAtUtc = await cbsLink.SendTokenAsync( this.ConnectionString, this.ConnectionString.AmqpEndpoint, audience, resource, AccessRightsHelper.AccessRightsToStringArray(this.accessRights), timeout); this.ScheduleTokenRefresh(expiresAtUtc); } async void OnRefreshToken() { AmqpSession amqpSession = this.faultTolerantSession.Value; if (amqpSession != null && !amqpSession.IsClosing()) { var cbsLink = amqpSession.Connection.Extensions.Find<AmqpCbsLink>(); if (cbsLink != null) { try { await this.SendCbsTokenAsync(cbsLink, DefaultOperationTimeout); } catch (Exception exception) { if (Fx.IsFatal(exception)) { throw; } this.refreshTokenTimer.Set(RefreshTokenRetryInterval); } } } } #if !WINDOWS_UWP // Not supported in UWP bool OnRemoteCertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) >>>>>>> #if !WINDOWS_UWP // Not supported in UWP static bool OnRemoteCertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) <<<<<<< #endif ======= void ScheduleTokenRefresh(DateTime expiresAtUtc) { if (expiresAtUtc == DateTime.MaxValue) { return; } TimeSpan timeFromNow = expiresAtUtc.Subtract(RefreshTokenBuffer).Subtract(DateTime.UtcNow); if (timeFromNow > TimeSpan.Zero) { this.refreshTokenTimer.Set(timeFromNow); } } >>>>>>>
<<<<<<< ======= OptionXY weight, CapOptions cap, OffsetOptions offset, Option acceleration, Option limtOrExp, Option midpoint, >>>>>>> <<<<<<< ======= public OptionXY Weight { get; } public CapOptions Cap { get; } public OffsetOptions Offset { get; } public Option Acceleration { get; } public Option LimitOrExponent { get; } public Option Midpoint { get; } >>>>>>> <<<<<<< combineMagnitudes = ApplyOptions.IsWhole, modes = ApplyOptions.GetModes(), args = ApplyOptions.GetArgs(), ======= combineMagnitudes = true, modes = new Vec2<AccelMode> { x = (AccelMode)AccelerationOptions.AccelerationIndex }, args = new Vec2<AccelArgs> { x = new AccelArgs { offset = Offset.Offset, legacy_offset = Offset.LegacyOffset, weight = Weight.Fields.X, gainCap = Cap.VelocityGainCap, scaleCap = Cap.SensitivityCapX, accel = Acceleration.Field.Data, rate = Acceleration.Field.Data, powerScale = Acceleration.Field.Data, limit = LimitOrExponent.Field.Data, exponent = LimitOrExponent.Field.Data, powerExponent = LimitOrExponent.Field.Data, midpoint = Midpoint.Field.Data } }, >>>>>>> combineMagnitudes = ApplyOptions.IsWhole, modes = ApplyOptions.GetModes(), args = ApplyOptions.GetArgs(), <<<<<<< RefreshOnRead(); } public void RefreshOnRead() { AccelCharts.RefreshXY(Settings.RawAccelSettings.AccelerationSettings.combineMagnitudes); UpdateGraph(); UpdateShownActiveValues(); ======= >>>>>>> RefreshOnRead(); } public void RefreshOnRead() { AccelCharts.RefreshXY(Settings.RawAccelSettings.AccelerationSettings.combineMagnitudes); UpdateGraph(); UpdateShownActiveValues(); <<<<<<< ApplyOptions.SetActiveValues(settings); ======= AccelerationOptions.SetActiveValue((int)settings.modes.x); Offset.SetActiveValue(settings.args.x.offset, settings.args.y.offset); Weight.SetActiveValues(settings.args.x.weight, settings.args.x.weight); Acceleration.SetActiveValue(settings.args.x.accel); // rate, powerscale LimitOrExponent.SetActiveValue(settings.args.x.limit); //exp, powerexp Midpoint.SetActiveValue(settings.args.x.midpoint); //Cap.SetActiveValues(Settings.ActiveAccel.GainCap, Settings.ActiveAccel.CapX, Settings.ActiveAccel.CapY, Settings.ActiveAccel.GainCapEnabled); >>>>>>> ApplyOptions.SetActiveValues(settings);
<<<<<<< directionalMultipliers = driverSettings.directionalMultipliers, domainArgs = ApplyOptions.Directionality.GetDomainArgs(), rangeXY = ApplyOptions.Directionality.GetRangeXY(), ======= directionalMultipliers = driverSettings.directionalMultipliers, deviceID = DeviceIDManager.ID, >>>>>>> directionalMultipliers = driverSettings.directionalMultipliers, domainArgs = ApplyOptions.Directionality.GetDomainArgs(), rangeXY = ApplyOptions.Directionality.GetRangeXY(), deviceID = DeviceIDManager.ID,
<<<<<<< public PixelData GetPixelData() { return new PixelData(GetPixels32(), Width(), Height()); } ======= public void InitScreen() { Renderer renderer = GetComponent<Renderer>(); outputTexture = new Texture2D(webCamTexture.width, webCamTexture.height); renderer.material.mainTexture = outputTexture; pixelData = new Color32[webCamTexture.width * webCamTexture.height]; } >>>>>>> public PixelData GetPixelData() { return new PixelData(GetPixels32(), Width(), Height()); } public void InitScreen() { Renderer renderer = GetComponent<Renderer>(); outputTexture = new Texture2D(webCamTexture.width, webCamTexture.height); renderer.material.mainTexture = outputTexture; pixelData = new Color32[webCamTexture.width * webCamTexture.height]; }
<<<<<<< public RyuJitNodeFactory(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup) : base(context, compilationModuleGroup, new CompilerGeneratedMetadataManager(compilationModuleGroup, context), new CoreRTNameMangler(context.Target.IsWindows ? (NodeMangler)new WindowsNodeMangler() : (NodeMangler)new UnixNodeMangler(), false)) ======= public RyuJitNodeFactory(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, MetadataManager metadataManager) : base(context, compilationModuleGroup, metadataManager, new CoreRTNameMangler(false)) >>>>>>> public RyuJitNodeFactory(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, MetadataManager metadataManager) : base(context, compilationModuleGroup, metadataManager, new CoreRTNameMangler(context.Target.IsWindows ? (NodeMangler)new WindowsNodeMangler() : (NodeMangler)new UnixNodeMangler(), false))
<<<<<<< #region IsMissing and IsNotMissing /// <summary> /// Returns true if the selected property is missing from the document /// </summary> /// <typeparam name="T">Type of the property being selected</typeparam> /// <param name="property">Property to test</param> /// <returns>True if the property is missing from the document</returns> public static bool IsMissing<T>(T property) { // Implementation will only be called when unit testing // Since properties cannot be missing on in-memory objects // Always returns false return false; } /// <summary> /// Returns true if the named property is missing from the document /// </summary> /// <typeparam name="T">Type of the document being tested</typeparam> /// <param name="document">Document being tested</param> /// <param name="propertyName">Property name to test</param> /// <returns>True if the property is missing from the document</returns> /// <remarks><see cref="propertyName">propertyName</see> must be a constant when used in a LINQ expression</remarks> public static bool IsMissing<T>(T document, string propertyName) { // Implementation will only be called when unit testing // Test to see if the property is present via reflection return (document == null) || (typeof (T).GetProperty(propertyName) == null); } /// <summary> /// Returns true if the selected property is present on the document /// </summary> /// <typeparam name="T">Type of the property being selected</typeparam> /// <param name="property">Property to test</param> /// <returns>True if the property is present on the document</returns> public static bool IsNotMissing<T>(T property) { // Implementation will only be called when unit testing // Since properties cannot be missing on in-memory objects // Always returns true return true; } /// <summary> /// Returns true if the named property is present on the document /// </summary> /// <typeparam name="T">Type of the document being tested</typeparam> /// <param name="document">Document being tested</param> /// <param name="propertyName">Property name to test</param> /// <returns>True if the property is present on the document</returns> /// <remarks><see cref="propertyName">propertyName</see> must be a constant when used in a LINQ expression</remarks> public static bool IsNotMissing<T>(T document, string propertyName) { // Implementation will only be called when unit testing // Test to see if the property is present via reflection return (document != null) && (typeof(T).GetProperty(propertyName) != null); } #endregion #region IsValued and IsNotValued /// <summary> /// Returns true if the selected property is present on the document and not null /// </summary> /// <typeparam name="T">Type of the property being selected</typeparam> /// <param name="property">Property to test</param> /// <returns>True if the property is present on the document and not null</returns> public static bool IsValued<T>(T property) { // Implementation will only be called when unit testing // Since properties cannot be missing on in-memory objects // Simply test for null return property != null; } /// <summary> /// Returns true if the named property is not missing from the document and not null /// </summary> /// <typeparam name="T">Type of the document being tested</typeparam> /// <param name="document">Document being tested</param> /// <param name="propertyName">Property name to test</param> /// <returns>True if the property is present on the document and not null</returns> /// <remarks><see cref="propertyName">propertyName</see> must be a constant when used in a LINQ expression</remarks> public static bool IsValued<T>(T document, string propertyName) { // Implementation will only be called when unit testing // Test to see if the property is present and not null via reflection if (document == null) { return false; } var property = typeof (T).GetProperty(propertyName); if (property == null) { return false; } return property.GetValue(document) != null; } /// <summary> /// Returns true if the selected property is missing from the document or null /// </summary> /// <typeparam name="T">Type of the property being selected</typeparam> /// <param name="property">Property to test</param> /// <returns>True if the property is missing from the document or null</returns> public static bool IsNotValued<T>(T property) { // Implementation will only be called when unit testing // Since properties cannot be missing on in-memory objects // Simply test for null return property == null; } /// <summary> /// Returns true if the named property is missing from the document or null /// </summary> /// <typeparam name="T">Type of the document being tested</typeparam> /// <param name="document">Document being tested</param> /// <param name="propertyName">Property name to test</param> /// <returns>True if the property is missing from the document or null</returns> /// <remarks><see cref="propertyName">propertyName</see> must be a constant when used in a LINQ expression</remarks> public static bool IsNotValued<T>(T document, string propertyName) { // Implementation will only be called when unit testing // Test to see if the property is present via reflection if (document == null) { return true; } var property = typeof(T).GetProperty(propertyName); if (property == null) { return true; } return property.GetValue(document) == null; } #endregion ======= /// <summary> /// Returns the key for a document object /// </summary> /// <param name="document">Document to get key from</param> /// <returns>Key of the document</returns> /// <remarks>Should only be called against a top-level document in Couchbase</remarks> public static string Key(object document) { // Implementation will only be called when unit testing // using LINQ-to-Objects and faking a Couchbase database // Any faked document object should implement IDocumentMetadataProvider var provider = document as IDocumentMetadataProvider; if (provider != null) { var metadata = provider.GetMetadata(); return metadata != null ? metadata.Id : null; } else { return null; } } >>>>>>> /// <summary> /// Returns the key for a document object /// </summary> /// <param name="document">Document to get key from</param> /// <returns>Key of the document</returns> /// <remarks>Should only be called against a top-level document in Couchbase</remarks> public static string Key(object document) { // Implementation will only be called when unit testing // using LINQ-to-Objects and faking a Couchbase database // Any faked document object should implement IDocumentMetadataProvider var provider = document as IDocumentMetadataProvider; if (provider != null) { var metadata = provider.GetMetadata(); return metadata != null ? metadata.Id : null; } else { return null; } } #region IsMissing and IsNotMissing /// <summary> /// Returns true if the selected property is missing from the document /// </summary> /// <typeparam name="T">Type of the property being selected</typeparam> /// <param name="property">Property to test</param> /// <returns>True if the property is missing from the document</returns> public static bool IsMissing<T>(T property) { // Implementation will only be called when unit testing // Since properties cannot be missing on in-memory objects // Always returns false return false; } /// <summary> /// Returns true if the named property is missing from the document /// </summary> /// <typeparam name="T">Type of the document being tested</typeparam> /// <param name="document">Document being tested</param> /// <param name="propertyName">Property name to test</param> /// <returns>True if the property is missing from the document</returns> /// <remarks><see cref="propertyName">propertyName</see> must be a constant when used in a LINQ expression</remarks> public static bool IsMissing<T>(T document, string propertyName) { // Implementation will only be called when unit testing // Test to see if the property is present via reflection return (document == null) || (typeof (T).GetProperty(propertyName) == null); } /// <summary> /// Returns true if the selected property is present on the document /// </summary> /// <typeparam name="T">Type of the property being selected</typeparam> /// <param name="property">Property to test</param> /// <returns>True if the property is present on the document</returns> public static bool IsNotMissing<T>(T property) { // Implementation will only be called when unit testing // Since properties cannot be missing on in-memory objects // Always returns true return true; } /// <summary> /// Returns true if the named property is present on the document /// </summary> /// <typeparam name="T">Type of the document being tested</typeparam> /// <param name="document">Document being tested</param> /// <param name="propertyName">Property name to test</param> /// <returns>True if the property is present on the document</returns> /// <remarks><see cref="propertyName">propertyName</see> must be a constant when used in a LINQ expression</remarks> public static bool IsNotMissing<T>(T document, string propertyName) { // Implementation will only be called when unit testing // Test to see if the property is present via reflection return (document != null) && (typeof(T).GetProperty(propertyName) != null); } #endregion #region IsValued and IsNotValued /// <summary> /// Returns true if the selected property is present on the document and not null /// </summary> /// <typeparam name="T">Type of the property being selected</typeparam> /// <param name="property">Property to test</param> /// <returns>True if the property is present on the document and not null</returns> public static bool IsValued<T>(T property) { // Implementation will only be called when unit testing // Since properties cannot be missing on in-memory objects // Simply test for null return property != null; } /// <summary> /// Returns true if the named property is not missing from the document and not null /// </summary> /// <typeparam name="T">Type of the document being tested</typeparam> /// <param name="document">Document being tested</param> /// <param name="propertyName">Property name to test</param> /// <returns>True if the property is present on the document and not null</returns> /// <remarks><see cref="propertyName">propertyName</see> must be a constant when used in a LINQ expression</remarks> public static bool IsValued<T>(T document, string propertyName) { // Implementation will only be called when unit testing // Test to see if the property is present and not null via reflection if (document == null) { return false; } var property = typeof (T).GetProperty(propertyName); if (property == null) { return false; } return property.GetValue(document) != null; } /// <summary> /// Returns true if the selected property is missing from the document or null /// </summary> /// <typeparam name="T">Type of the property being selected</typeparam> /// <param name="property">Property to test</param> /// <returns>True if the property is missing from the document or null</returns> public static bool IsNotValued<T>(T property) { // Implementation will only be called when unit testing // Since properties cannot be missing on in-memory objects // Simply test for null return property == null; } /// <summary> /// Returns true if the named property is missing from the document or null /// </summary> /// <typeparam name="T">Type of the document being tested</typeparam> /// <param name="document">Document being tested</param> /// <param name="propertyName">Property name to test</param> /// <returns>True if the property is missing from the document or null</returns> /// <remarks><see cref="propertyName">propertyName</see> must be a constant when used in a LINQ expression</remarks> public static bool IsNotValued<T>(T document, string propertyName) { // Implementation will only be called when unit testing // Test to see if the property is present via reflection if (document == null) { return true; } var property = typeof(T).GetProperty(propertyName); if (property == null) { return true; } return property.GetValue(document) == null; } #endregion
<<<<<<< return EntityFilterManager.ApplyFilters(new BucketQueryable<T>(_bucket, Configuration)); ======= return DocumentFilterManager.ApplyFilters(new BucketQueryable<T>(_bucket)); >>>>>>> return DocumentFilterManager.ApplyFilters(new BucketQueryable<T>(_bucket, Configuration));
<<<<<<< SetKeywords(builtinParams, m_ProceduralSkyParameters); ======= SetKeywords(builtinParams, proceduralSkyParams, renderForCubemap); >>>>>>> SetKeywords(builtinParams, m_ProceduralSkyParameters, renderForCubemap); <<<<<<< SetUniforms(builtinParams, m_ProceduralSkyParameters, ref properties); ======= SetUniforms(builtinParams, proceduralSkyParams, renderForCubemap, ref properties); >>>>>>> SetUniforms(builtinParams, m_ProceduralSkyParameters, renderForCubemap, ref properties);
<<<<<<< if (testFileContext.TestContext.TestFileSettings.CreateFailedTestForFileError.GetValueOrDefault()) { var fileErrorTest = new TestCase(); fileErrorTest.InputTestFile = testFileContext.ReferencedFile.Path; fileErrorTest.TestName = string.Format("!! File Error #{0} - Error encountered outside of test case execution !!", testFileContext.TestFileSummary.Errors.Count); fileErrorTest.TestResults.Add(new TestResult { Passed = false, StackTrace = error.Error.StackAsString ?? error.Error.FormatStackObject(), Message = error.Error.Message }); callback.TestStarted(fileErrorTest); callback.TestFinished(fileErrorTest); testFileContext.TestFileSummary.AddTestCase(fileErrorTest); } ChutzpahTracer.TraceError("Eror recieved from Phantom {0}", error.Error.Message); ======= ChutzpahTracer.TraceError("Error received from Phantom {0}", error.Error.Message); >>>>>>> if (testFileContext.TestContext.TestFileSettings.CreateFailedTestForFileError.GetValueOrDefault()) { var fileErrorTest = new TestCase(); fileErrorTest.InputTestFile = testFileContext.ReferencedFile.Path; fileErrorTest.TestName = string.Format("!! File Error #{0} - Error encountered outside of test case execution !!", testFileContext.TestFileSummary.Errors.Count); fileErrorTest.TestResults.Add(new TestResult { Passed = false, StackTrace = error.Error.StackAsString ?? error.Error.FormatStackObject(), Message = error.Error.Message }); callback.TestStarted(fileErrorTest); callback.TestFinished(fileErrorTest); testFileContext.TestFileSummary.AddTestCase(fileErrorTest); } ChutzpahTracer.TraceError("Error received from Phantom {0}", error.Error.Message);
<<<<<<< public bool Coverage { get; protected set; } ======= public TestingMode TestMode { get { return testMode; } protected set { testMode = value; } } >>>>>>> public bool Coverage { get; protected set; } public TestingMode TestMode { get { return testMode; } protected set { testMode = value; } }
<<<<<<< private readonly ICoverageEngine mainCoverageEngine; ======= private readonly IJsonSerializer serializer; >>>>>>> private readonly ICoverageEngine mainCoverageEngine; private readonly IJsonSerializer serializer; <<<<<<< ICoverageEngine coverageEngine, ======= IJsonSerializer serializer, >>>>>>> ICoverageEngine coverageEngine, IJsonSerializer serializer, <<<<<<< private string CreateTestHarness(IFrameworkDefinition definition, string inputTestFilePath, IEnumerable<ReferencedFile> referencedFiles, ICoverageEngine coverageEngine, List<string> temporaryFiles) ======= private string CreateTestHarness(IFrameworkDefinition definition, ChutzpahTestSettingsFile chutzpahTestSettings, string inputTestFilePath, IEnumerable<ReferencedFile> referencedFiles, List<string> temporaryFiles) >>>>>>> private string CreateTestHarness(IFrameworkDefinition definition, ChutzpahTestSettingsFile chutzpahTestSettings, string inputTestFilePath, IEnumerable<ReferencedFile> referencedFiles, List<string> temporaryFiles) ICoverageEngine coverageEngine, <<<<<<< ======= private static string FillTestHtmlTemplate(string testHtmlTemplate, string inputTestFileDir, IEnumerable<ReferencedFile> referencedFiles) { var testJsReplacement = new StringBuilder(); var testFrameworkDependencies = new StringBuilder(); var referenceJsReplacement = new StringBuilder(); var referenceCssReplacement = new StringBuilder(); var referenceIconReplacement = new StringBuilder(); var referencedFilePaths = referencedFiles.OrderBy(x => x.IsFileUnderTest).Select(x => x); BuildReferenceHtml(referencedFilePaths, testFrameworkDependencies, referenceCssReplacement, testJsReplacement, referenceJsReplacement, referenceIconReplacement); testHtmlTemplate = testHtmlTemplate.Replace("@@TestFrameworkDependencies@@", testFrameworkDependencies.ToString()); testHtmlTemplate = testHtmlTemplate.Replace("@@TestJSFile@@", testJsReplacement.ToString()); testHtmlTemplate = testHtmlTemplate.Replace("@@ReferencedJSFiles@@", referenceJsReplacement.ToString()); testHtmlTemplate = testHtmlTemplate.Replace("@@ReferencedCSSFiles@@", referenceCssReplacement.ToString()); return testHtmlTemplate; } private static void BuildReferenceHtml(IEnumerable<ReferencedFile> referencedFilePaths, StringBuilder testFrameworkDependencies, StringBuilder referenceCssReplacement, StringBuilder testJsReplacement, StringBuilder referenceJsReplacement, StringBuilder referenceIconReplacement) { foreach (ReferencedFile referencedFile in referencedFilePaths) { string referencePath = string.IsNullOrEmpty(referencedFile.GeneratedFilePath) ? referencedFile.Path : referencedFile.GeneratedFilePath; var replacementBuffer = ChooseReplacementBuffer(testFrameworkDependencies, referenceCssReplacement, testJsReplacement, referenceJsReplacement, referenceIconReplacement, referencedFile, referencePath); if (replacementBuffer == null) continue; if (referencePath.EndsWith(Constants.CssExtension, StringComparison.OrdinalIgnoreCase)) { replacementBuffer.AppendLine(GetStyleStatement(referencePath)); } else if (referencedFile.IsFileUnderTest && referencePath.EndsWith(Constants.JavaScriptExtension, StringComparison.OrdinalIgnoreCase)) { replacementBuffer.AppendLine(GetScriptStatement(referencePath)); } else if (referencePath.EndsWith(Constants.JavaScriptExtension, StringComparison.OrdinalIgnoreCase)) { replacementBuffer.AppendLine(GetScriptStatement(referencePath)); } else if (referencePath.EndsWith(Constants.PngExtension, StringComparison.OrdinalIgnoreCase)) { replacementBuffer.AppendLine(GetIconStatement(referencePath)); } } } private static StringBuilder ChooseReplacementBuffer(StringBuilder testFrameworkDependencies, StringBuilder referenceCssReplacement, StringBuilder testJsReplacement, StringBuilder referenceJsReplacement, StringBuilder referenceIconReplacement, ReferencedFile referencedFile, string referencePath) { StringBuilder replacementBuffer = null; if (referencedFile.IsTestFrameworkDependency) { replacementBuffer = testFrameworkDependencies; } else if (referencedFile.IsFileUnderTest && referencePath.EndsWith(Constants.JavaScriptExtension, StringComparison.OrdinalIgnoreCase)) { replacementBuffer = testJsReplacement; } else if (referencePath.EndsWith(Constants.CssExtension, StringComparison.OrdinalIgnoreCase)) { replacementBuffer = referenceCssReplacement; } else if (referencePath.EndsWith(Constants.JavaScriptExtension, StringComparison.OrdinalIgnoreCase)) { replacementBuffer = referenceJsReplacement; } else if (referencePath.EndsWith(Constants.PngExtension, StringComparison.OrdinalIgnoreCase)) { replacementBuffer = referenceIconReplacement; } return replacementBuffer; } public static string GetScriptStatement(string path, bool absolute = true) { const string format = @"<script type=""text/javascript"" src=""{0}""></script>"; return string.Format(format, absolute ? GetAbsoluteFileUrl(path) : path); } public static string GetStyleStatement(string path) { const string format = @"<link rel=""stylesheet"" href=""{0}"" type=""text/css""/>"; return string.Format(format, GetAbsoluteFileUrl(path)); } public static string GetIconStatement(string path) { const string format = @"<link rel=""shortcut icon"" type=""image/png"" href=""{0}"">"; return string.Format(format, GetAbsoluteFileUrl(path)); } public static string GetAbsoluteFileUrl(string path) { if (!RegexPatterns.SchemePrefixRegex.IsMatch(path)) { return "file:///" + path.Replace('\\', '/'); } return path; } >>>>>>> referenceCssReplacement, testJsReplacement, referenceJsReplacement, referenceIconReplacement, referencedFile, referencePath);
<<<<<<< ======= SetGlobalOptions(commandLine); >>>>>>> SetGlobalOptions(commandLine); <<<<<<< Console.WriteLine(" /vsoutput : Print output in a format that the VS error list recognizes"); Console.WriteLine(" /coverage : Enable coverage collection (requires JSCover and Java)"); Console.WriteLine(" /coverageInclude pat : Only instrument files that match the given shell pattern"); Console.WriteLine(" /coverageExclude pat : Don't instrument files that match the given shell pattern"); foreach (var transformer in SummaryTransformerFactory.GetTransformers()) ======= Console.WriteLine(" /vsoutput : Print output in a format that the VS error list recognizes"); Console.WriteLine(" /compilercache : File where compiled scripts can be cached"); Console.WriteLine(" /compilercachesize : The maximum size of the cache in Mb"); foreach (var transformer in SummaryTransformerFactory.GetTransformers()) >>>>>>> Console.WriteLine(" /vsoutput : Print output in a format that the VS error list recognizes"); Console.WriteLine(" /coverage : Enable coverage collection (requires JSCover and Java)"); Console.WriteLine(" /coverageInclude pat : Only instrument files that match the given shell pattern"); Console.WriteLine(" /coverageExclude pat : Don't instrument files that match the given shell pattern"); Console.WriteLine(" /compilercache : File where compiled scripts can be cached"); Console.WriteLine(" /compilercachesize : The maximum size of the cache in Mb"); foreach (var transformer in SummaryTransformerFactory.GetTransformers())
<<<<<<< ======= using System.Collections.Generic; using System.Diagnostics; using System.DirectoryServices.ActiveDirectory; using System.Linq; using System.Net; using System.Runtime.InteropServices; >>>>>>> <<<<<<< if (!response.IsFieldValid("#ADDom") || !response.IsFieldValid("#ADUser") || !response.IsFieldValid("#ADPass")) ======= Log.Entry(Name, "Registering host with active directory"); if (!response.IsFieldValid("#ADDom") || !response.IsFieldValid("#ADUser") || !response.IsFieldValid("#ADPass")) >>>>>>> if (!response.IsFieldValid("#ADDom") || !response.IsFieldValid("#ADUser") || !response.IsFieldValid("#ADPass")) <<<<<<< try { if (_instance.RegisterComputer(response)) Power.Restart("Host joined to Active Directory, restart required", Power.FormOption.Delay); } catch (Exception ex) { Log.Error(Name, ex); } ======= // Check if the host is already part of the set domain by checking server IPs try { using (var domain = Domain.GetComputerDomain()) { var currentIP = Dns.GetHostAddresses(domain.Name); var targetIP = Dns.GetHostAddresses(response.GetField("#ADDom")); if (currentIP.Intersect(targetIP).Any()) { Log.Entry(Name, "Host is already joined to target domain"); return; } } } catch (Exception) { // ignored } // Attempt to join the domain var returnCode = DomainWrapper(response, true, (JoinOptions.NetsetupJoinDomain | JoinOptions.NetsetupAcctCreate)); if (returnCode == 2224) returnCode = DomainWrapper(response, true, JoinOptions.NetsetupJoinDomain); else if (returnCode == 2 || returnCode == 50) returnCode = DomainWrapper(response, false, (JoinOptions.NetsetupJoinDomain | JoinOptions.NetsetupAcctCreate)); // Entry the results Log.Entry(Name, string.Format("{0} {1}", (_returnCodes.ContainsKey(returnCode) ? string.Format("{0}, code = ", _returnCodes[returnCode]) : "Unknown Return Code: "), returnCode)); if (returnCode.Equals(0)) Power.Restart("Host joined to Active Directory, restart required", Power.FormOption.Delay); } private static int DomainWrapper(Response response, bool ou, JoinOptions options) { return NetJoinDomain(null, response.GetField("#ADDom"), ou ? response.GetField("#ADOU") : null, response.GetField("#ADUser"), response.GetField("#ADPass"), options); >>>>>>> try { if (_instance.RegisterComputer(response)) Power.Restart("Host joined to Active Directory, restart required", Power.FormOption.Delay); } catch (Exception ex) { Log.Error(Name, ex); }
<<<<<<< using System.Web.Mvc; ======= using System.ServiceModel; >>>>>>> using System.ServiceModel; using System.Web.Mvc;
<<<<<<< public Import(Quoted path, Value features, bool isOnce) : this((Node)path, features, isOnce) ======= public Import(Quoted path, IImporter importer, Value features, ImportOptions option) : this(path.Value, importer, features, option) >>>>>>> public Import(Quoted path, Value features, ImportOptions option) : this((Node)path, features, option) <<<<<<< public Import(Url path, Value features, bool isOnce) : this((Node)path, features, isOnce) ======= public Import(Url path, IImporter importer, Value features, ImportOptions option) : this(path.GetUnadjustedUrl(), importer, features, option) >>>>>>> public Import(Url path, Value features, ImportOptions option) : this((Node)path, features, option) <<<<<<< private Import(Node path, Value features, bool isOnce) ======= private Import(string path, IImporter importer, Value features, ImportOptions option) >>>>>>> private Import(Node path, Value features, ImportOptions option) <<<<<<< IsOnce = isOnce; } private ImportAction GetImportAction(IImporter importer) { if (!_importAction.HasValue) { _importAction = importer.Import(this); } ======= ImportOptions = option; >>>>>>> ImportOptions = option; } private ImportAction GetImportAction(IImporter importer) { if (!_importAction.HasValue) { _importAction = importer.Import(this); } <<<<<<< using (env.Parser.Importer.BeginScope(this)) { NodeHelper.ExpandNodes<Import>(env, InnerRoot.Rules); } ======= if (IsReference || IsOptionSet(ImportOptions, ImportOptions.Reference)) { // Walk the parse tree and mark all nodes as references. IsReference = true; IVisitor referenceImporter = null; referenceImporter = DelegateVisitor.For<Node>(node => { var ruleset = node as Ruleset; if (ruleset != null) { if (ruleset.Selectors != null) { ruleset.Selectors.Accept(referenceImporter); ruleset.Selectors.IsReference = true; } if (ruleset.Rules != null) { ruleset.Rules.Accept(referenceImporter); ruleset.Rules.IsReference = true; } } var media = node as Media; if (media != null) { media.Ruleset.Accept(referenceImporter); } var nodeList = node as NodeList; if (nodeList != null) { nodeList.Accept(referenceImporter); } node.IsReference = true; return node; }); Accept(referenceImporter); } NodeHelper.ExpandNodes<Import>(env, InnerRoot.Rules); >>>>>>> using (env.Parser.Importer.BeginScope(this)) { if (IsReference || IsOptionSet(ImportOptions, ImportOptions.Reference)) { // Walk the parse tree and mark all nodes as references. IsReference = true; IVisitor referenceImporter = null; referenceImporter = DelegateVisitor.For<Node>(node => { var ruleset = node as Ruleset; if (ruleset != null) { if (ruleset.Selectors != null) { ruleset.Selectors.Accept(referenceImporter); ruleset.Selectors.IsReference = true; } if (ruleset.Rules != null) { ruleset.Rules.Accept(referenceImporter); ruleset.Rules.IsReference = true; } } var media = node as Media; if (media != null) { media.Ruleset.Accept(referenceImporter); } var nodeList = node as NodeList; if (nodeList != null) { nodeList.Accept(referenceImporter); } node.IsReference = true; return node; }); Accept(referenceImporter); } NodeHelper.ExpandNodes<Import>(env, InnerRoot.Rules); }
<<<<<<< namespace dotless.Core.Parser.Tree { using System; using System.Collections.Generic; using System.Linq; using Exceptions; using Infrastructure; using Infrastructure.Nodes; using Utils; using Plugins; public class MixinCall : Node { public List<NamedArgument> Arguments { get; set; } public Selector Selector { get; set; } public bool Important { get; set; } public MixinCall(NodeList<Element> elements, List<NamedArgument> arguments, bool important) { Important = important; Selector = new Selector(elements); Arguments = arguments; } public override Node Evaluate(Env env) { var found = false; var closures = env.FindRulesets(Selector); if (closures == null) throw new ParsingException(Selector.ToCSS(env).Trim() + " is undefined", Location); env.Rule = this; var rules = new NodeList(); if (PreComments) rules.AddRange(PreComments); var rulesetList = closures.ToList(); // To address bug https://github.com/dotless/dotless/issues/136, where a mixin and ruleset selector may have the same name, we // need to favour matching a MixinDefinition with the required Selector and only fall back to considering other Ruleset types // if no match is found. // However, in order to support having a regular ruleset with the same name as a parameterized // mixin (see https://github.com/dotless/dotless/issues/387), we need to take argument counts into account, so we make the // decision after evaluating for argument match. var mixins = rulesetList.Where(c => c.Ruleset is MixinDefinition).ToList(); foreach (var closure in mixins) { var ruleset = (MixinDefinition)closure.Ruleset; var matchType = ruleset.MatchArguments(Arguments, env); if (matchType == MixinMatch.ArgumentMismatch) { continue; } found = true; if (matchType == MixinMatch.GuardFail) { continue; } try { var closureEnvironment = env.CreateChildEnvWithClosure(closure); rules.AddRange(ruleset.Evaluate(Arguments, closureEnvironment).Rules); } catch (ParsingException e) { throw new ParsingException(e.Message, e.Location, Location); } } if (!found) { var regularRulesets = rulesetList.Except(mixins); foreach (var closure in regularRulesets) { if (closure.Ruleset.Rules != null) { var nodes = new NodeList(closure.Ruleset.Rules); NodeHelper.ExpandNodes<MixinCall>(env, nodes); rules.AddRange(nodes); } found = true; } } if (PostComments) rules.AddRange(PostComments); env.Rule = null; if (!found) { var message = String.Format("No matching definition was found for `{0}({1})`", Selector.ToCSS(env).Trim(), Arguments.Select(a => a.Value.ToCSS(env)).JoinStrings(env.Compress ? "," : ", ")); throw new ParsingException(message, Location); } if (Important) { var importantRules = new NodeList(); foreach (Node node in rules) { if (node is Rule) { importantRules.Add(MakeRuleImportant(node as Rule)); ======= namespace dotless.Core.Parser.Tree { using System; using System.Collections.Generic; using System.Linq; using Exceptions; using Infrastructure; using Infrastructure.Nodes; using Utils; using Plugins; public class MixinCall : Node { public List<NamedArgument> Arguments { get; set; } public Selector Selector { get; set; } public bool Important { get; set; } public MixinCall(NodeList<Element> elements, List<NamedArgument> arguments, bool important) { Important = important; Selector = new Selector(elements); Arguments = arguments; } public override Node Evaluate(Env env) { var found = false; // To address bug https://github.com/dotless/dotless/issues/136, where a mixin and ruleset selector may have the same name, we // need to favour matching a MixinDefinition with the required Selector and only fall back to considering other Ruleset types // if no match is found. var closures = env.FindRulesets<MixinDefinition>(Selector) ?? env.FindRulesets<Ruleset>(Selector); if(closures == null) throw new ParsingException(Selector.ToCSS(env).Trim() + " is undefined", Location); env.Rule = this; var rules = new NodeList(); if (PreComments) rules.AddRange(PreComments); foreach (var closure in closures) { var ruleset = closure.Ruleset; var matchType = ruleset.MatchArguments(Arguments, env); if (matchType == MixinMatch.ArgumentMismatch) continue; found = true; if (matchType == MixinMatch.GuardFail) continue; if (ruleset is MixinDefinition) { try { var mixin = ruleset as MixinDefinition; rules.AddRange(mixin.Evaluate(Arguments, env, closure.Context).Rules); } catch (ParsingException e) { throw new ParsingException(e.Message, e.Location, Location); } } else { if (ruleset.Rules != null) { var nodes = new NodeList(ruleset.Rules); NodeHelper.ExpandNodes<MixinCall>(env, nodes); rules.AddRange(nodes); } } } if (PostComments) rules.AddRange(PostComments); env.Rule = null; if (!found) { var message = String.Format("No matching definition was found for `{0}({1})`", Selector.ToCSS(env).Trim(), Arguments.Select(a => a.Value.ToCSS(env)).JoinStrings(env.Compress ? "," : ", ")); throw new ParsingException(message, Location); } rules.IsReference = IsReference; foreach (var rule in rules) { rule.IsReference = IsReference; } if (Important) { var importantRules = new NodeList(); foreach (Node node in rules) { if (node is Rule) { importantRules.Add(MakeRuleImportant(node as Rule)); >>>>>>> namespace dotless.Core.Parser.Tree { using System; using System.Collections.Generic; using System.Linq; using Exceptions; using Infrastructure; using Infrastructure.Nodes; using Utils; using Plugins; public class MixinCall : Node { public List<NamedArgument> Arguments { get; set; } public Selector Selector { get; set; } public bool Important { get; set; } public MixinCall(NodeList<Element> elements, List<NamedArgument> arguments, bool important) { Important = important; Selector = new Selector(elements); Arguments = arguments; } public override Node Evaluate(Env env) { var found = false; var closures = env.FindRulesets(Selector); if (closures == null) throw new ParsingException(Selector.ToCSS(env).Trim() + " is undefined", Location); env.Rule = this; var rules = new NodeList(); if (PreComments) rules.AddRange(PreComments); var rulesetList = closures.ToList(); // To address bug https://github.com/dotless/dotless/issues/136, where a mixin and ruleset selector may have the same name, we // need to favour matching a MixinDefinition with the required Selector and only fall back to considering other Ruleset types // if no match is found. // However, in order to support having a regular ruleset with the same name as a parameterized // mixin (see https://github.com/dotless/dotless/issues/387), we need to take argument counts into account, so we make the // decision after evaluating for argument match. var mixins = rulesetList.Where(c => c.Ruleset is MixinDefinition).ToList(); foreach (var closure in mixins) { var ruleset = (MixinDefinition)closure.Ruleset; var matchType = ruleset.MatchArguments(Arguments, env); if (matchType == MixinMatch.ArgumentMismatch) { continue; } found = true; if (matchType == MixinMatch.GuardFail) { continue; } try { var closureEnvironment = env.CreateChildEnvWithClosure(closure); rules.AddRange(ruleset.Evaluate(Arguments, closureEnvironment).Rules); } catch (ParsingException e) { throw new ParsingException(e.Message, e.Location, Location); } } if (!found) { var regularRulesets = rulesetList.Except(mixins); foreach (var closure in regularRulesets) { if (closure.Ruleset.Rules != null) { var nodes = new NodeList(closure.Ruleset.Rules); NodeHelper.ExpandNodes<MixinCall>(env, nodes); rules.AddRange(nodes); } found = true; } } if (PostComments) rules.AddRange(PostComments); env.Rule = null; if (!found) { var message = String.Format("No matching definition was found for `{0}({1})`", Selector.ToCSS(env).Trim(), Arguments.Select(a => a.Value.ToCSS(env)).JoinStrings(env.Compress ? "," : ", ")); throw new ParsingException(message, Location); } rules.IsReference = IsReference; foreach (var rule in rules) { rule.IsReference = IsReference; } if (Important) { var importantRules = new NodeList(); foreach (Node node in rules) { if (node is Rule) { importantRules.Add(MakeRuleImportant(node as Rule));
<<<<<<< entityProcessors = new EntityProcessorList(); ======= // setup our resolution policy. we'll commit it in begin _resolutionPolicy = defaultSceneResolutionPolicy; _designResolutionSize = defaultDesignResolutionSize; >>>>>>> entityProcessors = new EntityProcessorList(); // setup our resolution policy. we'll commit it in begin _resolutionPolicy = defaultSceneResolutionPolicy; _designResolutionSize = defaultDesignResolutionSize;
<<<<<<< DirLandReplyData[] FindLandForSale(string searchType, uint price, uint area, int StartQuery, uint Flags); #endregion #region Classifieds /// <summary> /// Searches for classifieds /// </summary> /// <param name = "queryText"></param> /// <param name = "category"></param> /// <param name = "queryFlags"></param> /// <param name = "StartQuery"></param> /// <returns></returns> DirClassifiedReplyData[] FindClassifieds(string queryText, string category, uint queryFlags, int StartQuery); /// <summary> /// Gets all classifieds in the given region /// </summary> /// <param name = "regionName"></param> /// <returns></returns> Classified[] GetClassifiedsInRegion(string regionName); #endregion #region Events ======= List<DirLandReplyData> FindLandForSale(string searchType, string price, string area, int StartQuery, uint Flags); >>>>>>> List<DirLandReplyData> FindLandForSale(string searchType, uint price, uint area, int StartQuery, uint Flags); #endregion #region Classifieds /// <summary> /// Searches for classifieds /// </summary> /// <param name = "queryText"></param> /// <param name = "category"></param> /// <param name = "queryFlags"></param> /// <param name = "StartQuery"></param> /// <returns></returns> DirClassifiedReplyData[] FindClassifieds(string queryText, string category, uint queryFlags, int StartQuery); /// <summary> /// Gets all classifieds in the given region /// </summary> /// <param name = "regionName"></param> /// <returns></returns> Classified[] GetClassifiedsInRegion(string regionName); #endregion #region Events <<<<<<< DirEventsReplyData[] FindEvents(string queryText, uint flags, int StartQuery); ======= List<DirEventsReplyData> FindEvents(string queryText, string flags, int StartQuery); >>>>>>> List<DirEventsReplyData> FindEvents(string queryText, uint flags, int StartQuery); <<<<<<< EventData GetEventInfo(uint EventID); ======= List<DirClassifiedReplyData> FindClassifieds(string queryText, string category, string queryFlags, int StartQuery); >>>>>>> EventData GetEventInfo(uint EventID); <<<<<<< List<EventData> GetEvents(uint start, uint count, Dictionary<string, bool> sort, Dictionary<string, object> filter); /// <summary> /// Get the number of events matching the specified filters /// </summary> /// <param name="filter"></param> /// <returns></returns> uint GetNumberOfEvents(Dictionary<string, object> filter); /// <summary> /// Gets the highest event ID /// </summary> /// <returns></returns> uint GetMaxEventID(); #endregion ======= List<Classified> GetClassifiedsInRegion(string regionName); >>>>>>> List<EventData> GetEvents(uint start, uint count, Dictionary<string, bool> sort, Dictionary<string, object> filter); /// <summary> /// Get the number of events matching the specified filters /// </summary> /// <param name="filter"></param> /// <returns></returns> uint GetNumberOfEvents(Dictionary<string, object> filter); /// <summary> /// Gets the highest event ID /// </summary> /// <returns></returns> uint GetMaxEventID(); #endregion
<<<<<<< await _edgeHubClient.SetMethodHandlerAsync("GetDiagnosticInfo", HandleGetDiagnosticInfoMethodAsync, _edgeHubClient); await _edgeHubClient.SetMethodHandlerAsync("GetDiagnosticLog", HandleGetDiagnosticLogMethodAsync, _edgeHubClient); await _edgeHubClient.SetMethodHandlerAsync("ExitApplication", HandleExitApplicationMethodAsync, _edgeHubClient); await _edgeHubClient.SetMethodHandlerAsync("GetInfo", HandleGetInfoMethodAsync, _edgeHubClient); ======= await _edgeHubClient.SetMethodDefaultHandlerAsync(DefaultMethodHandlerAsync, _edgeHubClient); >>>>>>> await _edgeHubClient.SetMethodHandlerAsync("GetDiagnosticInfo", HandleGetDiagnosticInfoMethodAsync, _edgeHubClient); await _edgeHubClient.SetMethodHandlerAsync("GetDiagnosticLog", HandleGetDiagnosticLogMethodAsync, _edgeHubClient); await _edgeHubClient.SetMethodHandlerAsync("ExitApplication", HandleExitApplicationMethodAsync, _edgeHubClient); await _edgeHubClient.SetMethodHandlerAsync("GetInfo", HandleGetInfoMethodAsync, _edgeHubClient); await _edgeHubClient.SetMethodDefaultHandlerAsync(DefaultMethodHandlerAsync, _edgeHubClient); <<<<<<< await _iotHubClient.SetMethodHandlerAsync("GetDiagnosticInfo", HandleGetDiagnosticInfoMethodAsync, _iotHubClient); await _iotHubClient.SetMethodHandlerAsync("GetDiagnosticLog", HandleGetDiagnosticLogMethodAsync, _iotHubClient); await _iotHubClient.SetMethodHandlerAsync("ExitApplication", HandleExitApplicationMethodAsync, _iotHubClient); await _iotHubClient.SetMethodHandlerAsync("GetInfo", HandleGetInfoMethodAsync, _iotHubClient); ======= await _edgeHubClient.SetMethodDefaultHandlerAsync(DefaultMethodHandlerAsync, _iotHubClient); >>>>>>> await _iotHubClient.SetMethodHandlerAsync("GetDiagnosticInfo", HandleGetDiagnosticInfoMethodAsync, _iotHubClient); await _iotHubClient.SetMethodHandlerAsync("GetDiagnosticLog", HandleGetDiagnosticLogMethodAsync, _iotHubClient); await _iotHubClient.SetMethodHandlerAsync("ExitApplication", HandleExitApplicationMethodAsync, _iotHubClient); await _iotHubClient.SetMethodHandlerAsync("GetInfo", HandleGetInfoMethodAsync, _iotHubClient); await _iotHubClient.SetMethodDefaultHandlerAsync(DefaultMethodHandlerAsync, _iotHubClient); <<<<<<< /// Handle method call to get diagnostic information. /// </summary> static async Task<MethodResponse> HandleGetDiagnosticInfoMethodAsync(MethodRequest methodRequest, object userContext) { string logPrefix = "HandleGetDiagnosticInfoMethodAsync:"; // get the diagnostic info DiagnosticInfoMethodResponseModel diagnosticInfo = new DiagnosticInfoMethodResponseModel(); try { diagnosticInfo = GetDiagnosticInfo(); } catch (Exception e) { Logger.Error(e, $"{logPrefix} Exception"); return (new MethodResponse((int)HttpStatusCode.InternalServerError)); } // build response string resultString = JsonConvert.SerializeObject(diagnosticInfo); byte[] result = Encoding.UTF8.GetBytes(resultString); MethodResponse methodResponse = new MethodResponse(result, (int)HttpStatusCode.OK); Logger.Information($"{logPrefix} Success returning diagnostic info!"); return methodResponse; } /// <summary> /// Handle method call to get log information. /// </summary> static async Task<MethodResponse> HandleGetDiagnosticLogMethodAsync(MethodRequest methodRequest, object userContext) { string logPrefix = "HandleGetDiagnosticLogMethodAsync:"; // get the diagnostic info DiagnosticLogMethodResponseModel diagnosticLogMethodResponseModel = new DiagnosticLogMethodResponseModel(); try { diagnosticLogMethodResponseModel = await GetDiagnosticLogAsync(); } catch (Exception e) { Logger.Error(e, $"{logPrefix} Exception"); return (new MethodResponse((int)HttpStatusCode.InternalServerError)); } // build response string resultString = JsonConvert.SerializeObject(diagnosticLogMethodResponseModel); byte[] result = Encoding.UTF8.GetBytes(resultString); MethodResponse methodResponse = new MethodResponse(result, (int)HttpStatusCode.OK); Logger.Information($"{logPrefix} Success returning diagnostic log!"); return methodResponse; } /// <summary> /// Handle method call to get log information. /// </summary> static async Task<MethodResponse> HandleExitApplicationMethodAsync(MethodRequest methodRequest, object userContext) { string logPrefix = "HandleExitApplicationMethodAsync:"; ExitApplicationMethodRequestModel exitApplicationMethodRequest = null; try { Logger.Debug($"{logPrefix} called"); exitApplicationMethodRequest = JsonConvert.DeserializeObject<ExitApplicationMethodRequestModel>(methodRequest.DataAsJson); } catch (Exception e) { Logger.Error(e, $"{logPrefix} Exception"); return (new MethodResponse((int)HttpStatusCode.InternalServerError)); } // get the parameter ExitApplicationMethodRequestModel exitApplication = new ExitApplicationMethodRequestModel(); try { Task.Run(async () => await ExitApplicationAsync(exitApplicationMethodRequest.SecondsTillExit)); } catch (Exception e) { Logger.Error(e, $"{logPrefix} Exception"); return (new MethodResponse((int)HttpStatusCode.InternalServerError)); } Logger.Information($"{logPrefix} Success returning exit application!"); return (new MethodResponse((int)HttpStatusCode.OK)); } /// <summary> /// Handle method call to get application information. /// </summary> static async Task<MethodResponse> HandleGetInfoMethodAsync(MethodRequest methodRequest, object userContext) { string logPrefix = "HandleGetInfoMethodAsync:"; // get the info GetInfoMethodResponseModel getInfoMethodResponseModel = new GetInfoMethodResponseModel(); getInfoMethodResponseModel.VersionMajor = Assembly.GetExecutingAssembly().GetName().Version.Major; getInfoMethodResponseModel.VersionMinor = Assembly.GetExecutingAssembly().GetName().Version.Minor; getInfoMethodResponseModel.VersionPatch = Assembly.GetExecutingAssembly().GetName().Version.Build; getInfoMethodResponseModel.SemanticVersion = (Attribute.GetCustomAttribute(Assembly.GetEntryAssembly(), typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute).InformationalVersion; getInfoMethodResponseModel.InformationalVersion = (Attribute.GetCustomAttribute(Assembly.GetEntryAssembly(), typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute).InformationalVersion; getInfoMethodResponseModel.OS = RuntimeInformation.OSDescription; getInfoMethodResponseModel.OSArchitecture = RuntimeInformation.OSArchitecture; getInfoMethodResponseModel.FrameworkDescription = RuntimeInformation.FrameworkDescription; // build response string resultString = JsonConvert.SerializeObject(getInfoMethodResponseModel); byte[] result = Encoding.UTF8.GetBytes(resultString); MethodResponse methodResponse = new MethodResponse(result, (int)HttpStatusCode.OK); Logger.Information($"{logPrefix} Success returning application info!"); return methodResponse; } /// <summary> ======= /// Method that is called for any unimplemented call. Just returns that info to the caller /// </summary> /// <param name="methodRequest"></param> /// <param name="userContext"></param> /// <returns></returns> private async Task<MethodResponse> DefaultMethodHandlerAsync(MethodRequest methodRequest, object userContext) { Logger.Information($"Received direct method call for {methodRequest.Name} which is not implemented"); string response = $"Method {methodRequest.Name} successfully received but this method is not implemented"; string resultString = JsonConvert.SerializeObject(response); byte[] result = Encoding.UTF8.GetBytes(resultString); MethodResponse methodResponse = new MethodResponse(result, (int)HttpStatusCode.OK); return methodResponse; } /// <summary> >>>>>>> /// Handle method call to get diagnostic information. /// </summary> static async Task<MethodResponse> HandleGetDiagnosticInfoMethodAsync(MethodRequest methodRequest, object userContext) { string logPrefix = "HandleGetDiagnosticInfoMethodAsync:"; // get the diagnostic info DiagnosticInfoMethodResponseModel diagnosticInfo = new DiagnosticInfoMethodResponseModel(); try { diagnosticInfo = GetDiagnosticInfo(); } catch (Exception e) { Logger.Error(e, $"{logPrefix} Exception"); return (new MethodResponse((int)HttpStatusCode.InternalServerError)); } // build response string resultString = JsonConvert.SerializeObject(diagnosticInfo); byte[] result = Encoding.UTF8.GetBytes(resultString); MethodResponse methodResponse = new MethodResponse(result, (int)HttpStatusCode.OK); Logger.Information($"{logPrefix} Success returning diagnostic info!"); return methodResponse; } /// <summary> /// Handle method call to get log information. /// </summary> static async Task<MethodResponse> HandleGetDiagnosticLogMethodAsync(MethodRequest methodRequest, object userContext) { string logPrefix = "HandleGetDiagnosticLogMethodAsync:"; // get the diagnostic info DiagnosticLogMethodResponseModel diagnosticLogMethodResponseModel = new DiagnosticLogMethodResponseModel(); try { diagnosticLogMethodResponseModel = await GetDiagnosticLogAsync(); } catch (Exception e) { Logger.Error(e, $"{logPrefix} Exception"); return (new MethodResponse((int)HttpStatusCode.InternalServerError)); } // build response string resultString = JsonConvert.SerializeObject(diagnosticLogMethodResponseModel); byte[] result = Encoding.UTF8.GetBytes(resultString); MethodResponse methodResponse = new MethodResponse(result, (int)HttpStatusCode.OK); Logger.Information($"{logPrefix} Success returning diagnostic log!"); return methodResponse; } /// <summary> /// Handle method call to get log information. /// </summary> static async Task<MethodResponse> HandleExitApplicationMethodAsync(MethodRequest methodRequest, object userContext) { string logPrefix = "HandleExitApplicationMethodAsync:"; ExitApplicationMethodRequestModel exitApplicationMethodRequest = null; try { Logger.Debug($"{logPrefix} called"); exitApplicationMethodRequest = JsonConvert.DeserializeObject<ExitApplicationMethodRequestModel>(methodRequest.DataAsJson); } catch (Exception e) { Logger.Error(e, $"{logPrefix} Exception"); return (new MethodResponse((int)HttpStatusCode.InternalServerError)); } // get the parameter ExitApplicationMethodRequestModel exitApplication = new ExitApplicationMethodRequestModel(); try { Task.Run(async () => await ExitApplicationAsync(exitApplicationMethodRequest.SecondsTillExit)); } catch (Exception e) { Logger.Error(e, $"{logPrefix} Exception"); return (new MethodResponse((int)HttpStatusCode.InternalServerError)); } Logger.Information($"{logPrefix} Success returning exit application!"); return (new MethodResponse((int)HttpStatusCode.OK)); } /// <summary> /// Handle method call to get application information. /// </summary> static async Task<MethodResponse> HandleGetInfoMethodAsync(MethodRequest methodRequest, object userContext) { string logPrefix = "HandleGetInfoMethodAsync:"; // get the info GetInfoMethodResponseModel getInfoMethodResponseModel = new GetInfoMethodResponseModel(); getInfoMethodResponseModel.VersionMajor = Assembly.GetExecutingAssembly().GetName().Version.Major; getInfoMethodResponseModel.VersionMinor = Assembly.GetExecutingAssembly().GetName().Version.Minor; getInfoMethodResponseModel.VersionPatch = Assembly.GetExecutingAssembly().GetName().Version.Build; getInfoMethodResponseModel.SemanticVersion = (Attribute.GetCustomAttribute(Assembly.GetEntryAssembly(), typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute).InformationalVersion; getInfoMethodResponseModel.InformationalVersion = (Attribute.GetCustomAttribute(Assembly.GetEntryAssembly(), typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute).InformationalVersion; getInfoMethodResponseModel.OS = RuntimeInformation.OSDescription; getInfoMethodResponseModel.OSArchitecture = RuntimeInformation.OSArchitecture; getInfoMethodResponseModel.FrameworkDescription = RuntimeInformation.FrameworkDescription; // build response string resultString = JsonConvert.SerializeObject(getInfoMethodResponseModel); byte[] result = Encoding.UTF8.GetBytes(resultString); MethodResponse methodResponse = new MethodResponse(result, (int)HttpStatusCode.OK); Logger.Information($"{logPrefix} Success returning application info!"); return methodResponse; } /// </summary> /// Method that is called for any unimplemented call. Just returns that info to the caller /// </summary> private async Task<MethodResponse> DefaultMethodHandlerAsync(MethodRequest methodRequest, object userContext) { Logger.Information($"Received direct method call for {methodRequest.Name}, which is not implemented"); string response = $"Method {methodRequest.Name} successfully received, but this method is not implemented"; string resultString = JsonConvert.SerializeObject(response); byte[] result = Encoding.UTF8.GetBytes(resultString); MethodResponse methodResponse = new MethodResponse(result, (int)HttpStatusCode.OK); return methodResponse; } /// <summary>
<<<<<<< ClientItemGenericUnlock = 0x0400, ======= ServerRealmBroadcast = 0x03E1, >>>>>>> ServerRealmBroadcast = 0x03E1, ClientItemGenericUnlock = 0x0400,
<<<<<<< private LogoutManager logoutManager; private PendingFarTeleport pendingFarTeleport; ======= private PendingTeleport pendingTeleport; >>>>>>> private LogoutManager logoutManager; private PendingTeleport pendingTeleport; <<<<<<< RealmId = 358, ======= RealmId = WorldServer.RealmId, >>>>>>> RealmId = WorldServer.RealmId, <<<<<<< PathManager.SendPathLogPacket(); BuybackManager.SendBuybackItems(this); ======= Session.EnqueueMessageEncrypted(new ServerHousingNeighbors()); Session.EnqueueMessageEncrypted(new ServerPathLog()); >>>>>>> PathManager.SendPathLogPacket(); BuybackManager.SendBuybackItems(this); Session.EnqueueMessageEncrypted(new ServerHousingNeighbors()); Session.EnqueueMessageEncrypted(new ServerPathLog());
<<<<<<< ClientLogout = 0x00C0, ======= ClientHousingResidencePrivacyLevel = 0x00C9, >>>>>>> ClientLogout = 0x00C0, ClientHousingResidencePrivacyLevel = 0x00C9, <<<<<<< ClientSellItemToVendor = 0x0166, ServerAbilityPoints = 0x0169, ServerSpellUpdate = 0x017B, ======= Server0169 = 0x0169, // ability book related ServerShowActionBar = 0x016C, >>>>>>> ClientSellItemToVendor = 0x0166, ServerAbilityPoints = 0x0169, ServerShowActionBar = 0x016C, ServerSpellUpdate = 0x017B, <<<<<<< ServerActionSet = 0x019D, ServerAbilities = 0x01A0, ======= Server019D = 0x019D, // action set related ServerStanceChanged = 0x019F, Server01A0 = 0x01A0, // ability book related >>>>>>> ServerActionSet = 0x019D, ServerStanceChanged = 0x019F, ServerAbilities = 0x01A0, <<<<<<< ServerPathUpdateXP = 0x01AA, ======= ServerExperienceGained = 0x01AC, >>>>>>> ServerPathUpdateXP = 0x01AA, ServerExperienceGained = 0x01AC, <<<<<<< ServerEntityDestory = 0x0355, ======= ServerQuestInit = 0x035F, >>>>>>> ServerEntityDestory = 0x0355, ServerQuestInit = 0x035F, <<<<<<< ClientCastSpell = 0x04DB, ======= ServerHousingResidenceDecor = 0x04DE, ServerHousingProperties = 0x04DF, ServerHousingPlots = 0x04E1, ClientHousingCrateAllDecor = 0x04EC, ServerHousingNeighbors = 0x0507, ServerHousingVendorList = 0x0508, ClientHousingRemodel = 0x050A, ClientHousingDecorUpdate = 0x050B, ClientHousingPlugUpdate = 0x0510, ClientHousingVendorList = 0x0525, ClientHousingRenameProperty = 0x0529, ClientHousingVisit = 0x0531, ClientHousingEditMode = 0x053C, ServerSpellList = 0x0551, >>>>>>> ClientCastSpell = 0x04DB, ServerHousingResidenceDecor = 0x04DE, ServerHousingProperties = 0x04DF, ServerHousingPlots = 0x04E1, ClientHousingCrateAllDecor = 0x04EC, ServerHousingNeighbors = 0x0507, ServerHousingVendorList = 0x0508, ClientHousingRemodel = 0x050A, ClientHousingDecorUpdate = 0x050B, ClientHousingPlugUpdate = 0x0510, ClientHousingVendorList = 0x0525, ClientHousingRenameProperty = 0x0529, ClientHousingVisit = 0x0531, ClientHousingEditMode = 0x053C, ServerSpellList = 0x0551, <<<<<<< ServerMovementControl = 0x0636, ServerClientLogout = 0x0594, ======= ServerMovementControl = 0x0636, // handler sends 0x0635 and 0x063A ServerAvailableMail = 0x05A3, >>>>>>> ServerClientLogout = 0x0594, ServerAvailableMail = 0x05A3, ServerMovementControl = 0x0636, // handler sends 0x0635 and 0x063A <<<<<<< ClientPathActivate = 0x06B2, ServerPathActivateResult = 0x06B3, ServerPathRefresh = 0x06B4, ServerPathEpisodeProgress = 0x06B5, Server06B6 = 0x06B6, Server06B7 = 0x06B7, Server06B8 = 0x06B8, Server06B9 = 0x06B9, ServerPathMissionActivate = 0x06BA, ServerPathMissionUpdate = 0x06BB, ======= ClientPlayerMovementSpeedUpdate = 0x063B, ServerOwnedCommodityOrders = 0x064C, ServerOwnedItemAuctions = 0x064D, >>>>>>> ClientPlayerMovementSpeedUpdate = 0x063B, ServerOwnedCommodityOrders = 0x064C, ServerOwnedItemAuctions = 0x064D, ClientPathActivate = 0x06B2, ServerPathActivateResult = 0x06B3, ServerPathRefresh = 0x06B4, ServerPathEpisodeProgress = 0x06B5, Server06B6 = 0x06B6, Server06B7 = 0x06B7, Server06B8 = 0x06B8, Server06B9 = 0x06B9, ServerPathMissionActivate = 0x06BA, ServerPathMissionUpdate = 0x06BB,
<<<<<<< GeoCoordinate point1 = new GeoCoordinate(51.158075, 2.961545); GeoCoordinate point2 = new GeoCoordinate(51.190503, 3.004793); RouterPoint routerPoint1 = _router.Resolve(Vehicle.Car, point1); RouterPoint routerPoint2 = _router.Resolve(Vehicle.Car, point2); Route route1 = _router.Calculate(Vehicle.Car, routerPoint1, routerPoint2); ======= // GeoCoordinate point1 = new GeoCoordinate(51.158075, 2.961545); // GeoCoordinate point2 = new GeoCoordinate(51.190503, 3.004793); // RouterPoint routerPoint1 = _router.Resolve(Vehicle.Car, point1); // RouterPoint routerPoint2 = _router.Resolve(Vehicle.Car, point2); // OsmSharpRoute route1 = _router.Calculate(Vehicle.Car, routerPoint1, routerPoint2); >>>>>>> // GeoCoordinate point1 = new GeoCoordinate(51.158075, 2.961545); // GeoCoordinate point2 = new GeoCoordinate(51.190503, 3.004793); // RouterPoint routerPoint1 = _router.Resolve(Vehicle.Car, point1); // RouterPoint routerPoint2 = _router.Resolve(Vehicle.Car, point2); // Route route1 = _router.Calculate(Vehicle.Car, routerPoint1, routerPoint2); <<<<<<< /// <summary> /// Holds the previous point. /// </summary> private RouterPoint _previousPoint; private void MapMarkerClicked(object sender, EventArgs e) { if (sender is MapMarker) { lock (_router) { MapMarker marker = sender as MapMarker; RouterPoint point = _router.Resolve (Vehicle.Car, marker.Location); if (point != null) { if (_previousPoint != null) { _routeLayer.Clear (); Route route = _router.Calculate (Vehicle.Car, _previousPoint, point); if (route != null) { _routeLayer.AddRoute (route); } _routeLayer.Invalidate (); } _previousPoint = point; } } } } ======= >>>>>>>
<<<<<<< string cloneFolder, ScriptBlock installScript, AssemblyInfo assemblyInfo, ======= ExpandableString cloneFolder, ScriptBlock installScript, >>>>>>> ExpandableString cloneFolder, ScriptBlock installScript, AssemblyInfo assemblyInfo,
<<<<<<< Task InvalidateCacheAsync(IEnumerable<T> documents, ICommandOptions options = null); Task<long> CountAsync(ICommandOptions options = null); Task<T> GetByIdAsync(string id, ICommandOptions options = null); Task<IReadOnlyCollection<T>> GetByIdsAsync(IEnumerable<string> ids, ICommandOptions options = null); Task<FindResults<T>> GetAllAsync(ICommandOptions options = null); Task<bool> ExistsAsync(string id); ======= Task InvalidateCacheAsync(IEnumerable<T> documents); Task<long> CountAsync(); Task<T> GetByIdAsync(Id id, bool useCache = false, TimeSpan? expiresIn = null); Task<IReadOnlyCollection<T>> GetByIdsAsync(Ids ids, bool useCache = false, TimeSpan? expiresIn = null); Task<FindResults<T>> GetAllAsync(PagingOptions paging = null); Task<bool> ExistsAsync(Id id); >>>>>>> Task InvalidateCacheAsync(IEnumerable<T> documents, ICommandOptions options = null); Task<long> CountAsync(ICommandOptions options = null); Task<T> GetByIdAsync(Id id, ICommandOptions options = null); Task<IReadOnlyCollection<T>> GetByIdsAsync(Ids ids, ICommandOptions options = null); Task<FindResults<T>> GetAllAsync(ICommandOptions options = null); Task<bool> ExistsAsync(Id id); <<<<<<< public static class ReadOnlyRepositoryExtensions { public static Task<T> GetByIdAsync<T>(this IReadOnlyRepository<T> repository, string id, bool useCache = false, TimeSpan? expiresIn = null) where T : class, new() { return repository.GetByIdAsync(id, new CommandOptions().EnableCache(useCache, expiresIn)); } public static Task<IReadOnlyCollection<T>> GetByIdsAsync<T>(this IReadOnlyRepository<T> repository, IEnumerable<string> ids, bool useCache = false, TimeSpan? expiresIn = null) where T : class, new() { return repository.GetByIdsAsync(ids, new CommandOptions().EnableCache(useCache, expiresIn)); } } ======= public static class ReadOnlyRepositoryExtensions { public static Task<IReadOnlyCollection<T>> GetByIdsAsync<T>(this IRepository<T> repository, IEnumerable<string> ids, bool useCache = false, TimeSpan? expiresIn = null) where T : class, IIdentity, new() { return repository.GetByIdsAsync(new Ids(ids), useCache, expiresIn); } } >>>>>>> public static class ReadOnlyRepositoryExtensions { public static Task<T> GetByIdAsync<T>(this IReadOnlyRepository<T> repository, Id id, bool useCache = false, TimeSpan? expiresIn = null) where T : class, new() { return repository.GetByIdAsync(id, new CommandOptions().EnableCache(useCache, expiresIn)); } public static Task<IReadOnlyCollection<T>> GetByIdsAsync<T>(this IReadOnlyRepository<T> repository, IEnumerable<string> ids, bool useCache = false, TimeSpan? expiresIn = null) where T : class, new() { return repository.GetByIdsAsync(ids, new CommandOptions().EnableCache(useCache, expiresIn)); } public static Task<IReadOnlyCollection<T>> GetByIdsAsync<T>(this IRepository<T> repository, IEnumerable<string> ids, bool useCache = false, TimeSpan? expiresIn = null) where T : class, IIdentity, new() { return repository.GetByIdsAsync(new Ids(ids), useCache, expiresIn); } }
<<<<<<< ISearchResponse<TResult> response; if (useSnapshotPaging == false || String.IsNullOrEmpty(elasticPagingOptions.ScrollId)) { SearchDescriptor<T> searchDescriptor = CreateSearchDescriptor(query); ======= ISearchResponse<TResult> response = null; if (useSnapshotPaging == false || String.IsNullOrEmpty(elasticPagingOptions?.ScrollId)) { SearchDescriptor<T> searchDescriptor = CreateSearchDescriptor(query, queryOptions); >>>>>>> ISearchResponse<TResult> response = null; if (useSnapshotPaging == false || String.IsNullOrEmpty(elasticPagingOptions?.ScrollId)) { SearchDescriptor<T> searchDescriptor = CreateSearchDescriptor(query, queryOptions); <<<<<<< var searchDescriptor = CreateSearchDescriptor(query).Size(1); searchDescriptor.DocvalueFields("id"); ======= var queryOptions = GetQueryOptions(); await OnBeforeQueryAsync(query, queryOptions, typeof(T)).AnyContext(); var searchDescriptor = CreateSearchDescriptor(query, queryOptions).Size(1); searchDescriptor.Fields("id"); >>>>>>> var queryOptions = GetQueryOptions(); await OnBeforeQueryAsync(query, queryOptions, typeof(T)).AnyContext(); var searchDescriptor = CreateSearchDescriptor(query, queryOptions).Size(1); searchDescriptor.DocvalueFields("id"); <<<<<<< var searchDescriptor = CreateSearchDescriptor(query); searchDescriptor.Size(0); ======= var queryOptions = GetQueryOptions(); await OnBeforeQueryAsync(query, queryOptions, typeof(T)).AnyContext(); var searchDescriptor = CreateSearchDescriptor(query, queryOptions); searchDescriptor.SearchType(SearchType.Count); >>>>>>> var queryOptions = GetQueryOptions(); await OnBeforeQueryAsync(query, queryOptions, typeof(T)).AnyContext(); var searchDescriptor = CreateSearchDescriptor(query, queryOptions); searchDescriptor.Size(0); <<<<<<< public async Task<IReadOnlyCollection<AggregationResult>> GetAggregationsAsync(IRepositoryQuery query) { var aggregationQuery = query as IAggregationQuery; if (aggregationQuery == null || aggregationQuery.AggregationFields.Count == 0) throw new ArgumentException("Query must contain aggregation fields.", nameof(query)); if (ElasticType.AllowedAggregationFields.Count > 0 && !aggregationQuery.AggregationFields.All(f => ElasticType.AllowedAggregationFields.Contains(f.Field))) throw new ArgumentException("All aggregation fields must be allowed.", nameof(query)); var searchDescriptor = CreateSearchDescriptor(query).Size(0); var response = await _client.SearchAsync<T>(searchDescriptor).AnyContext(); _logger.Trace(() => response.GetRequest()); if (!response.IsValid) { string message = $"Retrieving aggregations failed: {response.GetErrorMessage()}"; _logger.Error().Exception(response.OriginalException).Message(message).Property("request", response.GetRequest()).Write(); throw new ApplicationException(message, response.OriginalException); } return response.ToAggregationResult(); } public Task<IReadOnlyCollection<AggregationResult>> GetAggregationsAsync(IRepositoryQuery systemFilter, AggregationOptions aggregations, string filter = null) { var search = NewQuery() .WithSystemFilter(systemFilter) .WithFilter(filter) .WithAggregation(aggregations); return GetAggregationsAsync(search); } protected IElasticQuery NewQuery() { ======= protected virtual IElasticQuery NewQuery() { >>>>>>> protected virtual IElasticQuery NewQuery() {
<<<<<<< public Task<FindResults<Employee>> GetAllByCompanyAsync(string company, PagingOptions paging = null) { return FindAsync(new MyAppQuery().WithCompany(company).WithPaging(paging)); ======= public Task<IFindResults<Employee>> GetAllByCompanyAsync(string company, PagingOptions paging = null, bool useCache = false) { return FindAsync(new MyAppQuery().WithCompany(company).WithPaging(paging).WithCacheKey(useCache ? "by-company" : null)); >>>>>>> public Task<FindResults<Employee>> GetAllByCompanyAsync(string company, PagingOptions paging = null, bool useCache = false) { return FindAsync(new MyAppQuery().WithCompany(company).WithPaging(paging).WithCacheKey(useCache ? "by-company" : null));
<<<<<<< public async Task<T> GetByIdAsync(string id, ICommandOptions options = null) { if (String.IsNullOrEmpty(id)) ======= public async Task<T> GetByIdAsync(Id id, bool useCache = false, TimeSpan? expiresIn = null) { if (String.IsNullOrEmpty(id.Value)) >>>>>>> public async Task<T> GetByIdAsync(Id id, ICommandOptions options = null) { if (String.IsNullOrEmpty(id.Value)) <<<<<<< public async Task<IReadOnlyCollection<T>> GetByIdsAsync(IEnumerable<string> ids, ICommandOptions options = null) { ======= public async Task<IReadOnlyCollection<T>> GetByIdsAsync(Ids ids, bool useCache = false, TimeSpan? expiresIn = null) { >>>>>>> public async Task<IReadOnlyCollection<T>> GetByIdsAsync(Ids ids, ICommandOptions options = null) { <<<<<<< if (IsCacheEnabled && options.ShouldUseCache()) { var cacheHits = await Cache.GetAllAsync<T>(idList).AnyContext(); ======= if (IsCacheEnabled && useCache) { var cacheHits = await Cache.GetAllAsync<T>(idList.Select(id => id.Value)).AnyContext(); >>>>>>> if (IsCacheEnabled && options.ShouldUseCache()) { var cacheHits = await Cache.GetAllAsync<T>(idList.Select(id => id.Value)).AnyContext(); <<<<<<< protected string[] GetIndexesByQuery(IRepositoryQuery query, ICommandOptions options = null) { ======= protected string[] GetIndexesByQuery(IRepositoryQuery query) { >>>>>>> protected string[] GetIndexesByQuery(IRepositoryQuery query, ICommandOptions options = null) {
<<<<<<< public async Task PatchAsync(string id, object update, ICommandOptions options = null) { if (String.IsNullOrEmpty(id)) ======= public async Task PatchAsync(Id id, object update, bool sendNotification = true) { if (String.IsNullOrEmpty(id.Value)) >>>>>>> public async Task PatchAsync(Id id, object update, ICommandOptions options = null) { if (String.IsNullOrEmpty(id.Value)) <<<<<<< public async Task PatchAsync(IEnumerable<string> ids, object update, ICommandOptions options = null) { ======= public async Task PatchAsync(Ids ids, object update, bool sendNotifications = true) { >>>>>>> public async Task PatchAsync(Ids ids, object update, ICommandOptions options = null) { <<<<<<< if (idList.Count == 1) { await PatchAsync(idList[0], update, options).AnyContext(); ======= if (ids.Count == 1) { await PatchAsync(ids[0], update, sendNotifications).AnyContext(); >>>>>>> if (ids.Count == 1) { await PatchAsync(ids[0], update, sendNotifications).AnyContext(); <<<<<<< await PatchAllAsync(NewQuery().WithIds(idList), update, options).AnyContext(); ======= await PatchAllAsync(NewQuery().WithIds(ids), update, sendNotifications).AnyContext(); >>>>>>> await PatchAllAsync(NewQuery().WithIds(ids), update, options).AnyContext(); <<<<<<< foreach (string id in idList) { ======= foreach (var id in ids) { >>>>>>> foreach (var id in ids) { <<<<<<< if (options.ShouldSendNotifications()) foreach (var id in idList) ======= if (sendNotifications) foreach (var id in ids) >>>>>>> if (options.ShouldSendNotifications()) foreach (var id in ids) <<<<<<< public async Task RemoveAsync(string id, ICommandOptions options = null) { ======= public async Task RemoveAsync(Id id, bool sendNotification = true) { >>>>>>> public async Task RemoveAsync(Id id, ICommandOptions options = null) {
<<<<<<< //if (progressCallbackAsync == null) { // progressCallbackAsync = (progress, message) => { // _logger.Info("Reindex Progress {0}%: {1}", progress, message); // return Task.CompletedTask; // }; //} //_logger.Info("Received reindex work item for new index {0}", workItem.NewIndex); //var startTime = SystemClock.UtcNow.AddSeconds(-1); //await progressCallbackAsync(0, "Starting reindex...").AnyContext(); //var result = await InternalReindexAsync(workItem, progressCallbackAsync, 0, 90, workItem.StartUtc).AnyContext(); //await progressCallbackAsync(95, $"Total: {result.Total} Completed: {result.Completed}").AnyContext(); //// TODO: Check to make sure the docs have been added to the new index before changing alias //if (workItem.OldIndex != workItem.NewIndex) { // var aliases = await GetIndexAliases(workItem.OldIndex).AnyContext(); // if (!String.IsNullOrEmpty(workItem.Alias) && !aliases.Contains(workItem.Alias)) // aliases.Add(workItem.Alias); // if (aliases.Count > 0) { // await _client.AliasAsync(x => { // foreach (var alias in aliases) // x = x.Remove(a => a.Alias(alias).Index(workItem.OldIndex)).Add(a => a.Alias(alias).Index(workItem.NewIndex)); // return x; // }).AnyContext(); // await progressCallbackAsync(98, $"Updated aliases: {String.Join(", ", aliases)} Remove: {workItem.OldIndex} Add: {workItem.NewIndex}").AnyContext(); // } //} //await _client.RefreshAsync(Indices.All).AnyContext(); //var secondPassResult = await InternalReindexAsync(workItem, progressCallbackAsync, 90, 98, startTime).AnyContext(); //await progressCallbackAsync(98, $"Total: {secondPassResult.Total} Completed: {secondPassResult.Completed}").AnyContext(); //if (workItem.DeleteOld && workItem.OldIndex != workItem.NewIndex) { // await _client.RefreshAsync(Indices.All).AnyContext(); // long newDocCount = (await _client.CountAsync(d => d.Index(workItem.NewIndex)).AnyContext()).Count; // long oldDocCount = (await _client.CountAsync(d => d.Index(workItem.OldIndex)).AnyContext()).Count; // await progressCallbackAsync(98, $"Old Docs: {oldDocCount} New Docs: {newDocCount}").AnyContext(); // if (newDocCount >= oldDocCount) { // await _client.DeleteIndexAsync(Indices.Index(workItem.OldIndex)).AnyContext(); // await progressCallbackAsync(99, $"Deleted index: {workItem.OldIndex}").AnyContext(); // } //} ======= if (progressCallbackAsync == null) { progressCallbackAsync = (progress, message) => { _logger.Info("Reindex Progress {0}%: {1}", progress, message); return Task.CompletedTask; }; } _logger.Info("Received reindex work item for new index {0}", workItem.NewIndex); var startTime = SystemClock.UtcNow.AddSeconds(-1); await progressCallbackAsync(0, "Starting reindex...").AnyContext(); var result = await InternalReindexAsync(workItem, progressCallbackAsync, 0, 90, workItem.StartUtc).AnyContext(); await progressCallbackAsync(95, $"Total: {result.Total} Completed: {result.Completed}").AnyContext(); // TODO: Check to make sure the docs have been added to the new index before changing alias if (workItem.OldIndex != workItem.NewIndex) { var aliases = await GetIndexAliases(workItem.OldIndex).AnyContext(); if (!String.IsNullOrEmpty(workItem.Alias) && !aliases.Contains(workItem.Alias)) aliases.Add(workItem.Alias); if (aliases.Count > 0) { await _client.AliasAsync(x => { foreach (var alias in aliases) x = x.Remove(a => a.Alias(alias).Index(workItem.OldIndex)).Add(a => a.Alias(alias).Index(workItem.NewIndex)); return x; }).AnyContext(); await progressCallbackAsync(98, $"Updated aliases: {String.Join(", ", aliases)} Remove: {workItem.OldIndex} Add: {workItem.NewIndex}").AnyContext(); } } await _client.RefreshAsync().AnyContext(); var secondPassResult = await InternalReindexAsync(workItem, progressCallbackAsync, 90, 98, startTime).AnyContext(); await progressCallbackAsync(98, $"Total: {secondPassResult.Total} Completed: {secondPassResult.Completed}").AnyContext(); if (workItem.DeleteOld && workItem.OldIndex != workItem.NewIndex) { await _client.RefreshAsync().AnyContext(); long newDocCount = (await _client.CountAsync(d => d.Index(workItem.NewIndex)).AnyContext()).Count; long oldDocCount = (await _client.CountAsync(d => d.Index(workItem.OldIndex)).AnyContext()).Count; await progressCallbackAsync(98, $"Old Docs: {oldDocCount} New Docs: {newDocCount}").AnyContext(); if (newDocCount >= oldDocCount) { await _client.DeleteIndexAsync(d => d.Index(workItem.OldIndex)).AnyContext(); await progressCallbackAsync(99, $"Deleted index: {workItem.OldIndex}").AnyContext(); } } >>>>>>> if (progressCallbackAsync == null) { progressCallbackAsync = (progress, message) => { _logger.Info("Reindex Progress {0}%: {1}", progress, message); return Task.CompletedTask; }; } //_logger.Info("Received reindex work item for new index {0}", workItem.NewIndex); //var startTime = SystemClock.UtcNow.AddSeconds(-1); //await progressCallbackAsync(0, "Starting reindex...").AnyContext(); //var result = await InternalReindexAsync(workItem, progressCallbackAsync, 0, 90, workItem.StartUtc).AnyContext(); //await progressCallbackAsync(95, $"Total: {result.Total} Completed: {result.Completed}").AnyContext(); //// TODO: Check to make sure the docs have been added to the new index before changing alias //if (workItem.OldIndex != workItem.NewIndex) { // var aliases = await GetIndexAliases(workItem.OldIndex).AnyContext(); // if (!String.IsNullOrEmpty(workItem.Alias) && !aliases.Contains(workItem.Alias)) // aliases.Add(workItem.Alias); // if (aliases.Count > 0) { // await _client.AliasAsync(x => { // foreach (var alias in aliases) // x = x.Remove(a => a.Alias(alias).Index(workItem.OldIndex)).Add(a => a.Alias(alias).Index(workItem.NewIndex)); // return x; // }).AnyContext(); // await progressCallbackAsync(98, $"Updated aliases: {String.Join(", ", aliases)} Remove: {workItem.OldIndex} Add: {workItem.NewIndex}").AnyContext(); // } //} //await _client.RefreshAsync().AnyContext(); //var secondPassResult = await InternalReindexAsync(workItem, progressCallbackAsync, 90, 98, startTime).AnyContext(); //await progressCallbackAsync(98, $"Total: {secondPassResult.Total} Completed: {secondPassResult.Completed}").AnyContext(); //if (workItem.DeleteOld && workItem.OldIndex != workItem.NewIndex) { // await _client.RefreshAsync().AnyContext(); // long newDocCount = (await _client.CountAsync(d => d.Index(workItem.NewIndex)).AnyContext()).Count; // long oldDocCount = (await _client.CountAsync(d => d.Index(workItem.OldIndex)).AnyContext()).Count; // await progressCallbackAsync(98, $"Old Docs: {oldDocCount} New Docs: {newDocCount}").AnyContext(); // if (newDocCount >= oldDocCount) { // await _client.DeleteIndexAsync(d => d.Index(workItem.OldIndex)).AnyContext(); // await progressCallbackAsync(99, $"Deleted index: {workItem.OldIndex}").AnyContext(); // } //}
<<<<<<< internal static ResponseCacheContext CreateTestContext(ITestSink testSink) ======= internal static ResponseCachingContext CreateTestContext(TestSink testSink) >>>>>>> internal static ResponseCachingContext CreateTestContext(ITestSink testSink)
<<<<<<< /// <summary> /// Options for persisted grants. /// </summary> public PersistentGrantOptions PersistentGrants { get; set; } = new PersistentGrantOptions(); ======= /// <summary> /// Gets or sets the license key. /// </summary> public string LicenseKey { get; set; } >>>>>>> /// <summary> /// Options for persisted grants. /// </summary> public PersistentGrantOptions PersistentGrants { get; set; } = new PersistentGrantOptions(); /// Gets or sets the license key. /// </summary> public string LicenseKey { get; set; }
<<<<<<< context.AddRequestedClaims(user.Claims); ======= if (user != null) { context.AddFilteredClaims(user.Claims); } >>>>>>> if (user != null) { context.AddRequestedClaims(user.Claims); }
<<<<<<< /// <summary> /// Linear interpolates B<->C using percent A /// </summary> /// <param name="a"></param> /// <param name="b"></param> /// <param name="c"></param> /// <returns></returns> public static double lerp(double a, double b, double c) { return (b*a) + (c*(1 - a)); } /// <summary> /// Bilinear Interpolate, see Lerp but for 2D using 'percents' X & Y. /// Layout: /// A B /// C D /// A<->C = Y /// C<->D = X /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="a"></param> /// <param name="b"></param> /// <param name="c"></param> /// <param name="d"></param> /// <returns></returns> public static double lerp2D(double x, double y, double a, double b, double c, double d) { return lerp(y, lerp(x, a, b), lerp(x, c, d)); } ======= public static Encoding UTF8 = Encoding.UTF8; >>>>>>> /// <summary> /// Linear interpolates B<->C using percent A /// </summary> /// <param name="a"></param> /// <param name="b"></param> /// <param name="c"></param> /// <returns></returns> public static double lerp(double a, double b, double c) { return (b*a) + (c*(1 - a)); } /// <summary> /// Bilinear Interpolate, see Lerp but for 2D using 'percents' X & Y. /// Layout: /// A B /// C D /// A<->C = Y /// C<->D = X /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="a"></param> /// <param name="b"></param> /// <param name="c"></param> /// <param name="d"></param> /// <returns></returns> public static double lerp2D(double x, double y, double a, double b, double c, double d) { return lerp(y, lerp(x, a, b), lerp(x, c, d)); } public static Encoding UTF8 = Encoding.UTF8;
<<<<<<< ======= using System.IO; using System.Linq; using System.Text; >>>>>>> using System.IO;
<<<<<<< if (options.IsMultiInstanceTask) { unboundTask.MultiInstanceSettings = new MultiInstanceSettings(options.InstanceNumber); unboundTask.MultiInstanceSettings.CoordinationCommandLine = options.BackgroundCommand; unboundTask.MultiInstanceSettings.CommonResourceFiles = options.CommonResourceFiles.ConvertAll(f => new ResourceFile(f.BlobSource, f.FilePath)); } ======= unboundTask.ResourceFiles = options.ResourceFiles.ConvertAll(f => new ResourceFile(f.BlobSource, f.FilePath)); >>>>>>> if (options.IsMultiInstanceTask) { unboundTask.MultiInstanceSettings = new MultiInstanceSettings(options.InstanceNumber); unboundTask.MultiInstanceSettings.CoordinationCommandLine = options.BackgroundCommand; unboundTask.MultiInstanceSettings.CommonResourceFiles = options.CommonResourceFiles.ConvertAll(f => new ResourceFile(f.BlobSource, f.FilePath)); } unboundTask.ResourceFiles = options.ResourceFiles.ConvertAll(f => new ResourceFile(f.BlobSource, f.FilePath));
<<<<<<< using System.Collections.Generic; ======= using System.Collections.Generic; >>>>>>> using System.Collections.Generic; <<<<<<< public string BackgroundCommand { get; set; } public List<ResourceFileInfo> CommonResourceFiles { get; set; } public int InstanceNumber { get; set; } public bool IsMultiInstanceTask { get; set; } ======= public List<ResourceFileInfo> ResourceFiles { get; set; } >>>>>>> public List<ResourceFileInfo> ResourceFiles { get; set; } public string BackgroundCommand { get; set; } public List<ResourceFileInfo> CommonResourceFiles { get; set; } public int InstanceNumber { get; set; } public bool IsMultiInstanceTask { get; set; }
<<<<<<< public void ValueOrDefaultFactory() => Value .ValueOrDefault(() => 5) .Should() .Be(10); [Fact] public void ValueOrNull() => Value .ValueOrNull() .Should() .Be(IntValue); [Fact] ======= >>>>>>> public void ValueOrDefaultFactory() => Value .ValueOrDefault(() => 5) .Should() .Be(10); [Fact] <<<<<<< public Task ValueOrDefaultFactory() => Value .ValueOrDefault(() => 5) .Should() .Be(10); [Fact] public Task ValueOrNull() => Value .ValueOrNull() .Should() .Be(IntValue); [Fact] ======= >>>>>>> public Task ValueOrDefaultFactory() => Value .ValueOrDefault(() => 5) .Should() .Be(10); [Fact] <<<<<<< public void ValueOrDefaultFactory() => Value .ValueOrDefault(() => 5) .Should() .Be(5); [Fact] public void ValueOrNull() => Value .ValueOrNull() .Should() .BeNull(); [Fact] ======= >>>>>>> public void ValueOrDefaultFactory() => Value .ValueOrDefault(() => 5) .Should() .Be(5); [Fact] <<<<<<< public Task ValueOrDefaultFactory() => Value .ValueOrDefault(() => 5) .Should() .Be(5); [Fact] public Task ValueOrNull() => Value .ValueOrNull() .Should() .BeNull(); [Fact] ======= >>>>>>> public Task ValueOrDefaultFactory() => Value .ValueOrDefault(() => 5) .Should() .Be(5); [Fact]
<<<<<<< IronRuby.Builtins.RubyModule def19 = DefineModule("IronRuby::Clr::FlagEnumeration", typeof(IronRuby.Builtins.FlagEnumeration), false, LoadIronRuby__Clr__FlagEnumeration_Instance, null, null, IronRuby.Builtins.RubyModule.EmptyArray); ======= IronRuby.Builtins.RubyModule def21 = DefineModule("IronRuby::Clr::FlagEnumeration", typeof(IronRuby.Builtins.FlagEnumeration), false, LoadIronRuby__Clr__FlagEnumeration_Instance, null, null, IronRuby.Builtins.RubyModule.EmptyArray); >>>>>>> IronRuby.Builtins.RubyModule def20 = DefineModule("IronRuby::Clr::FlagEnumeration", typeof(IronRuby.Builtins.FlagEnumeration), false, LoadIronRuby__Clr__FlagEnumeration_Instance, null, null, IronRuby.Builtins.RubyModule.EmptyArray); <<<<<<< IronRuby.Builtins.RubyClass def9 = DefineClass("Errno::EADDRINUSE", typeof(IronRuby.Builtins.Errno.AddressInUseError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def10 = DefineClass("Errno::EBADF", typeof(IronRuby.Builtins.Errno.BadFileDescriptorError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def11 = DefineClass("Errno::ECONNABORTED", typeof(IronRuby.Builtins.Errno.ConnectionAbortError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def12 = DefineClass("Errno::ECONNREFUSED", typeof(IronRuby.Builtins.Errno.ConnectionRefusedError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def13 = DefineClass("Errno::ECONNRESET", typeof(IronRuby.Builtins.Errno.ConnectionResetError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def14 = DefineClass("Errno::EDOM", typeof(IronRuby.Builtins.Errno.DomainError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def18 = DefineClass("Errno::EEXIST", typeof(IronRuby.Builtins.ExistError), false, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, new System.Func<IronRuby.Builtins.RubyClass, IronRuby.Builtins.MutableString, IronRuby.Builtins.ExistError>(IronRuby.Builtins.Errno.ExistErrorOps.Create) ); IronRuby.Builtins.RubyClass def20 = DefineClass("Errno::EINVAL", typeof(IronRuby.Builtins.InvalidError), false, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, new System.Func<IronRuby.Builtins.RubyClass, IronRuby.Builtins.MutableString, IronRuby.Builtins.InvalidError>(IronRuby.Builtins.Errno.InvalidErrorOps.Create) ); IronRuby.Builtins.RubyClass def28 = DefineClass("Errno::ENOENT", typeof(System.IO.FileNotFoundException), false, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, ======= IronRuby.Builtins.RubyClass def9 = DefineClass("Errno::EADDRINUSE", typeof(IronRuby.Builtins.Errno.AddressInUseError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def10 = DefineClass("Errno::EBADF", typeof(IronRuby.Builtins.Errno.BadFileDescriptorError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def11 = DefineClass("Errno::ECHILD", typeof(IronRuby.Builtins.Errno.ChildError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def12 = DefineClass("Errno::ECONNABORTED", typeof(IronRuby.Builtins.Errno.ConnectionAbortError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def13 = DefineClass("Errno::ECONNREFUSED", typeof(IronRuby.Builtins.Errno.ConnectionRefusedError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def14 = DefineClass("Errno::ECONNRESET", typeof(IronRuby.Builtins.Errno.ConnectionResetError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def15 = DefineClass("Errno::EDOM", typeof(IronRuby.Builtins.Errno.DomainError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def16 = DefineClass("Errno::EEXIST", typeof(IronRuby.Builtins.Errno.ExistError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def18 = DefineClass("Errno::EINVAL", typeof(IronRuby.Builtins.Errno.InvalidError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def29 = DefineClass("Errno::ENOENT", typeof(System.IO.FileNotFoundException), false, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, >>>>>>> IronRuby.Builtins.RubyClass def9 = DefineClass("Errno::EADDRINUSE", typeof(IronRuby.Builtins.Errno.AddressInUseError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def10 = DefineClass("Errno::EBADF", typeof(IronRuby.Builtins.Errno.BadFileDescriptorError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def11 = DefineClass("Errno::ECHILD", typeof(IronRuby.Builtins.Errno.ChildError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def12 = DefineClass("Errno::ECONNABORTED", typeof(IronRuby.Builtins.Errno.ConnectionAbortError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def13 = DefineClass("Errno::ECONNREFUSED", typeof(IronRuby.Builtins.Errno.ConnectionRefusedError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def14 = DefineClass("Errno::ECONNRESET", typeof(IronRuby.Builtins.Errno.ConnectionResetError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def15 = DefineClass("Errno::EDOM", typeof(IronRuby.Builtins.Errno.DomainError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def16 = DefineClass("Errno::EEXIST", typeof(IronRuby.Builtins.Errno.ExistError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def21 = DefineClass("Errno::EINVAL", typeof(IronRuby.Builtins.InvalidError), false, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, new System.Func<IronRuby.Builtins.RubyClass, IronRuby.Builtins.MutableString, IronRuby.Builtins.InvalidError>(IronRuby.Builtins.Errno.InvalidErrorOps.Create) ); IronRuby.Builtins.RubyClass def29 = DefineClass("Errno::ENOENT", typeof(System.IO.FileNotFoundException), false, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, <<<<<<< IronRuby.Builtins.RubyClass def16 = DefineClass("Errno::ENOTCONN", typeof(IronRuby.Builtins.Errno.NotConnectedError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def27 = DefineClass("Errno::ENOTDIR", typeof(System.IO.DirectoryNotFoundException), false, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, ======= IronRuby.Builtins.RubyClass def19 = DefineClass("Errno::ENOTCONN", typeof(IronRuby.Builtins.Errno.NotConnectedError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def28 = DefineClass("Errno::ENOTDIR", typeof(System.IO.DirectoryNotFoundException), false, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, >>>>>>> IronRuby.Builtins.RubyClass def18 = DefineClass("Errno::ENOTCONN", typeof(IronRuby.Builtins.Errno.NotConnectedError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def28 = DefineClass("Errno::ENOTDIR", typeof(System.IO.DirectoryNotFoundException), false, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, <<<<<<< IronRuby.Builtins.RubyClass def17 = DefineClass("Errno::EPIPE", typeof(IronRuby.Builtins.Errno.PipeError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def15 = DefineClass("Errno::EXDEV", typeof(IronRuby.Builtins.Errno.ImproperLinkError), true, def33, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); DefineGlobalClass("FloatDomainError", typeof(IronRuby.Builtins.FloatDomainError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, ======= IronRuby.Builtins.RubyClass def20 = DefineClass("Errno::EPIPE", typeof(IronRuby.Builtins.Errno.PipeError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def17 = DefineClass("Errno::EXDEV", typeof(IronRuby.Builtins.Errno.ImproperLinkError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); DefineGlobalClass("FloatDomainError", typeof(IronRuby.Builtins.FloatDomainError), true, def35, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, >>>>>>> IronRuby.Builtins.RubyClass def19 = DefineClass("Errno::EPIPE", typeof(IronRuby.Builtins.Errno.PipeError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); IronRuby.Builtins.RubyClass def17 = DefineClass("Errno::EXDEV", typeof(IronRuby.Builtins.Errno.ImproperLinkError), true, def34, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); DefineGlobalClass("FloatDomainError", typeof(IronRuby.Builtins.FloatDomainError), true, def35, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray, <<<<<<< def2.SetConstant("FlagEnumeration", def19); ======= def2.SetConstant("FlagEnumeration", def21); >>>>>>> def2.SetConstant("FlagEnumeration", def20); <<<<<<< def8.SetConstant("ECONNABORTED", def11); def8.SetConstant("ECONNREFUSED", def12); def8.SetConstant("ECONNRESET", def13); def8.SetConstant("EDOM", def14); def8.SetConstant("EEXIST", def18); def8.SetConstant("EINVAL", def20); def8.SetConstant("ENOENT", def28); def8.SetConstant("ENOTCONN", def16); def8.SetConstant("ENOTDIR", def27); def8.SetConstant("EPIPE", def17); def8.SetConstant("EXDEV", def15); ======= def8.SetConstant("ECHILD", def11); def8.SetConstant("ECONNABORTED", def12); def8.SetConstant("ECONNREFUSED", def13); def8.SetConstant("ECONNRESET", def14); def8.SetConstant("EDOM", def15); def8.SetConstant("EEXIST", def16); def8.SetConstant("EINVAL", def18); def8.SetConstant("ENOENT", def29); def8.SetConstant("ENOTCONN", def19); def8.SetConstant("ENOTDIR", def28); def8.SetConstant("EPIPE", def20); def8.SetConstant("EXDEV", def17); >>>>>>> def8.SetConstant("ECHILD", def11); def8.SetConstant("ECONNABORTED", def12); def8.SetConstant("ECONNREFUSED", def13); def8.SetConstant("ECONNRESET", def14); def8.SetConstant("EDOM", def15); def8.SetConstant("EEXIST", def16); def8.SetConstant("EINVAL", def21); def8.SetConstant("ENOENT", def29); def8.SetConstant("ENOTCONN", def18); def8.SetConstant("ENOTDIR", def28); def8.SetConstant("EPIPE", def19); def8.SetConstant("EXDEV", def17);
<<<<<<< protected override void UnhandledException(Exception e) { // Kernel#at_exit can access $!. So we need to publish the uncaught exception RubyOps.SetCurrentExceptionAndStackTrace(Ruby.GetExecutionContext(Engine), e); base.UnhandledException(e); } protected override void Shutdown() { try { Engine.Runtime.Shutdown(); } catch (SystemExit e) { // Kernel#at_exit runs during shutdown, and it can set the exitcode by calling exit ExitCode = e.Status; } catch (Exception e) { UnhandledException(e); ExitCode = 1; } } ======= internal static string CanonicalizePath(string path) { return Glob.CanonicalizePath(IronRuby.Builtins.MutableString.Create(path)).ToString(); } >>>>>>> protected override void UnhandledException(Exception e) { // Kernel#at_exit can access $!. So we need to publish the uncaught exception RubyOps.SetCurrentExceptionAndStackTrace(Ruby.GetExecutionContext(Engine), e); base.UnhandledException(e); } protected override void Shutdown() { try { Engine.Runtime.Shutdown(); } catch (SystemExit e) { // Kernel#at_exit runs during shutdown, and it can set the exitcode by calling exit ExitCode = e.Status; } catch (Exception e) { UnhandledException(e); ExitCode = 1; } } internal static string CanonicalizePath(string path) { return Glob.CanonicalizePath(IronRuby.Builtins.MutableString.Create(path)).ToString(); }
<<<<<<< Python = new LangSetup( new[] { "IronPython","Python","py" },new[] { ".py" }, "IronPython 2.7", "IronPython.Runtime.PythonContext", "IronPython, Version=2.7.0.10, Culture=neutral" ======= Python = new LangSetup( new[] { "IronPython","Python","py" },new[] { ".py" }, "IronPython 2.6", "IronPython.Runtime.PythonContext", "IronPython, Version=2.7.0.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35" >>>>>>> Python = new LangSetup( new[] { "IronPython","Python","py" },new[] { ".py" }, "IronPython 2.7", "IronPython.Runtime.PythonContext", "IronPython, Version=2.7.0.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
<<<<<<< // Real exception begin propagated by the CLR. Needed for lazy initialization of message, backtrace ======= // An exception class can implement singleton method "new" that returns an arbitrary instance of an exception. // This mapping needs to be applied on exceptions created in libraries as well (they should be created "dynamically"). // That would however need to pass RubyContext to every method that might throw an exception. Instead, we call // "new" on the exception's class as soon as it gets to the first Ruby EH handler (rescue/ensure/else). // // True if the exception has already been handled by Ruby EH clause or if it was constructed "dynamically" via Class#new. internal bool Handled { get; set; } // owner exception, needed for lazy initialization of message, backtrace >>>>>>> // An exception class can implement singleton method "new" that returns an arbitrary instance of an exception. // This mapping needs to be applied on exceptions created in libraries as well (they should be created "dynamically"). // That would however need to pass RubyContext to every method that might throw an exception. Instead, we call // "new" on the exception's class as soon as it gets to the first Ruby EH handler (rescue/ensure/else). // // True if the exception has already been handled by Ruby EH clause or if it was constructed "dynamically" via Class#new. internal bool Handled { get; set; } // Real exception begin propagated by the CLR. Needed for lazy initialization of message, backtrace
<<<<<<< if (declaringDef.Compatibility != RubyCompatibility.Default) { def.Compatibility = (RubyCompatibility)Math.Max((int)declaringDef.Compatibility, (int)def.Compatibility); } // we will need a reference for setting the constant: def.DeclaringTypeRef = declaringDef.GetReference(ref defVariableId); def.GetReference(ref defVariableId); break; } else { declaringType = declaringType.DeclaringType; ======= // inherits build config: if (declaringDef.BuildConfig != null) { if (def.BuildConfig != null) { def.BuildConfig = declaringDef.BuildConfig + " && " + def.BuildConfig; } else { def.BuildConfig = declaringDef.BuildConfig; } >>>>>>> // inherits build config: if (declaringDef.BuildConfig != null) { if (def.BuildConfig != null) { def.BuildConfig = declaringDef.BuildConfig + " && " + def.BuildConfig; } else { def.BuildConfig = declaringDef.BuildConfig; } } if (declaringDef.Compatibility != RubyCompatibility.Default) { def.Compatibility = (RubyCompatibility)Math.Max((int)declaringDef.Compatibility, (int)def.Compatibility);
<<<<<<< [RubyMethod("to_ary")] public static RubyArray/*!*/ ToExplicitArray(RubyArray/*!*/ self) { return self; } ======= [RubyMethod("to_ary")] public static RubyArray/*!*/ ToAry(RubyArray/*!*/ self) { return self; } >>>>>>> public static RubyArray/*!*/ ToExplicitArray(RubyArray/*!*/ self) { return self; }
<<<<<<< using CommonServiceLocator; ======= using Microsoft.Practices.ServiceLocation; >>>>>>> using Microsoft.Practices.ServiceLocation;
<<<<<<< IReadOnlyCollection<Type> Sagas { get; } ======= IReadOnlyCollection<Type> SnapshotTypes { get; } >>>>>>> IReadOnlyCollection<Type> Sagas { get; } IReadOnlyCollection<Type> SnapshotTypes { get; }
<<<<<<< using EventFlow.Sagas; ======= using EventFlow.Snapshots; >>>>>>> using EventFlow.Sagas; using EventFlow.Snapshots; <<<<<<< private readonly ISagaDefinitionService _sagaDefinitionService; ======= private readonly ISnapshotDefinitionService _snapshotDefinitionService; >>>>>>> private readonly ISagaDefinitionService _sagaDefinitionService; private readonly ISnapshotDefinitionService _snapshotDefinitionService; <<<<<<< IJobDefinitionService jobDefinitionService, ISagaDefinitionService sagaDefinitionService) ======= IJobDefinitionService jobDefinitionService, ISnapshotDefinitionService snapshotDefinitionService) >>>>>>> IJobDefinitionService jobDefinitionService, ISagaDefinitionService sagaDefinitionService, ISnapshotDefinitionService snapshotDefinitionService) <<<<<<< _sagaDefinitionService = sagaDefinitionService; ======= _snapshotDefinitionService = snapshotDefinitionService; >>>>>>> _sagaDefinitionService = sagaDefinitionService; _snapshotDefinitionService = snapshotDefinitionService; <<<<<<< _sagaDefinitionService.LoadSagas(_loadedVersionedTypes.Sagas); ======= _snapshotDefinitionService.Load(_loadedVersionedTypes.SnapshotTypes); >>>>>>> _sagaDefinitionService.LoadSagas(_loadedVersionedTypes.Sagas); _snapshotDefinitionService.Load(_loadedVersionedTypes.SnapshotTypes);
<<<<<<< It.IsAny<Func<IReadModelContext>>(), It.IsAny<Func<IReadModelContext, IReadOnlyCollection<IDomainEvent>, ReadModelEnvelope<TReadModel>, CancellationToken, Task<ReadModelUpdateResult<TReadModel>>>>(), ======= It.IsAny<IReadModelContextFactory>(), It.IsAny<Func<IReadModelContext, IReadOnlyCollection<IDomainEvent>, ReadModelEnvelope<ReadStoreManagerTestReadModel>, CancellationToken, Task<ReadModelEnvelope<ReadStoreManagerTestReadModel>>>>(), >>>>>>> It.IsAny<IReadModelContextFactory>(), It.IsAny<Func<IReadModelContext, IReadOnlyCollection<IDomainEvent>, ReadModelEnvelope<TReadModel>, CancellationToken, Task<ReadModelUpdateResult<TReadModel>>>>(),
<<<<<<< BatchId = batchId, Data = e.SerializedData, Metadata = e.SerializedMetadata, ======= Data = e.Data, Metadata = e.Meta, >>>>>>> Data = e.SerializedData, Metadata = e.SerializedMetadata,
<<<<<<< .Setup(s => s.LoadAggregateAsync<TestAggregate>(It.IsAny<TestId>(), It.IsAny<CancellationToken>())) .Returns(() => Task.FromResult(new TestAggregate(TestId.New))); ======= .Setup(s => s.LoadAggregateAsync<TestAggregate>(It.IsAny<string>(), It.IsAny<CancellationToken>())) .Returns(() => Task.FromResult(new TestAggregate("42"))); resolver .Setup(r => r.Resolve<IOptimisticConcurrencyRetryStrategy>()) .Returns(new OptimisticConcurrencyRetryStrategy(new EventFlowConfiguration())); >>>>>>> .Setup(s => s.LoadAggregateAsync<TestAggregate>(It.IsAny<TestId>(), It.IsAny<CancellationToken>())) .Returns(() => Task.FromResult(new TestAggregate(TestId.New))); resolver .Setup(r => r.Resolve<IOptimisticConcurrencyRetryStrategy>()) .Returns(new OptimisticConcurrencyRetryStrategy(new EventFlowConfiguration())); <<<<<<< s => s.StoreAsync<TestAggregate>(It.IsAny<TestId>(), It.IsAny<IReadOnlyCollection<IUncommittedEvent>>(), It.IsAny<CancellationToken>()), Times.Exactly(3)); ======= s => s.StoreAsync<TestAggregate>(It.IsAny<string>(), It.IsAny<IReadOnlyCollection<IUncommittedEvent>>(), It.IsAny<CancellationToken>()), Times.Exactly(5)); >>>>>>> s => s.StoreAsync<TestAggregate>(It.IsAny<TestId>(), It.IsAny<IReadOnlyCollection<IUncommittedEvent>>(), It.IsAny<CancellationToken>()), Times.Exactly(5));
<<<<<<< using EventFlow.Sagas; ======= using EventFlow.Snapshots; using EventFlow.Snapshots.Stores; using EventFlow.Snapshots.Stores.InMemory; using EventFlow.Snapshots.Stores.Null; using EventFlow.Snapshots.Strategies; >>>>>>> using EventFlow.Sagas; using EventFlow.Snapshots; using EventFlow.Snapshots.Stores; using EventFlow.Snapshots.Stores.InMemory; using EventFlow.Snapshots.Stores.Null; using EventFlow.Snapshots.Strategies; <<<<<<< _aggregateEventTypes, _sagaTypes), ======= _aggregateEventTypes, _snapshotTypes), >>>>>>> _aggregateEventTypes, _sagaTypes, _snapshotTypes),
<<<<<<< public EventFlowOptions UseFilesEventStore(IFilesEventStoreConfiguration filesEventStoreConfiguration) { AddRegistration(new Registration<IFilesEventStoreConfiguration>(c => filesEventStoreConfiguration, Lifetime.Singleton)); AddRegistration(new Registration<IEventStore, FilesEventStore>()); return this; } ======= public EventFlowOptions UseNullEventCache() { AddRegistration(new Registration<IEventCache, NullEventCache>(Lifetime.Singleton)); return this; } public EventFlowOptions UseEventCache<TEventCache>(Lifetime lifetime = Lifetime.AlwaysUnique) where TEventCache : class, IEventCache { AddRegistration(new Registration<IEventCache, TEventCache>(lifetime)); return this; } >>>>>>> public EventFlowOptions UseNullEventCache() { AddRegistration(new Registration<IEventCache, NullEventCache>(Lifetime.Singleton)); return this; } public EventFlowOptions UseEventCache<TEventCache>(Lifetime lifetime = Lifetime.AlwaysUnique) where TEventCache : class, IEventCache { AddRegistration(new Registration<IEventCache, TEventCache>(lifetime)); return this; } public EventFlowOptions UseFilesEventStore(IFilesEventStoreConfiguration filesEventStoreConfiguration) { AddRegistration(new Registration<IFilesEventStoreConfiguration>(c => filesEventStoreConfiguration, Lifetime.Singleton)); AddRegistration(new Registration<IEventStore, FilesEventStore>()); return this; }
<<<<<<< var testAggregate = EventStore.LoadAggregate<TestAggregate, TestId>(id, CancellationToken.None); testAggregate.Ping(); ======= var testAggregate = await EventStore.LoadAggregateAsync<TestAggregate>(id, CancellationToken.None).ConfigureAwait(false); testAggregate.Ping(PingId.New); >>>>>>> var testAggregate = EventStore.LoadAggregate<TestAggregate, TestId>(id, CancellationToken.None); testAggregate.Ping(PingId.New); <<<<<<< var testAggregate = EventStore.LoadAggregate<TestAggregate, TestId>(id, CancellationToken.None); testAggregate.Ping(); ======= var testAggregate = await EventStore.LoadAggregateAsync<TestAggregate>(id, CancellationToken.None).ConfigureAwait(false); testAggregate.Ping(PingId.New); >>>>>>> var testAggregate = EventStore.LoadAggregate<TestAggregate, TestId>(id, CancellationToken.None); testAggregate.Ping(PingId.New); <<<<<<< var aggregate1 = await EventStore.LoadAggregateAsync<TestAggregate, TestId>(id1, CancellationToken.None).ConfigureAwait(false); var aggregate2 = await EventStore.LoadAggregateAsync<TestAggregate, TestId>(id2, CancellationToken.None).ConfigureAwait(false); aggregate1.Ping(); aggregate2.Ping(); ======= var aggregate1 = await EventStore.LoadAggregateAsync<TestAggregate>(id1, CancellationToken.None).ConfigureAwait(false); var aggregate2 = await EventStore.LoadAggregateAsync<TestAggregate>(id2, CancellationToken.None).ConfigureAwait(false); aggregate1.Ping(PingId.New); aggregate2.Ping(PingId.New); >>>>>>> var aggregate1 = await EventStore.LoadAggregateAsync<TestAggregate, TestId>(id1, CancellationToken.None).ConfigureAwait(false); var aggregate2 = await EventStore.LoadAggregateAsync<TestAggregate, TestId>(id2, CancellationToken.None).ConfigureAwait(false); aggregate1.Ping(PingId.New); aggregate2.Ping(PingId.New); <<<<<<< var aggregate1 = await EventStore.LoadAggregateAsync<TestAggregate, TestId>(id1, CancellationToken.None).ConfigureAwait(false); var aggregate2 = await EventStore.LoadAggregateAsync<TestAggregate, TestId>(id2, CancellationToken.None).ConfigureAwait(false); aggregate1.Ping(); aggregate2.Ping(); aggregate2.Ping(); ======= var aggregate1 = await EventStore.LoadAggregateAsync<TestAggregate>(id1, CancellationToken.None).ConfigureAwait(false); var aggregate2 = await EventStore.LoadAggregateAsync<TestAggregate>(id2, CancellationToken.None).ConfigureAwait(false); aggregate1.Ping(PingId.New); aggregate2.Ping(PingId.New); aggregate2.Ping(PingId.New); >>>>>>> var aggregate1 = await EventStore.LoadAggregateAsync<TestAggregate, TestId>(id1, CancellationToken.None).ConfigureAwait(false); var aggregate2 = await EventStore.LoadAggregateAsync<TestAggregate, TestId>(id2, CancellationToken.None).ConfigureAwait(false); aggregate1.Ping(PingId.New); aggregate2.Ping(PingId.New); aggregate2.Ping(PingId.New);
<<<<<<< public interface IMongoDbReadModelStore<TReadModel> : IReadModelStore<TReadModel> where TReadModel : class, IReadModel { Task<IAsyncCursor<TReadModel>> FindAsync( Expression<Func<TReadModel, bool>> filter, FindOptions<TReadModel, TReadModel> options = null, CancellationToken cancellationToken = default(CancellationToken)); } ======= public interface IMongoDbReadModelStore<TReadModel> : IReadModelStore<TReadModel> where TReadModel : class, IReadModel, new() { Task<IAsyncCursor<TReadModel>> FindAsync( Expression<Func<TReadModel, bool>> filter, FindOptions<TReadModel, TReadModel> options = null, CancellationToken cancellationToken = default(CancellationToken)); IQueryable<TReadModel> AsQueryable(); } >>>>>>> public interface IMongoDbReadModelStore<TReadModel> : IReadModelStore<TReadModel> where TReadModel : class, IReadModel { Task<IAsyncCursor<TReadModel>> FindAsync( Expression<Func<TReadModel, bool>> filter, FindOptions<TReadModel, TReadModel> options = null, CancellationToken cancellationToken = default(CancellationToken)); IQueryable<TReadModel> AsQueryable();
<<<<<<< private readonly ConcurrentBag<Type> _sagaTypes = new ConcurrentBag<Type>(); ======= private readonly ConcurrentBag<Type> _commandTypes = new ConcurrentBag<Type>(); >>>>>>> private readonly ConcurrentBag<Type> _sagaTypes = new ConcurrentBag<Type>(); private readonly ConcurrentBag<Type> _commandTypes = new ConcurrentBag<Type>(); <<<<<<< public EventFlowOptions AddSagas(IEnumerable<Type> sagaTypes) { foreach (var sagaType in sagaTypes) { if (!typeof(ISaga).IsAssignableFrom(sagaType)) { throw new ArgumentException($"Type {sagaType.PrettyPrint()} is not a {typeof(ISaga).PrettyPrint()}"); } _sagaTypes.Add(sagaType); } return this; } ======= public EventFlowOptions AddCommands(IEnumerable<Type> commandTypes) { foreach (var commandType in commandTypes) { if (!typeof(ICommand).IsAssignableFrom(commandType)) { throw new ArgumentException($"Type {commandType.Name} is not a {typeof(ICommand).PrettyPrint()}"); } _commandTypes.Add(commandType); } return this; } >>>>>>> public EventFlowOptions AddSagas(IEnumerable<Type> sagaTypes) { foreach (var sagaType in sagaTypes) { if (!typeof(ISaga).IsAssignableFrom(sagaType)) { throw new ArgumentException($"Type {sagaType.PrettyPrint()} is not a {typeof(ISaga).PrettyPrint()}"); } _sagaTypes.Add(sagaType); } return this; } public EventFlowOptions AddCommands(IEnumerable<Type> commandTypes) { foreach (var commandType in commandTypes) { if (!typeof(ICommand).IsAssignableFrom(commandType)) { throw new ArgumentException($"Type {commandType.Name} is not a {typeof(ICommand).PrettyPrint()}"); } _commandTypes.Add(commandType); } return this; }
<<<<<<< IEnumerable<Type> eventTypes, IEnumerable<Type> sagaTypes) ======= IEnumerable<Type> eventTypes, IEnumerable<Type> snapshotTypes) >>>>>>> IEnumerable<Type> eventTypes, IEnumerable<Type> sagaTypes, IEnumerable<Type> snapshotTypes) <<<<<<< Sagas = sagaTypes.ToList(); ======= SnapshotTypes = snapshotTypes.ToList(); >>>>>>> Sagas = sagaTypes.ToList(); SnapshotTypes = snapshotTypes.ToList(); <<<<<<< public IReadOnlyCollection<Type> Sagas { get; } ======= public IReadOnlyCollection<Type> SnapshotTypes { get; } >>>>>>> public IReadOnlyCollection<Type> Sagas { get; } public IReadOnlyCollection<Type> SnapshotTypes { get; }
<<<<<<< eventFlowOptions.RegisterServices(f => f.Register<IReadModelStore<TAggregate>>(r => r.Resolve<TReadModelStore>(), lifetime)); ======= eventFlowOptions.AddRegistration(new Registration<IReadModelStore<TAggregate>>(r => r.Resolver.Resolve<TReadModelStore>(), lifetime)); >>>>>>> eventFlowOptions.RegisterServices(f => f.Register<IReadModelStore<TAggregate>>(r => r.Resolver.Resolve<TReadModelStore>(), lifetime));
<<<<<<< { AggregateId = id.Value, AggregateSequenceNumber = serializedEvent.AggregateSequenceNumber, Data = serializedEvent.SerializedData, Metadata = serializedEvent.SerializedMetadata, }; ======= { AggregateId = id.Value, AggregateSequenceNumber = serializedEvent.AggregateSequenceNumber, Data = serializedEvent.Data, GlobalSequenceNumber = _globalSequenceNumber, Metadata = serializedEvent.Meta, }; >>>>>>> { AggregateId = id.Value, AggregateSequenceNumber = serializedEvent.AggregateSequenceNumber, Data = serializedEvent.SerializedData, Metadata = serializedEvent.SerializedMetadata, GlobalSequenceNumber = _globalSequenceNumber, };
<<<<<<< using EventFlow.Queries; ======= using EventFlow.ReadStores; >>>>>>> using EventFlow.Queries; using EventFlow.ReadStores; <<<<<<< var queryProcessor = resolver.Resolve<IQueryProcessor>(); var readModelStore = resolver.Resolve<IInMemoryReadModelStore<TestAggregate, TestAggregateReadModel>>(); ======= var readModelStore = resolver.Resolve<IInMemoryReadModelStore<TestAggregateReadModel>>(); >>>>>>> var queryProcessor = resolver.Resolve<IQueryProcessor>(); var readModelStore = resolver.Resolve<IInMemoryReadModelStore<TestAggregateReadModel>>(); <<<<<<< commandBus.Publish(new DomainErrorAfterFirstCommand(id)); var testAggregate = eventStore.LoadAggregate<TestAggregate>(id, CancellationToken.None); var testReadModelFromStore = readModelStore.Get(id); //var testReadModelFromQuery = queryProcessor.Process( // new InMemoryQuery<TestAggregate, TestAggregateReadModel>(rm => rm.DomainErrorAfterFirstReceived), ) ======= commandBus.Publish(new DomainErrorAfterFirstCommand(id), CancellationToken.None); var testAggregate = eventStore.LoadAggregate<TestAggregate, TestId>(id, CancellationToken.None); var testReadModel = readModelStore.Get(id); >>>>>>> commandBus.Publish(new DomainErrorAfterFirstCommand(id), CancellationToken.None); var testAggregate = eventStore.LoadAggregate<TestAggregate, TestId>(id, CancellationToken.None); var testReadModelFromStore = readModelStore.Get(id); var testReadModelFromQuery = queryProcessor.Process( new InMemoryQuery<TestAggregateReadModel>(rm => rm.DomainErrorAfterFirstReceived), CancellationToken.None);
<<<<<<< // Update sagas await _sagaManager.ProcessAsync(domainEvents, cancellationToken).ConfigureAwait(false); ======= // Update subscriptions AFTER read stores have been updated await _dispatchToEventSubscribers.DispatchAsync(domainEvents, cancellationToken).ConfigureAwait(false); >>>>>>> // Update subscriptions AFTER read stores have been updated await _dispatchToEventSubscribers.DispatchAsync(domainEvents, cancellationToken).ConfigureAwait(false); // Update sagas await _sagaManager.ProcessAsync(domainEvents, cancellationToken).ConfigureAwait(false);
<<<<<<< using Microsoft.AspNetCore.Razor.Language.Legacy; using System.Threading.Tasks; ======= >>>>>>> using System.Threading.Tasks;
<<<<<<< DirLandReplyData[] Landdata = directoryService.FindLandForSale("0", uint.MaxValue, 0, 0, 0); ======= List<DirLandReplyData> Landdata = directoryService.FindLandForSale("0", int.MaxValue.ToString(), "0", 0, 0); >>>>>>> List<DirLandReplyData> Landdata = directoryService.FindLandForSale("0", uint.MaxValue, 0, 0, 0); <<<<<<< DirLandReplyData[] Landdata = directoryService.FindLandForSale("0", uint.MaxValue, 0, 0, 0); ======= List<DirLandReplyData> Landdata = directoryService.FindLandForSale("0", int.MaxValue.ToString(), "0", 0, 0); >>>>>>> List<DirLandReplyData> Landdata = directoryService.FindLandForSale("0", uint.MaxValue, 0, 0, 0);
<<<<<<< Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None), Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace), Factory.Span(SpanKindInternal.Code, "Header", CSharpSymbolType.Identifier) .Accepts(AcceptedCharactersInternal.NonWhiteSpace) .With(new DirectiveTokenChunkGenerator(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First())), Factory.Span(SpanKindInternal.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharactersInternal.None), ======= Factory.MetaCode("section").Accepts(AcceptedCharacters.None), Factory.Span(SpanKind.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharacters.WhiteSpace), Factory.Span(SpanKind.Code, "Header", CSharpSymbolType.Identifier) .AsDirectiveToken(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First()), Factory.Span(SpanKind.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharacters.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharacters.None), >>>>>>> Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None), Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace), Factory.Span(SpanKindInternal.Code, "Header", CSharpSymbolType.Identifier) .AsDirectiveToken(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First()), Factory.Span(SpanKindInternal.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharactersInternal.None), <<<<<<< Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None), Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace), Factory.Span(SpanKindInternal.Code, "Header", CSharpSymbolType.Identifier) .Accepts(AcceptedCharactersInternal.NonWhiteSpace) .With(new DirectiveTokenChunkGenerator(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First())), Factory.Span(SpanKindInternal.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharactersInternal.None), ======= Factory.MetaCode("section").Accepts(AcceptedCharacters.None), Factory.Span(SpanKind.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharacters.WhiteSpace), Factory.Span(SpanKind.Code, "Header", CSharpSymbolType.Identifier).AsDirectiveToken(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First()), Factory.Span(SpanKind.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharacters.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharacters.None), >>>>>>> Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None), Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace), Factory.Span(SpanKindInternal.Code, "Header", CSharpSymbolType.Identifier).AsDirectiveToken(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First()), Factory.Span(SpanKindInternal.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharactersInternal.None),
<<<<<<< [Parameter(Mandatory = false, HelpMessage = "If true, Initialize Variable actions will be included in the ARM template")] public SwitchParameter IncludeInitializeVariable; ======= [Parameter(Mandatory = false, HelpMessage = "If true, the functionApp gets a static name")] public bool FixedFunctionAppName = false; [Parameter(Mandatory = false, HelpMessage = "If true, generate an output variable with the trigger url.")] public bool GenerateHttpTriggerUrlOutput = false; [Parameter(Mandatory = false, HelpMessage = "If true, the passwords will be stripped out of the output")] public bool StripPassword = false; [Parameter(Mandatory = false, HelpMessage = "If true, the LA ARM Template will be set to Disabled and won't be automatically run when deployed")] public bool DisableState = false; >>>>>>> [Parameter(Mandatory = false, HelpMessage = "If true, Initialize Variable actions will be included in the ARM template")] public SwitchParameter IncludeInitializeVariable; [Parameter(Mandatory = false, HelpMessage = "If true, the functionApp gets a static name")] public bool FixedFunctionAppName = false; [Parameter(Mandatory = false, HelpMessage = "If true, generate an output variable with the trigger url.")] public bool GenerateHttpTriggerUrlOutput = false; [Parameter(Mandatory = false, HelpMessage = "If true, the passwords will be stripped out of the output")] public bool StripPassword = false; [Parameter(Mandatory = false, HelpMessage = "If true, the LA ARM Template will be set to Disabled and won't be automatically run when deployed")] public bool DisableState = false; <<<<<<< TemplateGenerator generator = new TemplateGenerator(LogicApp, SubscriptionId, ResourceGroup, resourceCollector); generator.DiagnosticSettings = DiagnosticSettings; generator.IncludeInitializeVariable = IncludeInitializeVariable; ======= >>>>>>>
<<<<<<< #endregion ======= public FlowDocument FlowDoc { get; set; } >>>>>>> #endregion public FlowDocument FlowDoc { get; set; }
<<<<<<< var response = new RestMessage<bool>(false); try { value["_id"] = id; service.Update(collection, value); response.Data = true; return response; } catch (ValidationException err) { response.Errors = err.Errors; } catch (Exception untrapped) { //TODO: log here response.Errors.Add(new Library.Core.Error() { Code = "UNEXPEXTED", Title = $"{collection} produces an unexpexted error", Description = untrapped.Message, }); } return response; ======= value["_id"] = id; service.Update(collection, value,true); return new RestMessage<bool>(true); } // PUT api/CRUD/{collection}/5 [HttpPatch("{collection}/{id}")] public RestMessage<bool> Patch(string collection, string id, [FromBody]JObject value) { value["_id"] = id; service.Update(collection, value,false); return new RestMessage<bool>(true); >>>>>>> var response = new RestMessage<bool>(false); try { value["_id"] = id; service.Update(collection, value,true); response.Data = true; return response; } catch (ValidationException err) { response.Errors = err.Errors; } catch (Exception untrapped) { //TODO: log here response.Errors.Add(new Library.Core.Error() { Code = "UNEXPEXTED", Title = $"{collection} produces an unexpexted error", Description = untrapped.Message, }); } return response; } // PUT api/CRUD/{collection}/5 [HttpPatch("{collection}/{id}")] public RestMessage<bool> Patch(string collection, string id, [FromBody]JObject value) { var response = new RestMessage<bool>(false); try { value["_id"] = id; service.Update(collection, value,false); response.Data = true; return response; } catch (ValidationException err) { response.Errors = err.Errors; } catch (Exception untrapped) { //TODO: log here response.Errors.Add(new Library.Core.Error() { Code = "UNEXPEXTED", Title = $"{collection} produces an unexpexted error", Description = untrapped.Message, }); } return response;
<<<<<<< DataContext = this; Resources["SelectedLinkProperties"] = SelectedLinkProperties; Dispatcher.UnhandledException += App_DispatcherUnhandledException; ======= Dispatcher.UnhandledException += AppDispatcherUnhandledException; >>>>>>> DataContext = this; Resources["SelectedLinkProperties"] = SelectedLinkProperties; Dispatcher.UnhandledException += AppDispatcherUnhandledException; <<<<<<< MatchedListLabel.Content = BuildTextBlock("Matching Links from CSV: ", longCSVFilename); ======= ExistingTreeLabel.ToolTip = new TextBlock { Text = "Configuration from Assembly: " + AssemblyName }; LoadedTreeLabel.Content = BuildTextBlock("Configuration from CSV: ", longCSVFilename); LoadedTreeLabel.ToolTip = new TextBlock { Text = "Configuration from CSV: " + CSVFileName }; >>>>>>> MatchedListLabel.Content = BuildTextBlock("Matching Links from CSV: ", longCSVFilename); ExistingTreeLabel.ToolTip = new TextBlock { Text = "Configuration from Assembly: " + AssemblyName };
<<<<<<< ======= using System.Runtime.InteropServices; using System.Windows.Forms; >>>>>>> <<<<<<< Link.Inertial.Inertia.SetMomentMatrix(moment); Link.Collision.Origin.SetXYZ(MathOps.GetXYZ(localCollisionTransform)); Link.Collision.Origin.SetRPY(MathOps.GetRPY(localCollisionTransform)); ======= Link.Inertial.Inertia.setMomentMatrix(moment); Link.Collision.Origin.xyz = ops.getXYZ(localCollisionTransform); Link.Collision.Origin.rpy = ops.getRPY(localCollisionTransform); >>>>>>> Link.Inertial.Inertia.SetMomentMatrix(moment); Link.Collision.Origin.SetXYZ(MathOps.GetXYZ(localCollisionTransform)); Link.Collision.Origin.SetRPY(MathOps.GetRPY(localCollisionTransform)); <<<<<<< CreateBaseLinkFromComponents(node); Link = URDFRobot.BaseLink; ======= createBaseLinkFromComponents(node); Link = mRobot.BaseLink; >>>>>>> CreateBaseLinkFromComponents(node); Link = URDFRobot.BaseLink; <<<<<<< Body2[] bodies = GetBodies(components); bool addedBodies = swMass.AddBodies(bodies); child.Inertial.Mass.Value = swMass.Mass; double[] moment = swMass.GetMomentOfInertia((int)swMassPropertyMoment_e.swMassPropertyMomentAboutCenterOfMass); // returned as double with values [Lxx, Lxy, Lxz, Lyx, Lyy, Lyz, Lzx, Lzy, Lzz] child.Inertial.Inertia.SetMomentMatrix(moment); ======= bool bRet = swMass.AddBodies(bodies.ToArray()); double[] moment = (double[])swMass.GetMomentOfInertia((int)swMomentsOfInertiaReferenceFrame_e.swMomentsOfInertiaReferenceFrame_CenterOfMass); child.Inertial.Mass.value = swMass.Mass; child.Inertial.Inertia.setMomentMatrix(moment); >>>>>>> bool bRet = swMass.AddBodies(bodies.ToArray()); double[] moment = (double[])swMass.GetMomentOfInertia((int)swMomentsOfInertiaReferenceFrame_e.swMomentsOfInertiaReferenceFrame_CenterOfMass); child.Inertial.Mass.Value = swMass.Mass; child.Inertial.Inertia.SetMomentMatrix(moment); <<<<<<< public Body2[] GetBodies(List<Component2> components) ======= public List<Body2> GetBodies(List<Component2> components) >>>>>>> public List<Body2> GetBodies(List<Component2> components) <<<<<<< object[] assyObjs = comp.GetChildren(); List<Component2> assyComponents = Array.ConvertAll(assyObjs, assyObj => (Component2)assyObj).ToList(); bodies.AddRange(GetBodies(assyComponents)); ======= foreach (Body2 obj in componentBodies) { bodies.Add(obj); } >>>>>>> foreach (Body2 obj in componentBodies) { bodies.Add(obj); } <<<<<<< object[] objs = comp.GetBodies3((int)swBodyType_e.swAllBodies, out object BodiesInfo); if (objs != null) ======= List<Component2> childComponents = new List<Component2>(); foreach (Component2 child in children) >>>>>>> List<Component2> childComponents = new List<Component2>(); foreach (Component2 child in children) <<<<<<< MathTransform parentTransform = GetCoordinateSystemTransform(parentCoordsysName); double[] parentRPY = MathOps.GetRPY(parentTransform); Matrix<double> ParentJointGlobalTransform = MathOps.GetTransformation(parentTransform); MathTransform coordsysTransform = GetCoordinateSystemTransform(Joint.CoordinateSystemName); double[] coordsysRPY = MathOps.GetRPY(coordsysTransform); ======= MathTransform parentTransform = getCoordinateSystemTransform(parentCoordsysName); double[] parentRPY = ops.getRPY(parentTransform); Matrix<double> ParentJointGlobalTransform = ops.getTransformation(parentTransform); MathTransform coordsysTransform = getCoordinateSystemTransform(Joint.CoordinateSystemName); double[] coordsysRPY = ops.getRPY(coordsysTransform); >>>>>>> MathTransform parentTransform = GetCoordinateSystemTransform(parentCoordsysName); double[] parentRPY = MathOps.GetRPY(parentTransform); Matrix<double> ParentJointGlobalTransform = MathOps.GetTransformation(parentTransform); MathTransform coordsysTransform = GetCoordinateSystemTransform(Joint.CoordinateSystemName); double[] coordsysRPY = MathOps.GetRPY(coordsysTransform); <<<<<<< double[] globalRPY = MathOps.GetRPY(ChildJointOrigin); ======= double[] globalRPY = ops.getRPY(ChildJointOrigin); >>>>>>> double[] globalRPY = MathOps.GetRPY(ChildJointOrigin); <<<<<<< //Calculate! double[] axisParams; double[] XYZ = new double[3]; axisParams = axis.GetRefAxisParams(); XYZ[0] = axisParams[0] - axisParams[3]; XYZ[1] = axisParams[1] - axisParams[4]; XYZ[2] = axisParams[2] - axisParams[5]; XYZ = MathOps.PNorm(XYZ, 2); if (MathOps.Sum(XYZ) < 0.0) { XYZ = MathOps.Flip(XYZ); } return GlobalAxis(XYZ, ComponentTransform); ======= return xyz; >>>>>>> return xyz; <<<<<<< Joint.Limit.Upper = -swMate.MinimumVariation; // Reverse mate directions, for some reason Joint.Limit.Lower = -swMate.MaximumVariation; ======= Joint.Limit.upper = -swMate.MinimumVariation; // Reverse mate directions, for some reason Joint.Limit.lower = -swMate.MaximumVariation; >>>>>>> Joint.Limit.Upper = -swMate.MinimumVariation; // Reverse mate directions, for some reason Joint.Limit.Lower = -swMate.MaximumVariation;
<<<<<<< ======= using System.Windows; >>>>>>>
<<<<<<< public SerializedProperty supportAsyncCompute; public SerializedProperty supportsForwardOnly; public SerializedProperty supportsMotionVectors; public SerializedProperty supportsStereo; ======= >>>>>>> public SerializedProperty supportsForwardOnly; public SerializedProperty supportsMotionVectors; public SerializedProperty supportsStereo; <<<<<<< supportAsyncCompute = root.Find((RenderPipelineSettings s) => s.supportAsyncCompute); supportsForwardOnly = root.Find((RenderPipelineSettings s) => s.supportsForwardOnly); supportsMotionVectors = root.Find((RenderPipelineSettings s) => s.supportsMotionVectors); supportsStereo = root.Find((RenderPipelineSettings s) => s.supportsStereo); ======= >>>>>>> supportsForwardOnly = root.Find((RenderPipelineSettings s) => s.supportsForwardOnly); supportsMotionVectors = root.Find((RenderPipelineSettings s) => s.supportsMotionVectors); supportsStereo = root.Find((RenderPipelineSettings s) => s.supportsStereo);
<<<<<<< string filename = exportFiles(mRobot.BaseLink, package, 0, exportSTL); ======= logger.Info("Beginning individual files export"); string filename = exportFiles(mRobot.BaseLink, package, 0); >>>>>>> string filename = exportFiles(mRobot.BaseLink, package, 0, exportSTL); logger.Info("Beginning individual files export");
<<<<<<< using FoundationDB.Client.Utils; using JetBrains.Annotations; ======= >>>>>>> using JetBrains.Annotations;
<<<<<<< Log($"Creating '{pathFoo}' ..."); var foo = await logged.ReadWriteAsync(tr => dl.CreateAsync(tr, pathFoo), this.Cancellation); ======= Log("Creating 'Foo' ..."); var foo = await db.ReadWriteAsync(tr => dl.CreateAsync(tr, pathFoo), this.Cancellation); >>>>>>> Log($"Creating '{pathFoo}' ..."); var foo = await db.ReadWriteAsync(tr => dl.CreateAsync(tr, pathFoo), this.Cancellation); <<<<<<< Log($"OpenCached({pathFoo}) #1..."); var foo1 = await logged.ReadAsync(async tr => ======= Log("OpenCached (#1)..."); var foo1 = await db.ReadAsync(async tr => >>>>>>> Log($"OpenCached({pathFoo}) #1..."); var foo1 = await db.ReadAsync(async tr => <<<<<<< Log($"OpenCached({pathFoo}) #2..."); var foo2 = await logged.ReadAsync(async tr => ======= Log("OpenCached (#2)..."); var foo2 = await db.ReadAsync(async tr => >>>>>>> Log($"OpenCached({pathFoo}) #2..."); var foo2 = await db.ReadAsync(async tr => <<<<<<< // on first attempt, we expect "folder" to NOT be null. On second attempt we expect it to be null. Log($"- Attempt #{tr.Context.Retries}: {pathFoo} => {folder?.GetPrefixUnsafe().ToString("P") ?? "<not_found>"}"); return folder?.Descriptor; ======= Log("Get 'Foo'..."); // now another read, this time should be a cached instance var foo5 = await db.ReadAsync(async tr => { var folder = await dl.TryOpenCachedAsync(tr, pathFoo); Validate(folder, foo); return folder.Descriptor; >>>>>>> // on first attempt, we expect "folder" to NOT be null. On second attempt we expect it to be null. Log($"- Attempt #{tr.Context.Retries}: {pathFoo} => {folder?.GetPrefixUnsafe().ToString("P") ?? "<not_found>"}"); return folder?.Descriptor; <<<<<<< await logged.WriteAsync(async tr => { for (int i = 0; i < N; i++) await dl.CreateAsync(tr, FdbPath.Absolute("Students", k.ToString(), i.ToString())); }, this.Cancellation); ======= await db.WriteAsync( async tr => { for (int i = 0; i < N; i++) await dl.CreateAsync(tr, FdbPath.Absolute("Students", k.ToString(), i.ToString())); }, this.Cancellation); >>>>>>> await db.WriteAsync(async tr => { for (int i = 0; i < N; i++) await dl.CreateAsync(tr, FdbPath.Absolute("Students", k.ToString(), i.ToString())); }, this.Cancellation);
<<<<<<< /// <summary>Wrap an existing transaction and log all operations performed</summary> public FdbLoggedTransaction(IFdbTransaction trans, bool ownsTransaction, Action<FdbLoggedTransaction> onCommitted) ======= public FdbLoggedTransaction(IFdbTransaction trans, bool ownsTransaction, Action<FdbLoggedTransaction> onCommitted, FdbLoggingOptions options) >>>>>>> /// <summary>Wrap an existing transaction and log all operations performed</summary> public FdbLoggedTransaction(IFdbTransaction trans, bool ownsTransaction, Action<FdbLoggedTransaction> onCommitted, FdbLoggingOptions options)
<<<<<<< /// <summary>Create an empty log for a newly created transaction</summary> /// <param name="trans"></param> public FdbTransactionLog(IFdbTransaction trans) ======= /// <summary>Create an empty log for a newly created transaction</summary> public FdbTransactionLog(FdbLoggingOptions options) >>>>>>> /// <summary>Create an empty log for a newly created transaction</summary> public FdbTransactionLog(FdbLoggingOptions options) <<<<<<< /// <summary>True if the transaction is Read Only</summary> public bool IsReadOnly { get; private set; } ======= /// <summary>Logging options for this log</summary> public FdbLoggingOptions Options { get; private set; } /// <summary>StackTrace of the method that created this transaction</summary> /// <remarks>Only if the <see cref="FdbLoggingOptions.RecordCreationStackTrace"/> option is set</remarks> public StackTrace CallSite { get; private set; } internal StackTrace CaptureStackTrace(int numStackFramesToSkip) { #if DEBUG const bool NEED_FILE_INFO = true; #else const bool NEED_FILE_INFO = false; #endif return new StackTrace(1 + numStackFramesToSkip, NEED_FILE_INFO); } /// <summary>Checks if we need to record the stacktrace of the creation of the transaction</summary> internal bool ShoudCaptureTransactionStackTrace { get { return (this.Options & FdbLoggingOptions.RecordCreationStackTrace) != 0; } } internal bool ShouldCaptureOperationStackTrace { get { return (this.Options & FdbLoggingOptions.RecordOperationStackTrace) != 0; } } >>>>>>> /// <summary>Logging options for this log</summary> public FdbLoggingOptions Options { get; private set; } /// <summary>True if the transaction is Read Only</summary> public bool IsReadOnly { get; private set; } /// <summary>StackTrace of the method that created this transaction</summary> /// <remarks>Only if the <see cref="FdbLoggingOptions.RecordCreationStackTrace"/> option is set</remarks> public StackTrace CallSite { get; private set; } internal StackTrace CaptureStackTrace(int numStackFramesToSkip) { #if DEBUG const bool NEED_FILE_INFO = true; #else const bool NEED_FILE_INFO = false; #endif return new StackTrace(1 + numStackFramesToSkip, NEED_FILE_INFO); } /// <summary>Checks if we need to record the stacktrace of the creation of the transaction</summary> internal bool ShoudCaptureTransactionStackTrace { get { return (this.Options & FdbLoggingOptions.RecordCreationStackTrace) != 0; } } internal bool ShouldCaptureOperationStackTrace { get { return (this.Options & FdbLoggingOptions.RecordOperationStackTrace) != 0; } } <<<<<<< [NotNull] public string GetTimingsReport(bool showCommands = false) ======= public string GetTimingsReport(bool showCommands = false, KeyResolver keyResolver = null) >>>>>>> [NotNull] public string GetTimingsReport(bool showCommands = false, KeyResolver keyResolver = null)
<<<<<<< public void SetOption(FdbTransactionOption option, ReadOnlySpan<byte> data) ======= /// <inheritdoc /> public void SetOption(FdbTransactionOption option, Slice data) >>>>>>> /// <inheritdoc /> public void SetOption(FdbTransactionOption option, ReadOnlySpan<byte> data) <<<<<<< public void Set(ReadOnlySpan<byte> key, ReadOnlySpan<byte> value) ======= /// <inheritdoc /> public void Set(Slice key, Slice value) >>>>>>> /// <inheritdoc /> public void Set(ReadOnlySpan<byte> key, ReadOnlySpan<byte> value) <<<<<<< public void Atomic(ReadOnlySpan<byte> key, ReadOnlySpan<byte> param, FdbMutationType type) ======= /// <inheritdoc /> public void Atomic(Slice key, Slice param, FdbMutationType type) >>>>>>> /// <inheritdoc /> public void Atomic(ReadOnlySpan<byte> key, ReadOnlySpan<byte> param, FdbMutationType type) <<<<<<< public void Clear(ReadOnlySpan<byte> key) ======= /// <inheritdoc /> public void Clear(Slice key) >>>>>>> /// <inheritdoc /> public void Clear(ReadOnlySpan<byte> key) <<<<<<< public void ClearRange(ReadOnlySpan<byte> beginKeyInclusive, ReadOnlySpan<byte> endKeyExclusive) ======= /// <inheritdoc /> public void ClearRange(Slice beginKeyInclusive, Slice endKeyExclusive) >>>>>>> /// <inheritdoc /> public void ClearRange(ReadOnlySpan<byte> beginKeyInclusive, ReadOnlySpan<byte> endKeyExclusive) <<<<<<< public void AddConflictRange(ReadOnlySpan<byte> beginKeyInclusive, ReadOnlySpan<byte> endKeyExclusive, FdbConflictRangeType type) ======= /// <inheritdoc /> public void AddConflictRange(Slice beginKeyInclusive, Slice endKeyExclusive, FdbConflictRangeType type) >>>>>>> /// <inheritdoc /> public void AddConflictRange(ReadOnlySpan<byte> beginKeyInclusive, ReadOnlySpan<byte> endKeyExclusive, FdbConflictRangeType type) <<<<<<< public Task<string[]> GetAddressesForKeyAsync(ReadOnlySpan<byte> key, CancellationToken ct) ======= /// <inheritdoc /> public Task<string[]> GetAddressesForKeyAsync(Slice key, CancellationToken ct) >>>>>>> /// <inheritdoc /> public Task<string[]> GetAddressesForKeyAsync(ReadOnlySpan<byte> key, CancellationToken ct)
<<<<<<< /// <summary> /// Removes empty sections and columns to optimize screen real estate /// </summary> public bool RemoveEmptySectionsAndColumns { get; set; } ======= /// <summary> /// Includes referenced assets in the web part /// </summary> public bool IncludeReferencedAssets { get; set; } >>>>>>> /// <summary> /// Includes referenced assets in the web part /// </summary> public bool IncludeReferencedAssets { get; set; } /// <summary> /// Removes empty sections and columns to optimize screen real estate /// </summary> public bool RemoveEmptySectionsAndColumns { get; set; }
<<<<<<< termCache.TryAdd(termSetTerm.Key, termSetTerm.Value); ======= var term = termSetTerm.Value; term.IsSourceTerm = isSourceTerm; termCache.TryAdd(termSetTerm.Key, term); Store.Set<ConcurrentDictionary<Guid, TermData>>(StoreOptions.GetKey(keyTermTransformatorCache), termCache, StoreOptions.EntryOptions); >>>>>>> var term = termSetTerm.Value; term.IsSourceTerm = isSourceTerm; termCache.TryAdd(termSetTerm.Key, term);
<<<<<<< var runtime = RuntimeContext.MakeRuntimeContext("settingsPath", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); ======= var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_a_numeric_field", settings, context, logger, (c, i, l) => alternateRepository); >>>>>>> var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_a_numeric_field", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); <<<<<<< var runtime = RuntimeContext.MakeRuntimeContext("settingsPath", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); ======= var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_a_numeric_field_short", settings, context, logger, (c, i, l) => alternateRepository); >>>>>>> var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_a_numeric_field_short", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); <<<<<<< var runtime = RuntimeContext.MakeRuntimeContext("settingsPath", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); ======= var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_a_numeric_field_VB", settings, context, logger, (c, i, l) => alternateRepository); >>>>>>> var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_a_numeric_field_VB", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); <<<<<<< var runtime = RuntimeContext.MakeRuntimeContext("settingsPath", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); ======= var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_to_parent", settings, context, logger, (c, i, r) => alternateRepository); >>>>>>> var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_to_parent", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); <<<<<<< var runtime = RuntimeContext.MakeRuntimeContext("settingsPath", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder); ======= var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_to_parent_should_handle_null", settings, context, logger, (c, i, l) => alternateRepository); >>>>>>> var runtime = RuntimeContext.MakeRuntimeContext(@"C:\Should_aggregate_to_parent_should_handle_null", settings, context, logger, (c) => alternateRepository, scriptLibraryBuilder);
<<<<<<< using System.Collections; using SadConsole.StringParser; using System.Linq; ======= >>>>>>> using System.Collections; using SadConsole.StringParser; using System.Linq;