conflict_resolution
stringlengths
27
16k
<<<<<<< public override async Task<bool> InitializeTiltify(string authorizationCode = null) { this.Tiltify = (ChannelSession.Settings.TiltifyOAuthToken != null) ? new TiltifyService(ChannelSession.Settings.TiltifyOAuthToken) : new TiltifyService(authorizationCode); if (await this.Tiltify.Connect()) { return true; } else { await this.DisconnectTiltify(); } return false; } public override async Task DisconnectTiltify() { if (this.Tiltify != null) { await this.Tiltify.Disconnect(); this.Tiltify = null; ChannelSession.Settings.TiltifyOAuthToken = null; ChannelSession.Settings.TiltifyCampaign = 0; } } private void OverlayServer_OnWebSocketConnectedOccurred(object sender, EventArgs e) ======= public override async Task<bool> InitializeStreamDeck() { this.StreamDeck = (ChannelSession.Settings.StreamDeckDeviceName != null) ? new StreamDeckService(ChannelSession.Settings.StreamDeckDeviceName) : new StreamDeckService(); if (await this.StreamDeck.Connect()) { return true; } else { await this.DisconnectStreamDeck(); } return false; } public override async Task DisconnectStreamDeck() { if (this.StreamDeck != null) { await this.StreamDeck.Disconnect(); this.StreamDeck = null; ChannelSession.Settings.StreamDeckDeviceName = null; } } private void OverlayServer_OnWebSocketConnectedOccurred(object sender, System.EventArgs e) >>>>>>> public override async Task<bool> InitializeTiltify(string authorizationCode = null) { this.Tiltify = (ChannelSession.Settings.TiltifyOAuthToken != null) ? new TiltifyService(ChannelSession.Settings.TiltifyOAuthToken) : new TiltifyService(authorizationCode); if (await this.Tiltify.Connect()) { return true; } else { await this.DisconnectTiltify(); } return false; } public override async Task DisconnectTiltify() { if (this.Tiltify != null) { await this.Tiltify.Disconnect(); this.Tiltify = null; ChannelSession.Settings.TiltifyOAuthToken = null; ChannelSession.Settings.TiltifyCampaign = 0; } } public override async Task<bool> InitializeStreamDeck() { this.StreamDeck = (ChannelSession.Settings.StreamDeckDeviceName != null) ? new StreamDeckService(ChannelSession.Settings.StreamDeckDeviceName) : new StreamDeckService(); if (await this.StreamDeck.Connect()) { return true; } else { await this.DisconnectStreamDeck(); } return false; } public override async Task DisconnectStreamDeck() { if (this.StreamDeck != null) { await this.StreamDeck.Disconnect(); this.StreamDeck = null; ChannelSession.Settings.StreamDeckDeviceName = null; } } private void OverlayServer_OnWebSocketConnectedOccurred(object sender, System.EventArgs e)
<<<<<<< private async void EnableQuotesToggleButton_Checked(object sender, RoutedEventArgs e) ======= protected override async Task OnVisibilityChanged() { await this.InitializeInternal(); } private void EnableQuotesToggleButton_Checked(object sender, RoutedEventArgs e) >>>>>>> protected override async Task OnVisibilityChanged() { await this.InitializeInternal(); } private async void EnableQuotesToggleButton_Checked(object sender, RoutedEventArgs e)
<<<<<<< if (ChannelSession.TwitchUserConnection != null) { this.TwitchUserOAuthToken = ChannelSession.TwitchUserConnection.Connection.GetOAuthTokenCopy(); } if (ChannelSession.TwitchBotConnection != null) { this.TwitchBotOAuthToken = ChannelSession.TwitchBotConnection.Connection.GetOAuthTokenCopy(); } this.StreamlabsOAuthToken = ChannelSession.Services.Streamlabs.GetOAuthTokenCopy(); this.StreamElementsOAuthToken = ChannelSession.Services.StreamElements.GetOAuthTokenCopy(); this.StreamJarOAuthToken = ChannelSession.Services.StreamJar.GetOAuthTokenCopy(); this.TipeeeStreamOAuthToken = ChannelSession.Services.TipeeeStream.GetOAuthTokenCopy(); this.TreatStreamOAuthToken = ChannelSession.Services.TreatStream.GetOAuthTokenCopy(); this.StreamlootsOAuthToken = ChannelSession.Services.Streamloots.GetOAuthTokenCopy(); this.TiltifyOAuthToken = ChannelSession.Services.Tiltify.GetOAuthTokenCopy(); this.PatreonOAuthToken = ChannelSession.Services.Patreon.GetOAuthTokenCopy(); this.IFTTTOAuthToken = ChannelSession.Services.IFTTT.GetOAuthTokenCopy(); this.JustGivingOAuthToken = ChannelSession.Services.JustGiving.GetOAuthTokenCopy(); this.DiscordOAuthToken = ChannelSession.Services.Discord.GetOAuthTokenCopy(); this.TwitterOAuthToken = ChannelSession.Services.Twitter.GetOAuthTokenCopy(); ======= if (ChannelSession.Services.Streamlabs.IsConnected) { this.StreamlabsOAuthToken = ChannelSession.Services.Streamlabs.GetOAuthTokenCopy(); } if (ChannelSession.Services.StreamElements.IsConnected) { this.StreamElementsOAuthToken = ChannelSession.Services.StreamElements.GetOAuthTokenCopy(); } if (ChannelSession.Services.StreamJar.IsConnected) { this.StreamJarOAuthToken = ChannelSession.Services.StreamJar.GetOAuthTokenCopy(); } if (ChannelSession.Services.TipeeeStream.IsConnected) { this.TipeeeStreamOAuthToken = ChannelSession.Services.TipeeeStream.GetOAuthTokenCopy(); } if (ChannelSession.Services.TreatStream.IsConnected) { this.TreatStreamOAuthToken = ChannelSession.Services.TreatStream.GetOAuthTokenCopy(); } if (ChannelSession.Services.Streamloots.IsConnected) { this.StreamlootsOAuthToken = ChannelSession.Services.Streamloots.GetOAuthTokenCopy(); } if (ChannelSession.Services.Tiltify.IsConnected) { this.TiltifyOAuthToken = ChannelSession.Services.Tiltify.GetOAuthTokenCopy(); } if (ChannelSession.Services.Patreon.IsConnected) { this.PatreonOAuthToken = ChannelSession.Services.Patreon.GetOAuthTokenCopy(); } if (ChannelSession.Services.IFTTT.IsConnected) { this.IFTTTOAuthToken = ChannelSession.Services.IFTTT.GetOAuthTokenCopy(); } if (ChannelSession.Services.JustGiving.IsConnected) { this.JustGivingOAuthToken = ChannelSession.Services.JustGiving.GetOAuthTokenCopy(); } if (ChannelSession.Services.Discord.IsConnected) { this.DiscordOAuthToken = ChannelSession.Services.Discord.GetOAuthTokenCopy(); } if (ChannelSession.Services.Twitter.IsConnected) { this.TwitterOAuthToken = ChannelSession.Services.Twitter.GetOAuthTokenCopy(); } >>>>>>> if (ChannelSession.TwitchUserConnection != null) { this.TwitchUserOAuthToken = ChannelSession.TwitchUserConnection.Connection.GetOAuthTokenCopy(); } if (ChannelSession.TwitchBotConnection != null) { this.TwitchBotOAuthToken = ChannelSession.TwitchBotConnection.Connection.GetOAuthTokenCopy(); } if (ChannelSession.Services.Streamlabs.IsConnected) { this.StreamlabsOAuthToken = ChannelSession.Services.Streamlabs.GetOAuthTokenCopy(); } if (ChannelSession.Services.StreamElements.IsConnected) { this.StreamElementsOAuthToken = ChannelSession.Services.StreamElements.GetOAuthTokenCopy(); } if (ChannelSession.Services.StreamJar.IsConnected) { this.StreamJarOAuthToken = ChannelSession.Services.StreamJar.GetOAuthTokenCopy(); } if (ChannelSession.Services.TipeeeStream.IsConnected) { this.TipeeeStreamOAuthToken = ChannelSession.Services.TipeeeStream.GetOAuthTokenCopy(); } if (ChannelSession.Services.TreatStream.IsConnected) { this.TreatStreamOAuthToken = ChannelSession.Services.TreatStream.GetOAuthTokenCopy(); } if (ChannelSession.Services.Streamloots.IsConnected) { this.StreamlootsOAuthToken = ChannelSession.Services.Streamloots.GetOAuthTokenCopy(); } if (ChannelSession.Services.Tiltify.IsConnected) { this.TiltifyOAuthToken = ChannelSession.Services.Tiltify.GetOAuthTokenCopy(); } if (ChannelSession.Services.Patreon.IsConnected) { this.PatreonOAuthToken = ChannelSession.Services.Patreon.GetOAuthTokenCopy(); } if (ChannelSession.Services.IFTTT.IsConnected) { this.IFTTTOAuthToken = ChannelSession.Services.IFTTT.GetOAuthTokenCopy(); } if (ChannelSession.Services.JustGiving.IsConnected) { this.JustGivingOAuthToken = ChannelSession.Services.JustGiving.GetOAuthTokenCopy(); } if (ChannelSession.Services.Discord.IsConnected) { this.DiscordOAuthToken = ChannelSession.Services.Discord.GetOAuthTokenCopy(); } if (ChannelSession.Services.Twitter.IsConnected) { this.TwitterOAuthToken = ChannelSession.Services.Twitter.GetOAuthTokenCopy(); }
<<<<<<< Affiliate = 23, ======= >>>>>>> Affiliate = 23, <<<<<<< if (this.MixerID > 0) { return StreamingPlatformTypeEnum.Mixer; } else if (!string.IsNullOrEmpty(this.TwitchID)) { return StreamingPlatformTypeEnum.Twitch; } ======= if (this.MixerID > 0 || this.InteractiveIDs.Count > 0) { return StreamingPlatformTypeEnum.Mixer; } >>>>>>> if (this.MixerID > 0 || this.InteractiveIDs.Count > 0) { return StreamingPlatformTypeEnum.Mixer; } else if (!string.IsNullOrEmpty(this.TwitchID)) { return StreamingPlatformTypeEnum.Twitch; } <<<<<<< else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { return this.TwitchUserRoles; } return new HashSet<UserRoleEnum>(); ======= return new HashSet<UserRoleEnum>() { UserRoleEnum.User }; >>>>>>> else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { return this.TwitchUserRoles; } return new HashSet<UserRoleEnum>() { UserRoleEnum.User }; <<<<<<< List<string> displayRolesList = new List<string>(displayRoles.Select(r => EnumHelper.GetEnumName(r))); displayRolesList.AddRange(this.CustomRoles); ======= List<string> displayRoles = new List<string>(mixerDisplayRoles.Select(r => EnumLocalizationHelper.GetLocalizedName(r))); displayRoles.AddRange(this.CustomRoles); >>>>>>> List<string> displayRoles = new List<string>(mixerDisplayRoles.Select(r => EnumLocalizationHelper.GetLocalizedName(r))); displayRoles.AddRange(this.CustomRoles);
<<<<<<< [JsonIgnore] public bool IsAnonymous { get { if (this.Platform == StreamingPlatformTypeEnum.Mixer) { return this.MixerID == 0 || this.InteractiveIDs.Values.Any(i => i.anonymous.GetValueOrDefault()); } else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { return string.IsNullOrEmpty(this.TwitchID); } return false; } } ======= public DateTimeOffset LastSeen { get { return this.Data.LastSeen; } set { this.Data.LastSeen = value; } } >>>>>>> [JsonIgnore] public bool IsAnonymous { get { if (this.Platform == StreamingPlatformTypeEnum.Mixer) { return this.MixerID == 0 || this.InteractiveIDs.Values.Any(i => i.anonymous.GetValueOrDefault()); } else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { return string.IsNullOrEmpty(this.TwitchID); } return false; } } public DateTimeOffset LastSeen { get { return this.Data.LastSeen; } set { this.Data.LastSeen = value; } }
<<<<<<< UserViewModel user = new UserViewModel(0, card.data.Username); UserModel userModel = await ChannelSession.MixerStreamerConnection.GetUser(user.UserName); if (userModel != null) { user = new UserViewModel(userModel); } ======= cardData = string.Empty; StreamlootsCardModel card = jobj["data"].ToObject<StreamlootsCardModel>(); if (card != null) { UserViewModel user = new UserViewModel(0, card.data.Username); >>>>>>> cardData = string.Empty; StreamlootsCardModel card = jobj["data"].ToObject<StreamlootsCardModel>(); if (card != null) { UserViewModel user = new UserViewModel(0, card.data.Username); <<<<<<< } catch (Exception ex) { Logger.Log(LogLevel.Debug, ex); ======= catch (Exception ex) { Util.Logger.LogDiagnostic(ex); } >>>>>>> catch (Exception ex) { Logger.Log(ex); } <<<<<<< Logger.Log(ex); ======= Util.Logger.Log(ex); await Task.Delay(5000); } finally { if (this.webRequest != null) { this.webRequest.Abort(); this.webRequest = null; } if (this.responseStream != null) { this.responseStream.Close(); this.responseStream = null; } >>>>>>> Logger.Log(ex); await Task.Delay(5000); } finally { if (this.webRequest != null) { this.webRequest.Abort(); this.webRequest = null; } if (this.responseStream != null) { this.responseStream.Close(); this.responseStream = null; }
<<<<<<< this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "amountdifference", (patronageMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "reward", patronageMilestone.DollarAmountText()); ======= this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "remainingamount", (patronageMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "reward", string.Format("{0:C}", milestoneReward)); >>>>>>> this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "remainingamount", (patronageMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "reward", patronageMilestone.DollarAmountText()); <<<<<<< this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "nextamountdifference", (patronageNextMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "nextreward", patronageNextMilestone.DollarAmountText()); ======= this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "remainingnextamount", (patronageNextMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "nextreward", string.Format("{0:C}", milestoneNextReward)); >>>>>>> this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "remainingnextamount", (patronageNextMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "nextreward", patronageNextMilestone.DollarAmountText()); <<<<<<< this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "finalamountdifference", (patronageFinalMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "finalreward", patronageFinalMilestone.DollarAmountText()); ======= this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "remainingfinalamount", (patronageFinalMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "finalreward", string.Format("{0:C}", milestoneFinalReward)); >>>>>>> this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "remainingfinalamount", (patronageFinalMilestone.target - patronageStatus.patronageEarned).ToString()); this.ReplaceSpecialIdentifier(MilestoneSpecialIdentifierHeader + "finalreward", patronageFinalMilestone.DollarAmountText());
<<<<<<< using MixItUp.Base.Services.Twitch; using MixItUp.Desktop.Services; ======= using MixItUp.WPF.Services; >>>>>>> using MixItUp.Base.Services.Twitch; using MixItUp.WPF.Services;
<<<<<<< ======= public event EventHandler<UserViewModel> OnFollowOccurred; public event EventHandler<UserViewModel> OnUnfollowOccurred; public event EventHandler<Tuple<UserViewModel, int>> OnHostedOccurred; public event EventHandler<UserViewModel> OnSubscribedOccurred; public event EventHandler<Tuple<UserViewModel, int>> OnResubscribedOccurred; public event EventHandler<Tuple<UserViewModel, SkillModel>> OnSkillOccurred; public event EventHandler<PatronageStatusModel> OnPatronageUpdateOccurred; >>>>>>> public event EventHandler<UserViewModel> OnFollowOccurred; public event EventHandler<UserViewModel> OnUnfollowOccurred; public event EventHandler<Tuple<UserViewModel, int>> OnHostedOccurred; public event EventHandler<UserViewModel> OnSubscribedOccurred; public event EventHandler<Tuple<UserViewModel, int>> OnResubscribedOccurred;
<<<<<<< else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { return this.TwitchVisualName; } return this.unassociatedUsername; ======= return this.UnassociatedUsername; >>>>>>> else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { return this.TwitchVisualName; } return this.UnassociatedUsername; <<<<<<< else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { this.Data.TwitchSubscribeDate = value; } if (this.SubscribeDate == null || this.SubscribeDate.GetValueOrDefault() == DateTimeOffset.MinValue) { this.UserRoles.Remove(UserRoleEnum.Subscriber); } else { this.UserRoles.Add(UserRoleEnum.Subscriber); } ======= >>>>>>> else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { this.Data.TwitchSubscribeDate = value; } <<<<<<< [JsonIgnore] public bool IsAnonymous { get { if (this.Platform == StreamingPlatformTypeEnum.Mixer) { return this.MixerID == 0 || this.InteractiveIDs.Values.Any(i => i.anonymous.GetValueOrDefault()); } else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { return string.IsNullOrEmpty(this.TwitchID); } return false; } } ======= public string UnassociatedUsername { get { return this.Data.UnassociatedUsername; } private set { this.Data.UnassociatedUsername = value; } } >>>>>>> [JsonIgnore] public bool IsAnonymous { get { if (this.Platform == StreamingPlatformTypeEnum.Mixer) { return this.MixerID == 0 || this.InteractiveIDs.Values.Any(i => i.anonymous.GetValueOrDefault()); } else if (this.Platform == StreamingPlatformTypeEnum.Twitch) { return string.IsNullOrEmpty(this.TwitchID); } return false; } } public string UnassociatedUsername { get { return this.Data.UnassociatedUsername; } private set { this.Data.UnassociatedUsername = value; } } <<<<<<< #region Twitch [DataMember] public string TwitchID { get { return this.Data.TwitchID; } private set { this.Data.TwitchID = value; } } [DataMember] public string TwitchUsername { get { return this.Data.TwitchUsername; } private set { this.Data.TwitchUsername = value; } } [DataMember] public string TwitchDisplayName { get { return this.Data.TwitchDisplayName; } private set { this.Data.TwitchDisplayName = value; } } [DataMember] public string TwitchAvatarLink { get { return this.Data.TwitchAvatarLink; } private set { this.Data.TwitchAvatarLink = value; } } [DataMember] public HashSet<UserRoleEnum> TwitchUserRoles { get { return this.Data.TwitchUserRoles; } private set { this.Data.TwitchUserRoles = value; } } [JsonIgnore] public string TwitchVisualName { get { return (!string.IsNullOrEmpty(this.TwitchDisplayName)) ? this.TwitchDisplayName : this.TwitchUsername; } } #endregion Twitch public bool NeedsHardRefresh { get { return !this.IsAnonymous && this.LastUpdated == DateTimeOffset.MinValue; } } public bool NeedsSoftRefresh { get { return !this.IsAnonymous && this.LastUpdated != DateTimeOffset.MinValue && !this.Data.UpdatedThisSession; } } ======= >>>>>>> #region Twitch [DataMember] public string TwitchID { get { return this.Data.TwitchID; } private set { this.Data.TwitchID = value; } } [DataMember] public string TwitchUsername { get { return this.Data.TwitchUsername; } private set { this.Data.TwitchUsername = value; } } [DataMember] public string TwitchDisplayName { get { return this.Data.TwitchDisplayName; } private set { this.Data.TwitchDisplayName = value; } } [DataMember] public string TwitchAvatarLink { get { return this.Data.TwitchAvatarLink; } private set { this.Data.TwitchAvatarLink = value; } } [DataMember] public HashSet<UserRoleEnum> TwitchUserRoles { get { return this.Data.TwitchUserRoles; } private set { this.Data.TwitchUserRoles = value; } } [JsonIgnore] public string TwitchVisualName { get { return (!string.IsNullOrEmpty(this.TwitchDisplayName)) ? this.TwitchDisplayName : this.TwitchUsername; } } #endregion Twitch <<<<<<< private async Task RefreshDetailsInternal() { this.Data.UpdatedThisSession = true; this.LastUpdated = DateTimeOffset.Now; List<Task> refreshTasks = new List<Task>(); if (this.Platform.HasFlag(StreamingPlatformTypeEnum.Mixer)) { refreshTasks.Add(this.RefreshMixerUserDetails()); refreshTasks.Add(this.RefreshMixerUserFanProgression()); refreshTasks.Add(this.RefreshMixerUserFollowDate()); refreshTasks.Add(this.RefreshMixerChatAndSubscriberDetails()); } else if (this.Platform.HasFlag(StreamingPlatformTypeEnum.Twitch)) { await this.RefreshTwitchUserDetails(); refreshTasks.Add(this.RefreshTwitchUserAccountDate()); refreshTasks.Add(this.RefreshTwitchUserFollowDate()); refreshTasks.Add(this.RefreshTwitchUserSubscribeDate()); } await Task.WhenAll(refreshTasks); this.SetCommonUserRoles(); await this.RefreshExternalServiceDetails(); } ======= >>>>>>>
<<<<<<< ======= public event EventHandler<UserViewModel> OnFollowOccurred; public event EventHandler<UserViewModel> OnUnfollowOccurred; public event EventHandler<Tuple<UserViewModel, int>> OnHostedOccurred; public event EventHandler<UserViewModel> OnSubscribedOccurred; public event EventHandler<Tuple<UserViewModel, int>> OnResubscribedOccurred; public event EventHandler<PatronageStatusModel> OnPatronageUpdateOccurred; >>>>>>> <<<<<<< JObject manifest = (JObject)e.payload["manifest"]; JObject parameters = (JObject)e.payload["parameters"]; SkillInstanceModel skillInstance = new SkillInstanceModel(skill, manifest, parameters); GlobalEvents.SkillOccurred(new Tuple<UserViewModel, SkillInstanceModel>(user, skillInstance)); ======= string skillName = e.payload["manifest"]["name"].ToString(); if (skillName.Equals("beachball")) { skill = this.availableSkills.Values.FirstOrDefault(s => s.name.Equals("Beach Ball")); } } } if (user != null && skill != null) { JObject manifest = (JObject)e.payload["manifest"]; JObject parameters = (JObject)e.payload["parameters"]; >>>>>>> string skillName = e.payload["manifest"]["name"].ToString(); if (skillName.Equals("beachball")) { skill = this.availableSkills.Values.FirstOrDefault(s => s.name.Equals("Beach Ball")); } } } if (user != null && skill != null) { JObject manifest = (JObject)e.payload["manifest"]; JObject parameters = (JObject)e.payload["parameters"];
<<<<<<< [JsonProperty] public OAuthTokenModel StreamlootsOAuthToken { get; set; } ======= [JsonProperty] public OAuthTokenModel IFTTTOAuthToken { get; set; } >>>>>>> [JsonProperty] public OAuthTokenModel IFTTTOAuthToken { get; set; } [JsonProperty] public OAuthTokenModel StreamlootsOAuthToken { get; set; } <<<<<<< if (ChannelSession.Services.Streamloots != null) { this.StreamlootsOAuthToken = ChannelSession.Services.Streamloots.GetOAuthTokenCopy(); } ======= if (ChannelSession.Services.IFTTT != null) { this.IFTTTOAuthToken = ChannelSession.Services.IFTTT.Token; } >>>>>>> if (ChannelSession.Services.IFTTT != null) { this.IFTTTOAuthToken = ChannelSession.Services.IFTTT.Token; } if (ChannelSession.Services.Streamloots != null) { this.StreamlootsOAuthToken = ChannelSession.Services.Streamloots.GetOAuthTokenCopy(); }
<<<<<<< var blockingAcquire = new Task<Task<IConnection>>(() => pool.AcquireAsync(AccessMode.Read)); ======= var blockingAcquire = new Task(() => { pool.Acquire(); }); var releaseConn = new Task(() => { conn.Close(); }); >>>>>>> var blockingAcquire = new Task<Task<IConnection>>(() => pool.AcquireAsync(AccessMode.Read)); <<<<<<< ======= public void ShouldTimeoutAfterAcquireTimeoutIfPoolIsFull() { Config config = Config.Builder.WithConnectionAcquisitionTimeout(TimeSpan.FromSeconds(10)) .WithMaxConnectionPoolSize(5).WithMaxIdleConnectionPoolSize(0).ToConfig(); var pool = NewConnectionPool(poolSettings: new ConnectionPoolSettings(config)); for (var i = 0; i < config.MaxConnectionPoolSize; i++) { pool.Acquire(); } var stopWatch = new Stopwatch(); stopWatch.Start(); var exception = Record.Exception(() => pool.Acquire()); stopWatch.Elapsed.TotalSeconds.Should().BeGreaterOrEqualTo(10, 0.1); exception.Message.Should().StartWith("Failed to obtain a connection from pool within"); exception.Should().BeOfType<ClientException>(); } [Fact] public void ShouldTimeoutAfterAcquireTimeoutWhenConnectionIsNotValidated() { Config config = Config.Builder.WithConnectionAcquisitionTimeout(TimeSpan.FromSeconds(5)) .ToConfig(); var closedConnectionMock = new Mock<IPooledConnection>(); closedConnectionMock.Setup(x => x.IsOpen).Returns(false); var pool = NewConnectionPool(poolSettings: new ConnectionPoolSettings(config), isConnectionValid: false); var exception = Record.Exception(() => pool.Acquire()); exception.Should().BeOfType<ClientException>(); exception.Message.Should().StartWith("Failed to obtain a connection from pool within"); } [Fact] >>>>>>> <<<<<<< ======= [Theory] [InlineData(AccessMode.Read)] [InlineData(AccessMode.Write)] public void ShouldManageModeProperty(AccessMode mode) { var connection = new Mock<IPooledConnection>().SetupProperty(x => x.Mode); var idleConnections = new BlockingCollection<IPooledConnection>() { connection.Object }; var pool = NewConnectionPool(idleConnections); var acquired = pool.Acquire(mode); acquired.Mode.Should().Be(mode); pool.Release((IPooledConnection)acquired); acquired.Mode.Should().BeNull(); connection.VerifySet(x => x.Mode = mode); connection.VerifySet(x => x.Mode = null); } [Theory] [InlineData(AccessMode.Read)] [InlineData(AccessMode.Write)] public async Task ShouldManageModePropertyAsync(AccessMode mode) { var connection = new Mock<IPooledConnection>().SetupProperty(x => x.Mode); var idleConnections = new BlockingCollection<IPooledConnection>() { connection.Object }; var pool = NewConnectionPool(idleConnections); var acquired = await pool.AcquireAsync(mode); acquired.Mode.Should().Be(mode); await pool.ReleaseAsync((IPooledConnection)acquired); acquired.Mode.Should().BeNull(); connection.VerifySet(x => x.Mode = mode); connection.VerifySet(x => x.Mode = null); } >>>>>>> [Theory] [InlineData(AccessMode.Read)] [InlineData(AccessMode.Write)] public async Task ShouldManageModePropertyAsync(AccessMode mode) { var connection = new Mock<IPooledConnection>().SetupProperty(x => x.Mode); var idleConnections = new BlockingCollection<IPooledConnection>() { connection.Object }; var pool = NewConnectionPool(idleConnections); var acquired = await pool.AcquireAsync(mode); acquired.Mode.Should().Be(mode); await pool.ReleaseAsync((IPooledConnection)acquired); acquired.Mode.Should().BeNull(); connection.VerifySet(x => x.Mode = mode); connection.VerifySet(x => x.Mode = null); } <<<<<<< mock.Verify(x => x.DestroyAsync(), Times.Once); mock1.Verify(x => x.DestroyAsync(), Times.Once); ======= mock.Verify(x => x.Destroy(), Times.Once); mock1.Verify(x => x.Destroy(), Times.Once); >>>>>>> mock.Verify(x => x.DestroyAsync(), Times.Once); mock1.Verify(x => x.DestroyAsync(), Times.Once); <<<<<<< var acquireTasks = Enumerable.Range(0, 100).Select(i => Task.Run(async () => { var conn = await pool.AcquireAsync(AccessMode.Read); ======= var acquireTasks = Enumerable.Range(0, 100).Select(i => Task.Run(() => { var conn = pool.Acquire(); >>>>>>> var acquireTasks = Enumerable.Range(0, 100).Select(i => Task.Run(async () => { var conn = await pool.AcquireAsync(AccessMode.Read); <<<<<<< var exception = await Record.ExceptionAsync(() => pool.AcquireAsync(AccessMode.Read)); ======= var exception = Record.Exception(() => pool.Acquire()); >>>>>>> var exception = await Record.ExceptionAsync(() => pool.AcquireAsync(AccessMode.Read)); <<<<<<< var exception = await Record.ExceptionAsync(() => pool.AcquireAsync(AccessMode.Read)); ======= var exception = Record.Exception(() => pool.Acquire()); >>>>>>> var exception = await Record.ExceptionAsync(() => pool.AcquireAsync(AccessMode.Read)); <<<<<<< ======= public void ShouldCloseAllIdleConnections() { // Given var idleConnections = new BlockingCollection<IPooledConnection>(); var idleMocks = FillIdleConnections(idleConnections, 10); var pool = NewConnectionPool(idleConnections); // When pool.Deactivate(); // Then idleConnections.Count.Should().Be(0); VerifyDestroyCalledOnce(idleMocks); } [Fact] >>>>>>> <<<<<<< specialConn.Setup(x => x.DestroyAsync()) .Returns(TaskHelper.GetCompletedTask()) .Callback(() => { pool.Activate(); }); ======= specialConn.Setup(x => x.Destroy()).Callback(() => { pool.Activate(); }); >>>>>>> specialConn.Setup(x => x.DestroyAsync()) .Returns(TaskHelper.GetCompletedTask()) .Callback(() => { pool.Activate(); });
<<<<<<< // Annotations public const int ANNOTATION_HIDDEN = 0; public const int ANNOTATION_STANDARD = 1; public const int ANNOTATION_BOXED = 2; public const int ANNOTATION_INDENTED = 3; ======= // Keys public const int SCMOD_NORM = 0; public const int SCMOD_SHIFT = 1; public const int SCMOD_CTRL = 2; public const int SCMOD_ALT = 4; public const int SCMOD_SUPER = 8; public const int SCMOD_META = 16; public const int SCI_NORM = 0; public const int SCI_SHIFT = SCMOD_SHIFT; public const int SCI_CTRL = SCMOD_CTRL; public const int SCI_ALT = SCMOD_ALT; public const int SCI_META = SCMOD_META; public const int SCI_CSHIFT = (SCI_CTRL | SCI_SHIFT); public const int SCI_ASHIFT = (SCI_ALT | SCI_SHIFT); >>>>>>> // Annotations public const int ANNOTATION_HIDDEN = 0; public const int ANNOTATION_STANDARD = 1; public const int ANNOTATION_BOXED = 2; public const int ANNOTATION_INDENTED = 3; // Keys public const int SCMOD_NORM = 0; public const int SCMOD_SHIFT = 1; public const int SCMOD_CTRL = 2; public const int SCMOD_ALT = 4; public const int SCMOD_SUPER = 8; public const int SCMOD_META = 16; public const int SCI_NORM = 0; public const int SCI_SHIFT = SCMOD_SHIFT; public const int SCI_CTRL = SCMOD_CTRL; public const int SCI_ALT = SCMOD_ALT; public const int SCI_META = SCMOD_META; public const int SCI_CSHIFT = (SCI_CTRL | SCI_SHIFT); public const int SCI_ASHIFT = (SCI_ALT | SCI_SHIFT);
<<<<<<< customHeaders = new Dictionary<string, string>(behaviors.CustomHeadersInternal); automaticDecompression = behaviors.AutomaticDecompression; ======= this.CookieContainer = behaviors.CookieContainer; >>>>>>> customHeaders = new Dictionary<string, string>(behaviors.CustomHeadersInternal); automaticDecompression = behaviors.AutomaticDecompression; this.CookieContainer = behaviors.CookieContainer; <<<<<<< using (var stream = GetWrappedStream(we.Response)) ======= if(we.Response != null) { using (var stream = we.Response.GetResponseStream()) >>>>>>> if(we.Response != null) { using (var stream = GetWrappedStream(we.Response))
<<<<<<< private readonly StatisticsModel stats; private readonly PipelineController pipelineController; ======= private readonly ConvertPolarShader polarConvertShader; private readonly PreprocessModel preprocess; >>>>>>> private readonly StatisticsModel stats; private readonly PipelineController pipelineController; private readonly ConvertPolarShader polarConvertShader; <<<<<<< ======= pixelValueShader = new PixelValueShader(); sharedModel = new SharedModel(); polarConvertShader = new ConvertPolarShader(sharedModel.QuadShader); >>>>>>> <<<<<<< Export?.Dispose(); //Gif?.Dispose(); ======= //Gif?.Dispose(); TextureCache?.Dispose(); >>>>>>> //Gif?.Dispose(); <<<<<<< stats?.Dispose(); TextureCache?.Dispose(); pipelineController?.Dispose(); foreach (var imagePipeline in Pipelines) ======= preprocess?.Dispose(); polarConvertShader?.Dispose(); foreach (var imagePipeline in pipelines) >>>>>>> polarConvertShader?.Dispose(); foreach (var imagePipeline in pipelines)
<<<<<<< ======= public void ShouldConnectServer() { var bufferSettings = new BufferSettings(Config.DefaultConfig); var connMock = new Mock<ITcpSocketClient>(); TcpSocketClientTestSetup.CreateReadStreamMock(connMock, new byte[] {0, 0, 0, 1}); TcpSocketClientTestSetup.CreateWriteStreamMock(connMock); var client = new SocketClient(FakeUri, null, bufferSettings, socketClient: connMock.Object); client.Connect(); // Then connMock.Verify(x => x.Connect(FakeUri), Times.Once); } [Fact] >>>>>>> <<<<<<< ======= public void ShouldSendAllMessages() { // Given var writerMock = new Mock<IMessageWriter>(); var m1 = new RunMessage("Run message 1"); var m2 = new RunMessage("Run message 2"); var messages = new IRequestMessage[] {m1, m2}; var client = new SocketClient(null, writerMock.Object); // When client.Send(messages); // Then writerMock.Verify(x => x.Write(m1), Times.Once); writerMock.Verify(x => x.Write(m2), Times.Once); writerMock.Verify(x => x.Flush(), Times.Once); } [Fact] >>>>>>> <<<<<<< writerMock.Verify(x => x.Write(m1), Times.Once); writerMock.Verify(x => x.Write(m2), Times.Once); writerMock.Verify(x => x.FlushAsync(), Times.Once); ======= writerMock.Verify(x => x.Write(m1), Times.Once); writerMock.Verify(x => x.Write(m2), Times.Once); writerMock.Verify(x => x.FlushAsync(), Times.Once); } [Fact] public void ShouldCloseConnectionIfError() { // Given var connMock = new Mock<ITcpSocketClient>(); var client = new SocketClient(null, null, connMock.Object); client.SetOpened(); // When var exception = Exception(() => client.Send(null /*cause null point exception in send method*/)); // Then exception.Should().BeOfType<NullReferenceException>(); connMock.Verify(x => x.Disconnect(), Times.Once); >>>>>>> writerMock.Verify(x => x.Write(m1), Times.Once); writerMock.Verify(x => x.Write(m2), Times.Once); writerMock.Verify(x => x.FlushAsync(), Times.Once); <<<<<<< ======= public void ShouldReadMessage() { // Given var readerMock = new Mock<IMessageReader>(); var client = new SocketClient(readerMock.Object, null); var handlerMock = new Mock<IMessageResponseHandler>(); // When client.ReceiveOne(handlerMock.Object); // Then readerMock.Verify(x => x.Read(handlerMock.Object), Times.Once); } [Fact] >>>>>>> <<<<<<< readerMock.Verify(x => x.ReadAsync(handlerMock.Object), Times.Once); ======= readerMock.Verify(x => x.ReadAsync(handlerMock.Object), Times.Once); } [Fact] public void ShouldCloseConnectionIfError() { // Given var readerMock = new Mock<IMessageReader>(); var connMock = new Mock<ITcpSocketClient>(); var client = new SocketClient(readerMock.Object, null, connMock.Object); client.SetOpened(); var handlerMock = new Mock<IMessageResponseHandler>(); // Throw error when try to read readerMock.Setup(x => x.Read(handlerMock.Object)).Throws<IOException>(); // When var exception = Exception(() => client.ReceiveOne(handlerMock.Object)); // Then exception.Should().BeOfType<IOException>(); connMock.Verify(x => x.Disconnect(), Times.Once); >>>>>>> readerMock.Verify(x => x.ReadAsync(handlerMock.Object), Times.Once); <<<<<<< connMock.Verify(x => x.DisconnectAsync(), Times.Once); ======= connMock.Verify(x => x.DisconnectAsync(), Times.Once); } [Fact] public void ShouldCloseConnectionIfServerError() { // Given var readerMock = new Mock<IMessageReader>(); var connMock = new Mock<ITcpSocketClient>(); var client = new SocketClient(readerMock.Object, null, connMock.Object); client.SetOpened(); var handlerMock = new Mock<IMessageResponseHandler>(); handlerMock.Setup(x => x.HasProtocolViolationError).Returns(true); handlerMock.Setup(x => x.Error).Returns(new DatabaseException()); // When var exception = Exception(() => client.ReceiveOne(handlerMock.Object)); // Then exception.Should().BeOfType<DatabaseException>(); readerMock.Verify(x => x.Read(handlerMock.Object), Times.Once); connMock.Verify(x => x.Disconnect(), Times.Once); >>>>>>> connMock.Verify(x => x.DisconnectAsync(), Times.Once); <<<<<<< ======= [Fact] public void ShouldCallDisconnectOnTheTcpSocketClientWhenDisposed() { var connMock = new Mock<ITcpSocketClient>(); var client = new SocketClient(null, null, connMock.Object); client.SetOpened(); // When client.Dispose(); // Then connMock.Verify(x => x.Disconnect(), Times.Once); client.IsOpen.Should().BeFalse(); } [Fact] public void ShouldCallDisconnectOnTheTcpSocketClientWhenStopped() { var connMock = new Mock<ITcpSocketClient>(); var client = new SocketClient(null, null, connMock.Object); client.SetOpened(); // When client.Stop(); // Then connMock.Verify(x => x.Disconnect(), Times.Once); client.IsOpen.Should().BeFalse(); } >>>>>>>
<<<<<<< if (proj.Debug) modDef.LoadPdb(); ======= context.CheckCancellation(); >>>>>>> context.CheckCancellation(); if (proj.Debug) modDef.LoadPdb();
<<<<<<< // [assembly: AssemblyVersion("1.1.*")] [assembly: AssemblyVersion("1.1.0.0")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: InternalsVisibleTo("Neo4j.Driver.Tests"), InternalsVisibleTo("Neo4j.Driver.Tck.Tests")] ======= // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: InternalsVisibleTo("Neo4j.Driver.Tests"), InternalsVisibleTo("Neo4j.Driver.IntegrationTests"), InternalsVisibleTo("Neo4j.Driver.Tck.Tests"), InternalsVisibleTo("DynamicProxyGenAssembly2")] >>>>>>> // [assembly: AssemblyVersion("1.1.*")] [assembly: AssemblyVersion("1.1.0.0")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: InternalsVisibleTo("Neo4j.Driver.Tests"), InternalsVisibleTo("Neo4j.Driver.IntegrationTests"), InternalsVisibleTo("Neo4j.Driver.Tck.Tests"), InternalsVisibleTo("DynamicProxyGenAssembly2")]
<<<<<<< ======= public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("GrokFilter\n"); foreach (var prop in this.GetType().GetProperties()) { if (prop != null) { sb.Append(String.Format("\t{0}: {1}\n", prop.Name, prop.GetValue(this, null))); } } return sb.ToString(); } /// <summary> /// Apply the Grok filter to the Object /// </summary> /// <param name="json"></param> >>>>>>> /// <summary> /// Apply the Grok filter to the Object /// </summary> /// <param name="json"></param>
<<<<<<< public async Task ShowLeaderboardsAsync(IDiscordMessage mContext, LeaderboardOptions leaderboardOptions) ======= [Command(Name = "mybadges")] public async Task MyBadgesAsync(EventContext e) { int page = 0; using (var context = new MikiContext()) { User u = await context.Users.FindAsync(e.Author.Id.ToDbLong()); string output = string.Join<long>(" ", u.BadgesOwned.Select(x => x.Id).ToList()); await e.Channel.SendMessage(output.DefaultIfEmpty("none, yet!")); } } public async Task ShowLeaderboardsAsync(IDiscordMessage mContext, LeaderboardsType leaderboardType = LeaderboardsType.Experience, int page = 1) >>>>>>> [Command(Name = "mybadges")] public async Task MyBadgesAsync(EventContext e) { int page = 0; using (var context = new MikiContext()) { User u = await context.Users.FindAsync(e.Author.Id.ToDbLong()); string output = string.Join<long>(" ", u.BadgesOwned.Select(x => x.Id).ToList()); await e.Channel.SendMessage(output.DefaultIfEmpty("none, yet!")); } } public async Task ShowLeaderboardsAsync(IDiscordMessage mContext, LeaderboardOptions leaderboardOptions)
<<<<<<< /// Looks up a localized string similar to and. /// </summary> internal static string time_and { get { return ResourceManager.GetString("time_and", resourceCulture); } } /// <summary> /// Looks up a localized string similar to day. /// </summary> internal static string time_day { get { return ResourceManager.GetString("time_day", resourceCulture); } } /// <summary> /// Looks up a localized string similar to days. /// </summary> internal static string time_days { get { return ResourceManager.GetString("time_days", resourceCulture); } } /// <summary> /// Looks up a localized string similar to hour. /// </summary> internal static string time_hour { get { return ResourceManager.GetString("time_hour", resourceCulture); } } /// <summary> /// Looks up a localized string similar to hours. /// </summary> internal static string time_hours { get { return ResourceManager.GetString("time_hours", resourceCulture); } } /// <summary> /// Looks up a localized string similar to minute. /// </summary> internal static string time_minute { get { return ResourceManager.GetString("time_minute", resourceCulture); } } /// <summary> /// Looks up a localized string similar to minutes. /// </summary> internal static string time_minutes { get { return ResourceManager.GetString("time_minutes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to second. /// </summary> internal static string time_second { get { return ResourceManager.GetString("time_second", resourceCulture); } } /// <summary> /// Looks up a localized string similar to seconds. /// </summary> internal static string time_seconds { get { return ResourceManager.GetString("time_seconds", resourceCulture); } } /// <summary> ======= >>>>>>> /// Looks up a localized string similar to and. /// </summary> internal static string time_and { get { return ResourceManager.GetString("time_and", resourceCulture); } } /// <summary> /// Looks up a localized string similar to day. /// </summary> internal static string time_day { get { return ResourceManager.GetString("time_day", resourceCulture); } } /// <summary> /// Looks up a localized string similar to days. /// </summary> internal static string time_days { get { return ResourceManager.GetString("time_days", resourceCulture); } } /// <summary> /// Looks up a localized string similar to hour. /// </summary> internal static string time_hour { get { return ResourceManager.GetString("time_hour", resourceCulture); } } /// <summary> /// Looks up a localized string similar to hours. /// </summary> internal static string time_hours { get { return ResourceManager.GetString("time_hours", resourceCulture); } } /// <summary> /// Looks up a localized string similar to minute. /// </summary> internal static string time_minute { get { return ResourceManager.GetString("time_minute", resourceCulture); } } /// <summary> /// Looks up a localized string similar to minutes. /// </summary> internal static string time_minutes { get { return ResourceManager.GetString("time_minutes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to second. /// </summary> internal static string time_second { get { return ResourceManager.GetString("time_second", resourceCulture); } } /// <summary> /// Looks up a localized string similar to seconds. /// </summary> internal static string time_seconds { get { return ResourceManager.GetString("time_seconds", resourceCulture); } } /// <summary>
<<<<<<< private readonly SyncExecutor _syncExecutor; private readonly IDictionary<string, string> _routingContext; private IRoutingTable _routingTable; ======= private readonly IDiscovery _discovery; >>>>>>> private readonly IDiscovery _discovery; private readonly SyncExecutor _syncExecutor; <<<<<<< this(routingSettings.InitialServerAddressProvider, routingSettings.RoutingContext, new RoutingTable(Enumerable.Empty<Uri>()), poolManager, syncExecutor, logger) ======= this(routingSettings.InitialServerAddressProvider, new ClusterDiscovery(routingSettings.RoutingContext, logger), new RoutingTable(Enumerable.Empty<Uri>()), poolManager, logger) >>>>>>> this(routingSettings.InitialServerAddressProvider, new ClusterDiscovery(syncExecutor, routingSettings.RoutingContext, logger), new RoutingTable(Enumerable.Empty<Uri>()), poolManager, syncExecutor, logger) <<<<<<< ======= public void EnsureRoutingTableForMode(AccessMode mode) { // a quick return path for most happy cases if (!IsRoutingTableStale(_routingTable, mode)) { return; } _semaphore.Wait(); try { // once we grab the lock, we test again to avoid update it multiple times if (!IsRoutingTableStale(_routingTable, mode)) { return; } var routingTable = UpdateRoutingTableWithInitialUriFallback(); Update(routingTable); } finally { _semaphore.Release(); } } >>>>>>> <<<<<<< internal async Task<IRoutingTable> UpdateRoutingTableWithInitialUriFallbackAsync( Func<ISet<Uri>, Task<IRoutingTable>> updateRoutingTableFunc = null) ======= internal IRoutingTable UpdateRoutingTableWithInitialUriFallback() { _logger?.Debug("Updating routing table."); var hasPrependedInitialRouters = false; if (IsReadingInAbsenceOfWriter) { // to prevent from only talking to minority part of a partitioned cluster. PrependRouters(_initialServerAddressProvider.Get()); hasPrependedInitialRouters = true; } var triedUris = new HashSet<Uri>(); var routingTable = UpdateRoutingTable(triedUris); if (routingTable != null) { return routingTable; } if (!hasPrependedInitialRouters) { var uris = _initialServerAddressProvider.Get(); uris.ExceptWith(triedUris); if (uris.Count != 0) { PrependRouters(uris); routingTable = UpdateRoutingTable(null); if (routingTable != null) { return routingTable; } } } // We retried and tried our best however there is just no cluster. // This is the ultimate place we will inform the user that you need to re-create a driver throw new ServiceUnavailableException( "Failed to connect to any routing server. " + "Please make sure that the cluster is up and can be accessed by the driver and retry."); } internal async Task<IRoutingTable> UpdateRoutingTableWithInitialUriFallbackAsync() >>>>>>> internal async Task<IRoutingTable> UpdateRoutingTableWithInitialUriFallbackAsync( Func<ISet<Uri>, Task<IRoutingTable>> updateRoutingTableFunc = null) <<<<<<< public async Task<IRoutingTable> UpdateRoutingTableAsync(ISet<Uri> triedUris = null, Func<IConnection, Task<IRoutingTable>> rediscoveryFunc = null) ======= public IRoutingTable UpdateRoutingTable(ISet<Uri> triedUris = null) { var knownRouters = _routingTable.Routers; foreach (var router in knownRouters) { triedUris?.Add(router); try { var conn = _poolManager.CreateClusterConnection(router); if (conn == null) { _routingTable.Remove(router); } else { var newRoutingTable = _discovery.Discover(conn); if (!IsRoutingTableStale(newRoutingTable)) { return newRoutingTable; } } } catch (SecurityException e) { _logger?.Error(e, "Failed to update routing table from server '{0}' because of a security exception.", router); throw; } catch (Exception e) { _logger?.Warn(e, "Failed to update routing table from server '{0}'.", router); } } return null; } public async Task<IRoutingTable> UpdateRoutingTableAsync(ISet<Uri> triedUris = null) >>>>>>> public async Task<IRoutingTable> UpdateRoutingTableAsync(ISet<Uri> triedUris = null, Func<IConnection, Task<IRoutingTable>> rediscoveryFunc = null) <<<<<<< return null; } private async Task<IRoutingTable> RediscoveryAsync(IConnection conn) { var discoveryManager = new ClusterDiscoveryManager(conn, _syncExecutor, _routingContext, _logger); await discoveryManager.RediscoveryAsync().ConfigureAwait(false); return new RoutingTable(discoveryManager.Routers, discoveryManager.Readers, discoveryManager.Writers, discoveryManager.ExpireAfterSeconds); ======= return null; >>>>>>> return null;
<<<<<<< /// Looks up a localized string similar to Your account does not exist yet! If this problem keeps appearing, please notify us!. /// </summary> internal static string error_account_null { get { return ResourceManager.GetString("error_account_null", resourceCulture); } } /// <summary> /// Looks up a localized string similar to You can not give {0} user(s) {1} reputation point(s) while you only have {2} points left.. /// </summary> internal static string error_rep_limit { get { return ResourceManager.GetString("error_rep_limit", resourceCulture); } } /// <summary> ======= /// Looks up a localized string similar to This role is not allowed!. /// </summary> internal static string error_role_forbidden { get { return ResourceManager.GetString("error_role_forbidden", resourceCulture); } } /// <summary> >>>>>>> /// Looks up a localized string similar to Your account does not exist yet! If this problem keeps appearing, please notify us!. /// </summary> internal static string error_account_null { get { return ResourceManager.GetString("error_account_null", resourceCulture); } } /// <summary> /// Looks up a localized string similar to You can not give {0} user(s) {1} reputation point(s) while you only have {2} points left.. /// </summary> internal static string error_rep_limit { get { return ResourceManager.GetString("error_rep_limit", resourceCulture); /// Looks up a localized string similar to This role is not allowed!. /// </summary> internal static string error_role_forbidden { get { return ResourceManager.GetString("error_role_forbidden", resourceCulture); } } /// <summary> <<<<<<< /// Looks up a localized string similar to I&apos;ve synchronized your current {0} to Miki&apos;s database!. /// </summary> internal static string sync_success { get { return ResourceManager.GetString("sync_success", resourceCulture); } } /// <summary> /// Looks up a localized string similar to avatar. /// </summary> internal static string term_avatar { get { return ResourceManager.GetString("term_avatar", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Commands. /// </summary> internal static string term_commands { get { return ResourceManager.GetString("term_commands", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Shard. /// </summary> internal static string term_shard { get { return ResourceManager.GetString("term_shard", resourceCulture); } } /// <summary> ======= /// Looks up a localized string similar to Available Roles. /// </summary> internal static string term_available { get { return ResourceManager.GetString("term_available", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Roles. /// </summary> internal static string term_roles { get { return ResourceManager.GetString("term_roles", resourceCulture); } } /// <summary> >>>>>>> /// Looks up a localized string similar to I&apos;ve synchronized your current {0} to Miki&apos;s database!. /// </summary> internal static string sync_success { get { return ResourceManager.GetString("sync_success", resourceCulture); /// Looks up a localized string similar to Available Roles. /// </summary> internal static string term_available { get { return ResourceManager.GetString("term_available", resourceCulture); } } /// <summary> /// Looks up a localized string similar to avatar. /// </summary> internal static string term_avatar { get { return ResourceManager.GetString("term_avatar", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Commands. /// </summary> internal static string term_commands { get { return ResourceManager.GetString("term_commands", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Shard. /// </summary> internal static string term_shard { get { return ResourceManager.GetString("term_shard", resourceCulture); /// Looks up a localized string similar to Roles. /// </summary> internal static string term_roles { get { return ResourceManager.GetString("term_roles", resourceCulture); } } /// <summary>
<<<<<<< using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Attributes; using Bot.Models; using Discord; using Framework; using Framework.Commands; using Microsoft.EntityFrameworkCore; using Miki.Accounts; using Miki.Localization; using Miki.Services; using Miki.Services.Transactions; using Miki.Utility; ======= >>>>>>> <<<<<<< var response = await guildService.ClaimWeeklyAsync( new GuildUserReference((long)e.GetGuild().Id, (long)e.GetAuthor().Id)); ======= var unit = e.GetService<IUnitOfWork>(); var localExperienceRepository = unit.GetRepository<LocalExperience>(); var timerRepository = unit.GetRepository<Timer>(); LocalExperience thisUser = await localExperienceRepository.GetAsync( (long)e.GetGuild().Id, (long)e.GetAuthor().Id); // TODO move to LocalExperience service? if(thisUser == null) { thisUser = new LocalExperience { ServerId = (long)e.GetGuild().Id, UserId = (long)e.GetAuthor().Id, Experience = 0, }; await localExperienceRepository.AddAsync(thisUser) .ConfigureAwait(false); await unit.CommitAsync().ConfigureAwait(false); } GuildUser thisGuild = await guildService.GetGuildAsync((long)e.GetGuild().Id); if(thisUser.Experience < thisGuild.MinimalExperienceToGetRewards) { await e.ErrorEmbedResource("miki_guildweekly_insufficient_exp", thisGuild.MinimalExperienceToGetRewards.ToString("N0")) .ToEmbed() .QueueAsync(e, e.GetChannel()); return; } Timer timer = await timerRepository.GetAsync((long)e.GetGuild().Id, (long)e.GetAuthor().Id); if (timer == null) { timer = await timerRepository.AddAsync( new Timer { GuildId = (long)e.GetGuild().Id, UserId = (long)e.GetAuthor().Id, Value = DateTime.Now.AddDays(-30) }); await unit.CommitAsync(); } >>>>>>> var response = await guildService.ClaimWeeklyAsync( new GuildUserReference((long)e.GetGuild().Id, (long)e.GetAuthor().Id));
<<<<<<< /// Writes a value for the <code>position</code> property as a <code>cartesianVelocity</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="value">The value.</param> public void WritePositionPropertyCartesianVelocity(Motion<Cartesian> value) { using (var writer = OpenPositionProperty()) { writer.WriteCartesianVelocity(value); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>cartesianVelocity</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="dates">The dates at which the vector is specified.</param> /// <param name="values">The values corresponding to each date.</param> public void WritePositionPropertyCartesianVelocity(IList<JulianDate> dates, IList<Motion<Cartesian>> values) { using (var writer = OpenPositionProperty()) { writer.WriteCartesianVelocity(dates, values); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>cartesianVelocity</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="dates">The dates at which the vector is specified.</param> /// <param name="values">The values corresponding to each date.</param> /// <param name="startIndex">The index of the first element to use in the `values` collection.</param> /// <param name="length">The number of elements to use from the `values` collection.</param> public void WritePositionPropertyCartesianVelocity(IList<JulianDate> dates, IList<Motion<Cartesian>> values, int startIndex, int length) { using (var writer = OpenPositionProperty()) { writer.WriteCartesianVelocity(dates, values, startIndex, length); } } /// <summary> ======= /// Writes a value for the <code>position</code> property as a <code>reference</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="value">The reference.</param> public void WritePositionPropertyReference(Reference value) { using (var writer = OpenPositionProperty()) { writer.WriteReference(value); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>reference</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="value">The earliest date of the interval.</param> public void WritePositionPropertyReference(string value) { using (var writer = OpenPositionProperty()) { writer.WriteReference(value); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>reference</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="identifier">The identifier of the object which contains the referenced property.</param> /// <param name="propertyName">The property on the referenced object.</param> public void WritePositionPropertyReference(string identifier, string propertyName) { using (var writer = OpenPositionProperty()) { writer.WriteReference(identifier, propertyName); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>reference</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="identifier">The identifier of the object which contains the referenced property.</param> /// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param> public void WritePositionPropertyReference(string identifier, string[] propertyNames) { using (var writer = OpenPositionProperty()) { writer.WriteReference(identifier, propertyNames); } } /// <summary> >>>>>>> /// Writes a value for the <code>position</code> property as a <code>cartesianVelocity</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="value">The value.</param> public void WritePositionPropertyCartesianVelocity(Motion<Cartesian> value) { using (var writer = OpenPositionProperty()) { writer.WriteCartesianVelocity(value); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>cartesianVelocity</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="dates">The dates at which the vector is specified.</param> /// <param name="values">The values corresponding to each date.</param> public void WritePositionPropertyCartesianVelocity(IList<JulianDate> dates, IList<Motion<Cartesian>> values) { using (var writer = OpenPositionProperty()) { writer.WriteCartesianVelocity(dates, values); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>cartesianVelocity</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="dates">The dates at which the vector is specified.</param> /// <param name="values">The values corresponding to each date.</param> /// <param name="startIndex">The index of the first element to use in the `values` collection.</param> /// <param name="length">The number of elements to use from the `values` collection.</param> public void WritePositionPropertyCartesianVelocity(IList<JulianDate> dates, IList<Motion<Cartesian>> values, int startIndex, int length) { using (var writer = OpenPositionProperty()) { writer.WriteCartesianVelocity(dates, values, startIndex, length); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>reference</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="value">The reference.</param> public void WritePositionPropertyReference(Reference value) { using (var writer = OpenPositionProperty()) { writer.WriteReference(value); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>reference</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="value">The earliest date of the interval.</param> public void WritePositionPropertyReference(string value) { using (var writer = OpenPositionProperty()) { writer.WriteReference(value); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>reference</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="identifier">The identifier of the object which contains the referenced property.</param> /// <param name="propertyName">The property on the referenced object.</param> public void WritePositionPropertyReference(string identifier, string propertyName) { using (var writer = OpenPositionProperty()) { writer.WriteReference(identifier, propertyName); } } /// <summary> /// Writes a value for the <code>position</code> property as a <code>reference</code> value. The <code>position</code> property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other primitives attached to the object. /// </summary> /// <param name="identifier">The identifier of the object which contains the referenced property.</param> /// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param> public void WritePositionPropertyReference(string identifier, string[] propertyNames) { using (var writer = OpenPositionProperty()) { writer.WriteReference(identifier, propertyNames); } } /// <summary>
<<<<<<< /// <summary> /// The name of the <code>outlineColor</code> property. /// </summary> public const string OutlineColorPropertyName = "outlineColor"; /// <summary> /// The name of the <code>outlineWidth</code> property. /// </summary> public const string OutlineWidthPropertyName = "outlineWidth"; /// <summary> /// The name of the <code>followSurface</code> property. /// </summary> public const string FollowSurfacePropertyName = "followSurface"; ======= >>>>>>> /// <summary> /// The name of the <code>followSurface</code> property. /// </summary> public const string FollowSurfacePropertyName = "followSurface"; <<<<<<< private readonly Lazy<ColorCesiumWriter> m_outlineColor = new Lazy<ColorCesiumWriter>(() => new ColorCesiumWriter(OutlineColorPropertyName), false); private readonly Lazy<DoubleCesiumWriter> m_outlineWidth = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(OutlineWidthPropertyName), false); private readonly Lazy<BooleanCesiumWriter> m_followSurface = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(FollowSurfacePropertyName), false); ======= >>>>>>> private readonly Lazy<BooleanCesiumWriter> m_followSurface = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(FollowSurfacePropertyName), false); <<<<<<< /// <summary> /// Gets the writer for the <code>outlineColor</code> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <code>outlineColor</code> property defines the color of the outline of the polyline. /// </summary> public ColorCesiumWriter OutlineColorWriter { get { return m_outlineColor.Value; } } /// <summary> /// Opens and returns the writer for the <code>outlineColor</code> property. The <code>outlineColor</code> property defines the color of the outline of the polyline. /// </summary> public ColorCesiumWriter OpenOutlineColorProperty() { OpenIntervalIfNecessary(); return OpenAndReturn(OutlineColorWriter); } /// <summary> /// Writes a value for the <code>outlineColor</code> property as a <code>rgba</code> value. The <code>outlineColor</code> property specifies the color of the outline of the polyline. /// </summary> /// <param name="color">The color.</param> public void WriteOutlineColorProperty(Color color) { using (var writer = OpenOutlineColorProperty()) { writer.WriteRgba(color); } } /// <summary> /// Writes a value for the <code>outlineColor</code> property as a <code>rgba</code> value. The <code>outlineColor</code> property specifies the color of the outline of the polyline. /// </summary> /// <param name="red">The red component in the range 0 to 255.</param> /// <param name="green">The green component in the range 0 to 255.</param> /// <param name="blue">The blue component in the range 0 to 255.</param> /// <param name="alpha">The alpha component in the range 0 to 255.</param> public void WriteOutlineColorProperty(int red, int green, int blue, int alpha) { using (var writer = OpenOutlineColorProperty()) { writer.WriteRgba(red, green, blue, alpha); } } /// <summary> /// Writes a value for the <code>outlineColor</code> property as a <code>rgba</code> value. The <code>outlineColor</code> property specifies the color of the outline of the polyline. /// </summary> /// <param name="dates">The dates at which the value is specified.</param> /// <param name="colors">The color corresponding to each date.</param> /// <param name="startIndex">The index of the first element to use in the `colors` collection.</param> /// <param name="length">The number of elements to use from the `colors` collection.</param> public void WriteOutlineColorProperty(IList<JulianDate> dates, IList<Color> colors, int startIndex, int length) { using (var writer = OpenOutlineColorProperty()) { writer.WriteRgba(dates, colors, startIndex, length); } } /// <summary> /// Writes a value for the <code>outlineColor</code> property as a <code>rgbaf</code> value. The <code>outlineColor</code> property specifies the color of the outline of the polyline. /// </summary> /// <param name="red">The red component in the range 0 to 1.0.</param> /// <param name="green">The green component in the range 0 to 1.0.</param> /// <param name="blue">The blue component in the range 0 to 1.0.</param> /// <param name="alpha">The alpha component in the range 0 to 1.0.</param> public void WriteOutlineColorPropertyRgbaf(float red, float green, float blue, float alpha) { using (var writer = OpenOutlineColorProperty()) { writer.WriteRgbaf(red, green, blue, alpha); } } /// <summary> /// Writes a value for the <code>outlineColor</code> property as a <code>reference</code> value. The <code>outlineColor</code> property specifies the color of the outline of the polyline. /// </summary> /// <param name="value">The reference.</param> public void WriteOutlineColorPropertyReference(Reference value) { using (var writer = OpenOutlineColorProperty()) { writer.WriteReference(value); } } /// <summary> /// Writes a value for the <code>outlineColor</code> property as a <code>reference</code> value. The <code>outlineColor</code> property specifies the color of the outline of the polyline. /// </summary> /// <param name="value">The earliest date of the interval.</param> public void WriteOutlineColorPropertyReference(string value) { using (var writer = OpenOutlineColorProperty()) { writer.WriteReference(value); } } /// <summary> /// Writes a value for the <code>outlineColor</code> property as a <code>reference</code> value. The <code>outlineColor</code> property specifies the color of the outline of the polyline. /// </summary> /// <param name="identifier">The identifier of the object which contains the referenced property.</param> /// <param name="propertyName">The property on the referenced object.</param> public void WriteOutlineColorPropertyReference(string identifier, string propertyName) { using (var writer = OpenOutlineColorProperty()) { writer.WriteReference(identifier, propertyName); } } /// <summary> /// Writes a value for the <code>outlineColor</code> property as a <code>reference</code> value. The <code>outlineColor</code> property specifies the color of the outline of the polyline. /// </summary> /// <param name="identifier">The identifier of the object which contains the referenced property.</param> /// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param> public void WriteOutlineColorPropertyReference(string identifier, string[] propertyNames) { using (var writer = OpenOutlineColorProperty()) { writer.WriteReference(identifier, propertyNames); } } /// <summary> /// Gets the writer for the <code>outlineWidth</code> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <code>outlineWidth</code> property defines the width of the outline of the polyline. /// </summary> public DoubleCesiumWriter OutlineWidthWriter { get { return m_outlineWidth.Value; } } /// <summary> /// Opens and returns the writer for the <code>outlineWidth</code> property. The <code>outlineWidth</code> property defines the width of the outline of the polyline. /// </summary> public DoubleCesiumWriter OpenOutlineWidthProperty() { OpenIntervalIfNecessary(); return OpenAndReturn(OutlineWidthWriter); } /// <summary> /// Writes a value for the <code>outlineWidth</code> property as a <code>number</code> value. The <code>outlineWidth</code> property specifies the width of the outline of the polyline. /// </summary> /// <param name="value">The value.</param> public void WriteOutlineWidthProperty(double value) { using (var writer = OpenOutlineWidthProperty()) { writer.WriteNumber(value); } } /// <summary> /// Writes a value for the <code>outlineWidth</code> property as a <code>number</code> value. The <code>outlineWidth</code> property specifies the width of the outline of the polyline. /// </summary> /// <param name="dates">The dates at which the value is specified.</param> /// <param name="values">The value corresponding to each date.</param> /// <param name="startIndex">The index of the first element to use in the `values` collection.</param> /// <param name="length">The number of elements to use from the `values` collection.</param> public void WriteOutlineWidthProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length) { using (var writer = OpenOutlineWidthProperty()) { writer.WriteNumber(dates, values, startIndex, length); } } /// <summary> /// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the outline of the polyline. /// </summary> /// <param name="value">The reference.</param> public void WriteOutlineWidthPropertyReference(Reference value) { using (var writer = OpenOutlineWidthProperty()) { writer.WriteReference(value); } } /// <summary> /// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the outline of the polyline. /// </summary> /// <param name="value">The earliest date of the interval.</param> public void WriteOutlineWidthPropertyReference(string value) { using (var writer = OpenOutlineWidthProperty()) { writer.WriteReference(value); } } /// <summary> /// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the outline of the polyline. /// </summary> /// <param name="identifier">The identifier of the object which contains the referenced property.</param> /// <param name="propertyName">The property on the referenced object.</param> public void WriteOutlineWidthPropertyReference(string identifier, string propertyName) { using (var writer = OpenOutlineWidthProperty()) { writer.WriteReference(identifier, propertyName); } } /// <summary> /// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the outline of the polyline. /// </summary> /// <param name="identifier">The identifier of the object which contains the referenced property.</param> /// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param> public void WriteOutlineWidthPropertyReference(string identifier, string[] propertyNames) { using (var writer = OpenOutlineWidthProperty()) { writer.WriteReference(identifier, propertyNames); } } /// <summary> /// Gets the writer for the <code>followSurface</code> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <code>followSurface</code> property defines whether or not the positions are connected as great arcs (the default) or as straight lines. /// </summary> public BooleanCesiumWriter FollowSurfaceWriter { get { return m_followSurface.Value; } } /// <summary> /// Opens and returns the writer for the <code>followSurface</code> property. The <code>followSurface</code> property defines whether or not the positions are connected as great arcs (the default) or as straight lines. /// </summary> public BooleanCesiumWriter OpenFollowSurfaceProperty() { OpenIntervalIfNecessary(); return OpenAndReturn(FollowSurfaceWriter); } /// <summary> /// Writes a value for the <code>followSurface</code> property as a <code>boolean</code> value. The <code>followSurface</code> property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. /// </summary> /// <param name="value">The value.</param> public void WriteFollowSurfaceProperty(bool value) { using (var writer = OpenFollowSurfaceProperty()) { writer.WriteBoolean(value); } } ======= >>>>>>> /// <summary> /// Gets the writer for the <code>followSurface</code> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <code>followSurface</code> property defines whether or not the positions are connected as great arcs (the default) or as straight lines. /// </summary> public BooleanCesiumWriter FollowSurfaceWriter { get { return m_followSurface.Value; } } /// <summary> /// Opens and returns the writer for the <code>followSurface</code> property. The <code>followSurface</code> property defines whether or not the positions are connected as great arcs (the default) or as straight lines. /// </summary> public BooleanCesiumWriter OpenFollowSurfaceProperty() { OpenIntervalIfNecessary(); return OpenAndReturn(FollowSurfaceWriter); } /// <summary> /// Writes a value for the <code>followSurface</code> property as a <code>boolean</code> value. The <code>followSurface</code> property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. /// </summary> /// <param name="value">The value.</param> public void WriteFollowSurfaceProperty(bool value) { using (var writer = OpenFollowSurfaceProperty()) { writer.WriteBoolean(value); } }
<<<<<<< sp.Object, telemetryProvider.Object, _cSharpScriptExecutor.Object); ======= ProtectedOperations, _factory.Create<IMarkDisplayUtil>(MockBehavior.Loose).Object, _factory.Create<IControlCharUtil>(MockBehavior.Loose).Object, sp.Object); >>>>>>> ProtectedOperations, _factory.Create<IMarkDisplayUtil>(MockBehavior.Loose).Object, _factory.Create<IControlCharUtil>(MockBehavior.Loose).Object, sp.Object, _cSharpScriptExecutor.Object);
<<<<<<< /// Subtract a negative decimal number /// </summary> [Test] public void SubtractFromWord_Decimal_Negative() { Create(" -10"); _buffer.Process(KeyInputUtil.CharWithControlToKeyInput('x')); Assert.AreEqual(" -11", _textBuffer.GetLine(0).GetText()); Assert.AreEqual(3, _textView.GetCaretPoint().Position); } /// <summary> ======= /// Make sure we handle the 'gv' command to switch to the previous visual mode /// </summary> [Test] public void SwitchPreviousVisualMode_Line() { Create("cats", "dogs", "fish"); var visualSelection = VisualSelection.NewLine( _textView.GetLineRange(0, 1), true, 1); _vimTextBuffer.LastVisualSelection = FSharpOption.Create(visualSelection); _buffer.Process("gv"); Assert.AreEqual(ModeKind.VisualLine, _buffer.ModeKind); Assert.AreEqual(visualSelection, VisualSelection.CreateForSelection(_textView, VisualKind.Line)); } /// <summary> >>>>>>> /// Subtract a negative decimal number /// </summary> [Test] public void SubtractFromWord_Decimal_Negative() { Create(" -10"); _buffer.Process(KeyInputUtil.CharWithControlToKeyInput('x')); Assert.AreEqual(" -11", _textBuffer.GetLine(0).GetText()); Assert.AreEqual(3, _textView.GetCaretPoint().Position); } /// <summary> /// Make sure we handle the 'gv' command to switch to the previous visual mode /// </summary> [Test] public void SwitchPreviousVisualMode_Line() { Create("cats", "dogs", "fish"); var visualSelection = VisualSelection.NewLine( _textView.GetLineRange(0, 1), true, 1); _vimTextBuffer.LastVisualSelection = FSharpOption.Create(visualSelection); _buffer.Process("gv"); Assert.AreEqual(ModeKind.VisualLine, _buffer.ModeKind); Assert.AreEqual(visualSelection, VisualSelection.CreateForSelection(_textView, VisualKind.Line)); } /// <summary>
<<<<<<< protected IVimBufferFactory VimBufferFactory { get { return _vimBufferFactory; } } protected MockVimHost VimHost { get { return (MockVimHost)_vim.VimHost; } } ======= protected IVimBufferFactory VimBufferFactory { get { return _vimBufferFactory; } } >>>>>>> protected IVimBufferFactory VimBufferFactory { get { return _vimBufferFactory; } } protected MockVimHost VimHost { get { return (MockVimHost)_vim.VimHost; } } <<<<<<< protected IBufferTrackingService BufferTrackingService { get { return _bufferTrackingService; } } ======= protected ISmartIndentationService SmartIndentationService { get { return _smartIndentationService; } } >>>>>>> protected IBufferTrackingService BufferTrackingService { get { return _bufferTrackingService; } } protected ISmartIndentationService SmartIndentationService { get { return _smartIndentationService; } }
<<<<<<< private Mock<ICommandDispatcher> _commandDispatcher; ======= private Mock<IClipboardDevice> _clipboardDevice; >>>>>>> private Mock<ICommandDispatcher> _commandDispatcher; private Mock<IClipboardDevice> _clipboardDevice; <<<<<<< _commandDispatcher = _factory.Create<ICommandDispatcher>(); ======= _clipboardDevice = _factory.Create<IClipboardDevice>(MockBehavior.Loose); >>>>>>> _commandDispatcher = _factory.Create<ICommandDispatcher>(); _clipboardDevice = _factory.Create<IClipboardDevice>(MockBehavior.Loose); <<<<<<< _commandDispatcher.Object, sp.Object); ======= sp.Object, _clipboardDevice.Object); >>>>>>> _commandDispatcher.Object, sp.Object, _clipboardDevice.Object);
<<<<<<< using Vim.Interpreter; ======= using System.Windows.Threading; using System.Diagnostics; >>>>>>> using System.Windows.Threading; using System.Diagnostics; using Vim.Interpreter; <<<<<<< private readonly ICSharpScriptExecutor _cSharpScriptExecutor; ======= private readonly IProtectedOperations _protectedOperations; private readonly SettingsSync _settingsSync; >>>>>>> private readonly IProtectedOperations _protectedOperations; private readonly SettingsSync _settingsSync; private readonly ICSharpScriptExecutor _cSharpScriptExecutor; <<<<<<< SVsServiceProvider serviceProvider, ITelemetryProvider telemetryProvider, [Import(AllowDefault = true)]ICSharpScriptExecutor cSharpScriptExecutor) ======= IProtectedOperations protectedOperations, IMarkDisplayUtil markDisplayUtil, IControlCharUtil controlCharUtil, SVsServiceProvider serviceProvider) >>>>>>> IProtectedOperations protectedOperations, IMarkDisplayUtil markDisplayUtil, IControlCharUtil controlCharUtil, SVsServiceProvider serviceProvider, [Import(AllowDefault = true)]ICSharpScriptExecutor cSharpScriptExecutor) <<<<<<< _cSharpScriptExecutor = cSharpScriptExecutor; ======= _protectedOperations = protectedOperations; >>>>>>> _protectedOperations = protectedOperations; _cSharpScriptExecutor = cSharpScriptExecutor;
<<<<<<< using Microsoft.VisualStudio.TextManager.Interop; using Microsoft.VisualStudio.Editor; using VimCoreTest.Utils; using Microsoft.VisualStudio; ======= using Microsoft.VisualStudio.Text.Operations; >>>>>>> using Microsoft.VisualStudio.TextManager.Interop; using Microsoft.VisualStudio.Editor; using VimCoreTest.Utils; using Microsoft.VisualStudio; using Microsoft.VisualStudio.Text.Operations; <<<<<<< private Mock<IUndoHistoryRegistry> _undoRegistry; private Mock<IVsEditorAdaptersFactoryService> _editorAdaptersFactoryService; ======= private Mock<ITextBufferUndoManagerProvider> _undoManagerProvider; >>>>>>> private Mock<IVsEditorAdaptersFactoryService> _editorAdaptersFactoryService; private Mock<ITextBufferUndoManagerProvider> _undoManagerProvider; <<<<<<< _undoRegistry = new Mock<IUndoHistoryRegistry>(MockBehavior.Strict); _editorAdaptersFactoryService = new Mock<IVsEditorAdaptersFactoryService>(MockBehavior.Strict); _hostRaw = new VsVimHost(_undoRegistry.Object, _editorAdaptersFactoryService.Object); ======= _undoManagerProvider = new Mock<ITextBufferUndoManagerProvider>(MockBehavior.Strict); _hostRaw = new VsVimHost(_undoManagerProvider.Object); >>>>>>> _undoManagerProvider = new Mock<ITextBufferUndoManagerProvider>(MockBehavior.Strict); _editorAdaptersFactoryService = new Mock<IVsEditorAdaptersFactoryService>(MockBehavior.Strict); _hostRaw = new VsVimHost(_undoManagerProvider.Object, _editorAdaptersFactoryService.Object);
<<<<<<< private Mock<IVimBufferData> _vimBufferData; private Mock<ITextView> _textView; ======= private Mock<IWpfTextView> _textView; >>>>>>> private Mock<IVimBufferData> _vimBufferData; private Mock<IWpfTextView> _textView; <<<<<<< private Mock<ITextSelection> _selection; private Mock<ITextViewLineCollection> _lines; private Mock<ITextViewLine> _caretLine; ======= private Mock<IWpfTextViewLineCollection> _lines; private Mock<IWpfTextViewLine> _caretLine; >>>>>>> private Mock<ITextSelection> _selection; private Mock<IWpfTextViewLineCollection> _lines; private Mock<IWpfTextViewLine> _caretLine; <<<<<<< _selection = new Mock<ITextSelection>(MockBehavior.Strict); _textView = new Mock<ITextView>(MockBehavior.Strict); ======= _textView = new Mock<IWpfTextView>(MockBehavior.Strict); >>>>>>> _selection = new Mock<ITextSelection>(MockBehavior.Strict); _textView = new Mock<IWpfTextView>(MockBehavior.Strict);
<<<<<<< public virtual T GetChild<T>(int i) where T:IParseTree ======= public virtual T GetChild<T, _T1>(Type<_T1> ctxType, int i) where T : IParseTree where _T1 : T >>>>>>> public virtual T GetChild<T>(int i) where T : IParseTree <<<<<<< public virtual T GetRuleContext<T>(int i) where T:Antlr4.Runtime.ParserRuleContext ======= public virtual T GetRuleContext<T, _T1>(Type<_T1> ctxType, int i) where T : Antlr4.Runtime.ParserRuleContext where _T1 : T >>>>>>> public virtual T GetRuleContext<T>(int i) where T : Antlr4.Runtime.ParserRuleContext <<<<<<< #if NET_4_5 public virtual IReadOnlyList<T> GetRuleContexts<T>() where T:Antlr4.Runtime.ParserRuleContext #else public virtual T[] GetRuleContexts<T>() where T:Antlr4.Runtime.ParserRuleContext #endif ======= public virtual IList<T> GetRuleContexts<T, _T1>(Type<_T1> ctxType) where T : Antlr4.Runtime.ParserRuleContext where _T1 : T >>>>>>> #if NET_4_5 public virtual IReadOnlyList<T> GetRuleContexts<T>() where T : Antlr4.Runtime.ParserRuleContext #else public virtual T[] GetRuleContexts<T>() where T : Antlr4.Runtime.ParserRuleContext #endif
<<<<<<< public const int DefaultTokenChannel = IToken.DefaultChannel; ======= public const int More = -2; public const int Skip = -3; public const int DefaultTokenChannel = TokenConstants.DefaultChannel; >>>>>>> public const int DefaultTokenChannel = TokenConstants.DefaultChannel;
<<<<<<< List<long> toRemove = new List<long>(); foreach (var pair in mergedConfigs) ======= IEnumerator<KeyValuePair<long, ATNConfig>> iterator = mergedConfigs.EntrySet().GetEnumerator(); while (iterator.HasNext()) { if (iterator.Next().Value.IsHidden) { iterator.Remove(); } } IListIterator<ATNConfig> iterator2 = unmerged.ListIterator(); while (iterator2.HasNext()) >>>>>>> List<long> toRemove = new List<long>(); foreach (var pair in mergedConfigs) <<<<<<< public virtual bool AddAll(IEnumerable<ATNConfig> c, PredictionContextCache contextCache) ======= public virtual bool AddAll<_T0>(ICollection<_T0> c, PredictionContextCache contextCache) where _T0 : ATNConfig >>>>>>> public virtual bool AddAll(IEnumerable<ATNConfig> c, PredictionContextCache contextCache) <<<<<<< return this.outermostConfigSet == other.outermostConfigSet && Utils.Equals(conflictingAlts , other.conflictingAlts) && configs.SequenceEqual(other.configs); ======= return this.outermostConfigSet == other.outermostConfigSet && Utils.Equals(conflictingAlts, other.conflictingAlts) && configs.Equals(other.configs); >>>>>>> return this.outermostConfigSet == other.outermostConfigSet && Utils.Equals(conflictingAlts, other.conflictingAlts) && configs.SequenceEqual(other.configs);
<<<<<<< public DFASerializer(DFA dfa, IRecognizer parser) : this(dfa, parser != null ? parser.TokenNames : null, parser != null ? parser.RuleNames : null , parser != null ? parser.Atn : null) ======= public DFASerializer(DFA dfa, Recognizer<object, object> parser) : this(dfa, parser != null ? parser.TokenNames : null, parser != null ? parser.RuleNames : null, parser != null ? parser.Atn : null) >>>>>>> public DFASerializer(DFA dfa, IRecognizer parser) : this(dfa, parser != null ? parser.TokenNames : null, parser != null ? parser.RuleNames : null, parser != null ? parser.Atn : null)
<<<<<<< /// <see cref="PredictionMode"/> /// <code>(</code> /// <see cref="Atn.PredictionMode.Sll"/> /// <code>)</code> ======= /// <see cref="PredictionMode(PredictionMode)">setPredictionMode</see> /// <c>(</c> /// <see cref="PredictionMode.Sll"/> /// <c>)</c> >>>>>>> /// <see cref="PredictionMode"/> /// <c>(</c> /// <see cref="Atn.PredictionMode.Sll"/> /// <c>)</c>
<<<<<<< using Antlr4.Runtime.Sharpen; ======= >>>>>>> <<<<<<< /// <seealso cref="Antlr4.Runtime.Atn.ATNDeserializationOptions.GenerateRuleBypassTransitions()">Antlr4.Runtime.Atn.ATNDeserializationOptions.GenerateRuleBypassTransitions()</seealso> private static readonly IDictionary<string, ATN> bypassAltsAtnCache = new Dictionary<string, ATN>(); ======= /// <seealso cref="Antlr4.Runtime.Atn.ATNDeserializationOptions.GenerateRuleBypassTransitions()"/> private static readonly IDictionary<string, ATN> bypassAltsAtnCache = new WeakHashMap<string, ATN>(); >>>>>>> /// <seealso cref="Antlr4.Runtime.Atn.ATNDeserializationOptions.GenerateRuleBypassTransitions()"/> private static readonly IDictionary<string, ATN> bypassAltsAtnCache = new Dictionary<string, ATN>(); <<<<<<< /// <seealso cref="ErrorHandler"/> ======= /// <seealso cref="ErrorHandler()"/> /// <seealso cref="ErrorHandler(IAntlrErrorStrategy)"/> >>>>>>> /// <seealso cref="ErrorHandler"/> <<<<<<< /// <seealso cref="BuildParseTree"/> ======= /// <seealso cref="BuildParseTree()"/> /// <seealso cref="BuildParseTree(bool)"/> >>>>>>> /// <seealso cref="BuildParseTree"/> <<<<<<< /// <see cref="Trace"/> ======= /// <see cref="Trace(bool)"/> >>>>>>> /// <see cref="Trace"/> <<<<<<< /// <see cref="Trace"/> ======= /// <see cref="Trace(bool)"/> >>>>>>> /// <see cref="Trace"/> <<<<<<< /// <exception cref="Antlr4.Runtime.RecognitionException"></exception> [return: NotNull] ======= /// <exception cref="Antlr4.Runtime.RecognitionException"/> [NotNull] >>>>>>> /// <exception cref="Antlr4.Runtime.RecognitionException"/> [return: NotNull] <<<<<<< /// <exception cref="Antlr4.Runtime.RecognitionException"></exception> [return: NotNull] ======= /// <exception cref="Antlr4.Runtime.RecognitionException"/> [NotNull] >>>>>>> /// <exception cref="Antlr4.Runtime.RecognitionException"/> [return: NotNull] <<<<<<< return Sharpen.Collections.EmptyList<IParseTreeListener>(); ======= return Antlr4.Runtime.Sharpen.Collections.EmptyList(); >>>>>>> return Sharpen.Collections.EmptyList<IParseTreeListener>(); <<<<<<< /// <seealso cref="Antlr4.Runtime.Atn.ATN.GetExpectedTokens(int, RuleContext)">Antlr4.Runtime.Atn.ATN.GetExpectedTokens(int, RuleContext)</seealso> [return: NotNull] ======= /// <seealso cref="Antlr4.Runtime.Atn.ATN.GetExpectedTokens(int, RuleContext)"/> [NotNull] >>>>>>> /// <seealso cref="Antlr4.Runtime.Atn.ATN.GetExpectedTokens(int, RuleContext)"/> [return: NotNull]
<<<<<<< public virtual string[] ToStrings(IRecognizer recognizer, int currentState ) ======= public virtual string[] ToStrings<_T0>(Recognizer<_T0> recognizer, int currentState) >>>>>>> public virtual string[] ToStrings(IRecognizer recognizer, int currentState) <<<<<<< public virtual string[] ToStrings(IRecognizer recognizer, Antlr4.Runtime.Atn.PredictionContext stop, int currentState) ======= public virtual string[] ToStrings<_T0>(Recognizer<_T0> recognizer, Antlr4.Runtime.Atn.PredictionContext stop, int currentState) >>>>>>> public virtual string[] ToStrings(IRecognizer recognizer, Antlr4.Runtime.Atn.PredictionContext stop, int currentState)
<<<<<<< [return: NotNull] public virtual MultiMap<string, IParseTree> GetLabels() ======= public virtual MultiMap<string, IParseTree> Labels >>>>>>> [NotNull] public virtual MultiMap<string, IParseTree> Labels <<<<<<< [return: Nullable] public virtual IParseTree GetMismatchedNode() ======= public virtual IParseTree MismatchedNode >>>>>>> [Nullable] public virtual IParseTree MismatchedNode <<<<<<< [return: NotNull] public virtual ParseTreePattern GetPattern() ======= public virtual ParseTreePattern Pattern >>>>>>> [NotNull] public virtual ParseTreePattern Pattern <<<<<<< [return: NotNull] public virtual IParseTree GetTree() ======= public virtual IParseTree Tree >>>>>>> [NotNull] public virtual IParseTree Tree <<<<<<< return string.Format("Match {0}; found {1} labels", Succeeded() ? "succeeded" : "failed", GetLabels().Count); ======= return string.Format("Match %s; found %d labels", Succeeded ? "succeeded" : "failed", Labels.Count); >>>>>>> return string.Format("Match {0}; found {1} labels", Succeeded ? "succeeded" : "failed", Labels.Count);
<<<<<<< return string.Format("failed predicate: {{{0}}}?", predicate); ======= return string.Format(CultureInfo.CurrentCulture, "failed predicate: {%s}?", predicate ); >>>>>>> return string.Format(CultureInfo.CurrentCulture, "failed predicate: {{{0}}}?", predicate );
<<<<<<< [return: NotNull] public ILexerAction GetAction() ======= public ILexerAction Action >>>>>>> [NotNull] public ILexerAction Action
<<<<<<< public static readonly int SerializedVersion = 5; ======= public static readonly int SerializedVersion; static ATNSimulator() { SerializedVersion = 3; } public static readonly UUID SerializedUuid; static ATNSimulator() { SerializedUuid = UUID.FromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"); } >>>>>>> public static readonly int SerializedVersion = 3; public static readonly UUID SerializedUuid = UUID.FromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"); <<<<<<< string reason = string.Format("Could not deserialize ATN with version {0} (expected {1})." ======= string reason = string.Format(CultureInfo.CurrentCulture, "Could not deserialize ATN with version %d (expected %d)." >>>>>>> string reason = string.Format(CultureInfo.CurrentCulture, "Could not deserialize ATN with version {0} (expected {1})." <<<<<<< sets.Add(set); for (int j = 1; j <= nintervals; j++) ======= sets.AddItem(set); bool containsEof = ToInt(data[p++]) != 0; if (containsEof) { set.Add(-1); } for (int j = 0; j < nintervals; j++) >>>>>>> sets.Add(set); bool containsEof = ToInt(data[p++]) != 0; if (containsEof) { set.Add(-1); } for (int j = 0; j < nintervals; j++) <<<<<<< string message = string.Format("The specified state type {0} is not valid.", type); ======= string message = string.Format(CultureInfo.CurrentCulture, "The specified state type %d is not valid." , type); >>>>>>> string message = string.Format(CultureInfo.CurrentCulture, "The specified state type {0} is not valid." , type);
<<<<<<< IAntlrErrorListener<int> listener = GetErrorListenerDispatch(); listener.SyntaxError(this, 0, _tokenStartLine, _tokenStartCharPositionInLine, msg, e); ======= IAntlrErrorListener<int> listener = ErrorListenerDispatch; listener.SyntaxError(this, null, _tokenStartLine, _tokenStartCharPositionInLine, msg, e); >>>>>>> IAntlrErrorListener<int> listener = ErrorListenerDispatch; listener.SyntaxError(this, 0, _tokenStartLine, _tokenStartCharPositionInLine, msg, e);
<<<<<<< string format = "reportAmbiguity d={0}: ambigAlts={1}, input='{2}'"; recognizer.NotifyErrorListeners(string.Format(format, GetDecisionDescription(recognizer , dfa.decision), ambigAlts, ((ITokenStream)recognizer.InputStream).GetText(Interval .Of(startIndex, stopIndex)))); ======= if (exactOnly && !exact) { return; } string format = "reportAmbiguity d=%s: ambigAlts=%s, input='%s'"; string decision = GetDecisionDescription(recognizer, dfa); BitSet conflictingAlts = GetConflictingAlts(ambigAlts, configs); string text = ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex , stopIndex)); string message = string.Format(format, decision, conflictingAlts, text); recognizer.NotifyErrorListeners(message); >>>>>>> if (exactOnly && !exact) { return; } string format = "reportAmbiguity d={0}: ambigAlts={1}, input='{2}'"; string decision = GetDecisionDescription(recognizer, dfa); BitSet conflictingAlts = GetConflictingAlts(ambigAlts, configs); string text = ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex , stopIndex)); string message = string.Format(format, decision, conflictingAlts, text); recognizer.NotifyErrorListeners(message); <<<<<<< string format = "reportAttemptingFullContext d={0}, input='{1}'"; recognizer.NotifyErrorListeners(string.Format(format, GetDecisionDescription(recognizer , dfa.decision), ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex , stopIndex)))); ======= string format = "reportAttemptingFullContext d=%s, input='%s'"; string decision = GetDecisionDescription(recognizer, dfa); string text = ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex , stopIndex)); string message = string.Format(format, decision, text); recognizer.NotifyErrorListeners(message); >>>>>>> string format = "reportAttemptingFullContext d={0}, input='{1}'"; string decision = GetDecisionDescription(recognizer, dfa); string text = ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex , stopIndex)); string message = string.Format(format, decision, text); recognizer.NotifyErrorListeners(message); <<<<<<< string format = "reportContextSensitivity d={0}, input='{1}'"; recognizer.NotifyErrorListeners(string.Format(format, GetDecisionDescription(recognizer , dfa.decision), ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex , stopIndex)))); ======= string format = "reportContextSensitivity d=%s, input='%s'"; string decision = GetDecisionDescription(recognizer, dfa); string text = ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex , stopIndex)); string message = string.Format(format, decision, text); recognizer.NotifyErrorListeners(message); >>>>>>> string format = "reportContextSensitivity d={0}, input='{1}'"; string decision = GetDecisionDescription(recognizer, dfa); string text = ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex , stopIndex)); string message = string.Format(format, decision, text); recognizer.NotifyErrorListeners(message); <<<<<<< return decision.ToString(); ======= if (reportedAlts != null) { return reportedAlts; } BitSet result = new BitSet(); foreach (ATNConfig config in configs) { result.Set(config.Alt); } return result; >>>>>>> if (reportedAlts != null) { return reportedAlts; } BitSet result = new BitSet(); foreach (ATNConfig config in configs) { result.Set(config.Alt); } return result;
<<<<<<< [return: NotNull] public virtual Lexer GetLexer() ======= public virtual Lexer Lexer >>>>>>> [NotNull] public virtual Lexer Lexer <<<<<<< [return: NotNull] public virtual Parser GetParser() ======= public virtual Parser Parser >>>>>>> [NotNull] public virtual Parser Parser <<<<<<< labels.Map(tokenTagToken.GetTokenName(), tree); if (tokenTagToken.GetLabel() != null) ======= labels.Map(tokenTagToken.TokenName, tree); if (tokenTagToken.Label != null) >>>>>>> labels.Map(tokenTagToken.TokenName, tree); if (tokenTagToken.Label != null) <<<<<<< if (r1.GetRuleIndex() == r2.GetRuleIndex()) ======= ParseTreeMatch m = null; if (r1.RuleContext.RuleIndex == r2.RuleContext.RuleIndex) >>>>>>> if (r1.RuleIndex == r2.RuleIndex) <<<<<<< TokenTagToken t = new TokenTagToken(tagChunk.GetTag(), ttype, tagChunk.GetLabel()); tokens.Add(t); ======= TokenTagToken t = new TokenTagToken(tagChunk.Tag, ttype, tagChunk.Label); tokens.AddItem(t); >>>>>>> TokenTagToken t = new TokenTagToken(tagChunk.Tag, ttype, tagChunk.Label); tokens.Add(t); <<<<<<< tokens.Add(new RuleTagToken(tagChunk.GetTag(), ruleImaginaryTokenType, tagChunk.GetLabel())); ======= tokens.AddItem(new RuleTagToken(tagChunk.Tag, ruleImaginaryTokenType, tagChunk.Label)); >>>>>>> tokens.Add(new RuleTagToken(tagChunk.Tag, ruleImaginaryTokenType, tagChunk.Label));
<<<<<<< /// <code>false</code> /// . This is the backing field for <see cref="IsPrecedenceDfa"/>. ======= /// <see langword="false"/> /// . This is the backing field for /// <see cref="IsPrecedenceDfa()"/> /// , /// <see cref="IsPrecedenceDfa(bool)"/> /// . >>>>>>> /// <see langword="false"/> /// . This is the backing field for <see cref="IsPrecedenceDfa"/>.
<<<<<<< [return: NotNull] public PredictionMode GetPredictionMode() ======= public Antlr4.Runtime.Atn.PredictionMode PredictionMode >>>>>>> public Antlr4.Runtime.Atn.PredictionMode PredictionMode <<<<<<< if (optimize_closure_busy && c.GetContext().IsEmpty && !closureBusy.Add(c)) ======= if (optimize_closure_busy && c.Context.IsEmpty && !closureBusy.AddItem(c)) >>>>>>> if (optimize_closure_busy && c.Context.IsEmpty && !closureBusy.Add(c)) <<<<<<< ATNConfig checkConfig = configs[j]; if (checkConfig.GetSemanticContext() != SemanticContext.None && !checkConfig.GetSemanticContext ().Equals(config.GetSemanticContext())) ======= ATNConfig checkConfig = configs[j_1]; if (checkConfig.SemanticContext != SemanticContext.None && !checkConfig.SemanticContext .Equals(config.SemanticContext)) >>>>>>> ATNConfig checkConfig = configs[j]; if (checkConfig.SemanticContext != SemanticContext.None && !checkConfig.SemanticContext .Equals(config.SemanticContext))
<<<<<<< public virtual int PredictATN(DFA dfa, ITokenStream input, ParserRuleContext outerContext , bool useContext) { if (outerContext == null) { outerContext = ParserRuleContext.EmptyContext; } int alt = 0; int m = input.Mark(); int index = input.Index; try { SimulatorState state = ComputeStartState(dfa, outerContext, useContext); if (state.s0.isAcceptState) { return ExecDFA(dfa, input, index, state); } else { alt = ExecATN(dfa, input, index, state); } } catch (NoViableAltException) { throw; } finally { input.Seek(index); input.Release(m); } return alt; } public virtual int ExecDFA(DFA dfa, ITokenStream input, int startIndex, SimulatorState state) ======= protected internal virtual int ExecDFA(DFA dfa, ITokenStream input, int startIndex , SimulatorState state) >>>>>>> protected internal virtual int ExecDFA(DFA dfa, ITokenStream input, int startIndex , SimulatorState state) <<<<<<< [return: NotNull] public virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext globalContext , bool useContext) ======= [NotNull] protected internal virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext globalContext, bool useContext) >>>>>>> [return: NotNull] protected internal virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext globalContext, bool useContext) <<<<<<< [return: Nullable] public virtual ATNState GetReachableTarget(ATNConfig source, Transition trans, int ttype) ======= [Nullable] protected internal virtual ATNState GetReachableTarget(ATNConfig source, Transition trans, int ttype) >>>>>>> [return: Nullable] protected internal virtual ATNState GetReachableTarget(ATNConfig source, Transition trans, int ttype) <<<<<<< if (optimize_closure_busy && !closureBusy.Add(config)) { continue; } ======= >>>>>>> <<<<<<< if (!optimize_closure_busy && !closureBusy.Add(config)) { return; } // avoid infinite recursion ======= >>>>>>> <<<<<<< if (optimize_closure_busy && c.Context.IsEmpty && !closureBusy.Add(c)) { continue; } ======= >>>>>>> <<<<<<< if (optimize_closure_busy) { bool checkClosure = false; switch (c.State.StateType) { case StateType.StarLoopEntry: case StateType.BlockEnd: case StateType.LoopEnd: { checkClosure = true; break; } case StateType.PlusBlockStart: { checkClosure = true; break; } case StateType.RuleStop: { checkClosure = c.Context.IsEmpty; break; } default: { break; } } if (checkClosure && !closureBusy.Add(c)) { continue; } } ======= >>>>>>> <<<<<<< [return: Nullable] public virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition t, bool collectPredicates , bool inContext, PredictionContextCache contextCache) ======= [Nullable] protected internal virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition t, bool collectPredicates, bool inContext, PredictionContextCache contextCache ) >>>>>>> [return: Nullable] protected internal virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition t, bool collectPredicates, bool inContext, PredictionContextCache contextCache ) <<<<<<< [return: NotNull] public virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition ======= [NotNull] protected internal virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition >>>>>>> [return: NotNull] protected internal virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition <<<<<<< [return: Nullable] public virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition ======= [Nullable] protected internal virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition >>>>>>> [return: Nullable] protected internal virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition <<<<<<< [return: Nullable] public virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition pt, bool collectPredicates, bool inContext) ======= [Nullable] protected internal virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition pt, bool collectPredicates, bool inContext) >>>>>>> [return: Nullable] protected internal virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition pt, bool collectPredicates, bool inContext) <<<<<<< [return: NotNull] public virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition ======= [NotNull] protected internal virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition >>>>>>> [return: NotNull] protected internal virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition <<<<<<< [return: NotNull] public virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext ======= [NotNull] protected internal virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext >>>>>>> [return: NotNull] protected internal virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext
<<<<<<< [return: NotNull] public virtual BitSet GetRepresentedAlternatives() ======= public virtual BitSet RepresentedAlternatives >>>>>>> [NotNull] public virtual BitSet RepresentedAlternatives <<<<<<< states.Add(c.State); ======= HashSet<ATNState> states = new HashSet<ATNState>(); foreach (ATNConfig c in this.configs) { states.AddItem(c.State); } return states; >>>>>>> HashSet<ATNState> states = new HashSet<ATNState>(); foreach (ATNConfig c in this.configs) { states.Add(c.State); } return states; <<<<<<< List<ATNConfig> sortedConfigs = new List<ATNConfig>(configs); sortedConfigs.Sort(new _IComparer_490()); ======= IList<ATNConfig> sortedConfigs = new List<ATNConfig>(configs); sortedConfigs.Sort(new _IComparer_495()); >>>>>>> List<ATNConfig> sortedConfigs = new List<ATNConfig>(configs); sortedConfigs.Sort(new _IComparer_495());
<<<<<<< [return: NotNull] public string GetTokenName() ======= public string TokenName >>>>>>> [NotNull] public string TokenName <<<<<<< [return: Nullable] public string GetLabel() ======= public string Label >>>>>>> [Nullable] public string Label
<<<<<<< /// <see cref="ATNConfig.Context"/> ======= /// <see cref="ATNConfig#context"/> >>>>>>> /// <see cref="ATNConfig.Context"/> <<<<<<< ATNConfig config = c.Transform(c.State, SemanticContext.None, false); dup.AddItem(config); ======= c = c.Transform(c.State, SemanticContext.None, false); dup.Add(c); >>>>>>> ATNConfig config = c.Transform(c.State, SemanticContext.None, false); dup.Add(c); <<<<<<< /// <see cref="ATNConfig.Alt"/> ======= /// <see cref="ATNConfig.Alt()"/> >>>>>>> /// <see cref="ATNConfig.Alt"/>
<<<<<<< using Antlr4.Runtime.Sharpen; ======= >>>>>>> <<<<<<< /// <see cref="IParseTree.Accept{T}(IParseTreeVisitor{T})">IParseTree.Accept&lt;T&gt;(IParseTreeVisitor&lt;Result&gt;)</see> ======= /// <see cref="IParseTree.Accept{T}(IParseTreeVisitor{Result})"/> >>>>>>> /// <see cref="IParseTree.Accept{T}(IParseTreeVisitor{T})"/> <<<<<<< /// <see cref="AbstractParseTreeVisitor{Result}.ShouldVisitNextChild(IRuleNode, Result)">AbstractParseTreeVisitor&lt;Result&gt;.ShouldVisitNextChild(IRuleNode, object)</see> ======= /// <see cref="AbstractParseTreeVisitor{Result}.ShouldVisitNextChild(IRuleNode, object)"/> >>>>>>> /// <see cref="AbstractParseTreeVisitor{Result}.ShouldVisitNextChild(IRuleNode, Result)"/>
<<<<<<< using Antlr4.Runtime.Sharpen; ======= >>>>>>> <<<<<<< #if COMPACT ======= /// <?/> >>>>>>> #if COMPACT
<<<<<<< return string.Format(CultureInfo.CurrentCulture, "failed predicate: {{{0}}}?", predicate ); ======= return string.Format(CultureInfo.CurrentCulture, "failed predicate: {%s}?", predicate); >>>>>>> return string.Format(CultureInfo.CurrentCulture, "failed predicate: {{{0}}}?", predicate);
<<<<<<< public override string[] ToStrings(IRecognizer recognizer, int currentState ) ======= public override string[] ToStrings<_T0>(Recognizer<_T0> recognizer, int currentState) >>>>>>> public override string[] ToStrings(IRecognizer recognizer, int currentState) <<<<<<< public override string[] ToStrings(IRecognizer recognizer, PredictionContext stop, int currentState) ======= public override string[] ToStrings<_T0>(Recognizer<_T0> recognizer, PredictionContext stop, int currentState) >>>>>>> public override string[] ToStrings(IRecognizer recognizer, PredictionContext stop, int currentState)
<<<<<<< public abstract bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) where ATNInterpreter : ATNSimulator; ======= public abstract bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack); >>>>>>> public abstract bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) where ATNInterpreter : ATNSimulator; <<<<<<< public virtual SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) where ATNInterpreter : ATNSimulator ======= public virtual SemanticContext EvalPrecedence<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack) >>>>>>> public virtual SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) where ATNInterpreter : ATNSimulator <<<<<<< public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) ======= public override bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack) >>>>>>> public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) <<<<<<< public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) ======= public override bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack) >>>>>>> public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) <<<<<<< public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) ======= public override SemanticContext EvalPrecedence<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack) >>>>>>> public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) <<<<<<< public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) ======= public override bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack) >>>>>>> public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) <<<<<<< public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) ======= public override SemanticContext EvalPrecedence<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack) >>>>>>> public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) <<<<<<< public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) ======= public override bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack) >>>>>>> public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) <<<<<<< public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext) ======= public override SemanticContext EvalPrecedence<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack) >>>>>>> public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
<<<<<<< public void StripHiddenConfigs() { EnsureWritable(); List<long> toRemove = new List<long>(); foreach (var pair in mergedConfigs) { if (pair.Value.IsHidden) { toRemove.Add(pair.Key); } } foreach (long key in toRemove) { mergedConfigs.Remove(key); } unmerged.RemoveAll(config => config.IsHidden); configs.RemoveAll(config => config.IsHidden); } ======= >>>>>>> <<<<<<< return this.outermostConfigSet == other.outermostConfigSet && Utils.Equals(conflictingAlts, other.conflictingAlts) && configs.SequenceEqual(other.configs); ======= return this.outermostConfigSet == other.outermostConfigSet && Utils.Equals(conflictInfo, other.conflictInfo) && configs.Equals(other.configs); >>>>>>> return this.outermostConfigSet == other.outermostConfigSet && Utils.Equals(conflictInfo, other.conflictInfo) && configs.SequenceEqual(other.configs); <<<<<<< List<ATNConfig> sortedConfigs = new List<ATNConfig>(configs); sortedConfigs.Sort(new _IComparer_495()); ======= IList<ATNConfig> sortedConfigs = new List<ATNConfig>(configs); sortedConfigs.Sort(new _IComparer_475()); >>>>>>> List<ATNConfig> sortedConfigs = new List<ATNConfig>(configs); sortedConfigs.Sort(new _IComparer_475());
<<<<<<< [return: NotNull] public string GetTag() ======= public string Tag >>>>>>> [NotNull] public string Tag <<<<<<< [return: Nullable] public string GetLabel() ======= public string Label >>>>>>> [Nullable] public string Label
<<<<<<< #if false private static readonly Logger Logger = Logger.GetLogger(typeof(Antlr4.Runtime.Misc.RuleDependencyChecker ).FullName); #endif ======= private static readonly Logger Logger = Logger.GetLogger(typeof(Antlr4.Runtime.Misc.RuleDependencyChecker).FullName); >>>>>>> #if false private static readonly Logger Logger = Logger.GetLogger(typeof(Antlr4.Runtime.Misc.RuleDependencyChecker).FullName); #endif <<<<<<< foreach (KeyValuePair<Type, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> entry in recognizerDependencies) ======= foreach (KeyValuePair<Type, IList<Tuple<RuleDependency, IAnnotatedElement>>> entry in recognizerDependencies.EntrySet()) >>>>>>> foreach (KeyValuePair<Type, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> entry in recognizerDependencies) <<<<<<< private static void CheckDependencies(IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider >> dependencies, Type recognizerType) ======= private static void CheckDependencies<_T0>(IList<Tuple<RuleDependency, IAnnotatedElement>> dependencies, Type<_T0> recognizerType) where _T0 : Recognizer<object, object> >>>>>>> private static void CheckDependencies(IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies, Type recognizerType) <<<<<<< BitSet children = relations.children[dependency.Item1.Rule]; for (int child = children.NextSetBit(0); child >= 0; child = children.NextSetBit( child + 1)) ======= BitSet children = relations.children[dependency.Item1.Rule()]; for (int child = children.NextSetBit(0); child >= 0; child = children.NextSetBit(child + 1)) >>>>>>> BitSet children = relations.children[dependency.Item1.Rule]; for (int child = children.NextSetBit(0); child >= 0; child = children.NextSetBit(child + 1)) <<<<<<< BitSet ancestors = relations.GetAncestors(dependency.Item1.Rule); for (int ancestor = ancestors.NextSetBit(0); ancestor >= 0; ancestor = ancestors. NextSetBit(ancestor + 1)) ======= BitSet ancestors = relations.GetAncestors(dependency.Item1.Rule()); for (int ancestor = ancestors.NextSetBit(0); ancestor >= 0; ancestor = ancestors.NextSetBit(ancestor + 1)) >>>>>>> BitSet ancestors = relations.GetAncestors(dependency.Item1.Rule); for (int ancestor = ancestors.NextSetBit(0); ancestor >= 0; ancestor = ancestors.NextSetBit(ancestor + 1)) <<<<<<< BitSet descendants = relations.GetDescendants(dependency.Item1.Rule); for (int descendant = descendants.NextSetBit(0); descendant >= 0; descendant = descendants .NextSetBit(descendant + 1)) ======= BitSet descendants = relations.GetDescendants(dependency.Item1.Rule()); for (int descendant = descendants.NextSetBit(0); descendant >= 0; descendant = descendants.NextSetBit(descendant + 1)) >>>>>>> BitSet descendants = relations.GetDescendants(dependency.Item1.Rule); for (int descendant = descendants.NextSetBit(0); descendant >= 0; descendant = descendants.NextSetBit(descendant + 1)) <<<<<<< string message = string.Format("Rule dependency version mismatch: {0} has maximum dependency version {1} (expected {2}) in {3}" , ruleNames[dependency.Item1.Rule], highestRequiredDependency, declaredVersion , dependency.Item1.Recognizer.ToString()); errors.AppendLine(dependency.Item2.ToString()); errors.AppendLine(message); ======= string message = string.Format("Rule dependency version mismatch: %s has maximum dependency version %d (expected %d) in %s%n", ruleNames[dependency.Item1.Rule()], highestRequiredDependency, declaredVersion, dependency.Item1.Recognizer().ToString()); errors.Append(message); >>>>>>> string message = string.Format("Rule dependency version mismatch: {0} has maximum dependency version {1} (expected {2}) in {3}", ruleNames[dependency.Item1.Rule], highestRequiredDependency, declaredVersion, dependency.Item1.Recognizer.ToString()); errors.AppendLine(dependency.Item2.ToString()); errors.AppendLine(message); <<<<<<< path = string.Format("rule {0} ({1} of {2})", mismatchedRuleName, relation, ruleName ); ======= path = string.Format("rule %s (%s of %s)", mismatchedRuleName, relation, ruleName); >>>>>>> path = string.Format("rule {0} ({1} of {2})", mismatchedRuleName, relation, ruleName); <<<<<<< string message = string.Format("Rule dependency version mismatch: {0} has version {1} (expected <= {2}) in {3}" , path, actualVersion, declaredVersion, dependency.Item1.Recognizer.ToString ()); errors.AppendLine(dependency.Item2.ToString()); errors.AppendLine(message); ======= string message = string.Format("Rule dependency version mismatch: %s has version %d (expected <= %d) in %s%n", path, actualVersion, declaredVersion, dependency.Item1.Recognizer().ToString()); errors.Append(message); >>>>>>> string message = string.Format("Rule dependency version mismatch: {0} has version {1} (expected <= {2}) in {3}", path, actualVersion, declaredVersion, dependency.Item1.Recognizer.ToString()); errors.AppendLine(dependency.Item2.ToString()); errors.AppendLine(message); <<<<<<< private static int[] GetRuleVersions(Type recognizerClass, string[] ruleNames ) ======= private static int[] GetRuleVersions<_T0>(Type<_T0> recognizerClass, string[] ruleNames) where _T0 : Recognizer<object, object> >>>>>>> private static int[] GetRuleVersions(Type recognizerClass, string[] ruleNames) <<<<<<< #if false Logger.Log(Level.Warning, "Rule index {0} for rule ''{1}'' out of bounds for recognizer {2}." , @params); #endif ======= Logger.Log(Level.Warning, "Rule index {0} for rule ''{1}'' out of bounds for recognizer {2}.", @params); >>>>>>> #if false Logger.Log(Level.Warning, "Rule index {0} for rule ''{1}'' out of bounds for recognizer {2}.", @params); #endif <<<<<<< #if false Logger.Log(Level.Warning, "Could not find rule method for rule ''{0}'' in recognizer {1}." , @params); #endif ======= Logger.Log(Level.Warning, "Could not find rule method for rule ''{0}'' in recognizer {1}.", @params); >>>>>>> #if false Logger.Log(Level.Warning, "Could not find rule method for rule ''{0}'' in recognizer {1}.", @params); #endif <<<<<<< private static MethodInfo GetRuleMethod(Type recognizerClass, string name ) ======= private static MethodInfo GetRuleMethod<_T0>(Type<_T0> recognizerClass, string name) where _T0 : Recognizer<object, object> >>>>>>> private static MethodInfo GetRuleMethod(Type recognizerClass, string name) <<<<<<< foreach (ParameterInfo parameter in method.GetParameters()) GetElementDependencies(AsCustomAttributeProvider(parameter), result); ======= case ElementType.Parameter: { System.Console.Error.WriteLine("Runtime rule dependency checking is not supported for parameters."); break; } } >>>>>>> foreach (ParameterInfo parameter in method.GetParameters()) GetElementDependencies(AsCustomAttributeProvider(parameter), result); <<<<<<< private static RuleDependencyChecker.RuleRelations ExtractRuleRelations(Type recognizer) ======= private static RuleDependencyChecker.RuleRelations ExtractRuleRelations<_T0>(Type<_T0> recognizer) where _T0 : Recognizer<object, object> >>>>>>> private static RuleDependencyChecker.RuleRelations ExtractRuleRelations(Type recognizer) <<<<<<< FieldInfo serializedAtnField = recognizerClass.GetField("_serializedATN", AllDeclaredStaticMembers); if (serializedAtnField != null) return (string)serializedAtnField.GetValue(null); if (recognizerClass.BaseType != null) return GetSerializedATN(recognizerClass.BaseType); return null; ======= try { FieldInfo serializedAtnField = Sharpen.Runtime.GetDeclaredField(recognizerClass, "_serializedATN"); if (Modifier.IsStatic(serializedAtnField.GetModifiers())) { return (string)serializedAtnField.GetValue(null); } return null; } catch (NoSuchFieldException) { if (recognizerClass.BaseType != null) { return GetSerializedATN(recognizerClass.BaseType); } return null; } catch (SecurityException) { return null; } catch (ArgumentException) { return null; } catch (MemberAccessException) { return null; } >>>>>>> FieldInfo serializedAtnField = recognizerClass.GetField("_serializedATN", AllDeclaredStaticMembers); if (serializedAtnField != null) return (string)serializedAtnField.GetValue(null); if (recognizerClass.BaseType != null) return GetSerializedATN(recognizerClass.BaseType); return null;
<<<<<<< public readonly IDictionary<string, TokensStartState> modeNameToStartState = new Dictionary<string, TokensStartState>(); ======= public readonly IDictionary<string, TokensStartState> modeNameToStartState = new LinkedHashMap<string, TokensStartState>(); >>>>>>> public readonly IDictionary<string, TokensStartState> modeNameToStartState = new Dictionary<string, TokensStartState>(); <<<<<<< [return: NotNull] public virtual IntervalSet GetExpectedTokens(int stateNumber, RuleContext context ) ======= [NotNull] public virtual IntervalSet GetExpectedTokens(int stateNumber, RuleContext context) >>>>>>> [return: NotNull] public virtual IntervalSet GetExpectedTokens(int stateNumber, RuleContext context)
<<<<<<< public ParserInterpreter(string grammarFileName, IEnumerable<string> tokenNames, IEnumerable<string> ruleNames, ATN atn, ITokenStream input) ======= [System.ObsoleteAttribute(@"Use ParserInterpreter(string, IVocabulary, System.Collections.Generic.ICollection{E}, Antlr4.Runtime.Atn.ATN, ITokenStream) instead.")] public ParserInterpreter(string grammarFileName, ICollection<string> tokenNames, ICollection<string> ruleNames, ATN atn, ITokenStream input) : this(grammarFileName, Antlr4.Runtime.Vocabulary.FromTokenNames(Sharpen.Collections.ToArray(tokenNames, new string[tokenNames.Count])), ruleNames, atn, input) { } public ParserInterpreter(string grammarFileName, IVocabulary vocabulary, ICollection<string> ruleNames, ATN atn, ITokenStream input) >>>>>>> [System.ObsoleteAttribute(@"Use ParserInterpreter(string, IVocabulary, System.Collections.Generic.ICollection{E}, Antlr4.Runtime.Atn.ATN, ITokenStream) instead.")] public ParserInterpreter(string grammarFileName, IEnumerable<string> tokenNames, IEnumerable<string> ruleNames, ATN atn, ITokenStream input) : this(grammarFileName, Antlr4.Runtime.Vocabulary.FromTokenNames(Sharpen.Collections.ToArray(tokenNames, new string[tokenNames.Count])), ruleNames, atn, input) { } public ParserInterpreter(string grammarFileName, IVocabulary vocabulary, ICollection<string> ruleNames, ATN atn, ITokenStream input) <<<<<<< this.tokenNames = tokenNames.ToArray(); this.ruleNames = ruleNames.ToArray(); ======= this.tokenNames = new string[atn.maxTokenType]; for (int i = 0; i < tokenNames.Length; i++) { tokenNames[i] = vocabulary.GetDisplayName(i); } this.ruleNames = Sharpen.Collections.ToArray(ruleNames, new string[ruleNames.Count]); this.vocabulary = vocabulary; >>>>>>> this.tokenNames = new string[atn.maxTokenType]; for (int i = 0; i < tokenNames.Length; i++) { tokenNames[i] = vocabulary.GetDisplayName(i); } this.ruleNames = ruleNames.ToArray(); this.vocabulary = vocabulary;
<<<<<<< /// <see cref="Antlr4.Runtime.TokenConstants.Eof">Antlr4.Runtime.TokenConstants.Eof</see> /// is added to the result set. ======= /// <see cref="Antlr4.Runtime.IToken.Eof">Antlr4.Runtime.IToken.Eof</see> /// is added to the result set.</p> >>>>>>> /// <see cref="Antlr4.Runtime.TokenConstants.Eof">Antlr4.Runtime.TokenConstants.Eof</see> /// is added to the result set.</p> <<<<<<< /// <see cref="TokenConstants.Eof"/> /// is added to the result set. ======= /// <see cref="Antlr4.Runtime.IToken.Eof">Antlr4.Runtime.IToken.Eof</see> /// is added to the result set.</p> >>>>>>> /// <see cref="TokenConstants.Eof"/> /// is added to the result set.</p>
<<<<<<< #if !PORTABLE System.Console.Error.WriteLine("unknown recognition error type: " + e.GetType().FullName ); #endif ======= System.Console.Error.WriteLine("unknown recognition error type: " + e.GetType().FullName); >>>>>>> #if !PORTABLE System.Console.Error.WriteLine("unknown recognition error type: " + e.GetType().FullName); #endif
<<<<<<< _outerGroupJoinIncludeContext = _groupJoinAsyncEnumerable._outerGroupJoinInclude?.Initialize(_groupJoinAsyncEnumerable._queryContext); _innerGroupJoinIncludeContext = _groupJoinAsyncEnumerable._innerGroupJoinInclude?.Initialize(_groupJoinAsyncEnumerable._queryContext); _outerEntityAccessor = _groupJoinAsyncEnumerable._outerGroupJoinInclude?.EntityAccessor as Func<TOuter, object>; _innerEntityAccessor = _groupJoinAsyncEnumerable._innerGroupJoinInclude?.EntityAccessor as Func<TInner, object>; ======= outerGroupJoinIncludeContext = _groupJoinAsyncEnumerable._outerGroupJoinInclude?.CreateIncludeContext(_groupJoinAsyncEnumerable._queryContext); innerGroupJoinIncludeContext = _groupJoinAsyncEnumerable._innerGroupJoinInclude?.CreateIncludeContext(_groupJoinAsyncEnumerable._queryContext); >>>>>>> _outerGroupJoinIncludeContext = _groupJoinAsyncEnumerable._outerGroupJoinInclude?.CreateIncludeContext(_groupJoinAsyncEnumerable._queryContext); _innerGroupJoinIncludeContext = _groupJoinAsyncEnumerable._innerGroupJoinInclude?.CreateIncludeContext(_groupJoinAsyncEnumerable._queryContext); _outerEntityAccessor = _groupJoinAsyncEnumerable._outerGroupJoinInclude?.EntityAccessor as Func<TOuter, object>; _innerEntityAccessor = _groupJoinAsyncEnumerable._innerGroupJoinInclude?.EntityAccessor as Func<TInner, object>;
<<<<<<< ======= using System.Collections.Generic; using System.Diagnostics; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure.Internal; >>>>>>> <<<<<<< ======= using Microsoft.EntityFrameworkCore.Migrations.Internal; using Microsoft.EntityFrameworkCore.Relational.Tests.TestUtilities; using Microsoft.EntityFrameworkCore.Relational.Tests.TestUtilities.FakeProvider; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; >>>>>>> <<<<<<< using Microsoft.Extensions.DependencyInjection; ======= using Microsoft.EntityFrameworkCore.TestUtilities.FakeProvider; using Microsoft.EntityFrameworkCore.Update; using Moq; >>>>>>> using Microsoft.Extensions.DependencyInjection; <<<<<<< => SqliteTestHelpers.Instance.CreateContextServices() .GetRequiredService<IHistoryRepository>(); ======= { var sqlGenerator = new SqliteSqlGenerationHelper(new RelationalSqlGenerationHelperDependencies()); var typeMapper = new SqliteTypeMapper(new RelationalTypeMapperDependencies()); return new SqliteHistoryRepository( new HistoryRepositoryDependencies( Mock.Of<IRelationalDatabaseCreator>(), Mock.Of<IRawSqlCommandBuilder>(), Mock.Of<IRelationalConnection>(), new DbContextOptions<DbContext>( new Dictionary<Type, IDbContextOptionsExtension> { { typeof(SqliteOptionsExtension), new SqliteOptionsExtension() } }), new MigrationsModelDiffer( typeMapper, new SqliteMigrationsAnnotationProvider(new MigrationsAnnotationProviderDependencies()), new FakeStateManager(), RelationalTestHelpers.Instance.CreateCommandBatchPreparer()), new SqliteMigrationsSqlGenerator( new MigrationsSqlGeneratorDependencies( new RelationalCommandBuilderFactory( new FakeDiagnosticsLogger<DbLoggerCategory.Database.Command>(), typeMapper), new FakeSqlGenerator( new UpdateSqlGeneratorDependencies( new RelationalSqlGenerationHelper( new RelationalSqlGenerationHelperDependencies()), typeMapper)), new SqliteSqlGenerationHelper(new RelationalSqlGenerationHelperDependencies()), typeMapper)), sqlGenerator)); } private class Context : DbContext { } >>>>>>> => SqliteTestHelpers.Instance.CreateContextServices() .GetRequiredService<IHistoryRepository>();
<<<<<<< var result = CreateRelationalDataReader( ======= if (readerColumns != null) { reader = new BufferedDataReader(reader).Initialize(readerColumns); } var result = new RelationalDataReader( >>>>>>> if (readerColumns != null) { reader = new BufferedDataReader(reader).Initialize(readerColumns); } var result = CreateRelationalDataReader( <<<<<<< var result = CreateRelationalDataReader( ======= if (readerColumns != null) { reader = await new BufferedDataReader(reader).InitializeAsync(readerColumns, cancellationToken); } var result = new RelationalDataReader( >>>>>>> if (readerColumns != null) { reader = await new BufferedDataReader(reader).InitializeAsync(readerColumns, cancellationToken); } var result = CreateRelationalDataReader(
<<<<<<< ======= private static readonly MethodInfo _objectEqualsMethodInfo = typeof(object).GetRuntimeMethod(nameof(object.Equals), new[] { typeof(object), typeof(object) }); >>>>>>> private static readonly MethodInfo _objectEqualsMethodInfo = typeof(object).GetRequiredRuntimeMethod(nameof(object.Equals), new[] { typeof(object), typeof(object) }); <<<<<<< private static IDictionary<IProperty, ColumnExpression>? GetPropertyExpressionFromSameTable( ======= private static Expression AddConvertToObject(Expression expression) => expression.Type.IsValueType ? Expression.Convert(expression, typeof(object)) : expression; private static IDictionary<IProperty, ColumnExpression> GetPropertyExpressionFromSameTable( >>>>>>> private static Expression AddConvertToObject(Expression expression) => expression.Type.IsValueType ? Expression.Convert(expression, typeof(object)) : expression; private static IDictionary<IProperty, ColumnExpression>? GetPropertyExpressionFromSameTable(
<<<<<<< ======= public override void Include_reference_collection_order_by_reference_navigation() { } protected override IQueryable<Level1> GetExpectedLevelOne() => ComplexNavigationsData.SplitLevelOnes.AsQueryable(); protected override IQueryable<Level2> GetExpectedLevelTwo() => GetExpectedLevelOne().Select(t => t.OneToOne_Required_PK).Where(t => t != null); protected override IQueryable<Level3> GetExpectedLevelThree() => GetExpectedLevelTwo().Select(t => t.OneToOne_Required_PK).Where(t => t != null); protected override IQueryable<Level4> GetExpectedLevelFour() => GetExpectedLevelThree().Select(t => t.OneToOne_Required_PK).Where(t => t != null); protected override IQueryable<Level2> GetLevelTwo(ComplexNavigationsContext context) => GetLevelOne(context).Select(t => t.OneToOne_Required_PK).Where(t => t != null); protected override IQueryable<Level3> GetLevelThree(ComplexNavigationsContext context) => GetLevelTwo(context).Select(t => t.OneToOne_Required_PK).Where(t => t != null); protected override IQueryable<Level4> GetLevelFour(ComplexNavigationsContext context) => GetLevelThree(context).Select(t => t.OneToOne_Required_PK).Where(t => t != null); >>>>>>> public override void Include_reference_collection_order_by_reference_navigation() { }
<<<<<<< value = ConvertUnderlyingEnumValueToEnum(value); ======= if (!_quirk19128) { value = ConvertUnderlyingEnumValueToEnum(value); } >>>>>>> value = ConvertUnderlyingEnumValueToEnum(value); if (!_quirk19128) { value = ConvertUnderlyingEnumValueToEnum(value); }
<<<<<<< /// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> public static string Format([NotNull] IEnumerable<IProperty> properties) => "{" + string.Join(", ", properties.Select(p => "'" + p.Name + "'")) + "}"; ======= internal static string Format(IEnumerable<IProperty> properties, bool includeTypes = false) => "{" + string.Join(", ", properties.Select(p => "'" + p.Name + "'" + (includeTypes ? " : " + p.ClrType.DisplayName(fullName: false) : ""))) + "}"; >>>>>>> /// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> public static string Format([NotNull] IEnumerable<IProperty> properties, bool includeTypes = false) => "{" + string.Join(", ", properties.Select(p => "'" + p.Name + "'" + (includeTypes ? " : " + p.ClrType.DisplayName(fullName: false) : ""))) + "}";
<<<<<<< public override async Task Generic_Ilist_contains_translates_to_server(bool isAsync) { await base.Generic_Ilist_contains_translates_to_server(isAsync); AssertSql( @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE [c].[City] IN (N'Seattle')"); } ======= public override async Task Project_non_nullable_value_after_FirstOrDefault_on_empty_collection(bool isAsync) { await base.Project_non_nullable_value_after_FirstOrDefault_on_empty_collection(isAsync); AssertSql( @"SELECT ( SELECT TOP(1) CAST(LEN([o].[CustomerID]) AS int) FROM [Orders] AS [o] WHERE ([o].[CustomerID] = N'John Doe') AND [o].[CustomerID] IS NOT NULL) FROM [Customers] AS [c]"); } public override async Task Filter_non_nullable_value_after_FirstOrDefault_on_empty_collection(bool isAsync) { await base.Filter_non_nullable_value_after_FirstOrDefault_on_empty_collection(isAsync); AssertSql( @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE (( SELECT TOP(1) CAST(LEN([o].[CustomerID]) AS int) FROM [Orders] AS [o] WHERE ([o].[CustomerID] = N'John Doe') AND [o].[CustomerID] IS NOT NULL) = 0) AND ( SELECT TOP(1) CAST(LEN([o].[CustomerID]) AS int) FROM [Orders] AS [o] WHERE ([o].[CustomerID] = N'John Doe') AND [o].[CustomerID] IS NOT NULL) IS NOT NULL"); } >>>>>>> public override async Task Generic_Ilist_contains_translates_to_server(bool isAsync) { await base.Generic_Ilist_contains_translates_to_server(isAsync); AssertSql( @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE [c].[City] IN (N'Seattle')"); } public override async Task Project_non_nullable_value_after_FirstOrDefault_on_empty_collection(bool isAsync) { await base.Project_non_nullable_value_after_FirstOrDefault_on_empty_collection(isAsync); AssertSql( @"SELECT ( SELECT TOP(1) CAST(LEN([o].[CustomerID]) AS int) FROM [Orders] AS [o] WHERE ([o].[CustomerID] = N'John Doe') AND [o].[CustomerID] IS NOT NULL) FROM [Customers] AS [c]"); } public override async Task Filter_non_nullable_value_after_FirstOrDefault_on_empty_collection(bool isAsync) { await base.Filter_non_nullable_value_after_FirstOrDefault_on_empty_collection(isAsync); AssertSql( @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE (( SELECT TOP(1) CAST(LEN([o].[CustomerID]) AS int) FROM [Orders] AS [o] WHERE ([o].[CustomerID] = N'John Doe') AND [o].[CustomerID] IS NOT NULL) = 0) AND ( SELECT TOP(1) CAST(LEN([o].[CustomerID]) AS int) FROM [Orders] AS [o] WHERE ([o].[CustomerID] = N'John Doe') AND [o].[CustomerID] IS NOT NULL) IS NOT NULL"); }
<<<<<<< var query = context.Customers .Include(v => v.Orders) .Where(v => v.CustomerID == "MAMRFC") .ToList(); ======= var query = context.Customers .Include(v => v.Orders) .Where(v => v.CustomerID == "MAMRFC") .ToList(); >>>>>>> var query = context.Customers .Include(v => v.Orders) .Where(v => v.CustomerID == "MAMRFC") .ToList(); <<<<<<< Assert.Equal(ConnectionState.Open, context.Database.GetDbConnection().State); } } [Fact] public virtual void From_sql_with_db_parameters_called_multiple_times() { using (var context = CreateContext()) { var parameter = CreateDbParameter("@id", "ALFKI"); var query = context.Customers .FromSql(@"SELECT * FROM ""Customers"" WHERE ""CustomerID"" = @id", parameter); var result1 = query.ToList(); Assert.Equal(1 , result1.Count); // This should not throw exception. var result2 = query.ToList(); Assert.Equal(1, result2.Count); ======= Assert.Equal(ConnectionState.Open, context.Database.GetDbConnection().State); } } [Fact] public virtual void Include_closed_connection_opened_by_it_when_buffering() { using (var context = CreateContext()) { var connection = context.Database.GetDbConnection(); Assert.Equal(ConnectionState.Closed, connection.State); var query = context.Customers .Include(v => v.Orders) .Where(v => v.CustomerID == "ALFKI") .ToList(); Assert.NotEmpty(query); Assert.Equal(ConnectionState.Closed, connection.State); >>>>>>> Assert.Equal(ConnectionState.Open, context.Database.GetDbConnection().State); } } [Fact] public virtual void From_sql_with_db_parameters_called_multiple_times() { using (var context = CreateContext()) { var parameter = CreateDbParameter("@id", "ALFKI"); var query = context.Customers .FromSql(@"SELECT * FROM ""Customers"" WHERE ""CustomerID"" = @id", parameter); var result1 = query.ToList(); Assert.Equal(1, result1.Count); // This should not throw exception. var result2 = query.ToList(); Assert.Equal(1, result2.Count); } } public virtual void Include_closed_connection_opened_by_it_when_buffering() { using (var context = CreateContext()) { var connection = context.Database.GetDbConnection(); Assert.Equal(ConnectionState.Closed, connection.State); var query = context.Customers .Include(v => v.Orders) .Where(v => v.CustomerID == "ALFKI") .ToList(); Assert.NotEmpty(query); Assert.Equal(ConnectionState.Closed, connection.State);
<<<<<<< public virtual bool IsNullable { get; set; } ======= /// <summary> /// Indicates whether or not this column can contain <c>NULL</c> values. /// </summary> public virtual bool IsNullable { get; [param: NotNull] set; } /// <summary> /// The database/store type of the column. /// </summary> >>>>>>> /// <summary> /// Indicates whether or not this column can contain <c>NULL</c> values. /// </summary> public virtual bool IsNullable { get; set; } /// <summary> /// The database/store type of the column. /// </summary>
<<<<<<< using System.Data.SqlClient; ======= using System.Collections.Generic; using System.Diagnostics; >>>>>>> using System.Data.SqlClient; <<<<<<< ======= using Microsoft.EntityFrameworkCore.Infrastructure.Internal; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Migrations.Internal; using Microsoft.EntityFrameworkCore.Relational.Tests.TestUtilities; using Microsoft.EntityFrameworkCore.Relational.Tests.TestUtilities.FakeProvider; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; >>>>>>> <<<<<<< ======= using Microsoft.EntityFrameworkCore.TestUtilities.FakeProvider; using Microsoft.EntityFrameworkCore.Update; using Moq; >>>>>>> <<<<<<< => new DbContext( new DbContextOptionsBuilder() .UseInternalServiceProvider(SqlServerTestHelpers.Instance.CreateServiceProvider()) .UseSqlServer( new SqlConnection("Database=DummyDatabase"), b => b.MigrationsHistoryTable(HistoryRepository.DefaultTableName, schema)) .Options) .GetService<IHistoryRepository>(); ======= { var sqlGenerator = new SqlServerSqlGenerationHelper(new RelationalSqlGenerationHelperDependencies()); var typeMapper = new SqlServerTypeMapper(new RelationalTypeMapperDependencies()); var commandBuilderFactory = new RelationalCommandBuilderFactory( new FakeDiagnosticsLogger<DbLoggerCategory.Database.Command>(), typeMapper); return new SqlServerHistoryRepository( new HistoryRepositoryDependencies( Mock.Of<IRelationalDatabaseCreator>(), Mock.Of<IRawSqlCommandBuilder>(), Mock.Of<ISqlServerConnection>(), new DbContextOptions<DbContext>( new Dictionary<Type, IDbContextOptionsExtension> { { typeof(SqlServerOptionsExtension), new SqlServerOptionsExtension().WithMigrationsHistoryTableSchema(schema) } }), new MigrationsModelDiffer( typeMapper, new SqlServerMigrationsAnnotationProvider(new MigrationsAnnotationProviderDependencies()), new FakeStateManager(), RelationalTestHelpers.Instance.CreateCommandBatchPreparer()), new SqlServerMigrationsSqlGenerator( new MigrationsSqlGeneratorDependencies( commandBuilderFactory, new FakeSqlGenerator( new UpdateSqlGeneratorDependencies( new RelationalSqlGenerationHelper( new RelationalSqlGenerationHelperDependencies()), typeMapper)), new SqlServerSqlGenerationHelper(new RelationalSqlGenerationHelperDependencies()), typeMapper), new SqlServerMigrationsAnnotationProvider(new MigrationsAnnotationProviderDependencies())), sqlGenerator)); } private class Context : DbContext { } >>>>>>> => new DbContext( new DbContextOptionsBuilder() .UseInternalServiceProvider(SqlServerTestHelpers.Instance.CreateServiceProvider()) .UseSqlServer( new SqlConnection("Database=DummyDatabase"), b => b.MigrationsHistoryTable(HistoryRepository.DefaultTableName, schema)) .Options) .GetService<IHistoryRepository>();
<<<<<<< #if (NET451 || DNX451) ======= if (_dependencyContext != null) { var library = _dependencyContext .CompileLibraries .FirstOrDefault(l => l.PackageName.Equals(name, StringComparison.OrdinalIgnoreCase)); if (library != null) { return new BuildReference( library.ResolveReferencePaths().Select(file => MetadataReference.CreateFromFile(file)), copyLocal); } } #if DNX451 >>>>>>> #if (NET451 || DNX451) if (_dependencyContext != null) { var library = _dependencyContext .CompileLibraries .FirstOrDefault(l => l.PackageName.Equals(name, StringComparison.OrdinalIgnoreCase)); if (library != null) { return new BuildReference( library.ResolveReferencePaths().Select(file => MetadataReference.CreateFromFile(file)), copyLocal); } } #if DNX451
<<<<<<< : IPrimaryKeyConvention, IForeignKeyConvention, IForeignKeyRemovedConvention, IModelConvention ======= : IKeyConvention, IPrimaryKeyConvention, IForeignKeyConvention, IForeignKeyRemovedConvention >>>>>>> : IPrimaryKeyConvention, IForeignKeyConvention, IForeignKeyRemovedConvention <<<<<<< private void SetKeyValueGeneration(IReadOnlyList<Property> properties, EntityType entityType) => FindValueGeneratedOnAddProperty(properties, entityType) ?.Builder?.ValueGenerated(ValueGenerated.OnAdd, ConfigurationSource.Convention); /// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> public virtual InternalModelBuilder Apply(InternalModelBuilder modelBuilder) { var messages = GetShadowKeyExceptionMessage( modelBuilder.Metadata, key => key.Properties.Any(p => p.IsShadowProperty && ConfigurationSource.Convention.Overrides(((Property)p).GetConfigurationSource()))); if (messages != null && messages.Any()) { throw new InvalidOperationException(messages.First()); } return modelBuilder; } /// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> public static List<string> GetShadowKeyExceptionMessage([NotNull] IModel model, [NotNull] Func<IKey, bool> keyPredicate) { List<string> messages = null; foreach (var entityType in model.GetEntityTypes()) { foreach (var key in entityType.GetDeclaredKeys()) { if (keyPredicate(key)) { string message; var referencingFk = key.GetReferencingForeignKeys().FirstOrDefault(); if (referencingFk != null) { if (referencingFk.DependentToPrincipal == null && referencingFk.PrincipalToDependent == null) { message = CoreStrings.ReferencedShadowKeyWithoutNavigations( Property.Format(key.Properties), entityType.DisplayName(), Property.Format(referencingFk.Properties), referencingFk.DeclaringEntityType.DisplayName()); } else { message = CoreStrings.ReferencedShadowKey( Property.Format(key.Properties), entityType.DisplayName() + (referencingFk.PrincipalToDependent == null ? "" : "." + referencingFk.PrincipalToDependent.Name), referencingFk.DeclaringEntityType.DisplayName() + (referencingFk.DependentToPrincipal == null ? "" : "." + referencingFk.DependentToPrincipal.Name)); } } else { message = CoreStrings.ShadowKey( Property.Format(key.Properties), entityType.DisplayName(), Property.Format(key.Properties)); } messages = messages ?? new List<string>(); messages.Add(message); } } } return messages; } ======= private void SetIdentity(IReadOnlyList<Property> properties, EntityType entityType) { var candidateIdentityProperty = FindValueGeneratedOnAddProperty(properties, entityType); if (candidateIdentityProperty != null) { var propertyBuilder = candidateIdentityProperty.Builder; propertyBuilder?.ValueGenerated(ValueGenerated.OnAdd, ConfigurationSource.Convention); propertyBuilder?.RequiresValueGenerator(true, ConfigurationSource.Convention); } } >>>>>>> private void SetKeyValueGeneration(IReadOnlyList<Property> properties, EntityType entityType) => FindValueGeneratedOnAddProperty(properties, entityType) ?.Builder?.ValueGenerated(ValueGenerated.OnAdd, ConfigurationSource.Convention);
<<<<<<< public class OptimisticConcurrencySqliteTest : OptimisticConcurrencyRelationalTestBase<F1SqliteFixture> ======= public class OptimisticConcurrencyULongSqliteTest : OptimisticConcurrencySqliteTestBase<F1ULongSqliteFixture, ulong?> { public OptimisticConcurrencyULongSqliteTest(F1ULongSqliteFixture fixture) : base(fixture) { } } public class OptimisticConcurrencySqliteTest : OptimisticConcurrencySqliteTestBase<F1SqliteFixture, byte[]> >>>>>>> public class OptimisticConcurrencyULongSqliteTest : OptimisticConcurrencySqliteTestBase<F1ULongSqliteFixture, ulong?> { public OptimisticConcurrencyULongSqliteTest(F1ULongSqliteFixture fixture) : base(fixture) { } } public class OptimisticConcurrencySqliteTest : OptimisticConcurrencySqliteTestBase<F1SqliteFixture, byte[]> <<<<<<< public override void Property_entry_original_value_is_set() { base.Property_entry_original_value_is_set(); AssertSql( @"SELECT ""e"".""Id"", ""e"".""EngineSupplierId"", ""e"".""Name"", ""e"".""StorageLocation_Latitude"", ""e"".""StorageLocation_Longitude"" FROM ""Engines"" AS ""e"" ORDER BY ""e"".""Id"" LIMIT 1", // @"@p1='1' (DbType = String) @p2='Mercedes' (Size = 8) @p0='FO 108X' (Size = 7) @p3='ChangedEngine' (Size = 13) @p4='47.64491' (Nullable = true) (DbType = String) @p5='-122.128101' (Nullable = true) (DbType = String) UPDATE ""Engines"" SET ""Name"" = @p0 WHERE ""Id"" = @p1 AND ""EngineSupplierId"" = @p2 AND ""Name"" = @p3 AND ""StorageLocation_Latitude"" = @p4 AND ""StorageLocation_Longitude"" = @p5; SELECT changes();"); } // Override failing tests because SQLite does not allow store-generated row versions. // Row version behavior could be imitated on SQLite. See Issue #2195 ======= [ConditionalFact(Skip = "Optimistic Offline Lock #2195")] >>>>>>> public override void Property_entry_original_value_is_set() { base.Property_entry_original_value_is_set(); AssertSql( @"SELECT ""e"".""Id"", ""e"".""EngineSupplierId"", ""e"".""Name"", ""e"".""StorageLocation_Latitude"", ""e"".""StorageLocation_Longitude"" FROM ""Engines"" AS ""e"" ORDER BY ""e"".""Id"" LIMIT 1", // @"@p1='1' (DbType = String) @p2='Mercedes' (Size = 8) @p0='FO 108X' (Size = 7) @p3='ChangedEngine' (Size = 13) @p4='47.64491' (Nullable = true) (DbType = String) @p5='-122.128101' (Nullable = true) (DbType = String) UPDATE ""Engines"" SET ""Name"" = @p0 WHERE ""Id"" = @p1 AND ""EngineSupplierId"" = @p2 AND ""Name"" = @p3 AND ""StorageLocation_Latitude"" = @p4 AND ""StorageLocation_Longitude"" = @p5; SELECT changes();"); } [ConditionalFact(Skip = "Optimistic Offline Lock #2195")]
<<<<<<< [ConditionalFact] public virtual void String_include_multiple_derived_navigation_with_same_name_and_same_type() ======= [ConditionalFact] public virtual void Include_reference_with_groupby_in_subquery() { AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToOne_Optional_FK) .GroupBy(g => g.Name) .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes: new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToOne_Optional_FK, "OneToOne_Optional_FK") }); } [ConditionalFact] public virtual void Include_collection_with_groupby_in_subquery() { AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToMany_Optional) .GroupBy(g => g.Name) .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes: new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToMany_Optional, "OneToMany_Optional") }); } [ConditionalFact] public virtual void Multi_include_with_groupby_in_subquery() { var expectedIncludes = new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToOne_Optional_FK, "OneToOne_Optional_FK"), new ExpectedInclude<Level2>(e => e.OneToMany_Optional, "OneToMany_Optional", "OneToOne_Optional_FK"), }; AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToOne_Optional_FK.OneToMany_Optional) .GroupBy(g => g.Name) .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes); } [ConditionalFact] public virtual void Include_collection_with_groupby_in_subquery_and_filter_before_groupby() { AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToMany_Optional) .Where(l1 => l1.Id > 3) .GroupBy(g => g.Name) .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes: new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToMany_Optional, "OneToMany_Optional") }); } [ConditionalFact] public virtual void Include_collection_with_groupby_in_subquery_and_filter_after_groupby() { AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToMany_Optional) .GroupBy(g => g.Name) .Where(g => g.Key != "Foo") .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes: new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToMany_Optional, "OneToMany_Optional") }); } private static TResult Maybe<TResult>(object caller, Func<TResult> expression) where TResult : class { if (caller == null) { return null; } return expression(); } private static TResult? MaybeScalar<TResult>(object caller, Func<TResult?> expression) where TResult : struct { if (caller == null) { return null; } return expression(); } protected IQueryable<T> ExpectedSet<T>() { if (typeof(T) == typeof(Level1)) { return (IQueryable<T>)GetExpectedLevelOne(); } if (typeof(T) == typeof(Level2)) { return (IQueryable<T>)GetExpectedLevelTwo(); } if (typeof(T) == typeof(Level3)) { return (IQueryable<T>)GetExpectedLevelThree(); } if (typeof(T) == typeof(Level4)) { return (IQueryable<T>)GetExpectedLevelFour(); } throw new NotImplementedException(); } protected virtual IQueryable<Level1> GetExpectedLevelOne() { return ComplexNavigationsData.LevelOnes.AsQueryable(); } protected virtual IQueryable<Level2> GetExpectedLevelTwo() { return ComplexNavigationsData.LevelTwos.AsQueryable(); } protected virtual IQueryable<Level3> GetExpectedLevelThree() { return ComplexNavigationsData.LevelThrees.AsQueryable(); } protected virtual IQueryable<Level4> GetExpectedLevelFour() { return ComplexNavigationsData.LevelFours.AsQueryable(); } protected IQueryable<T> Set<T>(ComplexNavigationsContext context) { if (typeof(T) == typeof(Level1)) { return (IQueryable<T>)GetLevelOne(context); } if (typeof(T) == typeof(Level2)) { return (IQueryable<T>)GetLevelTwo(context); } if (typeof(T) == typeof(Level3)) { return (IQueryable<T>)GetLevelThree(context); } if (typeof(T) == typeof(Level4)) { return (IQueryable<T>)GetLevelFour(context); } throw new NotImplementedException(); } protected virtual IQueryable<Level1> GetLevelOne(ComplexNavigationsContext context) { return context.LevelOne; } protected virtual IQueryable<Level2> GetLevelTwo(ComplexNavigationsContext context) { return context.LevelTwo; } protected virtual IQueryable<Level3> GetLevelThree(ComplexNavigationsContext context) { return context.LevelThree; } protected virtual IQueryable<Level4> GetLevelFour(ComplexNavigationsContext context) { return context.LevelFour; } #region AssertSingleResult private void AssertSingleResult<TItem1, TResult>( Func<IQueryable<TItem1>, TResult> query) where TItem1 : class => AssertSingleResult(query, query); private void AssertSingleResult<TItem1, TResult>( Func<IQueryable<TItem1>, TResult> efQuery, Func<IQueryable<TItem1>, TResult> l2oQuery) where TItem1 : class { using (var context = CreateContext()) { var actual = l2oQuery(ExpectedSet<TItem1>()); var expected = efQuery(Set<TItem1>(context)); Assert.Equal(expected, actual); } } private void AssertSingleResult<TItem1, TItem2, TResult>( Func<IQueryable<TItem1>, IQueryable<TItem2>, TResult> query) where TItem1 : class where TItem2 : class => AssertSingleResult(query, query); private void AssertSingleResult<TItem1, TItem2, TResult>( Func<IQueryable<TItem1>, IQueryable<TItem2>, TResult> efQuery, Func<IQueryable<TItem1>, IQueryable<TItem2>, TResult> l2oQuery) where TItem1 : class where TItem2 : class { using (var context = CreateContext()) { var actual = l2oQuery(ExpectedSet<TItem1>(), ExpectedSet<TItem2>()); var expected = efQuery(Set<TItem1>(context), Set<TItem2>(context)); Assert.Equal(expected, actual); } } #endregion #region AssertQuery private void AssertQuery<TItem1>( Func<IQueryable<TItem1>, IQueryable<object>> query, Func<dynamic, object> elementSorter = null, Action<dynamic, dynamic> elementAsserter = null, bool verifyOrdered = false) where TItem1 : class => AssertQuery(query, query, elementSorter, elementAsserter, verifyOrdered); private void AssertQuery<TItem1>( Func<IQueryable<TItem1>, IQueryable<object>> efQuery, Func<IQueryable<TItem1>, IQueryable<object>> l2oQuery, Func<dynamic, object> elementSorter = null, Action<dynamic, dynamic> elementAsserter = null, bool verifyOrdered = false) where TItem1 : class { using (var context = CreateContext()) { var actual = efQuery(Set<TItem1>(context)).ToArray(); var expected = l2oQuery(ExpectedSet<TItem1>()).ToArray(); TestHelpers.AssertResults( expected, actual, elementSorter ?? (e => e), elementAsserter ?? ((e, a) => Assert.Equal(e, a)), verifyOrdered); } } private void AssertQuery<TItem1, TItem2>( Func<IQueryable<TItem1>, IQueryable<TItem2>, IQueryable<object>> query, Func<dynamic, object> elementSorter = null, Action<dynamic, dynamic> elementAsserter = null, bool verifyOrdered = false) where TItem1 : class where TItem2 : class => AssertQuery(query, query, elementSorter, elementAsserter, verifyOrdered); private void AssertQuery<TItem1, TItem2>( Func<IQueryable<TItem1>, IQueryable<TItem2>, IQueryable<object>> efQuery, Func<IQueryable<TItem1>, IQueryable<TItem2>, IQueryable<object>> l2oQuery, Func<dynamic, object> elementSorter = null, Action<dynamic, dynamic> elementAsserter = null, bool verifyOrdered = false) where TItem1 : class where TItem2 : class >>>>>>> [ConditionalFact] public virtual void Include_reference_with_groupby_in_subquery() { AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToOne_Optional_FK) .GroupBy(g => g.Name) .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes: new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToOne_Optional_FK, "OneToOne_Optional_FK") }); } [ConditionalFact] public virtual void Include_collection_with_groupby_in_subquery() { AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToMany_Optional) .GroupBy(g => g.Name) .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes: new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToMany_Optional, "OneToMany_Optional") }); } [ConditionalFact] public virtual void Multi_include_with_groupby_in_subquery() { var expectedIncludes = new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToOne_Optional_FK, "OneToOne_Optional_FK"), new ExpectedInclude<Level2>(e => e.OneToMany_Optional, "OneToMany_Optional", "OneToOne_Optional_FK"), }; AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToOne_Optional_FK.OneToMany_Optional) .GroupBy(g => g.Name) .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes); } [ConditionalFact] public virtual void Include_collection_with_groupby_in_subquery_and_filter_before_groupby() { AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToMany_Optional) .Where(l1 => l1.Id > 3) .GroupBy(g => g.Name) .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes: new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToMany_Optional, "OneToMany_Optional") }); } [ConditionalFact] public virtual void Include_collection_with_groupby_in_subquery_and_filter_after_groupby() { AssertIncludeQuery<Level1>( l1s => l1s .Include(l1 => l1.OneToMany_Optional) .GroupBy(g => g.Name) .Where(g => g.Key != "Foo") .Select(g => g.OrderBy(e => e.Id).FirstOrDefault()), expectedIncludes: new List<IExpectedInclude> { new ExpectedInclude<Level1>(e => e.OneToMany_Optional, "OneToMany_Optional") }); } public virtual void String_include_multiple_derived_navigation_with_same_name_and_same_type()
<<<<<<< [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task Projecting_Length_of_a_string_property_after_FirstOrDefault_on_correlated_collection(bool async) { return base.Projecting_Length_of_a_string_property_after_FirstOrDefault_on_correlated_collection(async); } public override async Task Projection_take_predicate_projection(bool async) { await base.Projection_take_predicate_projection(async); AssertSql(@"@__p_0='10' SELECT VALUE {""Aggregate"" : ((c[""CustomerID""] || "" "") || c[""City""])} FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND ((c[""CustomerID""] != null) AND ((""A"" != null) AND STARTSWITH(c[""CustomerID""], ""A"")))) ORDER BY c[""CustomerID""] OFFSET 0 LIMIT @__p_0"); } public override async Task Projection_take_projection_doesnt_project_intermittent_column(bool async) { await base.Projection_take_projection_doesnt_project_intermittent_column(async); AssertSql(@"@__p_0='10' SELECT VALUE {""Aggregate"" : ((c[""CustomerID""] || "" "") || c[""City""])} FROM root c WHERE (c[""Discriminator""] = ""Customer"") ORDER BY c[""CustomerID""] OFFSET 0 LIMIT @__p_0"); } public override async Task Projection_skip_projection_doesnt_project_intermittent_column(bool async) { var message = (await Assert.ThrowsAsync<InvalidOperationException>( () => base.Projection_skip_projection_doesnt_project_intermittent_column(async))).Message; Assert.Equal(CosmosStrings.OffsetRequiresLimit, message); } [ConditionalTheory(Skip = "Issue#17246")] public override Task Projection_Distinct_projection_preserves_columns_used_for_distinct_in_subquery(bool async) { return base.Projection_Distinct_projection_preserves_columns_used_for_distinct_in_subquery(async); } [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task Projecting_count_of_navigation_which_is_generic_collection(bool async) { return base.Projecting_count_of_navigation_which_is_generic_collection(async); } [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task Projecting_count_of_navigation_which_is_generic_list(bool async) { return base.Projecting_count_of_navigation_which_is_generic_list(async); } ======= [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task Do_not_erase_projection_mapping_when_adding_single_projection(bool async) { return base.Do_not_erase_projection_mapping_when_adding_single_projection(async); } public override async Task Ternary_in_client_eval_assigns_correct_types(bool async) { await base.Ternary_in_client_eval_assigns_correct_types(async); AssertSql( @"SELECT VALUE {""CustomerID"" : c[""CustomerID""], ""OrderDate"" : c[""OrderDate""], ""c"" : (c[""OrderID""] - 10000)} FROM root c WHERE ((c[""Discriminator""] = ""Order"") AND (c[""OrderID""] < 10300)) ORDER BY c[""OrderID""]"); } >>>>>>> [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task Projecting_Length_of_a_string_property_after_FirstOrDefault_on_correlated_collection(bool async) { return base.Projecting_Length_of_a_string_property_after_FirstOrDefault_on_correlated_collection(async); } public override async Task Projection_take_predicate_projection(bool async) { await base.Projection_take_predicate_projection(async); AssertSql(@"@__p_0='10' SELECT VALUE {""Aggregate"" : ((c[""CustomerID""] || "" "") || c[""City""])} FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND ((c[""CustomerID""] != null) AND ((""A"" != null) AND STARTSWITH(c[""CustomerID""], ""A"")))) ORDER BY c[""CustomerID""] OFFSET 0 LIMIT @__p_0"); } public override async Task Projection_take_projection_doesnt_project_intermittent_column(bool async) { await base.Projection_take_projection_doesnt_project_intermittent_column(async); AssertSql(@"@__p_0='10' SELECT VALUE {""Aggregate"" : ((c[""CustomerID""] || "" "") || c[""City""])} FROM root c WHERE (c[""Discriminator""] = ""Customer"") ORDER BY c[""CustomerID""] OFFSET 0 LIMIT @__p_0"); } public override async Task Projection_skip_projection_doesnt_project_intermittent_column(bool async) { var message = (await Assert.ThrowsAsync<InvalidOperationException>( () => base.Projection_skip_projection_doesnt_project_intermittent_column(async))).Message; Assert.Equal(CosmosStrings.OffsetRequiresLimit, message); } [ConditionalTheory(Skip = "Issue#17246")] public override Task Projection_Distinct_projection_preserves_columns_used_for_distinct_in_subquery(bool async) { return base.Projection_Distinct_projection_preserves_columns_used_for_distinct_in_subquery(async); } [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task Projecting_count_of_navigation_which_is_generic_collection(bool async) { return base.Projecting_count_of_navigation_which_is_generic_collection(async); } [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task Projecting_count_of_navigation_which_is_generic_list(bool async) { return base.Projecting_count_of_navigation_which_is_generic_list(async); } [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task Do_not_erase_projection_mapping_when_adding_single_projection(bool async) { return base.Do_not_erase_projection_mapping_when_adding_single_projection(async); } public override async Task Ternary_in_client_eval_assigns_correct_types(bool async) { await base.Ternary_in_client_eval_assigns_correct_types(async); AssertSql( @"SELECT VALUE {""CustomerID"" : c[""CustomerID""], ""OrderDate"" : c[""OrderDate""], ""c"" : (c[""OrderID""] - 10000)} FROM root c WHERE ((c[""Discriminator""] = ""Order"") AND (c[""OrderID""] < 10300)) ORDER BY c[""OrderID""]"); }
<<<<<<< ReplaceConvention(conventionSet.PropertyFieldChangedConventions, (DatabaseGeneratedAttributeConvention)valueGenerationStrategyConvention); conventionSet.PropertyNullableChangedConventions.Add(sqlServerIndexConvention); conventionSet.PropertyAnnotationSetConventions.Add(sqlServerIndexConvention); ======= >>>>>>> conventionSet.PropertyNullableChangedConventions.Add(sqlServerIndexConvention); conventionSet.PropertyAnnotationSetConventions.Add(sqlServerIndexConvention);
<<<<<<< using Microsoft.EntityFrameworkCore.ValueGeneration; ======= using Microsoft.Extensions.Logging; >>>>>>> using Microsoft.EntityFrameworkCore.ValueGeneration; using Microsoft.Extensions.Logging; <<<<<<< => ((IInfrastructure<InternalModelBuilder>)ModelBuilder).Instance.Validate() == null ? null : this; public virtual string GetDisplayName(Type entityType) => entityType.Name; public virtual ModelBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) => ModelBuilder.UsePropertyAccessMode(propertyAccessMode); ======= { var modelBuilder = ((IInfrastructure<InternalModelBuilder>)ModelBuilder).Instance.Validate(); new LoggingModelValidator(new Logger<LoggingModelValidator>(new LoggerFactory())).Validate(modelBuilder.Metadata); return modelBuilder == null ? null : this; } >>>>>>> { var modelBuilder = ((IInfrastructure<InternalModelBuilder>)ModelBuilder).Instance.Validate(); new LoggingModelValidator(new Logger<LoggingModelValidator>(new LoggerFactory())).Validate(modelBuilder.Metadata); return modelBuilder == null ? null : this; } public virtual string GetDisplayName(Type entityType) => entityType.Name; public virtual ModelBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) => ModelBuilder.UsePropertyAccessMode(propertyAccessMode);
<<<<<<< case Keywords.Cache: CacheMode mode; if (!Enum.TryParse<CacheMode>(value as string, out mode)) { throw new ArgumentException(Strings.FormatInvalidCacheMode(value)); } CacheMode = mode; return; #if NET45 || DNX451 || DNXCORE50 ======= >>>>>>> case Keywords.Cache: CacheMode mode; if (!Enum.TryParse<CacheMode>(value as string, out mode)) { throw new ArgumentException(Strings.FormatInvalidCacheMode(value)); } CacheMode = mode; return;
<<<<<<< using AAEmu.Game.Models.Game.Items; ======= using AAEmu.Game.Models.Game.Units; >>>>>>> using AAEmu.Game.Models.Game.Items; using AAEmu.Game.Models.Game.Units;
<<<<<<< var doc = RapidXamlDocument.Create(snapshot, file, vsa, string.Empty); Cache.Add(file, doc); ======= var doc = RapidXamlDocument.Create(snapshot, file, vsa); lock (CacheLock) { Cache.Add(file, doc); } >>>>>>> var doc = RapidXamlDocument.Create(snapshot, file, vsa, string.Empty); lock (CacheLock) { Cache.Add(file, doc); } <<<<<<< var doc = RapidXamlDocument.Create(snapshot, file, vsa, string.Empty); Cache[file] = doc; ======= var doc = RapidXamlDocument.Create(snapshot, file, vsa); lock (CacheLock) { Cache[file] = doc; } >>>>>>> var doc = RapidXamlDocument.Create(snapshot, file, vsa, string.Empty); lock (CacheLock) { Cache[file] = doc; }
<<<<<<< Mappings = MappingsForStackPanelWithoutHeaders(), AttemptAutomaticDocumentFormatting = true, ======= Mappings = MappingsForUwpStackPanelWithoutHeaders(), General = new GeneralSettings { AttemptAutomaticDocumentFormatting = true, }, >>>>>>> Mappings = MappingsForUwpStackPanelWithoutHeaders(), AttemptAutomaticDocumentFormatting = true, <<<<<<< Mappings = MappingsForStackPanelWithHeader(), AttemptAutomaticDocumentFormatting = true, ======= Mappings = MappingsForUwpStackPanelWithHeader(), General = new GeneralSettings { AttemptAutomaticDocumentFormatting = true, }, >>>>>>> Mappings = MappingsForUwpStackPanelWithHeader(), AttemptAutomaticDocumentFormatting = true, <<<<<<< Mappings = MappingsFor2ColGrid(), AttemptAutomaticDocumentFormatting = true, ======= Mappings = MappingsForUwp2ColGrid(), General = new GeneralSettings { AttemptAutomaticDocumentFormatting = true, }, >>>>>>> Mappings = MappingsForUwp2ColGrid(), AttemptAutomaticDocumentFormatting = true, <<<<<<< Mappings = MappingsForRelativePanelWithHeader(), AttemptAutomaticDocumentFormatting = true, ======= Mappings = MappingsForUwpRelativePanelWithHeader(), General = new GeneralSettings { AttemptAutomaticDocumentFormatting = true, }, >>>>>>> Mappings = MappingsForUwpRelativePanelWithHeader(), AttemptAutomaticDocumentFormatting = true, <<<<<<< Mappings = MappingsForStackPanelWithHeader(), AttemptAutomaticDocumentFormatting = true, ======= Mappings = MappingsForUwpStackPanelWithHeader(), General = new GeneralSettings { AttemptAutomaticDocumentFormatting = true, }, >>>>>>> Mappings = MappingsForUwpStackPanelWithHeader(), AttemptAutomaticDocumentFormatting = true, <<<<<<< Mappings = MappingsForStackPanelWithHeader(), AttemptAutomaticDocumentFormatting = true, ======= Mappings = MappingsForUwpStackPanelWithHeader(), General = new GeneralSettings { AttemptAutomaticDocumentFormatting = true, }, >>>>>>> Mappings = MappingsForUwpStackPanelWithHeader(), AttemptAutomaticDocumentFormatting = true, <<<<<<< FallbackOutput = "<TextBlock Text=\"{x:Bind ViewModel.$name$}\" />", SubPropertyOutput = "<TextBlock Text=\"{x:Bind $name$, Mode=OneWay}\" />", EnumMemberOutput = "<RadioButton Content=\"$element$\" GroupName=\"$enumname$\" />", Mappings = MappingsForStackPanelWithHeader(), AttemptAutomaticDocumentFormatting = true, }, new Profile { Name = "Xamarin.Forms StackLayout (XAML + C#)", ClassGrouping = "StackLayout", FallbackOutput = "<Label Text=\"{Binding $name$}\" />", SubPropertyOutput = "<Label Text=\"{Binding $name$}\" />", EnumMemberOutput = "<x:String>$elementwithspaces$</x:String>", Mappings = MappingsForStackLayout(), AttemptAutomaticDocumentFormatting = true, ======= FallbackOutput = "<TextBlock Text=\"{Binding Path=$name$}\" />", SubPropertyOutput = "<TextBox Text=\"{Binding Path=$name$, Mode=TwoWay}\" />", EnumMemberOutput = "<ComboBoxItem>$element$</ComboBoxItem>", Mappings = MappingsForWpfStackPanel(), General = new GeneralSettings { AttemptAutomaticDocumentFormatting = true, }, >>>>>>> FallbackOutput = "<TextBlock Text=\"{Binding Path=$name$}\" />", SubPropertyOutput = "<TextBox Text=\"{Binding Path=$name$, Mode=TwoWay}\" />", EnumMemberOutput = "<ComboBoxItem>$element$</ComboBoxItem>", Mappings = MappingsForWpfStackPanel(), AttemptAutomaticDocumentFormatting = true,
<<<<<<< internal override Entity InnerSimplify() => Var.InnerSimplified is Variable var ? SequentialIntegrating(Expression.InnerSimplified, var, Iterations) : this; ======= protected override Entity InnerSimplify() => Var.InnerSimplified is Variable ? Iterations == 0 ? Expression.InnerSimplified : throw FutureReleaseException.Raised("Integration is not implemented yet", "1.2.3") : this; >>>>>>> protected override Entity InnerSimplify() => Var.InnerSimplified is Variable var ? SequentialIntegrating(Expression.InnerSimplified, var, Iterations) : this;
<<<<<<< public bool CanEditBlog { get { return currentBlog != null; } } public bool CanRemoveBlog { get { return currentBlog != null; } } public BlogSetting CurrentBlog { get { return currentBlog; } set { currentBlog = value; NotifyOfPropertyChange(() => CanEditBlog); NotifyOfPropertyChange(() => CanRemoveBlog); } } ======= public bool EnableMarkdownExtra { get; set; } >>>>>>> public bool EnableMarkdownExtra { get; set; } public bool CanEditBlog { get { return currentBlog != null; } } public bool CanRemoveBlog { get { return currentBlog != null; } } public BlogSetting CurrentBlog { get { return currentBlog; } set { currentBlog = value; NotifyOfPropertyChange(() => CanEditBlog); NotifyOfPropertyChange(() => CanRemoveBlog); } } <<<<<<< UpdateMarkpadSettings(); ======= var settings = settingsService.GetSettings<MarkPadSettings>(); settings.FontSize = SelectedFontSize; settings.FontFamily = SelectedFontFamily.Source; settings.FloatingToolBarEnabled = EnableFloatingToolBar; settings.IndentType = IndentType; settings.Language = SelectedLanguage; settings.MarkdownExtraEnabled = EnableMarkdownExtra; settingsService.SaveSettings(settings); >>>>>>> UpdateMarkpadSettings(); settings.MarkdownExtraEnabled = EnableMarkdownExtra;
<<<<<<< void TextView_VisualLinesChanged(object sender, EventArgs e) { DoSpellCheck(); } ======= void DocumentViewSizeChanged(object sender, SizeChangedEventArgs e) { // Hide web browser when the window is too small for it to make much sense if (e.NewSize.Width <= 350) { webBrowserColumn.MaxWidth = 0; } else { webBrowserColumn.MaxWidth = double.MaxValue; } } >>>>>>> void TextView_VisualLinesChanged(object sender, EventArgs e) { DoSpellCheck(); } void DocumentViewSizeChanged(object sender, SizeChangedEventArgs e) { // Hide web browser when the window is too small for it to make much sense if (e.NewSize.Width <= 350) { webBrowserColumn.MaxWidth = 0; } else { webBrowserColumn.MaxWidth = double.MaxValue; } }
<<<<<<< public DocumentViewModel(IDialogService dialogService, IWindowManager windowManager, ISiteContextGenerator siteContextGenerator, Func<string, IMetaWeblogService> getMetaWeblog, ISettingsProvider settingsProvider) ======= readonly Regex wordCountRegex = new Regex(@"[\S]+", RegexOptions.Compiled); public DocumentViewModel(IDialogService dialogService, IWindowManager windowManager, ISiteContextGenerator siteContextGenerator, Func<string, IMetaWeblogService> getMetaWeblog) >>>>>>> readonly Regex wordCountRegex = new Regex(@"[\S]+", RegexOptions.Compiled); public DocumentViewModel(IDialogService dialogService, IWindowManager windowManager, ISiteContextGenerator siteContextGenerator, Func<string, IMetaWeblogService> getMetaWeblog, ISettingsProvider settingsProvider) <<<<<<< public double FontSize { get; private set; } public double ZoomLevel { get { return zoomLevel; } set { zoomLevel = value; FontSize = GetFontSize()*value; } } public double MaxZoom { get { return 2; } } public double MinZoom { get { return 0.5; } } /// <summary> /// Get the font size that was set in the settings. /// </summary> /// <returns>Font size.</returns> private int GetFontSize() { return Constants.FONT_SIZE_ENUM_ADJUSTMENT + (int)settingsProvider.GetSettings<MarkPadSettings>().FontSize; } public void ZoomIn() { AdjustZoom(ZoomDelta); } public void ZoomOut() { AdjustZoom(-ZoomDelta); } private void AdjustZoom(double delta) { var newZoom = ZoomLevel + delta; if (newZoom < MinZoom) { //Don't cause a change if we don't have to if (Math.Abs(ZoomLevel - MinZoom) < 0.1) return; newZoom = MinZoom; } if (newZoom > MaxZoom) { //Don't cause a change if we don't have to if (Math.Abs(ZoomLevel - MaxZoom) < 0.1)return; newZoom = MaxZoom; } ZoomLevel = newZoom; } public void ZoomReset() { ZoomLevel = 1; } ======= public int WordCount { get; private set; } >>>>>>> public int WordCount { get; private set; } public double FontSize { get; private set; } public double ZoomLevel { get { return zoomLevel; } set { zoomLevel = value; FontSize = GetFontSize()*value; } } public double MaxZoom { get { return 2; } } public double MinZoom { get { return 0.5; } } /// <summary> /// Get the font size that was set in the settings. /// </summary> /// <returns>Font size.</returns> private int GetFontSize() { return Constants.FONT_SIZE_ENUM_ADJUSTMENT + (int)settingsProvider.GetSettings<MarkPadSettings>().FontSize; } public void ZoomIn() { AdjustZoom(ZoomDelta); } public void ZoomOut() { AdjustZoom(-ZoomDelta); } private void AdjustZoom(double delta) { var newZoom = ZoomLevel + delta; if (newZoom < MinZoom) { //Don't cause a change if we don't have to if (Math.Abs(ZoomLevel - MinZoom) < 0.1) return; newZoom = MinZoom; } if (newZoom > MaxZoom) { //Don't cause a change if we don't have to if (Math.Abs(ZoomLevel - MaxZoom) < 0.1)return; newZoom = MaxZoom; } ZoomLevel = newZoom; } public void ZoomReset() { ZoomLevel = 1; }
<<<<<<< using Ookii.Dialogs.Wpf; ======= using MarkPad.Updater; >>>>>>> using Ookii.Dialogs.Wpf; using MarkPad.Updater; <<<<<<< SettingsViewModel settingsCreator, ======= UpdaterViewModel updaterViewModel, >>>>>>> SettingsViewModel settingsCreator, UpdaterViewModel updaterViewModel, <<<<<<< Settings = settingsCreator; InitialiseDefaultSettings(); ======= InitialiseDefaultSettings(); >>>>>>> Settings = settingsCreator; InitialiseDefaultSettings(); <<<<<<< public SettingsViewModel Settings { get; private set; } ======= public UpdaterViewModel Updater { get; set; } >>>>>>> public SettingsViewModel Settings { get; private set; } public UpdaterViewModel Updater { get; set; }
<<<<<<< using MarkPad.Updater; using Ookii.Dialogs.Wpf; using System.Linq; using wyDay.Controls; ======= >>>>>>> using MarkPad.Updater;
<<<<<<< using MarkPad.Events; ======= using MarkPad.Framework.Events; >>>>>>> using MarkPad.Events; using MarkPad.Framework.Events; <<<<<<< internal class ShellViewModel : Conductor<IScreen>, IHandle<FileOpenEvent> ======= internal class ShellViewModel : Conductor<IScreen>, IHandle<AppStartedEvent> >>>>>>> internal class ShellViewModel : Conductor<IScreen>, IHandle<FileOpenEvent>, IHandle<AppStartedEvent> <<<<<<< public ShellViewModel(IEventAggregator eventAggregator, IDialogService dialogService, MDIViewModel mdi, Func<DocumentViewModel> documentCreator) ======= public ShellViewModel( IDialogService dialogService, IWindowManager windowService, MDIViewModel mdi, Func<DocumentViewModel> documentCreator, Func<SettingsViewModel> settingsCreator) >>>>>>> public ShellViewModel( IDialogService dialogService, IWindowManager windowService, IEventAggregator eventAggregator, MDIViewModel mdi, Func<DocumentViewModel> documentCreator, Func<SettingsViewModel> settingsCreator) <<<<<<< var path = dialogService.GetFileOpenPath("OpenFileCommand a markdown document.", "Any File (*.*)|*.*"); ======= var path = dialogService.GetFileOpenPath("Open a markdown document.", "Markdown Document (*.md)|*.md|Any File (*.*)|*.*"); >>>>>>> var path = dialogService.GetFileOpenPath("Open a markdown document.", "Markdown Document (*.md)|*.md|Any File (*.*)|*.*"); <<<<<<< eventAggregator.Publish(new FileOpenEvent(path)); ======= OpenDocument(path); } public void OpenDocument(string path) { JumpList.AddToRecentCategory(path); var doc = documentCreator(); doc.Open(path); MDI.Open(doc); >>>>>>> eventAggregator.Publish(new FileOpenEvent(path)); } public void OpenDocument(string path) { var doc = documentCreator(); doc.Open(path); MDI.Open(doc); <<<<<<< public void Handle(FileOpenEvent message) { var doc = documentCreator(); doc.Open(message.Path); MDI.Open(doc); } ======= public void ShowSettings() { windowService.ShowDialog(settingsCreator()); } public void Handle(AppStartedEvent message) { if (message.Args.Length == 1) { if (File.Exists(message.Args[0]) && Path.GetExtension(message.Args[0]) == ".md") OpenDocument(message.Args[0]); } } >>>>>>> public void Handle(FileOpenEvent message) { OpenDocument(message.Path); } public void Handle(AppStartedEvent message) { if (message.Args.Length == 1) { if (File.Exists(message.Args[0]) && Path.GetExtension(message.Args[0]) == ".md") OpenDocument(message.Args[0]); } } public void ShowSettings() { windowService.ShowDialog(settingsCreator()); }
<<<<<<< #region public bool FloatingToolbarEnabled ======= public static readonly DependencyProperty DocumentProperty = DependencyProperty.Register("Document", typeof(TextDocument), typeof(MarkdownEditor), new PropertyMetadata(default(TextDocument))); public TextDocument Document { get { return (TextDocument)GetValue(DocumentProperty); } set { SetValue(DocumentProperty, value); } } >>>>>>> public static readonly DependencyProperty DocumentProperty = DependencyProperty.Register("Document", typeof(TextDocument), typeof(MarkdownEditor), new PropertyMetadata(default(TextDocument))); public TextDocument Document { get { return (TextDocument)GetValue(DocumentProperty); } set { SetValue(DocumentProperty, value); } } #region public bool FloatingToolbarEnabled
<<<<<<< public bool EnableSpellCheck { get; set; } ======= public bool EnableFloatingToolBar { get; set; } >>>>>>> public bool EnableFloatingToolBar { get; set; } public bool EnableSpellCheck { get; set; } <<<<<<< EnableSpellCheck = settings.SpellCheckEnabled; ======= EnableFloatingToolBar = settings.FloatingToolBarEnabled; >>>>>>> EnableFloatingToolBar = settings.FloatingToolBarEnabled; EnableSpellCheck = settings.SpellCheckEnabled; <<<<<<< settings.SpellCheckEnabled = EnableSpellCheck; ======= settings.FloatingToolBarEnabled = EnableFloatingToolBar; >>>>>>> settings.FloatingToolBarEnabled = EnableFloatingToolBar; settings.SpellCheckEnabled = EnableSpellCheck;
<<<<<<< private readonly IWindowManager _windowManager; private readonly ISettingsService _settingsService; ======= private readonly IWindowManager windowService; >>>>>>> private readonly IWindowManager _windowManager; private readonly ISettingsService _settingsService; <<<<<<< public ShellViewModel(IDialogService dialogService, MDIViewModel mdi, IWindowManager windowManager, ISettingsService settingsService, Func<DocumentViewModel> documentCreator) ======= public ShellViewModel( IDialogService dialogService, IWindowManager windowService, IEventAggregator eventAggregator, MDIViewModel mdi, Func<DocumentViewModel> documentCreator, Func<SettingsViewModel> settingsCreator) >>>>>>> public ShellViewModel( IDialogService dialogService, IWindowManager windowManager, IEventAggregator eventAggregator, MDIViewModel mdi, Func<DocumentViewModel> documentCreator, Func<SettingsViewModel> settingsCreator) <<<<<<< _windowManager = windowManager; _settingsService = settingsService; this.MDI = mdi; ======= this.windowService = windowService; MDI = mdi; >>>>>>> _windowManager = windowManager; _settingsService = settingsService; this.MDI = mdi; <<<<<<< public override void CanClose(Action<bool> callback) { base.CanClose(callback); _settingsService.Save(); } public void Exit() { this.TryClose(); } ======= >>>>>>> public override void CanClose(Action<bool> callback) { base.CanClose(callback); _settingsService.Save(); } public void Exit() { this.TryClose(); } <<<<<<< public void Publish() { if (string.IsNullOrEmpty(_settingsService.Get<string>("BlogUrl"))) { var result =_windowManager.ShowDialog(new PublishViewModel(_settingsService)); if (result != true) return; } var doc = MDI.ActiveItem as DocumentViewModel; if (doc != null) { var pd = new Details {Title = doc.Post.title, Categories = doc.Post.categories }; var detailsResult = _windowManager.ShowDialog(new PublishDetailsViewModel(pd)); if (detailsResult != true) return; doc.Publish(pd.Title, pd.Categories); } } public void OpenFromWeb() { var result = _windowManager.ShowDialog(new OpenFromWebViewModel(_settingsService)); if (result != true) return; var post = _settingsService.Get<Post>("CurrentPost"); var doc = documentCreator(); doc.OpenFromWeb(post); MDI.Open(doc); } ======= public void Handle(FileOpenEvent message) { OpenDocument(message.Path); } public void ShowSettings() { windowService.ShowDialog(settingsCreator()); } public void PrintDocument() { var doc = MDI.ActiveItem as DocumentViewModel; if (doc != null) { doc.Print(); } } >>>>>>> public void Handle(FileOpenEvent message) { OpenDocument(message.Path); } public void ShowSettings() { windowService.ShowDialog(settingsCreator()); } public void PrintDocument() { var doc = MDI.ActiveItem as DocumentViewModel; if (doc != null) { doc.Print(); } } public void Publish() { if (string.IsNullOrEmpty(_settingsService.Get<string>("BlogUrl"))) { var result =_windowManager.ShowDialog(new PublishViewModel(_settingsService)); if (result != true) return; } var doc = MDI.ActiveItem as DocumentViewModel; if (doc != null) { var pd = new Details {Title = doc.Post.title, Categories = doc.Post.categories }; var detailsResult = _windowManager.ShowDialog(new PublishDetailsViewModel(pd)); if (detailsResult != true) return; doc.Publish(pd.Title, pd.Categories); } } public void OpenFromWeb() { var result = _windowManager.ShowDialog(new OpenFromWebViewModel(_settingsService)); if (result != true) return; var post = _settingsService.Get<Post>("CurrentPost"); var doc = documentCreator(); doc.OpenFromWeb(post); MDI.Open(doc); }
<<<<<<< using wyDay.Controls; ======= using System.Linq; >>>>>>> using System.Linq; using wyDay.Controls; <<<<<<< ======= InitialiseDefaultSettings(); >>>>>>> InitialiseDefaultSettings(); <<<<<<< foreach (var fn in filenames) eventAggregator.Publish(new FileOpenEvent(fn)); ======= foreach (var fn in filenames) { DocumentViewModel openedDoc = GetOpenedDocument(fn); if (openedDoc != null) MDI.ActivateItem(openedDoc); else eventAggregator.Publish(new FileOpenEvent(fn)); } >>>>>>> foreach (var fn in filenames) { DocumentViewModel openedDoc = GetOpenedDocument(fn); if (openedDoc != null) MDI.ActivateItem(openedDoc); else eventAggregator.Publish(new FileOpenEvent(fn)); } <<<<<<< var setupBlog = dialogService.ShowConfirmation("No blogs setup", "Do you want to setup a blog?", "", new ButtonExtras(ButtonType.Yes, "Yes", "Setup a blog"), new ButtonExtras(ButtonType.No, "No", "Don't setup a blog now")); ======= var setupBlog = dialogService.ShowConfirmation( "Open from web", "Do you want to configure a blog site?", "No blog sites have been configured. To open a document from the web, MarkPad first needs to be integrated with a blog site."); >>>>>>> var setupBlog = dialogService.ShowConfirmation( "Open from web", "Do you want to configure a blog site?", "No blog sites have been configured. To open a document from the web, MarkPad first needs to be integrated with a blog site.");
<<<<<<< using System; using System.IO; using System.Text.RegularExpressions; ======= using System; using System.IO; using System.Windows.Threading; >>>>>>> using System; using System.IO; using System.Windows.Threading; using System.Text.RegularExpressions; <<<<<<< using MarkdownSharp; using MarkPad.Metaweblog; ======= >>>>>>> using MarkPad.Metaweblog; <<<<<<< private readonly ISettingsService _settings; ======= >>>>>>> private readonly ISettingsService _settings; <<<<<<< private Post _post; ======= private readonly TimeSpan delay = TimeSpan.FromSeconds(0.5); private readonly DispatcherTimer timer; >>>>>>> private readonly TimeSpan delay = TimeSpan.FromSeconds(0.5); private readonly DispatcherTimer timer; private Post _post; <<<<<<< _settings = settings; ======= >>>>>>> _settings = settings; <<<<<<< _post = new Post(); ======= timer = new DispatcherTimer(); timer.Tick += TimerTick; timer.Interval = delay; } private void TimerTick(object sender, EventArgs e) { timer.Stop(); NotifyOfPropertyChange(() => Render); >>>>>>> _post = new Post(); timer = new DispatcherTimer(); timer.Tick += TimerTick; timer.Interval = delay; } private void TimerTick(object sender, EventArgs e) { timer.Stop(); NotifyOfPropertyChange(() => Render); <<<<<<< public void Publish(string postTitle, string[] categories) { if (categories == null) categories = new string[0]; var proxy = XmlRpcProxyGen.Create<IMetaWeblog>(); ((IXmlRpcProxy)proxy).Url = _settings.Get<string>("BlogUrl"); var post = new Post(); var permalink = this.DisplayName.Split('.')[0]; if (!string.IsNullOrWhiteSpace(_post.permalink)) { post = proxy.GetPost(_post.postid.ToString(), _settings.Get<string>("Username"), _settings.Get<string>("Password")); } if (string.IsNullOrWhiteSpace(post.permalink)) { post = new Post { permalink = permalink, title = postTitle, dateCreated = DateTime.Now, description = Render, categories = categories }; post.postid = proxy.AddPost("0", _settings.Get<string>("Username"), _settings.Get<string>("Password"), post, true); _settings.Set(post.permalink, post); _settings.Save(); } else { post.title = postTitle; post.description = Render; post.categories = categories; proxy.UpdatePost(post.postid.ToString(), _settings.Get<string>("Username"), _settings.Get<string>("Password"), post, true); _settings.Set(post.permalink, post); _settings.Save(); } Original = Document.Text; } ======= public void Print() { var view = this.GetView() as DocumentView; if (view != null) { view.wb.Print(); } } >>>>>>> public void Print() { var view = this.GetView() as DocumentView; if (view != null) { view.wb.Print(); } } public void Publish(string postTitle, string[] categories) { if (categories == null) categories = new string[0]; var proxy = XmlRpcProxyGen.Create<IMetaWeblog>(); ((IXmlRpcProxy)proxy).Url = _settings.Get<string>("BlogUrl"); var post = new Post(); var permalink = this.DisplayName.Split('.')[0]; if (!string.IsNullOrWhiteSpace(_post.permalink)) { post = proxy.GetPost(_post.postid.ToString(), _settings.Get<string>("Username"), _settings.Get<string>("Password")); } if (string.IsNullOrWhiteSpace(post.permalink)) { post = new Post { permalink = permalink, title = postTitle, dateCreated = DateTime.Now, description = Render, categories = categories }; post.postid = proxy.AddPost("0", _settings.Get<string>("Username"), _settings.Get<string>("Password"), post, true); _settings.Set(post.permalink, post); _settings.Save(); } else { post.title = postTitle; post.description = Render; post.categories = categories; proxy.UpdatePost(post.postid.ToString(), _settings.Get<string>("Username"), _settings.Get<string>("Password"), post, true); _settings.Set(post.permalink, post); _settings.Save(); } Original = Document.Text; }