conflict_resolution
stringlengths
27
16k
<<<<<<< [assembly: Guid("f2fac76e-0d80-4099-a64f-2686d4d99b6b")] ======= [assembly: Guid("f2fac76e-0d80-4099-a64f-2686d4d99b6b")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.2.1.0")] [assembly: AssemblyFileVersion("1.2.1.0")] >>>>>>> [assembly: Guid("f2fac76e-0d80-4099-a64f-2686d4d99b6b")] [assembly: AssemblyVersion("1.2.1.0")] [assembly: AssemblyFileVersion("1.2.1.0")]
<<<<<<< private ContentControl _popupContentControl; private DialogSession _session; ======= >>>>>>> private ContentControl _popupContentControl; private DialogSession _session;
<<<<<<< ======= if (newValue) { var popupOpenedEventArgs = new RoutedEventArgs() { RoutedEvent = OnPopupOpenedEvent, Source = popupBox }; popupBox.RaiseEvent(popupOpenedEventArgs); } else { var popupClosedEventArgs = new RoutedEventArgs() { RoutedEvent = OnPopupClosedEvent, Source = popupBox }; popupBox.RaiseEvent(popupClosedEventArgs); } >>>>>>> if (newValue) { var popupOpenedEventArgs = new RoutedEventArgs() { RoutedEvent = OnPopupOpenedEvent, Source = popupBox }; popupBox.RaiseEvent(popupOpenedEventArgs); } else { var popupClosedEventArgs = new RoutedEventArgs() { RoutedEvent = OnPopupClosedEvent, Source = popupBox }; popupBox.RaiseEvent(popupClosedEventArgs); }
<<<<<<< var hitPositionArg = new OutputArgument(); var hitSomethingArg = new OutputArgument(); var entityHandleArg = new OutputArgument(); var surfaceNormalArg = new OutputArgument(); Result = Function.Call<int>(Hash.GET_SHAPE_TEST_RESULT, handle, hitSomethingArg, hitPositionArg, surfaceNormalArg, entityHandleArg); ======= NativeVector3 hitPositionArg; bool hitSomethingArg; int entityHandleArg; NativeVector3 surfaceNormalArg; unsafe { Result = Function.Call<int>(Hash._GET_RAYCAST_RESULT, handle, &hitSomethingArg, &hitPositionArg, &surfaceNormalArg, &entityHandleArg); } >>>>>>> NativeVector3 hitPositionArg; bool hitSomethingArg; int entityHandleArg; NativeVector3 surfaceNormalArg; unsafe { Result = Function.Call<int>(Hash.GET_SHAPE_TEST_RESULT, handle, &hitSomethingArg, &hitPositionArg, &surfaceNormalArg, &entityHandleArg); }
<<<<<<< useWindowsLineEnding = false; ======= tabSize = 4; useTabbedBackspace = true; >>>>>>> useWindowsLineEnding = false; tabSize = 0; <<<<<<< useWindowsLineEnding = EditorPrefs.GetBool("MerinoUseWindowsLinesEnding", useWindowsLineEnding ); ======= tabSize = EditorPrefs.GetInt("MerinoTabSize", tabSize); useTabbedBackspace = EditorPrefs.GetBool("MerinoTabbedBackspace", useTabbedBackspace ); >>>>>>> useWindowsLineEnding = EditorPrefs.GetBool("MerinoUseWindowsLinesEnding", useWindowsLineEnding ); tabSize = EditorPrefs.GetInt("MerinoTabSize", tabSize); <<<<<<< EditorPrefs.SetBool("MerinoWindowsLineEnding", useWindowsLineEnding ); ======= EditorPrefs.SetInt("MerinoTabSize", tabSize ); EditorPrefs.SetBool("MerinoTabbedBackspace", useTabbedBackspace ); >>>>>>> EditorPrefs.SetBool("MerinoWindowsLineEnding", useWindowsLineEnding ); EditorPrefs.SetInt("MerinoTabSize", tabSize );
<<<<<<< [Fact] public void ShouldGetCorrectSqlQueryForWhereIn() ======= [Test] public void ShouldGetCorrectSqlQueryForWhereInUsingWhereString() >>>>>>> [Fact] public void ShouldGetCorrectSqlQueryForWhereInUsingWhereString() <<<<<<< [Fact] ======= [Test] public void ShouldGetCorrectSqlQueryForWhereInUsingWhereArray() { const string expectedSql = "SELECT * FROM dbo.[Project] WHERE ([State] IN (@queued, @running)) ORDER BY [Id]"; var queryBuilder = new QueryBuilder<IDocument>(transaction, "Project") .Where("State", SqlOperand.In, new[] {State.Queued, State.Running }); queryBuilder.DebugViewRawQuery().Should().Be(expectedSql); } [Test] >>>>>>> [Fact] public void ShouldGetCorrectSqlQueryForWhereInUsingWhereArray() { const string expectedSql = "SELECT * FROM dbo.[Project] WHERE ([State] IN (@queued, @running)) ORDER BY [Id]"; var queryBuilder = new QueryBuilder<IDocument>(transaction, "Project") .Where("State", SqlOperand.In, new[] {State.Queued, State.Running }); queryBuilder.DebugViewRawQuery().Should().Be(expectedSql); } [Fact]
<<<<<<< public IBLFilterGGX(RenderPipelineResources renderPipelinesResources) ======= public bool supportMis { get { return !TextureCache.isMobileBuildTarget; } } public IBLFilterGGX(RenderPipelineResources renderPipelineResources) >>>>>>> public IBLFilterGGX(RenderPipelineResources renderPipelineResources)
<<<<<<< [assembly: InternalsVisibleTo("Unity.RenderPipelines.Universal.Editor")] ======= [assembly: InternalsVisibleTo("Unity.ShaderGraph.GraphicsTests")] [assembly: InternalsVisibleTo("Unity.ShaderGraph.Editor.GraphicsTests")] [assembly: InternalsVisibleTo("Unity.RenderPipelines.Lightweight.Editor")] >>>>>>> [assembly: InternalsVisibleTo("Unity.RenderPipelines.Universal.Editor")] [assembly: InternalsVisibleTo("Unity.ShaderGraph.GraphicsTests")] [assembly: InternalsVisibleTo("Unity.ShaderGraph.Editor.GraphicsTests")]
<<<<<<< /// Looks up a localized string similar to Move to the end of the line.. /// </summary> internal static string MoveToEndOfLineDescription { get { return ResourceManager.GetString("MoveToEndOfLineDescription", resourceCulture); } } /// <summary> ======= /// Looks up a localized string similar to Complete the input if there is a single completion, otherwise complete the input by selecting from a menu of possible completions.. /// </summary> internal static string MenuCompleteDescription { get { return ResourceManager.GetString("MenuCompleteDescription", resourceCulture); } } /// <summary> >>>>>>> /// Looks up a localized string similar to Complete the input if there is a single completion, otherwise complete the input by selecting from a menu of possible completions.. /// </summary> internal static string MenuCompleteDescription { get { return ResourceManager.GetString("MenuCompleteDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to the end of the line.. /// </summary> internal static string MoveToEndOfLineDescription { get { return ResourceManager.GetString("MoveToEndOfLineDescription", resourceCulture); } } /// <summary> <<<<<<< /// Looks up a localized string similar to Searches backward for the perscribed character.. /// </summary> internal static string SearchBackwardCharDescription { get { return ResourceManager.GetString("SearchBackwardCharDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Starts a new seach backward in the history.. /// </summary> internal static string SearchBackwardDescription { get { return ResourceManager.GetString("SearchBackwardDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to the previous occurance of the specified character.. /// </summary> internal static string SearchCharBackwardDescription { get { return ResourceManager.GetString("SearchCharBackwardDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to the previous occurance of the specified character and then forward one character.. /// </summary> internal static string SearchCharBackwardWithBackoffDescription { get { return ResourceManager.GetString("SearchCharBackwardWithBackoffDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to the next occurance of the specified character.. /// </summary> internal static string SearchCharDescription { get { return ResourceManager.GetString("SearchCharDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to he next occurance of the specified character and then back one character.. /// </summary> internal static string SearchCharWithBackoffDescription { get { return ResourceManager.GetString("SearchCharWithBackoffDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Searches for the perscribed character in the perscribed direction.. /// </summary> internal static string SearchDescription { get { return ResourceManager.GetString("SearchDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Prompts for a search string and initiates a search upon AcceptLine.. /// </summary> internal static string SearchForwardDescription { get { return ResourceManager.GetString("SearchForwardDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Select the entire line. Moves the cursor to the end of the line. /// </summary> internal static string SelectAllDescription { get { return ResourceManager.GetString("SelectAllDescription", resourceCulture); } } /// <summary> ======= /// Looks up a localized string similar to Select the entire line. Moves the cursor to the end of the line. /// </summary> internal static string SelectAllDescription { get { return ResourceManager.GetString("SelectAllDescription", resourceCulture); } } /// <summary> >>>>>>> /// Looks up a localized string similar to Searches backward for the perscribed character.. /// </summary> internal static string SearchBackwardCharDescription { get { return ResourceManager.GetString("SearchBackwardCharDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Starts a new seach backward in the history.. /// </summary> internal static string SearchBackwardDescription { get { return ResourceManager.GetString("SearchBackwardDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to the previous occurance of the specified character.. /// </summary> internal static string SearchCharBackwardDescription { get { return ResourceManager.GetString("SearchCharBackwardDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to the previous occurance of the specified character and then forward one character.. /// </summary> internal static string SearchCharBackwardWithBackoffDescription { get { return ResourceManager.GetString("SearchCharBackwardWithBackoffDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to the next occurance of the specified character.. /// </summary> internal static string SearchCharDescription { get { return ResourceManager.GetString("SearchCharDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Move to he next occurance of the specified character and then back one character.. /// </summary> internal static string SearchCharWithBackoffDescription { get { return ResourceManager.GetString("SearchCharWithBackoffDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Searches for the perscribed character in the perscribed direction.. /// </summary> internal static string SearchDescription { get { return ResourceManager.GetString("SearchDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Prompts for a search string and initiates a search upon AcceptLine.. /// </summary> internal static string SearchForwardDescription { get { return ResourceManager.GetString("SearchForwardDescription", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Select the entire line. Moves the cursor to the end of the line. /// </summary> internal static string SelectAllDescription { get { return ResourceManager.GetString("SelectAllDescription", resourceCulture); } } /// <summary>
<<<<<<< // If the Url parameter only contains whitespaces or is empty return with BadRequest. if (string.IsNullOrWhiteSpace(input.Url)) { return req.CreateErrorResponse(HttpStatusCode.BadRequest, "The url parameter can not be empty."); } ======= // Validates if input.url is a valid aboslute url, aka is a complete refrence to the resource, ex: http(s)://google.com if (!Uri.IsWellFormedUriString(input.Url, UriKind.Absolute)) { return req.CreateErrorResponse(HttpStatusCode.BadRequest, $"{input.Url} is not a valid absolute Url. The Url parameter must start with 'http://' or 'http://'."); } >>>>>>> // If the Url parameter only contains whitespaces or is empty return with BadRequest. if (string.IsNullOrWhiteSpace(input.Url)) { return req.CreateErrorResponse(HttpStatusCode.BadRequest, "The url parameter can not be empty."); } // Validates if input.url is a valid aboslute url, aka is a complete refrence to the resource, ex: http(s)://google.com if (!Uri.IsWellFormedUriString(input.Url, UriKind.Absolute)) { return req.CreateErrorResponse(HttpStatusCode.BadRequest, $"{input.Url} is not a valid absolute Url. The Url parameter must start with 'http://' or 'http://'."); }
<<<<<<< using (new Utilities.ProfilingSample("Build Light list and render shadows", renderContext)) { // TODO: Everything here (SSAO, Shadow, Build light list, material and light classification can be parallelize with Async compute) m_SsaoEffect.Render(m_Asset.ssaoSettingsToUse, hdCamera, renderContext, GetDepthTexture(), m_Asset.renderingSettings.useForwardRenderingOnly); m_LightLoop.PrepareLightsForGPU(m_Asset.shadowSettings, cullResults, camera); m_LightLoop.RenderShadows(renderContext, cullResults); renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render m_LightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthStencilBufferRT); } ======= m_LightLoop.PrepareLightsForGPU(m_Asset.shadowSettings, cullResults, camera); m_LightLoop.RenderShadows(renderContext, cullResults); renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render m_LightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthStencilBufferRT); // TODO: Use async compute here to run light culling during shadow >>>>>>> // TODO: Everything here (SSAO, Shadow, Build light list, material and light classification can be parallelize with Async compute) m_SsaoEffect.Render(m_Asset.ssaoSettingsToUse, hdCamera, renderContext, GetDepthTexture(), m_Asset.renderingSettings.useForwardRenderingOnly); m_LightLoop.PrepareLightsForGPU(m_Asset.shadowSettings, cullResults, camera); m_LightLoop.RenderShadows(renderContext, cullResults); renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render m_LightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthStencilBufferRT);
<<<<<<< ======= using System.Collections.Generic; >>>>>>> <<<<<<< AssertRegistrationsAreSame(r => r.Name, "", "special"); ======= this.AssertRegistrationsAreSame(r => r.Name, String.Empty, "special"); >>>>>>> this.AssertRegistrationsAreSame(r => r.Name, String.Empty, "special"); <<<<<<< CollectionAssertExtensions.AreEqual(expectedStrings, container.Registrations.Select(selector).ToList()); ======= CollectionAssert.AreEqual(expectedStrings, this.container.Registrations.Select(selector).ToList()); >>>>>>> CollectionAssertExtensions.AreEqual(expectedStrings, this.container.Registrations.Select(selector).ToList());
<<<<<<< ======= using System; using System.Collections.Generic; >>>>>>> <<<<<<< CollectionAssertExtensions.AreEqual( new[] { "string", "int", "ILogger", "MockLogger", "SpecialLogger", "DependentConstructor", "TwoConstructorArgs", "MockDatabase" }, Section.TypeAliases.Select(a => a.Alias).ToList()); ======= CollectionAssert.AreEqual( new[] { "string", "int", "ILogger", "MockLogger", "SpecialLogger", "DependentConstructor", "TwoConstructorArgs", "MockDatabase" }, section.TypeAliases.Select(a => a.Alias).ToList()); >>>>>>> CollectionAssertExtensions.AreEqual( new[] { "string", "int", "ILogger", "MockLogger", "SpecialLogger", "DependentConstructor", "TwoConstructorArgs", "MockDatabase" }, section.TypeAliases.Select(a => a.Alias).ToList());
<<<<<<< CollectionAssertExtensions.AreEqual(new[] { "", "two" }, Section.Containers.Select(c => c.Name).ToList()); ======= CollectionAssert.AreEqual(new[] { String.Empty, "two" }, section.Containers.Select(c => c.Name).ToList()); >>>>>>> CollectionAssertExtensions.AreEqual(new[] { String.Empty, "two" }, section.Containers.Select(c => c.Name).ToList());
<<<<<<< using DependencyAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.DependencyAttribute; using InjectionConstructorAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionConstructorAttribute; using InjectionMethodAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionMethodAttribute; #if NETFX_CORE using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; #elif __IOS__ using NUnit.Framework; using TestClassAttribute = NUnit.Framework.TestFixtureAttribute; using TestMethodAttribute = NUnit.Framework.TestAttribute; using TestInitializeAttribute = NUnit.Framework.SetUpAttribute; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif ======= using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; using DependencyAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.DependencyAttribute; using InjectionConstructorAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionConstructorAttribute; using InjectionMethodAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionMethodAttribute; >>>>>>> #if NETFX_CORE using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; #elif __IOS__ using NUnit.Framework; using TestClassAttribute = NUnit.Framework.TestFixtureAttribute; using TestMethodAttribute = NUnit.Framework.TestAttribute; using TestInitializeAttribute = NUnit.Framework.SetUpAttribute; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif using DependencyAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.DependencyAttribute; using InjectionConstructorAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionConstructorAttribute; using InjectionMethodAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionMethodAttribute;
<<<<<<< AssertExtensions.IsInstanceOfType(accountResult, typeof(LoggingCommand<Account>)); ======= Assert.IsInstanceOfType(accountResult, typeof(LoggingCommand<Account>)); >>>>>>> AssertExtensions.IsInstanceOfType(accountResult, typeof(LoggingCommand<Account>)); <<<<<<< AssertExtensions.IsInstanceOfType(actualResult.inner, typeof(ConcreteCommand<Account>)); ======= Assert.IsInstanceOfType(actualResult.Inner, typeof(ConcreteCommand<Account>)); >>>>>>> AssertExtensions.IsInstanceOfType(actualResult.Inner, typeof(ConcreteCommand<Account>)); <<<<<<< AssertExtensions.IsInstanceOfType(logCmd.Inner, typeof(ConcreteCommand<Nullable<Customer>>)); ======= Assert.IsInstanceOfType(logCmd.Inner, typeof(ConcreteCommand<Customer?>)); >>>>>>> AssertExtensions.IsInstanceOfType(logCmd.Inner, typeof(ConcreteCommand<Customer?>));
<<<<<<< ======= using System; using System.Collections.Generic; >>>>>>> <<<<<<< CollectionAssertExtensions.AreEqual(new[] { "int", "string" }, Section.TypeAliases.Select(alias => alias.Alias).ToList()); ======= CollectionAssert.AreEqual(new[] { "int", "string" }, section.TypeAliases.Select(alias => alias.Alias).ToList()); >>>>>>> CollectionAssertExtensions.AreEqual(new[] { "int", "string" }, section.TypeAliases.Select(alias => alias.Alias).ToList());
<<<<<<< using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using Fiddler; using Grabacr07.KanColleWrapper.Models.Raw; namespace Grabacr07.KanColleWrapper.Models { /// <summary> /// 母港に所属している艦娘を表します。 /// </summary> public class Ship : RawDataWrapper<kcsapi_ship2>, IIdentifiable { private readonly Homeport homeport; /// <summary> /// この艦娘を識別する ID を取得します。 /// </summary> public int Id { get { return this.RawData.api_id; } } /// <summary> /// 艦娘の種類に基づく情報を取得します。 /// </summary> public ShipInfo Info { get; private set; } public int SortNumber { get { return this.RawData.api_sortno; } } /// <summary> /// 艦娘の現在のレベルを取得します。 /// </summary> public int Level { get { return this.RawData.api_lv; } } /// <summary> /// 艦娘の現在の累積経験値を取得します。 /// </summary> public int Exp { get { return this.RawData.api_exp; } } /// <summary> /// この艦娘が次のレベルに上がるために必要な経験値を取得します。 /// </summary> public int ExpForNextLevel { get { return Experience.GetShipExpForNextLevel(this.RawData.api_lv, this.RawData.api_exp); } } /// <summary> /// 耐久値を取得します。 /// </summary> public LimitedValue HP { get; private set; } /// <summary> /// 燃料を取得します。 /// </summary> public LimitedValue Fuel { get; private set; } /// <summary> /// 弾薬を取得します。 /// </summary> public LimitedValue Bull { get; private set; } /// <summary> /// 火力ステータス値を取得します。 /// </summary> public ModernizableStatus Firepower { get; private set; } /// <summary> /// 雷装ステータス値を取得します。 /// </summary> public ModernizableStatus Torpedo { get; private set; } /// <summary> /// 対空ステータス値を取得します。 /// </summary> public ModernizableStatus AA { get; private set; } /// <summary> /// 装甲ステータス値を取得します。 /// </summary> public ModernizableStatus Armer { get; private set; } /// <summary> /// 現在のコンディション値を取得します。 /// </summary> public int Condition { get { return this.RawData.api_cond; } } /// <summary> /// コンディションの種類を示す <see cref="ConditionType" /> 値を取得します。 /// </summary> public ConditionType ConditionType { get { return ConditionTypeHelper.ToConditionType(this.RawData.api_cond); } } public SlotItem[] SlotItems { get; private set; } public int[] OnSlot { get; private set; } internal Ship(Homeport parent, kcsapi_ship2 rawData) : base(rawData) { this.homeport = parent; this.Info = KanColleClient.Current.Master.Ships[rawData.api_ship_id] ?? ShipInfo.Dummy; this.HP = new LimitedValue(this.RawData.api_nowhp, this.RawData.api_maxhp, 0); this.Fuel = new LimitedValue(this.RawData.api_fuel, this.Info.RawData.api_fuel_max, 0); this.Bull = new LimitedValue(this.RawData.api_bull, this.Info.RawData.api_bull_max, 0); if (this.RawData.api_kyouka.Length == 4) { this.Firepower = new ModernizableStatus(this.Info.RawData.api_houg, this.RawData.api_kyouka[0]); this.Torpedo = new ModernizableStatus(this.Info.RawData.api_raig, this.RawData.api_kyouka[1]); this.AA = new ModernizableStatus(this.Info.RawData.api_tyku, this.RawData.api_kyouka[2]); this.Armer = new ModernizableStatus(this.Info.RawData.api_souk, this.RawData.api_kyouka[3]); } this.SlotItems = this.RawData.api_slot.Select(id => this.homeport.SlotItems[id]).Where(x => x != null).ToArray(); this.OnSlot = this.RawData.api_onslot; } public override string ToString() { return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\", Level = {3}", this.Id, this.Info.Name, this.Info.ShipType.Name, this.Level); } } } ======= using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using Fiddler; using Grabacr07.KanColleWrapper.Internal; using Grabacr07.KanColleWrapper.Models.Raw; namespace Grabacr07.KanColleWrapper.Models { /// <summary> /// 母港に所属している艦娘を表します。 /// </summary> public class Ship : RawDataWrapper<kcsapi_ship2>, IIdentifiable { private readonly Homeport homeport; /// <summary> /// この艦娘を識別する ID を取得します。 /// </summary> public int Id { get { return this.RawData.api_id; } } /// <summary> /// 艦娘の種類に基づく情報を取得します。 /// </summary> public ShipInfo Info { get; private set; } public int SortNumber { get { return this.RawData.api_sortno; } } /// <summary> /// 艦娘の現在のレベルを取得します。 /// </summary> public int Level { get { return this.RawData.api_lv; } } /// <summary> /// 艦娘の現在の累積経験値を取得します。 /// </summary> public int Exp { get { return this.RawData.api_exp.Get(0) ?? 0; } } /// <summary> /// この艦娘が次のレベルに上がるために必要な経験値を取得します。 /// </summary> public int ExpForNextLevel { get { return this.RawData.api_exp.Get(1) ?? 0; } } /// <summary> /// 耐久値を取得します。 /// </summary> public LimitedValue HP { get; private set; } /// <summary> /// 燃料を取得します。 /// </summary> public LimitedValue Fuel { get; private set; } /// <summary> /// 弾薬を取得します。 /// </summary> public LimitedValue Bull { get; private set; } /// <summary> /// 火力ステータス値を取得します。 /// </summary> public ModernizableStatus Firepower { get; private set; } /// <summary> /// 雷装ステータス値を取得します。 /// </summary> public ModernizableStatus Torpedo { get; private set; } /// <summary> /// 対空ステータス値を取得します。 /// </summary> public ModernizableStatus AA { get; private set; } /// <summary> /// 装甲ステータス値を取得します。 /// </summary> public ModernizableStatus Armer { get; private set; } /// <summary> /// 現在のコンディション値を取得します。 /// </summary> public int Condition { get { return this.RawData.api_cond; } } /// <summary> /// コンディションの種類を示す <see cref="ConditionType" /> 値を取得します。 /// </summary> public ConditionType ConditionType { get { return ConditionTypeHelper.ToConditionType(this.RawData.api_cond); } } public SlotItem[] SlotItems { get; private set; } internal Ship(Homeport parent, kcsapi_ship2 rawData) : base(rawData) { this.homeport = parent; this.Info = KanColleClient.Current.Master.Ships[rawData.api_ship_id] ?? ShipInfo.Dummy; this.HP = new LimitedValue(this.RawData.api_nowhp, this.RawData.api_maxhp, 0); this.Fuel = new LimitedValue(this.RawData.api_fuel, this.Info.RawData.api_fuel_max, 0); this.Bull = new LimitedValue(this.RawData.api_bull, this.Info.RawData.api_bull_max, 0); if (this.RawData.api_kyouka.Length == 4) { this.Firepower = new ModernizableStatus(this.Info.RawData.api_houg, this.RawData.api_kyouka[0]); this.Torpedo = new ModernizableStatus(this.Info.RawData.api_raig, this.RawData.api_kyouka[1]); this.AA = new ModernizableStatus(this.Info.RawData.api_tyku, this.RawData.api_kyouka[2]); this.Armer = new ModernizableStatus(this.Info.RawData.api_souk, this.RawData.api_kyouka[3]); } this.SlotItems = this.RawData.api_slot.Select(id => this.homeport.SlotItems[id]).Where(x => x != null).ToArray(); } public override string ToString() { return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\", Level = {3}", this.Id, this.Info.Name, this.Info.ShipType.Name, this.Level); } } } >>>>>>> using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using Fiddler; using Grabacr07.KanColleWrapper.Internal; using Grabacr07.KanColleWrapper.Models.Raw; namespace Grabacr07.KanColleWrapper.Models { /// <summary> /// 母港に所属している艦娘を表します。 /// </summary> public class Ship : RawDataWrapper<kcsapi_ship2>, IIdentifiable { private readonly Homeport homeport; /// <summary> /// この艦娘を識別する ID を取得します。 /// </summary> public int Id { get { return this.RawData.api_id; } } /// <summary> /// 艦娘の種類に基づく情報を取得します。 /// </summary> public ShipInfo Info { get; private set; } public int SortNumber { get { return this.RawData.api_sortno; } } /// <summary> /// 艦娘の現在のレベルを取得します。 /// </summary> public int Level { get { return this.RawData.api_lv; } } /// <summary> /// 艦娘の現在の累積経験値を取得します。 /// </summary> public int Exp { get { return this.RawData.api_exp.Get(0) ?? 0; } } /// <summary> /// この艦娘が次のレベルに上がるために必要な経験値を取得します。 /// </summary> public int ExpForNextLevel { get { return this.RawData.api_exp.Get(1) ?? 0; } } /// <summary> /// 耐久値を取得します。 /// </summary> public LimitedValue HP { get; private set; } /// <summary> /// 燃料を取得します。 /// </summary> public LimitedValue Fuel { get; private set; } /// <summary> /// 弾薬を取得します。 /// </summary> public LimitedValue Bull { get; private set; } /// <summary> /// 火力ステータス値を取得します。 /// </summary> public ModernizableStatus Firepower { get; private set; } /// <summary> /// 雷装ステータス値を取得します。 /// </summary> public ModernizableStatus Torpedo { get; private set; } /// <summary> /// 対空ステータス値を取得します。 /// </summary> public ModernizableStatus AA { get; private set; } /// <summary> /// 装甲ステータス値を取得します。 /// </summary> public ModernizableStatus Armer { get; private set; } /// <summary> /// 現在のコンディション値を取得します。 /// </summary> public int Condition { get { return this.RawData.api_cond; } } /// <summary> /// コンディションの種類を示す <see cref="ConditionType" /> 値を取得します。 /// </summary> public ConditionType ConditionType { get { return ConditionTypeHelper.ToConditionType(this.RawData.api_cond); } } public SlotItem[] SlotItems { get; private set; } public int[] OnSlot { get; private set; } internal Ship(Homeport parent, kcsapi_ship2 rawData) : base(rawData) { this.homeport = parent; this.Info = KanColleClient.Current.Master.Ships[rawData.api_ship_id] ?? ShipInfo.Dummy; this.HP = new LimitedValue(this.RawData.api_nowhp, this.RawData.api_maxhp, 0); this.Fuel = new LimitedValue(this.RawData.api_fuel, this.Info.RawData.api_fuel_max, 0); this.Bull = new LimitedValue(this.RawData.api_bull, this.Info.RawData.api_bull_max, 0); if (this.RawData.api_kyouka.Length == 4) { this.Firepower = new ModernizableStatus(this.Info.RawData.api_houg, this.RawData.api_kyouka[0]); this.Torpedo = new ModernizableStatus(this.Info.RawData.api_raig, this.RawData.api_kyouka[1]); this.AA = new ModernizableStatus(this.Info.RawData.api_tyku, this.RawData.api_kyouka[2]); this.Armer = new ModernizableStatus(this.Info.RawData.api_souk, this.RawData.api_kyouka[3]); } this.SlotItems = this.RawData.api_slot.Select(id => this.homeport.SlotItems[id]).Where(x => x != null).ToArray(); this.OnSlot = this.RawData.api_onslot; } public override string ToString() { return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\", Level = {3}", this.Id, this.Info.Name, this.Info.ShipType.Name, this.Level); } } }
<<<<<<< // NOTE: When updating the version, you also need to update the Identity/@Version // attribtute in src\NuProj.Package\source.extension.vsixmanifest. [assembly: AssemblyVersion("0.9.2.0")] [assembly: AssemblyFileVersion("0.9.2.0")] ======= [assembly: AssemblyVersion("0.9.3.0")] [assembly: AssemblyFileVersion("0.9.3.0")] >>>>>>> // NOTE: When updating the version, you also need to update the Identity/@Version // attribtute in src\NuProj.Package\source.extension.vsixmanifest. [assembly: AssemblyVersion("0.9.3.0")] [assembly: AssemblyFileVersion("0.9.3.0")]
<<<<<<< ======= using System.Collections.Generic; using System.IO; >>>>>>> using System.Collections.Generic; using System.IO; <<<<<<< ======= using System.Reflection; using System.Runtime.Versioning; >>>>>>> using System.Reflection; using System.Runtime.Versioning;
<<<<<<< using Castle.IO; using Castle.IO.Internal; using Castle.MicroKernel; using Castle.MicroKernel.Facilities; using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Naming; using Castle.Transactions; using Castle.Transactions.Activities; using Castle.Transactions.Internal; using Castle.Transactions.IO; using NLog; namespace Castle.Facilities.AutoTx { using Castle.Transactions.Helpers; ======= using Castle.Facilities.AutoTx.Registration; using Castle.MicroKernel.Facilities; using Castle.MicroKernel.Registration; using Castle.Core.Logging; using Castle.Services.Transaction; using Castle.Services.Transaction.Activities; using Castle.Services.Transaction.IO; >>>>>>> using Castle.IO; using Castle.IO.Internal; using Castle.MicroKernel; using Castle.MicroKernel.Facilities; using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Naming; using Castle.Transactions; using Castle.Transactions.Activities; using Castle.Transactions.Internal; using Castle.Transactions.IO; using NLog; <<<<<<< private static readonly Logger _Logger = LogManager.GetCurrentClassLogger(); ======= >>>>>>> <<<<<<< <add name=""tx"" type=""Castle.Transactions.Logging.TraceListener, Castle.Transactions""/> ======= <add name=""tx"" type=""Castle.Services.Transaction.Internal.TxTraceListener, Castle.Services.Transaction""/> >>>>>>> <add name=""tx"" type=""Castle.Transactions.Logging.TraceListener, Castle.Transactions""/>
<<<<<<< private static readonly Logger _Logger = LogManager.GetCurrentClassLogger(); ======= >>>>>>> <<<<<<< _Logger.Debug("created transaction interceptor"); ======= >>>>>>> _Logger.Debug("created transaction interceptor"); <<<<<<< private static void SynchronizedCase(IInvocation invocation, ITransaction transaction) ======= // TODO: implement WaitAll-semantics with returned task private void SynchronizedCase(IInvocation invocation, ITransaction transaction) >>>>>>> private static void SynchronizedCase(IInvocation invocation, ITransaction transaction) <<<<<<< else _Logger.Warn( ======= else if (_Logger.IsWarnEnabled) _Logger.WarnFormat( >>>>>>> else if (_Logger.IsWarnEnabled) _Logger.Warn( <<<<<<< _Logger.Warn("transaction aborted - synchronized case, tx#{0}", localIdentifier); ======= if (_Logger.IsWarnEnabled) _Logger.WarnFormat("transaction aborted - synchronized case, tx#{0}", localIdentifier); >>>>>>> if (_Logger.IsWarnEnabled) _Logger.WarnFormat("transaction aborted - synchronized case, tx#{0}", localIdentifier); <<<<<<< _Logger.Debug("fork case"); ======= if (_Logger.IsDebugEnabled) _Logger.DebugFormat("fork case"); >>>>>>> if (_Logger.IsDebugEnabled) _Logger.DebugFormat("fork case"); <<<<<<< _Logger.WarnException("transaction aborted", ex); ======= if (_Logger.IsWarnEnabled) _Logger.Warn("transaction aborted", ex); >>>>>>> if (_Logger.IsWarnEnabled) _Logger.Warn("transaction aborted", ex);
<<<<<<< SetupFrameRenderingConfiguration(out frameRenderingConfiguration, screenspaceShadows, stereoEnabled, sceneViewCamera); SetupIntermediateResources(frameRenderingConfiguration, ref context); ======= SetupFrameRenderingConfiguration(out frameRenderingConfiguration, shadows, stereoEnabled, sceneViewCamera); SetupIntermediateResources(frameRenderingConfiguration, shadows, ref context); >>>>>>> SetupFrameRenderingConfiguration(out frameRenderingConfiguration, screenspaceShadows, stereoEnabled, sceneViewCamera); SetupIntermediateResources(frameRenderingConfiguration, screenspaceShadows, ref context); <<<<<<< ======= >>>>>>> <<<<<<< if (m_DirectionalShadowmapRT) { RenderTexture.ReleaseTemporary(m_DirectionalShadowmapRT); m_DirectionalShadowmapRT = null; } if (m_AdditionalShadowmapRT) { RenderTexture.ReleaseTemporary(m_AdditionalShadowmapRT); m_AdditionalShadowmapRT = null; } ======= if (m_ShadowMapRT) { RenderTexture.ReleaseTemporary(m_ShadowMapRT); m_ShadowMapRT = null; } >>>>>>> if (m_DirectionalShadowmapRT) { RenderTexture.ReleaseTemporary(m_DirectionalShadowmapRT); m_DirectionalShadowmapRT = null; } if (m_AdditionalShadowmapRT) { RenderTexture.ReleaseTemporary(m_AdditionalShadowmapRT); m_AdditionalShadowmapRT = null; } <<<<<<< private void SetupShaderLightConstants(CommandBuffer cmd, ref LightData lightData) ======= private void SetupPerCameraShaderConstants() { float cameraWidth = GetScaledCameraWidth(m_CurrCamera); float cameraHeight = GetScaledCameraHeight(m_CurrCamera); Shader.SetGlobalVector(PerCameraBuffer._ScaledScreenParams, new Vector4(cameraWidth, cameraHeight, 1.0f + 1.0f / cameraWidth, 1.0f + 1.0f / cameraHeight)); } private void SetupShaderLightConstants(CommandBuffer cmd, List<VisibleLight> lights, ref LightData lightData) >>>>>>> private void SetupPerCameraShaderConstants() { float cameraWidth = GetScaledCameraWidth(m_CurrCamera); float cameraHeight = GetScaledCameraHeight(m_CurrCamera); Shader.SetGlobalVector(PerCameraBuffer._ScaledScreenParams, new Vector4(cameraWidth, cameraHeight, 1.0f + 1.0f / cameraWidth, 1.0f + 1.0f / cameraHeight)); } private void SetupShaderLightConstants(CommandBuffer cmd, ref LightData lightData)
<<<<<<< case "embed": if (string.IsNullOrEmpty(value)) { embedAllSourceFiles = true; continue; } embeddedFiles.AddRange(ParseSeparatedFileArgument(value, baseDirectory, diagnostics)); continue; ======= case "logger": if (value != null) { loggers.Add(value); } continue; >>>>>>> case "logger": if (value != null) { loggers.Add(value); } continue; case "embed": if (string.IsNullOrEmpty(value)) { embedAllSourceFiles = true; continue; } embeddedFiles.AddRange(ParseSeparatedFileArgument(value, baseDirectory, diagnostics)); continue;
<<<<<<< BindTargetToMethod_Object_RoutineInfo = ct.Operators.Method("BindTargetToMethod", ct.Object, ct.RoutineInfo); BuildGenerator_Context_Object_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle = ct.Operators.Method("BuildGenerator", ct.Context, ct.Object, ct.PhpArray, ct.PhpArray, ct.GeneratorStateMachineDelegate, ct.RuntimeMethodHandle); ======= BuildGenerator_Context_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle = ct.Operators.Method("BuildGenerator", ct.Context, ct.PhpArray, ct.PhpArray, ct.GeneratorStateMachineDelegate, ct.RuntimeMethodHandle); SetGeneratorDynamicScope_Generator_RuntimeTypeHandle = ct.Operators.Method("SetGeneratorDynamicScope", ct.Generator, ct.RuntimeTypeHandle); SetGeneratorThis_Generator_Object = ct.Operators.Method("SetGeneratorThis", ct.Generator, ct.Object); SetGeneratorLazyStatic_Generator_PhpTypeInfo = ct.Operators.Method("SetGeneratorLazyStatic", ct.Generator, ct.PhpTypeInfo); GetGeneratorLazyStatic_Generator = ct.Operators.Method("GetGeneratorLazyStatic", ct.Generator); >>>>>>> BindTargetToMethod_Object_RoutineInfo = ct.Operators.Method("BindTargetToMethod", ct.Object, ct.RoutineInfo); BuildGenerator_Context_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle = ct.Operators.Method("BuildGenerator", ct.Context, ct.PhpArray, ct.PhpArray, ct.GeneratorStateMachineDelegate, ct.RuntimeMethodHandle); SetGeneratorDynamicScope_Generator_RuntimeTypeHandle = ct.Operators.Method("SetGeneratorDynamicScope", ct.Generator, ct.RuntimeTypeHandle); SetGeneratorThis_Generator_Object = ct.Operators.Method("SetGeneratorThis", ct.Generator, ct.Object); SetGeneratorLazyStatic_Generator_PhpTypeInfo = ct.Operators.Method("SetGeneratorLazyStatic", ct.Generator, ct.PhpTypeInfo); GetGeneratorLazyStatic_Generator = ct.Operators.Method("GetGeneratorLazyStatic", ct.Generator); <<<<<<< BindTargetToMethod_Object_RoutineInfo, BuildGenerator_Context_Object_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle, ======= // Generator BuildGenerator_Context_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle, SetGeneratorDynamicScope_Generator_RuntimeTypeHandle, SetGeneratorThis_Generator_Object, SetGeneratorLazyStatic_Generator_PhpTypeInfo, GetGeneratorLazyStatic_Generator, >>>>>>> BindTargetToMethod_Object_RoutineInfo, // Generator BuildGenerator_Context_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle, SetGeneratorDynamicScope_Generator_RuntimeTypeHandle, SetGeneratorThis_Generator_Object, SetGeneratorLazyStatic_Generator_PhpTypeInfo, GetGeneratorLazyStatic_Generator,
<<<<<<< var place = refexpr.Place(); if (place != null && place.HasAddress && place.TypeOpt == targetp.Type) ======= var place = refexpr.Place(_il); if (place != null && place.HasAddress && place.Type == targetp.Type) >>>>>>> var place = refexpr.Place(); if (place != null && place.HasAddress && place.Type == targetp.Type)
<<<<<<< public enum HeightmapParametrization { MinMax = 0, Amplitude = 1 } ======= public enum MaterialId { LitSSS = 0, LitStandard = 1, LitAniso = 2, LitClearCoat = 3, LitSpecular = 4, LitIridescence = 5, }; >>>>>>> public enum MaterialId { LitSSS = 0, LitStandard = 1, LitAniso = 2, LitClearCoat = 3, LitSpecular = 4, LitIridescence = 5, }; public enum HeightmapParametrization { MinMax = 0, Amplitude = 1 }
<<<<<<< var place = varref.Place(); if (place != null && place.HasAddress && place.TypeOpt == _cg.CoreTypes.PhpValue) ======= var place = varref.Place(_cg.Builder); if (place != null && place.HasAddress && place.Type == _cg.CoreTypes.PhpValue) >>>>>>> var place = varref.Place(); if (place != null && place.HasAddress && place.Type == _cg.CoreTypes.PhpValue)
<<<<<<< cullingParameters.shadowDistance = m_ShadowSettings.maxShadowDistance; CullResults.Cull(ref cullingParameters, context,ref m_CullResults); ======= cullingParameters.shadowDistance = Mathf.Min(m_ShadowSettings.maxShadowDistance, camera.farClipPlane); CullResults cullResults = CullResults.Cull(ref cullingParameters, context); >>>>>>> cullingParameters.shadowDistance = Mathf.Min(m_ShadowSettings.maxShadowDistance, camera.farClipPlane); CullResults.Cull(ref cullingParameters, context,ref m_CullResults); <<<<<<< bool shadowsRendered = false; InitializeMainShadowLightIndex(visibleLights); if (m_ShadowLightIndex > -1) shadowsRendered = RenderShadows(ref m_CullResults, ref visibleLights[m_ShadowLightIndex], ref context); ======= if (lightData.shadowLightIndex > -1) lightData.shadowsRendered = RenderShadows(ref cullResults, ref visibleLights[lightData.shadowLightIndex], lightData.shadowLightIndex, ref context); >>>>>>> if (lightData.shadowLightIndex > -1) lightData.shadowsRendered = RenderShadows(ref m_CullResults, ref visibleLights[lightData.shadowLightIndex], lightData.shadowLightIndex, ref context); <<<<<<< SetupLightShaderVariables(visibleLights, ref m_CullResults, ref context, ref lightData); if (shadowsRendered) SetupShadowShaderVariables(ref context, m_ShadowCasterCascadesCount); ======= SetupShaderLightConstants(visibleLights, ref lightData, ref cullResults, ref context); if (lightData.shadowsRendered) SetupShadowShaderConstants(ref context, ref visibleLights[lightData.shadowLightIndex], lightData.shadowLightIndex, m_ShadowCasterCascadesCount); SetShaderKeywords(ref lightData, ref context); >>>>>>> SetupShaderLightConstants(visibleLights, ref lightData, ref m_CullResults, ref context); if (lightData.shadowsRendered) SetupShadowShaderConstants(ref context, ref visibleLights[lightData.shadowLightIndex], lightData.shadowLightIndex, m_ShadowCasterCascadesCount); SetShaderKeywords(ref lightData, ref context); <<<<<<< CommandBuffer cmd = CommandBufferPool.Get("SetupShadowShaderConstants"); cmd.SetGlobalVectorArray("globalLightPos", m_LightPositions); cmd.SetGlobalVectorArray("globalLightColor", m_LightColors); cmd.SetGlobalVectorArray("globalLightAtten", m_LightAttenuations); cmd.SetGlobalVectorArray("globalLightSpotDir", m_LightSpotDirections); if (!lightData.isSingleDirectionalLight) cmd.SetGlobalBuffer("globalLightIndexList", m_LightIndexListBuffer); cmd.SetGlobalVector("globalLightData", new Vector4(lightData.pixelLightsCount, m_ShadowLightIndex, m_Asset.ShadowMinNormalBias, m_Asset.ShadowNormalBias)); SetShaderKeywords(cmd, lightData.isSingleDirectionalLight, lightData.vertexLightsCount > 0); ======= CommandBuffer cmd = new CommandBuffer () { name = "SetupShadowShaderConstants" }; cmd.SetGlobalVector("globalLightCount", new Vector4 (pixelLightsCount, 0.0f, 0.0f, 0.0f)); cmd.SetGlobalVectorArray ("globalLightPos", m_LightPositions); cmd.SetGlobalVectorArray ("globalLightColor", m_LightColors); cmd.SetGlobalVectorArray ("globalLightAtten", m_LightAttenuations); cmd.SetGlobalVectorArray ("globalLightSpotDir", m_LightSpotDirections); cmd.SetGlobalBuffer("globalLightIndexList", m_LightIndexListBuffer); context.ExecuteCommandBuffer(cmd); cmd.Dispose(); } private void SetShaderKeywords(ref LightData lightData, ref ScriptableRenderContext context) { CommandBuffer cmd = new CommandBuffer() { name = "SetShaderKeywords" }; SetShaderKeywords(cmd, lightData.shadowsRendered, lightData.isSingleDirectionalLight, lightData.vertexLightsCount > 0); >>>>>>> CommandBuffer cmd = CommandBufferPool.Get("SetupShadowShaderConstants"); cmd.SetGlobalVector("globalLightCount", new Vector4 (pixelLightsCount, 0.0f, 0.0f, 0.0f)); cmd.SetGlobalVectorArray ("globalLightPos", m_LightPositions); cmd.SetGlobalVectorArray ("globalLightColor", m_LightColors); cmd.SetGlobalVectorArray ("globalLightAtten", m_LightAttenuations); cmd.SetGlobalVectorArray ("globalLightSpotDir", m_LightSpotDirections); cmd.SetGlobalBuffer("globalLightIndexList", m_LightIndexListBuffer);
<<<<<<< // TODO: Move this code inside LightLoop if (m_LightLoop.GetFeatureVariantsEnabled()) { // For material classification we use compute shader and so can't read into the stencil, so prepare it. using (new ProfilingSample(cmd, "Clear and copy stencil texture", GetSampler(CustomSamplerId.ClearAndCopyStencilTexture))) { CoreUtils.SetRenderTarget(cmd, m_CameraStencilBufferCopyRT, ClearFlag.Color, CoreUtils.clearColorAllBlack); cmd.SetRandomWriteTarget(1, GetHTile()); // In the material classification shader we will simply test is we are no lighting // Use ShaderPassID 1 => "Pass 1 - Write 1 if value different from stencilRef to output" CoreUtils.DrawFullScreen(cmd, m_CopyStencilForNoLighting, m_CameraStencilBufferCopyRT, m_CameraDepthStencilBufferRT, null, 1); cmd.ClearRandomWriteTargets(); } } m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, m_CameraStencilBufferCopyRT); ======= m_LightLoop.BuildGPULightListAsyncEnd(camera, cmd, buildGPULightListsCompleteFence); } else { using (new ProfilingSample(cmd, "Build Light list", GetSampler(CustomSamplerId.BuildLightList))) { m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, GetStencilTexture()); } >>>>>>> m_LightLoop.BuildGPULightListAsyncEnd(camera, cmd, buildGPULightListsCompleteFence); } else { using (new ProfilingSample(cmd, "Build Light list", GetSampler(CustomSamplerId.BuildLightList))) { m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, GetStencilTexture()); } <<<<<<< RenderForward(m_CullResults, camera, renderContext, cmd, ForwardPass.Opaque); ======= // We compute subsurface scattering here. Therefore, no objects rendered afterwards will exhibit SSS. // Currently, there is no efficient way to switch between SRT and MRT for the forward pass; // therefore, forward-rendered objects do not output split lighting required for the SSS pass. SubsurfaceScatteringPass(hdCamera, cmd, sssSettings); RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Opaque); >>>>>>> RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Opaque); <<<<<<< if (!m_CurrentDebugDisplaySettings.renderingDebugSettings.enableSSSAndTransmission) ======= // Currently, forward-rendered objects do not output split lighting required for the SSS pass. if (!m_CurrentDebugDisplaySettings.renderingDebugSettings.enableSSSAndTransmission || hdCamera.useForwardOnly) >>>>>>> if (!m_CurrentDebugDisplaySettings.renderingDebugSettings.enableSSSAndTransmission) <<<<<<< ======= CoreUtils.SetRenderTarget(cmd, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT); var camera = hdCamera.camera; >>>>>>> var camera = hdCamera.camera; <<<<<<< if (!m_Asset.globalRenderingSettings.ShouldUseForwardRenderingOnly()) { ======= if (!camera.useForwardOnly) >>>>>>> if (!camera.useForwardOnly) {
<<<<<<< protected int mReadDataSize; // 写入数据时,总共写入的数据大小 protected int mMaxDataSize; // 包体最大的大小,包括如果不使用变长数组时的大小 protected bool mIntReplaceULLong; // 如果ullong的值小于int最大值,是否在序列化时写入或读取int ======= protected int mMaxDataSize; protected bool mFixedLength; // 是否所有参数都是定长的 >>>>>>> protected int mReadDataSize; // 写入数据时,总共写入的数据大小 protected int mMaxDataSize; // 包体最大的大小,包括如果不使用变长数组时的大小 protected bool mIntReplaceULLong; // 如果ullong的值小于int最大值,是否在序列化时写入或读取int protected bool mFixedLength; // 是否所有参数都是定长的
<<<<<<< private async void Row_Drop(object sender, DragEventArgs e) { var row = (Border)sender; var fse = (FileSystemElement)row.Tag; StyleHitbox(row, ROW_DEFAULT_STYLE_NAME); if (fse.IsFolder && e.DataView.Contains(StandardDataFormats.StorageItems)) { var items = await e.DataView.GetStorageItemsAsync(); //FileSystem.MoveStorageItemsAsync(fse, items.ToList()); } } private void Row_DragOver(object sender, DragEventArgs e) { var row = (Border)sender; var fse = (FileSystemElement)row.Tag; if (fse.IsFolder && e.DataView.Contains(StandardDataFormats.StorageItems)) e.AcceptedOperation = DataPackageOperation.Move; StyleHitbox(row, ROW_DROP_STYLE_NAME); } private void Row_DragLeave(object sender, DragEventArgs e) { var row = (Border)sender; StyleHitbox(row, ROW_DEFAULT_STYLE_NAME); } private async void Row_DragStarting(UIElement sender, DragStartingEventArgs args) { var row = (Border)sender; var fse = (FileSystemElement)row.Tag; Debug.WriteLine("Drag started"); var deferral = args.GetDeferral(); if (!fse.IsFolder) { var storageItem = await FileSystem.GetFileAsync(fse); args.Data.SetStorageItems(new List<IStorageItem> { storageItem }, false); var ti = await storageItem.GetThumbnailAsync(ThumbnailMode.SingleItem, 30); if (ti != null) { var stream = ti.CloneStream(); var img = new BitmapImage(); await img.SetSourceAsync(stream); args.Data.RequestedOperation = DataPackageOperation.Move; args.DragUI.SetContentFromBitmapImage(img, new Point(-1, 0)); //args.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(stream); //args.DragUI.SetContentFromDataPackage(); } } else { var storageItem = await FileSystem.GetFolderAsync(fse); args.Data.SetStorageItems(new List<IStorageItem> { storageItem }, false); var ti = await storageItem.GetThumbnailAsync(ThumbnailMode.SingleItem, 30); if (ti != null) { var stream = ti.CloneStream(); var img = new BitmapImage(); await img.SetSourceAsync(stream); args.Data.RequestedOperation = DataPackageOperation.Move; args.DragUI.SetContentFromBitmapImage(img, new Point(-1, 0)); //args.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(stream); //args.DragUI.SetContentFromDataPackage(); } } //args.DragUI.SetContentFromDataPackage(); deferral.Complete(); } ======= private void ContentGrid_PointerMoved(object sender, PointerRoutedEventArgs e) { var pointer = e.GetCurrentPoint(ContentGrid); if (!isDraggingSelection || pointer.Timestamp == lastMoveTimestamp) return; var startPos = pressedPos.Position; var newPos = pointer.Position; var newSizeX = newPos.X - startPos.X; //Get the move delta x if (newSizeX < 0) //Drag left from start pos { Canvas.SetLeft(SelectionRect, newPos.X); SelectionRect.Width = -newSizeX; } else //Drag right from start pos { SelectionRect.Width = newPos.X - startPos.X; } var newSizeY = newPos.Y - startPos.Y; //Get the move delta y if (newSizeY < 0) //Drag up from start pos { Canvas.SetTop(SelectionRect, newPos.Y); SelectionRect.Height = -newSizeY; } else //Drag down from start pos { SelectionRect.Height = newPos.Y - startPos.Y; } var rowHeight = 30; var currentPointerOverRowIndex = (int)newPos.Y / rowHeight; if (pointerOverRowIndex != currentPointerOverRowIndex) //If pointer is still over the same row dont do anything { var topPos = Canvas.GetTop(SelectionRect); var from = (int)topPos / rowHeight; //start index to select rows (30 is rowHeight) var to = (int)(topPos + SelectionRect.Height) / rowHeight + 1; //end index var controlDown = Window.Current.CoreWindow.GetKeyState(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down); if (!controlDown) UnselectOldRows(); for (int i = from; i < to; i++) { if (i >= 0 && i < ItemsSource.Count) SelectRow(ItemsSource[i]); } } lastMoveTimestamp = pointer.Timestamp; pointerOverRowIndex = currentPointerOverRowIndex; } private void ContentGrid_PointerPressed(object sender, PointerRoutedEventArgs e) { isDraggingSelection = true; pressedPos = e.GetCurrentPoint((FrameworkElement)sender); ContentGrid.CapturePointer(e.Pointer); Canvas.SetLeft(SelectionRect, pressedPos.Position.X); Canvas.SetTop(SelectionRect, pressedPos.Position.Y); } private void ContentGrid_PointerReleased(object sender, PointerRoutedEventArgs e) { isDraggingSelection = false; ContentGrid.ReleasePointerCapture(e.Pointer); SelectionRect.Width = 0; SelectionRect.Height = 0; } >>>>>>> private async void Row_Drop(object sender, DragEventArgs e) { var row = (Border)sender; var fse = (FileSystemElement)row.Tag; StyleHitbox(row, ROW_DEFAULT_STYLE_NAME); if (fse.IsFolder && e.DataView.Contains(StandardDataFormats.StorageItems)) { var items = await e.DataView.GetStorageItemsAsync(); //FileSystem.MoveStorageItemsAsync(fse, items.ToList()); } } private void Row_DragOver(object sender, DragEventArgs e) { var row = (Border)sender; var fse = (FileSystemElement)row.Tag; if (fse.IsFolder && e.DataView.Contains(StandardDataFormats.StorageItems)) e.AcceptedOperation = DataPackageOperation.Move; StyleHitbox(row, ROW_DROP_STYLE_NAME); } private void Row_DragLeave(object sender, DragEventArgs e) { var row = (Border)sender; StyleHitbox(row, ROW_DEFAULT_STYLE_NAME); } private async void Row_DragStarting(UIElement sender, DragStartingEventArgs args) { var row = (Border)sender; var fse = (FileSystemElement)row.Tag; Debug.WriteLine("Drag started"); var deferral = args.GetDeferral(); if (!fse.IsFolder) { var storageItem = await FileSystem.GetFileAsync(fse); args.Data.SetStorageItems(new List<IStorageItem> { storageItem }, false); var ti = await storageItem.GetThumbnailAsync(ThumbnailMode.SingleItem, 30); if (ti != null) { var stream = ti.CloneStream(); var img = new BitmapImage(); await img.SetSourceAsync(stream); args.Data.RequestedOperation = DataPackageOperation.Move; args.DragUI.SetContentFromBitmapImage(img, new Point(-1, 0)); //args.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(stream); //args.DragUI.SetContentFromDataPackage(); } } else { var storageItem = await FileSystem.GetFolderAsync(fse); args.Data.SetStorageItems(new List<IStorageItem> { storageItem }, false); var ti = await storageItem.GetThumbnailAsync(ThumbnailMode.SingleItem, 30); if (ti != null) { var stream = ti.CloneStream(); var img = new BitmapImage(); await img.SetSourceAsync(stream); args.Data.RequestedOperation = DataPackageOperation.Move; args.DragUI.SetContentFromBitmapImage(img, new Point(-1, 0)); //args.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(stream); //args.DragUI.SetContentFromDataPackage(); } } //args.DragUI.SetContentFromDataPackage(); deferral.Complete(); } private void ContentGrid_PointerMoved(object sender, PointerRoutedEventArgs e) { var pointer = e.GetCurrentPoint(ContentGrid); if (!isDraggingSelection || pointer.Timestamp == lastMoveTimestamp) return; var startPos = pressedPos.Position; var newPos = pointer.Position; var newSizeX = newPos.X - startPos.X; //Get the move delta x if (newSizeX < 0) //Drag left from start pos { Canvas.SetLeft(SelectionRect, newPos.X); SelectionRect.Width = -newSizeX; } else //Drag right from start pos { SelectionRect.Width = newPos.X - startPos.X; } var newSizeY = newPos.Y - startPos.Y; //Get the move delta y if (newSizeY < 0) //Drag up from start pos { Canvas.SetTop(SelectionRect, newPos.Y); SelectionRect.Height = -newSizeY; } else //Drag down from start pos { SelectionRect.Height = newPos.Y - startPos.Y; } var rowHeight = 30; var currentPointerOverRowIndex = (int)newPos.Y / rowHeight; if (pointerOverRowIndex != currentPointerOverRowIndex) //If pointer is still over the same row dont do anything { var topPos = Canvas.GetTop(SelectionRect); var from = (int)topPos / rowHeight; //start index to select rows (30 is rowHeight) var to = (int)(topPos + SelectionRect.Height) / rowHeight + 1; //end index var controlDown = Window.Current.CoreWindow.GetKeyState(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down); if (!controlDown) UnselectOldRows(); for (int i = from; i < to; i++) { if (i >= 0 && i < ItemsSource.Count) SelectRow(ItemsSource[i]); } } lastMoveTimestamp = pointer.Timestamp; pointerOverRowIndex = currentPointerOverRowIndex; } private void ContentGrid_PointerPressed(object sender, PointerRoutedEventArgs e) { isDraggingSelection = true; pressedPos = e.GetCurrentPoint((FrameworkElement)sender); ContentGrid.CapturePointer(e.Pointer); Canvas.SetLeft(SelectionRect, pressedPos.Position.X); Canvas.SetTop(SelectionRect, pressedPos.Position.Y); } private void ContentGrid_PointerReleased(object sender, PointerRoutedEventArgs e) { isDraggingSelection = false; ContentGrid.ReleasePointerCapture(e.Pointer); SelectionRect.Width = 0; SelectionRect.Height = 0; }
<<<<<<< deliverEventArgs = Queue.Dequeue(); ======= if (!_disposed) { deliverEventArgs = Queue.Dequeue() as BasicDeliverEventArgs; } >>>>>>> if (!_disposed) { deliverEventArgs = Queue.Dequeue(); }
<<<<<<< private bool useCCD = false; ======= private bool allowParent = false; private bool continous = false; >>>>>>> private bool allowParent = false; private bool useCCD = false; <<<<<<< float bodyAngle = this.body.Rotation - bodyAngleVel * (1.0f - Scene.PhysicsAlpha) * Time.SecondsPerFrame; transform.IgnoreParent = true; // Force ignore parent! ======= float bodyAngle = this.body.Rotation - bodyAngleVel * (1.0f - Scene.PhysicsAlpha) * Time.SPFMult; // Unless allowed explicitly, ignore the transform hierarchy, so nested RigidBodies don't clash if (!this.allowParent) transform.IgnoreParent = true; >>>>>>> float bodyAngle = this.body.Rotation - bodyAngleVel * (1.0f - Scene.PhysicsAlpha) * Time.SecondsPerFrame; // Unless allowed explicitly, ignore the transform hierarchy, so nested RigidBodies don't clash if (!this.allowParent) transform.IgnoreParent = true; <<<<<<< target.useCCD = this.useCCD; ======= target.allowParent = this.allowParent; target.continous = this.continous; >>>>>>> target.allowParent = this.allowParent; target.useCCD = this.useCCD;
<<<<<<< memoryLogOutput = new EditorLogOutput(); Logs.AddGlobalOutput(memoryLogOutput); // Set up a global exception handler to log errors AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; ======= memoryLogOutput = new InMemoryLogOutput(); Log.AddGlobalOutput(memoryLogOutput); >>>>>>> memoryLogOutput = new EditorLogOutput(); Logs.AddGlobalOutput(memoryLogOutput); <<<<<<< private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { Logs.Core.WriteError(LogFormat.Exception(e.ExceptionObject as Exception)); } ======= >>>>>>>
<<<<<<< using (Texture texture = new Texture(width, height, TextureSizeMode.NonPowerOfTwo)) using (RenderTarget renderTarget = new RenderTarget(AAQuality.Off, true, texture)) ======= using (Texture texture = new Texture(width, height, TextureSizeMode.NonPowerOfTwo, TextureMagFilter.Nearest, TextureMinFilter.Nearest)) using (RenderTarget renderTarget = new RenderTarget(AAQuality.Off, texture)) >>>>>>> using (Texture texture = new Texture(width, height, TextureSizeMode.NonPowerOfTwo, TextureMagFilter.Nearest, TextureMinFilter.Nearest)) using (RenderTarget renderTarget = new RenderTarget(AAQuality.Off, true, texture))
<<<<<<< canvas.State.DepthOffset = -1; ======= canvas.State.ZOffset = this.depthOffset; canvas.State.SetMaterial(new BatchInfo(DrawTechnique.Alpha, ColorRgba.White)); >>>>>>> canvas.State.DepthOffset = this.depthOffset; canvas.State.SetMaterial(new BatchInfo(DrawTechnique.Alpha, ColorRgba.White));
<<<<<<< [EditorHintRange(0, int.MaxValue)] public Point2 Size ======= [EditorHintRange(1, int.MaxValue)] [EditorHintIncrement(1)] [EditorHintDecimalPlaces(0)] public Vector2 Size >>>>>>> [EditorHintRange(1, int.MaxValue)] public Point2 Size
<<<<<<< private ConcreteSlotValueType ConvertDynamicMatrixInputTypeToConcrete(IEnumerable<ConcreteSlotValueType> inputTypes) { var concreteSlotValueTypes = inputTypes as IList<ConcreteSlotValueType> ?? inputTypes.ToList(); var inputTypesDistinct = concreteSlotValueTypes.Distinct().ToList(); switch (inputTypesDistinct.Count) { case 0: return ConcreteSlotValueType.Matrix2; case 1: return inputTypesDistinct.FirstOrDefault(); default: var ordered = inputTypesDistinct.OrderByDescending(x => x); if (ordered.Any()) return ordered.FirstOrDefault(); break; } return ConcreteSlotValueType.Matrix2; } public override void ValidateNode() ======= public virtual void ValidateNode() >>>>>>> private ConcreteSlotValueType ConvertDynamicMatrixInputTypeToConcrete(IEnumerable<ConcreteSlotValueType> inputTypes) { var concreteSlotValueTypes = inputTypes as IList<ConcreteSlotValueType> ?? inputTypes.ToList(); var inputTypesDistinct = concreteSlotValueTypes.Distinct().ToList(); switch (inputTypesDistinct.Count) { case 0: return ConcreteSlotValueType.Matrix2; case 1: return inputTypesDistinct.FirstOrDefault(); default: var ordered = inputTypesDistinct.OrderByDescending(x => x); if (ordered.Any()) return ordered.FirstOrDefault(); break; } return ConcreteSlotValueType.Matrix2; } public virtual void ValidateNode() <<<<<<< public static string GetSlotDimension(ConcreteSlotValueType slotValue) { switch (slotValue) { case ConcreteSlotValueType.Vector1: return string.Empty; case ConcreteSlotValueType.Vector2: return "2"; case ConcreteSlotValueType.Vector3: return "3"; case ConcreteSlotValueType.Vector4: return "4"; case ConcreteSlotValueType.Matrix2: return "2x2"; case ConcreteSlotValueType.Matrix3: return "3x3"; case ConcreteSlotValueType.Matrix4: return "4x4"; default: return "Error"; } } public static string ConvertConcreteSlotValueTypeToString(OutputPrecision p, ConcreteSlotValueType slotValue) { switch (slotValue) { case ConcreteSlotValueType.Vector1: return p.ToString(); case ConcreteSlotValueType.Vector2: return p + "2"; case ConcreteSlotValueType.Vector3: return p + "3"; case ConcreteSlotValueType.Vector4: return p + "4"; case ConcreteSlotValueType.Texture2D: return "Texture2D"; case ConcreteSlotValueType.Cubemap: return "Cubemap"; case ConcreteSlotValueType.Matrix2: return p + "2x2"; case ConcreteSlotValueType.Matrix3: return p + "3x3"; case ConcreteSlotValueType.Matrix4: return p + "4x4"; case ConcreteSlotValueType.SamplerState: return "SamplerState"; default: return "Error"; } } ======= >>>>>>>
<<<<<<< float clampedDelta = forceFixedStep ? SecondsPerFrame : MathF.Min(realDelta, SecondsPerFrame * 2); gameDelta = timeScale * clampedDelta; timeMult = gameDelta / SecondsPerFrame; if (DualityApp.ExecContext == DualityApp.ExecutionContext.Game) gameTimer += TimeSpan.FromTicks((long)(gameDelta * TimeSpan.TicksPerSecond)); ======= if (advanceGameTime) gameTimer += TimeSpan.FromTicks((long)(lastDelta * timeScale * TimeSpan.TicksPerMillisecond)); timeMult = timeScale * lastDelta / MsPFMult; >>>>>>> float clampedDelta = forceFixedStep ? SecondsPerFrame : MathF.Min(realDelta, SecondsPerFrame * 2); gameDelta = timeScale * clampedDelta; timeMult = gameDelta / SecondsPerFrame; if (advanceGameTime) gameTimer += TimeSpan.FromTicks((long)(gameDelta * TimeSpan.TicksPerSecond));
<<<<<<< Logs.Core.Write("DualityApp Sandbox terminated"); ======= Log.Core.Write("DualityApp terminated in sandbox mode."); >>>>>>> Logs.Core.Write("DualityApp terminated in sandbox mode."); <<<<<<< ======= // Wrapper method for delivering the old API until removing it in v3.0 if (DiscardPluginData != null) DiscardPluginData(sender, e); // Save user and app data, they'll be reloaded after plugin reload is done, // as they can reference plugin data as well. SaveUserData(); SaveAppData(); >>>>>>> // Save user and app data, they'll be reloaded after plugin reload is done, // as they can reference plugin data as well. SaveUserData(); SaveAppData();
<<<<<<< ======= /// <summary> /// [GET] Provides information about the order in which different <see cref="Component"/> /// types are updated, initialized and shut down. /// </summary> public static ComponentExecutionOrder ExecOrder { get { return execOrder; } } /// <summary> /// Returns whether a Component Type requires another Component Type to work properly. /// </summary> /// <param name="cmpType">The Component Type that might require another Component Type.</param> /// <param name="requiredType">The Component Type that might be required.</param> /// <returns>True, if there is a requirement, false if not</returns> [Obsolete("Use Component.RequireMap API instead.")] public static bool RequiresComponent(Type cmpType, Type requiredType) { return requireMap.IsRequired(cmpType, requiredType); } /// <summary> /// Returns all required Component Types of a specified Component Type. /// </summary> /// <param name="cmpType">The Component Type that might require other Component Types.</param> /// <returns>An array of Component Types to require.</returns> [Obsolete("Use Component.RequireMap API instead.")] public static IEnumerable<Type> GetRequiredComponents(Type cmpType) { return requireMap.GetRequirements(cmpType); } /// <summary> /// Returns the number of Component Types that require the specified Component Type. /// This can be used as a measure of relative Component significance. /// </summary> /// <param name="cmpType"></param> /// <returns></returns> [Obsolete("No longer supported.")] public static IEnumerable<Type> GetRequiringComponents(Type requiredType) { return Enumerable.Empty<Type>(); } /// <summary> /// Given the specified target <see cref="GameObject"/> and <see cref="Component"/> type, /// this method will enumerate all <see cref="Component"/> types that need to /// be added in order to satisfy its requirements. /// </summary> /// <param name="targetObj"></param> /// <param name="targetComponentType"></param> /// <returns></returns> [Obsolete("Use Component.RequireMap API instead.")] public static IEnumerable<Type> GetRequiredComponentsToCreate(GameObject targetObj, Type targetComponentType) { return requireMap.GetRequirementsToCreate(targetObj, targetComponentType); } >>>>>>> /// <summary> /// [GET] Provides information about the order in which different <see cref="Component"/> /// types are updated, initialized and shut down. /// </summary> public static ComponentExecutionOrder ExecOrder { get { return execOrder; } }
<<<<<<< [assembly: InternalsVisibleTo("ReactiveUI.NLog")] [assembly: InternalsVisibleTo("ReactiveUI.Gtk")] [assembly: InternalsVisibleTo("ReactiveUI.Cocoa")] [assembly: InternalsVisibleTo("ReactiveUI.Android")] [assembly: InternalsVisibleTo("ReactiveUI.Mobile")] [assembly: InternalsVisibleTo("ReactiveUI.Winforms")] [assembly: InternalsVisibleTo("ReactiveUI.QuickUI")] ======= [assembly: InternalsVisibleTo("ReactiveUI.Winforms")] >>>>>>> [assembly: InternalsVisibleTo("ReactiveUI.Winforms")] [assembly: InternalsVisibleTo("ReactiveUI.QuickUI")]
<<<<<<< void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args) { var handler = PropertyChanged; if (handler != null) { handler(this, args); } } protected ReactiveFragment() { setupRxObj(); } ======= void IReactiveObjectExtension.RaisePropertyChanged(PropertyChangedEventArgs args) { var handler = PropertyChanged; if (handler != null) { handler(this, args); } } >>>>>>> void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args) { var handler = PropertyChanged; if (handler != null) { handler(this, args); } } <<<<<<< [IgnoreDataMember] public IObservable<IObservedChange<ReactiveFragment, object>> Changing { get { return this.getChangingObservable(); } ======= public IObservable<IObservedChange<object, object>> Changing { get { return this.getChangingObservable(); } >>>>>>> public IObservable<IObservedChange<ReactiveFragment, object>> Changing { get { return this.getChangingObservable(); } <<<<<<< [IgnoreDataMember] public IObservable<IObservedChange<ReactiveFragment, object>> Changed { get { return this.getChangedObservable(); } } [IgnoreDataMember] protected Lazy<PropertyInfo[]> allPublicProperties; [IgnoreDataMember] public IObservable<Exception> ThrownExceptions { get { return this.getThrownExceptionsObservable(); } } [OnDeserialized] void setupRxObj(StreamingContext sc) { setupRxObj(); } void setupRxObj() { allPublicProperties = new Lazy<PropertyInfo[]>(() => GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).ToArray()); ======= public IObservable<IObservedChange<object, object>> Changed { get { return this.getChangedObservable(); } >>>>>>> public IObservable<IObservedChange<ReactiveFragment, object>> Changed { get { return this.getChangedObservable(); } <<<<<<< return this.suppressChangeNotifications(); } public bool AreChangeNotificationsEnabled() { return this.areChangeNotificationsEnabled(); ======= return this.suppressChangeNotifications(); >>>>>>> return this.suppressChangeNotifications();
<<<<<<< /// <summary>When enabled, Cameras using these Frame Settings calculate Transparent Screen Space Reflections.</summary> [FrameSettingsField(1, displayedName: "Transparent Screen Space Reflection", customOrderInGroup: 25, positiveDependencies: new[] { SSR }, tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Reflections on transparent objects.")] TransparentSSR = 94, [FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.")] /// <summary>When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.</summary> ======= /// <summary>When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.</summary> [FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion (Depends on \"Screen Space Ambient Occlusion\" in current HDRP Asset).")] >>>>>>> /// <summary>When enabled, Cameras using these Frame Settings calculate Transparent Screen Space Reflections.</summary> [FrameSettingsField(1, displayedName: "Transparent Screen Space Reflection", customOrderInGroup: 25, positiveDependencies: new[] { SSR }, tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Reflections on transparent objects.")] TransparentSSR = 94, [FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.")] /// <summary>When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.</summary> [FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion (Depends on \"Screen Space Ambient Occlusion\" in current HDRP Asset).")]
<<<<<<< Console.WriteLine(RxApp.MainThreadScheduler.GetType().FullName); Assert.Equal(CurrentThreadScheduler.Instance, RxApp.MainThreadScheduler); ======= Console.WriteLine(RxApp.DeferredScheduler.GetType().FullName); Assert.Equal(Scheduler.Immediate, RxApp.DeferredScheduler); } [Fact] public void OverridingInUnitTestRunnerShouldActuallyDoThat() { //Set a UnitTestScheduler RxApp.InUnitTestRunnerOverride = true; RxApp.DeferredScheduler = ImmediateScheduler.Instance; //Try to Override RxApp.InUnitTestRunnerOverride = false; RxApp.DeferredScheduler = ThreadPoolScheduler.Instance; Assert.NotEqual(Scheduler.Immediate, RxApp.DeferredScheduler); //Restore Schedulers RxApp.InUnitTestRunnerOverride = true; RxApp.DeferredScheduler = ImmediateScheduler.Instance; RxApp.InUnitTestRunnerOverride = null; } [Fact] public void UnitTestDetectorIdentifiesThisTestAsAnXUnitTest() { string[] testAssemblies = new[] { "CSUNIT", "NUNIT", "XUNIT", "MBUNIT", "TESTDRIVEN", "QUALITYTOOLS.TIPS.UNITTEST.ADAPTER", "QUALITYTOOLS.UNITTESTING.SILVERLIGHT", "PEX", "MSBUILD", "NBEHAVE", "TESTPLATFORM", }; string[] designEnvironments = new[] { "BLEND.EXE", "MONODEVELOP", "SHARPDEVELOP.EXE", }; var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssemblies, designEnvironments); Assert.True(isInUnitTestRunner); } [Fact] public void UnitTestDetectorDoesNotIdentifyThisTestWhenXUnitAssemblyNotChecked() { // XUnit assembly name removed string[] testAssembliesWithoutNunit = new[] { "CSUNIT", "NUNIT", "MBUNIT", "TESTDRIVEN", "QUALITYTOOLS.TIPS.UNITTEST.ADAPTER", "QUALITYTOOLS.UNITTESTING.SILVERLIGHT", "PEX", "MSBUILD", "NBEHAVE", "TESTPLATFORM", }; string[] designEnvironments = new[] { "BLEND.EXE", "MONODEVELOP", "SHARPDEVELOP.EXE", }; var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssembliesWithoutNunit, designEnvironments); Assert.False(isInUnitTestRunner); >>>>>>> Console.WriteLine(RxApp.MainThreadScheduler.GetType().FullName); Assert.Equal(CurrentThreadScheduler.Instance, RxApp.MainThreadScheduler); } [Fact] public void OverridingInUnitTestRunnerShouldActuallyDoThat() { //Set a UnitTestScheduler RxApp.InUnitTestRunnerOverride = true; RxApp.DeferredScheduler = ImmediateScheduler.Instance; //Try to Override RxApp.InUnitTestRunnerOverride = false; RxApp.DeferredScheduler = ThreadPoolScheduler.Instance; Assert.NotEqual(Scheduler.Immediate, RxApp.DeferredScheduler); //Restore Schedulers RxApp.InUnitTestRunnerOverride = true; RxApp.DeferredScheduler = ImmediateScheduler.Instance; RxApp.InUnitTestRunnerOverride = null; } [Fact] public void UnitTestDetectorIdentifiesThisTestAsAnXUnitTest() { string[] testAssemblies = new[] { "CSUNIT", "NUNIT", "XUNIT", "MBUNIT", "TESTDRIVEN", "QUALITYTOOLS.TIPS.UNITTEST.ADAPTER", "QUALITYTOOLS.UNITTESTING.SILVERLIGHT", "PEX", "MSBUILD", "NBEHAVE", "TESTPLATFORM", }; string[] designEnvironments = new[] { "BLEND.EXE", "MONODEVELOP", "SHARPDEVELOP.EXE", }; var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssemblies, designEnvironments); Assert.True(isInUnitTestRunner); } [Fact] public void UnitTestDetectorDoesNotIdentifyThisTestWhenXUnitAssemblyNotChecked() { // XUnit assembly name removed string[] testAssembliesWithoutNunit = new[] { "CSUNIT", "NUNIT", "MBUNIT", "TESTDRIVEN", "QUALITYTOOLS.TIPS.UNITTEST.ADAPTER", "QUALITYTOOLS.UNITTESTING.SILVERLIGHT", "PEX", "MSBUILD", "NBEHAVE", "TESTPLATFORM", }; string[] designEnvironments = new[] { "BLEND.EXE", "MONODEVELOP", "SHARPDEVELOP.EXE", }; var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssembliesWithoutNunit, designEnvironments); Assert.False(isInUnitTestRunner);
<<<<<<< // IViewFor<IFooBarViewModel> try { var ifn = interfaceifyTypeName(viewModel.GetType().AssemblyQualifiedName); var type = Reflection.ReallyFindType(ifn, false); if (type != null) { var ret = RxApp.DependencyResolver.GetService(viewType.MakeGenericType(type), key) as IViewFor; if (ret != null) return ret; } } catch (Exception ex) { LogHost.Default.DebugException("Couldn't instantiate View via pure interface type", ex); } ======= >>>>>>>
<<<<<<< private GraphView m_GraphView; GraphTypeMapper typeMapper { get; set; } ======= >>>>>>> private GraphView m_GraphView; <<<<<<< typeMapper = new GraphTypeMapper(typeof(MaterialNodeView)); typeMapper[typeof(AbstractMaterialNode)] = typeof(MaterialNodeView); typeMapper[typeof(ColorNode)] = typeof(ColorNodeView); typeMapper[typeof(GradientNode)] = typeof(GradientNodeView); // typeMapper[typeof(ScatterNode)] = typeof(ScatterNodeView); //typeMapper[typeof(TextureNode)] = typeof(TextureNodeView); //typeMapper[typeof(SamplerAssetNode)] = typeof(SamplerAssetNodeView); //typeMapper[typeof(TextureSamplerNode)] = typeof(TextureSamplerNodeView); // typeMapper[typeof(Texture2DNode)] = typeof(TextureAssetNodeView); // typeMapper[typeof(TextureLODNode)] = typeof(TextureLODNodeView); typeMapper[typeof(SamplerStateNode)] = typeof(SamplerStateNodeView); // typeMapper[typeof(CubemapNode)] = typeof(CubeNodeView); // typeMapper[typeof(ToggleNode)] = typeof(ToggleNodeView); typeMapper[typeof(UVNode)] = typeof(UVNodeView); typeMapper[typeof(Vector1Node)] = typeof(Vector1NodeView); typeMapper[typeof(Vector2Node)] = typeof(Vector2NodeView); typeMapper[typeof(Vector3Node)] = typeof(Vector3NodeView); typeMapper[typeof(Vector4Node)] = typeof(Vector4NodeView); typeMapper[typeof(PropertyNode)] = typeof(PropertyNodeView); /* typeMapper[typeof(ScaleOffsetNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView typeMapper[typeof(RadialShearNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView typeMapper[typeof(SphereWarpNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView typeMapper[typeof(SphericalIndentationNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView typeMapper[typeof(AACheckerboardNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView typeMapper[typeof(AACheckerboard3dNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView*/ typeMapper[typeof(SubGraphNode)] = typeof(SubgraphNodeView); typeMapper[typeof(MasterRemapNode)] = typeof(MasterRemapNodeView); // typeMapper[typeof(MasterRemapInputNode)] = typeof(RemapInputNodeView); typeMapper[typeof(AbstractSubGraphIONode)] = typeof(SubgraphIONodeView); // typeMapper[typeof(AbstractSurfaceMasterNode)] = typeof(SurfaceMasterNodeView); typeMapper[typeof(LevelsNode)] = typeof(LevelsNodeView); typeMapper[typeof(ConstantsNode)] = typeof(ConstantsNodeView); //typeMapper[typeof(SwizzleNode)] = typeof(SwizzleNodeView); typeMapper[typeof(BlendModeNode)] = typeof(BlendModeNodeView); // typeMapper[typeof(AddManyNode)] = typeof(AddManyNodeView); typeMapper[typeof(IfNode)] = typeof(IfNodeView); //typeMapper[typeof(CustomCodeNode)] = typeof(CustomCodeView); typeMapper[typeof(Matrix2Node)] = typeof(Matrix2NodeView); typeMapper[typeof(Matrix3Node)] = typeof(Matrix3NodeView); typeMapper[typeof(Matrix4Node)] = typeof(Matrix4NodeView); typeMapper[typeof(MatrixCommonNode)] = typeof(MatrixCommonNodeView); typeMapper[typeof(TransformNode)] = typeof(TransformNodeView); // typeMapper[typeof(ConvolutionFilterNode)] = typeof(ConvolutionFilterNodeView); ======= >>>>>>> <<<<<<< var nodeView = (MaterialNodeView)typeMapper.Create(change.node); ======= var nodePresenter = CreateInstance<MaterialNodePresenter>(); >>>>>>> var nodeView = (MaterialNodeView)typeMapper.Create(change.node); <<<<<<< Undo.RecordObject(m_GraphObject, "Cut"); RemoveElements( m_GraphView.selection.OfType<MaterialNodeView>(), m_GraphView.selection.OfType<Edge>()); RecordState(); ======= graph.owner.RegisterCompleteObjectUndo("Cut"); RemoveElements(elements.OfType<MaterialNodePresenter>().Where(e => e.selected), elements.OfType<GraphEdgePresenter>().Where(e => e.selected)); >>>>>>> graph.owner.RegisterCompleteObjectUndo("Cut"); RemoveElements( m_GraphView.selection.OfType<MaterialNodeView>(), m_GraphView.selection.OfType<Edge>()); <<<<<<< var graph = DeserializeCopyBuffer(JsonUtility.ToJson(CreateCopyPasteGraph(m_GraphView.selection.OfType<GraphElement>()), true)); Undo.RecordObject(m_GraphObject, "Duplicate"); InsertCopyPasteGraph(graph); RecordState(); ======= var deserializedGraph = DeserializeCopyBuffer(JsonUtility.ToJson(CreateCopyPasteGraph(elements.Where(e => e.selected)), true)); graph.owner.RegisterCompleteObjectUndo("Duplicate"); InsertCopyPasteGraph(deserializedGraph); >>>>>>> var deserializedGraph = DeserializeCopyBuffer(JsonUtility.ToJson(CreateCopyPasteGraph(m_GraphView.selection.OfType<GraphElement>()), true)); graph.owner.RegisterCompleteObjectUndo("Duplicate"); InsertCopyPasteGraph(deserializedGraph); <<<<<<< RecordState(); Undo.RecordObject(m_GraphObject, "Delete"); RemoveElements( m_GraphView.selection.OfType<MaterialNodeView>(), m_GraphView.selection.OfType<Edge>()); RecordState(); ======= graph.owner.RegisterCompleteObjectUndo("Delete"); RemoveElements(elements.OfType<MaterialNodePresenter>().Where(e => e.selected), elements.OfType<GraphEdgePresenter>().Where(e => e.selected)); >>>>>>> graph.owner.RegisterCompleteObjectUndo("Delete"); RemoveElements( m_GraphView.selection.OfType<MaterialNodeView>(), m_GraphView.selection.OfType<Edge>());
<<<<<<< [IgnoreDataMember] public IObservable<IObservedChange<ReactiveActivity, object>> Changing { get { return this.getChangingObservable(); } ======= public IObservable<IObservedChange<object, object>> Changing { get { return this.getChangingObservable(); } >>>>>>> public IObservable<IObservedChange<ReactiveActivity, object>> Changing { get { return this.getChangingObservable(); } <<<<<<< [IgnoreDataMember] public IObservable<IObservedChange<ReactiveActivity, object>> Changed { get { return this.getChangedObservable(); } } [IgnoreDataMember] protected Lazy<PropertyInfo[]> allPublicProperties; [IgnoreDataMember] public IObservable<Exception> ThrownExceptions { get { return this.getThrownExceptionsObservable(); } } [OnDeserialized] void setupRxObj(StreamingContext sc) { setupRxObj(); } void setupRxObj() { allPublicProperties = new Lazy<PropertyInfo[]>(() => GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).ToArray()); ======= public IObservable<IObservedChange<object, object>> Changed { get { return this.getChangedObservable(); } >>>>>>> public IObservable<IObservedChange<ReactiveActivity, object>> Changed { get { return this.getChangedObservable(); } <<<<<<< return this.suppressChangeNotifications(); } public bool AreChangeNotificationsEnabled() { return this.areChangeNotificationsEnabled(); } ======= return this.suppressChangeNotifications(); } public IObservable<Exception> ThrownExceptions { get { return this.getThrownExceptionsObservable(); } } >>>>>>> return this.suppressChangeNotifications(); } public IObservable<Exception> ThrownExceptions { get { return this.getThrownExceptionsObservable(); } }
<<<<<<< internal static IObservable<object> ViewModelWhenAnyValue<TView, TViewModel>(TViewModel viewModel, TView view, Expression expression) ======= public static void ThrowIfMethodsNotOverloaded(string callingTypeName, object targetObject, params string[] methodsToCheck) { var missingMethod = methodsToCheck .Select(x => { var methods = targetObject.GetType().GetTypeInfo().DeclaredMethods; return Tuple.Create(x, methods.FirstOrDefault(y => y.Name == x)); }) .FirstOrDefault(x => x.Item2 == null); if (missingMethod != null) { throw new Exception(String.Format("Your class must implement {0} and call {1}.{0}", missingMethod.Item1, callingTypeName)); } } internal static IObservable<TProp> ViewModelWhenAnyValue<TView, TViewModel, TProp>(TViewModel viewModel, TView view, Expression<Func<TViewModel, TProp>> property) >>>>>>> public static void ThrowIfMethodsNotOverloaded(string callingTypeName, object targetObject, params string[] methodsToCheck) { var missingMethod = methodsToCheck .Select(x => { var methods = targetObject.GetType().GetTypeInfo().DeclaredMethods; return Tuple.Create(x, methods.FirstOrDefault(y => y.Name == x)); }) .FirstOrDefault(x => x.Item2 == null); if (missingMethod != null) { throw new Exception(String.Format("Your class must implement {0} and call {1}.{0}", missingMethod.Item1, callingTypeName)); } } internal static IObservable<object> ViewModelWhenAnyValue<TView, TViewModel>(TViewModel viewModel, TView view, Expression expression)
<<<<<<< using System.Collections.Generic; ======= using System.Collections.Generic; using System.Threading.Tasks; >>>>>>> using System.Collections.Generic; using System.Threading.Tasks;
<<<<<<< public InlineQueryResultArticle(string id, string title, InputMessageContent inputMessageContent) : base(InlineQueryResultType.Article, id) ======= public InlineQueryResultArticle(string id, string title, InputMessageContentBase inputMessageContent) : this() >>>>>>> public InlineQueryResultArticle(string id, string title, InputMessageContentBase inputMessageContent) : base(InlineQueryResultType.Article, id)
<<<<<<< /// <typeparam name="TResult">Expected type of operation result</typeparam> [JsonObject(MemberSerialization.OptIn)] public class ApiResponse<TResult> : IResponse ======= /// <typeparam name="T">The resultant object</typeparam> [JsonObject(MemberSerialization = MemberSerialization.OptIn, NamingStrategyType = typeof(SnakeCaseNamingStrategy))] public class ApiResponse<T> >>>>>>> /// <typeparam name="TResult">Expected type of operation result</typeparam> [JsonObject(MemberSerialization = MemberSerialization.OptIn, NamingStrategyType = typeof(SnakeCaseNamingStrategy))] public class ApiResponse<TResult> : IResponse
<<<<<<< public ChatMemberStatus Status { get; internal set; } ======= [JsonConverter(typeof(StringEnumConverter))] public ChatMemberStatus Status { get; set; } >>>>>>> public ChatMemberStatus Status { get; set; }
<<<<<<< public InputMessageContent InputMessageContent { get; set; } private InlineQueryResultCachedAudio() ======= public InputMessageContentBase InputMessageContent { get; set; } /// <summary> /// Initializes a new inline query result /// </summary> public InlineQueryResultCachedAudio() >>>>>>> public InputMessageContentBase InputMessageContent { get; set; } private InlineQueryResultCachedAudio()
<<<<<<< #if !UNITY_SWITCH if (LightweightUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.Stereo)) ======= if (CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.Stereo)) >>>>>>> #if !UNITY_SWITCH if (CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.Stereo))
<<<<<<< m_cubeBlockDefinitionsManager.Load(GetContentDataFile("CubeBlocks.sbc")); LBX_BlocksConfiguration.Items.Clear(); ======= LST_BlocksConfiguration.Items.Clear(); m_cubeBlockDefinitionsManager = new CubeBlockDefinitionsManager(m_configSerializer.CubeBlockDefinitions); >>>>>>> m_cubeBlockDefinitionsManager.Load(GetContentDataFile("CubeBlocks.sbc")); LST_BlocksConfiguration.Items.Clear(); <<<<<<< m_ammoMagazinesDefinitionsManager.Load(GetContentDataFile("AmmoMagazines.sbc")); LBX_AmmoConfiguration.Items.Clear(); ======= LST_AmmoConfiguration.Items.Clear(); m_ammoMagazinesDefinitionsManager = new AmmoMagazinesDefinitionsManager(m_configSerializer.AmmoMagazineDefinitions); >>>>>>> m_ammoMagazinesDefinitionsManager.Load(GetContentDataFile("AmmoMagazines.sbc")); LST_AmmoConfiguration.Items.Clear(); <<<<<<< m_containerTypesDefinitionsManager.Load(GetContentDataFile("ContainerTypes.sbc")); LBX_ContainerTypeConfiguration.Items.Clear(); LBX_ContainerTypeConfig_Details_Items.Items.Clear(); ======= LST_ContainerTypeConfiguration.Items.Clear(); LST_ContainerTypeConfig_Details_Items.Items.Clear(); m_containerTypesDefinitionsManager = new ContainerTypesDefinitionsManager(m_configSerializer.ContainerTypeDefinitions); >>>>>>> m_containerTypesDefinitionsManager.Load(GetContentDataFile("ContainerTypes.sbc")); LST_ContainerTypeConfiguration.Items.Clear(); LST_ContainerTypeConfig_Details_Items.Items.Clear(); <<<<<<< m_globalEventsDefinitionsManager.Load(GetContentDataFile("GlobalEvents.sbc")); LBX_GlobalEventConfiguration.Items.Clear(); ======= LST_GlobalEventConfiguration.Items.Clear(); m_globalEventsDefinitionsManager = new GlobalEventsDefinitionsManager(m_configSerializer.GlobalEventDefinitions); >>>>>>> m_globalEventsDefinitionsManager.Load(GetContentDataFile("GlobalEvents.sbc")); LST_GlobalEventConfiguration.Items.Clear(); <<<<<<< ======= LST_SpawnGroupConfiguration.Items.Clear(); LST_SpawnGroupConfig_Details_Prefabs.Items.Clear(); >>>>>>> <<<<<<< m_physicalItemsDefinitionsManager.Load(GetContentDataFile("PhysicalItems.sbc")); LBX_PhysicalItemConfiguration.Items.Clear(); ======= m_physicalItemsDefinitionsManager = new PhysicalItemDefinitionsManager(m_configSerializer.PhysicalItemDefinitions); LST_PhysicalItemConfiguration.Items.Clear(); >>>>>>> m_physicalItemsDefinitionsManager.Load(GetContentDataFile("PhysicalItems.sbc")); LST_PhysicalItemConfiguration.Items.Clear(); <<<<<<< m_componentsDefinitionsManager.Load(GetContentDataFile("Components.sbc")); LBX_ComponentsConfig.Items.Clear(); ======= m_componentsDefinitionsManager = new ComponentDefinitionsManager(m_configSerializer.ComponentDefinitions); LST_ComponentsConfig.Items.Clear(); >>>>>>> m_componentsDefinitionsManager.Load(GetContentDataFile("Components.sbc")); LST_ComponentsConfig.Items.Clear(); <<<<<<< m_blueprintsDefinitionsManager.Load(GetContentDataFile("Blueprints.sbc")); LBX_BlueprintConfig.Items.Clear(); ======= m_blueprintsDefinitionsManager = new BlueprintDefinitionsManager(m_configSerializer.BlueprintDefinitions); LST_BlueprintConfig.Items.Clear(); >>>>>>> m_blueprintsDefinitionsManager.Load(GetContentDataFile("Blueprints.sbc")); LST_BlueprintConfig.Items.Clear(); <<<<<<< m_voxelMaterialsDefinitionsManager.Load(GetContentDataFile("VoxelMaterials.sbc")); LBX_VoxelMaterialsConfig.Items.Clear(); foreach (var definition in m_voxelMaterialsDefinitionsManager.Definitions) ======= m_voxelMaterialsDefinitionsWrapper = new VoxelMaterialDefinitionsManager(m_configSerializer.VoxelMaterialDefinitions); LST_VoxelMaterialsConfig.Items.Clear(); foreach (var definition in m_voxelMaterialsDefinitionsWrapper.Definitions) >>>>>>> m_voxelMaterialsDefinitionsManager.Load(GetContentDataFile("VoxelMaterials.sbc")); LST_VoxelMaterialsConfig.Items.Clear(); foreach (var definition in m_voxelMaterialsDefinitionsManager.Definitions) <<<<<<< m_scenariosDefinitionManager.Load(GetContentDataFile("Scenarios.sbc")); LBX_ScenariosConfig.Items.Clear(); foreach (var definition in m_scenariosDefinitionManager.Definitions) ======= m_scenariosDefinitionWrapper = new ScenariosDefinitionsManager(m_configSerializer.ScenarioDefinitions); LST_ScenariosConfig.Items.Clear(); foreach (var definition in m_scenariosDefinitionWrapper.Definitions) >>>>>>> m_scenariosDefinitionManager.Load(GetContentDataFile("Scenarios.sbc")); LST_ScenariosConfig.Items.Clear(); foreach (var definition in m_scenariosDefinitionManager.Definitions)
<<<<<<< public static GUIContent ppdPrimitiveLength = new GUIContent("Primitive length", "Dimensions of the primitive (with the scale of 1) to which the per-pixel displacement mapping is being applied. For example, the standard quad is 1 x 1 meter, while the standard plane is 10 x 10 meters."); public static GUIContent ppdPrimitiveWidth = new GUIContent("Primitive width", "Dimensions of the primitive (with the scale of 1) to which the per-pixel displacement mapping is being applied. For example, the standard quad is 1 x 1 meter, while the standard plane is 10 x 10 meters."); ======= public static GUIContent perPixelDisplacementObjectScaleText = new GUIContent("Lock with object scale", "Per Pixel displacement will take into account the tiling scale - Only work with uniform positive scale"); >>>>>>> public static GUIContent perPixelDisplacementObjectScaleText = new GUIContent("Lock with object scale", "Per Pixel displacement will take into account the tiling scale - Only work with uniform positive scale"); public static GUIContent ppdPrimitiveLength = new GUIContent("Primitive length", "Dimensions of the primitive (with the scale of 1) to which the per-pixel displacement mapping is being applied. For example, the standard quad is 1 x 1 meter, while the standard plane is 10 x 10 meters."); public static GUIContent ppdPrimitiveWidth = new GUIContent("Primitive width", "Dimensions of the primitive (with the scale of 1) to which the per-pixel displacement mapping is being applied. For example, the standard quad is 1 x 1 meter, while the standard plane is 10 x 10 meters."); <<<<<<< ppdPrimitiveLength = FindProperty(kPpdPrimitiveLength, props); ppdPrimitiveWidth = FindProperty(kPpdPrimitiveWidth, props); perPixelDisplacementObjectScale = FindProperty(kPerPixelDisplacementObjectScale, props); perPixelDisplacementTilingScale = FindProperty(kPerPixelDisplacementTilingScale, props); ======= perPixelDisplacementObjectScale = FindProperty(kPerPixelDisplacementObjectScale, props); >>>>>>> ppdPrimitiveLength = FindProperty(kPpdPrimitiveLength, props); ppdPrimitiveWidth = FindProperty(kPpdPrimitiveWidth, props); perPixelDisplacementObjectScale = FindProperty(kPerPixelDisplacementObjectScale, props); perPixelDisplacementTilingScale = FindProperty(kPerPixelDisplacementTilingScale, props); <<<<<<< m_MaterialEditor.ShaderProperty(ppdPrimitiveLength, StylesBaseLit.ppdPrimitiveLength); ppdPrimitiveLength.floatValue = Mathf.Max(0.01f, ppdPrimitiveLength.floatValue); m_MaterialEditor.ShaderProperty(ppdPrimitiveWidth, StylesBaseLit.ppdPrimitiveWidth); ppdPrimitiveWidth.floatValue = Mathf.Max(0.01f, ppdPrimitiveWidth.floatValue); m_MaterialEditor.ShaderProperty(perPixelDisplacementObjectScale, StylesBaseLit.lockWithObjectScaleText); m_MaterialEditor.ShaderProperty(perPixelDisplacementTilingScale, StylesBaseLit.lockWithTilingRateText); m_MaterialEditor.ShaderProperty(depthOffsetEnable, StylesBaseLit.depthOffsetEnableText); ======= //m_MaterialEditor.ShaderProperty(perPixelDisplacementObjectScale, StylesBaseLit.perPixelDisplacementObjectScaleText); m_MaterialEditor.ShaderProperty(depthOffsetEnable, StylesBaseLit.depthOffsetEnableText); >>>>>>> m_MaterialEditor.ShaderProperty(ppdPrimitiveLength, StylesBaseLit.ppdPrimitiveLength); ppdPrimitiveLength.floatValue = Mathf.Max(0.01f, ppdPrimitiveLength.floatValue); m_MaterialEditor.ShaderProperty(ppdPrimitiveWidth, StylesBaseLit.ppdPrimitiveWidth); ppdPrimitiveWidth.floatValue = Mathf.Max(0.01f, ppdPrimitiveWidth.floatValue); m_MaterialEditor.ShaderProperty(perPixelDisplacementObjectScale, StylesBaseLit.lockWithObjectScaleText); m_MaterialEditor.ShaderProperty(perPixelDisplacementTilingScale, StylesBaseLit.lockWithTilingRateText); m_MaterialEditor.ShaderProperty(depthOffsetEnable, StylesBaseLit.depthOffsetEnableText);
<<<<<<< namespace SEModAPI ======= namespace SEModAPI.API >>>>>>> namespace SEModAPI.API <<<<<<< private MyObjectBuilder_Definitions m_ammoMagazineDefinitions; private MyObjectBuilder_Definitions m_blueprintDefinitions; private MyObjectBuilder_Definitions m_cubeBlockDefinitions; private MyObjectBuilder_Definitions m_componentDefinitions; private MyObjectBuilder_Definitions m_containerTypeDefinitions; private MyObjectBuilder_Definitions m_globalEventDefinitions; private MyObjectBuilder_Definitions m_handItemDefinitions; private MyObjectBuilder_Definitions m_physicalItemDefinitions; private MyObjectBuilder_Definitions m_spawnGroupDefinitions; private MyObjectBuilder_Definitions m_voxelMaterialDefinitions; private Dictionary<string, byte> m_materialIndex; ======= private MyObjectBuilder_Definitions _ammoMagazineDefinitions; private MyObjectBuilder_Definitions _cubeBlockDefinitions; private MyObjectBuilder_Definitions _componentDefinitions; private MyObjectBuilder_Definitions _blueprintDefinitions; private MyObjectBuilder_Definitions _physicalItemDefinitions; private MyObjectBuilder_Definitions _voxelMaterialDefinitions; private Dictionary<string, byte> _materialIndex; >>>>>>> private MyObjectBuilder_Definitions _ammoMagazineDefinitions; private MyObjectBuilder_Definitions _cubeBlockDefinitions; private MyObjectBuilder_Definitions _componentDefinitions; private MyObjectBuilder_Definitions _blueprintDefinitions; private MyObjectBuilder_Definitions _physicalItemDefinitions; private MyObjectBuilder_Definitions _voxelMaterialDefinitions; private Dictionary<string, byte> _materialIndex; <<<<<<< public MyObjectBuilder_ContainerTypeDefinition[] ContainerTypeDefinitions { get { return m_containerTypeDefinitions.ContainerTypes; } } ======= public ConfigFileSerializer() { //Prepare game installation configuration _gameInstallation = new GameInstallationInfo(); // Dynamically read all definitions as soon as the SpaceEngineersAPI class is first invoked. ReadCubeBlockDefinitions(); } >>>>>>> public MyObjectBuilder_ContainerTypeDefinition[] ContainerTypeDefinitions { get { return m_containerTypeDefinitions.ContainerTypes; } } public ConfigFileSerializer() { //Prepare game installation configuration _gameInstallation = new GameInstallationInfo(); // Dynamically read all definitions as soon as the SpaceEngineersAPI class is first invoked. ReadCubeBlockDefinitions(); } <<<<<<< m_ammoMagazineDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("AmmoMagazines.sbc"); m_blueprintDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("Blueprints.sbc"); m_componentDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("Components.sbc"); m_containerTypeDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("ContainerTypes.sbc"); m_cubeBlockDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("CubeBlocks.sbc"); m_globalEventDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("GlobalEvents.sbc"); m_handItemDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("HandItems.sbc"); m_physicalItemDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("PhysicalItems.sbc"); m_spawnGroupDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("SpawnGroups.sbc"); m_voxelMaterialDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("VoxelMaterials.sbc"); m_materialIndex = new Dictionary<string, byte>(); ======= _ammoMagazineDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("AmmoMagazines.sbc"); _voxelMaterialDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("VoxelMaterials.sbc"); _physicalItemDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("PhysicalItems.sbc"); _componentDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("Components.sbc"); _cubeBlockDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("CubeBlocks.sbc"); _blueprintDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("Blueprints.sbc"); _materialIndex = new Dictionary<string, byte>(); >>>>>>> m_ammoMagazineDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("AmmoMagazines.sbc"); m_blueprintDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("Blueprints.sbc"); m_componentDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("Components.sbc"); m_containerTypeDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("ContainerTypes.sbc"); m_cubeBlockDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("CubeBlocks.sbc"); m_globalEventDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("GlobalEvents.sbc"); m_handItemDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("HandItems.sbc"); m_physicalItemDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("PhysicalItems.sbc"); m_spawnGroupDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("SpawnGroups.sbc"); m_voxelMaterialDefinitions = LoadContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>("VoxelMaterials.sbc"); m_materialIndex = new Dictionary<string, byte>(); <<<<<<< ======= #endregion #region WriteCubeBlocksDefinitions public void WriteCubeBlockDefinitions() { SaveAmmoMagazinesContentFile(); SaveVoxelMaterialsContentFile(); SavePhysicalItemsContentFile(); SaveComponentsContentFile(); SaveCubeBlocksContentFile(); SaveBlueprintsContentFile(); } public void SaveAmmoMagazinesContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_ammoMagazineDefinitions, "AmmoMagazines.sbc"); } public void SaveVoxelMaterialsContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_voxelMaterialDefinitions, "VoxelMaterials.sbc"); } public void SavePhysicalItemsContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_physicalItemDefinitions, "PhysicalItems.sbc"); } public void SaveComponentsContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_componentDefinitions, "Components.sbc"); } public void SaveCubeBlocksContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_cubeBlockDefinitions, "CubeBlocks.sbc"); } public void SaveBlueprintsContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_blueprintDefinitions, "Blueprints.sbc"); } private void SaveContentFile<T, TS>(T fileContent,string filename) where TS : XmlSerializer1 { string filePath = Path.Combine(Path.Combine(_gameInstallation.GamePath, @"Content\Data"), filename); if (!File.Exists(filePath)) { throw new AutoException(new GameInstallationInfoException(GameInstallationInfoExceptionState.ConfigFileMissing), filePath); } try { WriteSpaceEngineersFile<T, TS>(fileContent, filePath); } catch { throw new AutoException(new GameInstallationInfoException(GameInstallationInfoExceptionState.ConfigFileCorrupted), filePath); } if (fileContent == null) { throw new AutoException(new GameInstallationInfoException(GameInstallationInfoExceptionState.ConfigFileEmpty), filePath); } // TODO: set a file watch to reload the files, incase modding is occuring at the same time this is open. // Lock the load during this time, in case it happens multiple times. // Report a friendly error if this load fails. } #endregion #region FetchCubeBlockMass >>>>>>> #endregion #region WriteCubeBlocksDefinitions public void WriteCubeBlockDefinitions() { SaveAmmoMagazinesContentFile(); SaveVoxelMaterialsContentFile(); SavePhysicalItemsContentFile(); SaveComponentsContentFile(); SaveCubeBlocksContentFile(); SaveBlueprintsContentFile(); } public void SaveAmmoMagazinesContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_ammoMagazineDefinitions, "AmmoMagazines.sbc"); } public void SaveVoxelMaterialsContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_voxelMaterialDefinitions, "VoxelMaterials.sbc"); } public void SavePhysicalItemsContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_physicalItemDefinitions, "PhysicalItems.sbc"); } public void SaveComponentsContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_componentDefinitions, "Components.sbc"); } public void SaveCubeBlocksContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_cubeBlockDefinitions, "CubeBlocks.sbc"); } public void SaveBlueprintsContentFile() { SaveContentFile<MyObjectBuilder_Definitions, MyObjectBuilder_DefinitionsSerializer>(_blueprintDefinitions, "Blueprints.sbc"); } private void SaveContentFile<T, TS>(T fileContent,string filename) where TS : XmlSerializer1 { string filePath = Path.Combine(Path.Combine(_gameInstallation.GamePath, @"Content\Data"), filename); if (!File.Exists(filePath)) { throw new AutoException(new GameInstallationInfoException(GameInstallationInfoExceptionState.ConfigFileMissing), filePath); } try { WriteSpaceEngineersFile<T, TS>(fileContent, filePath); } catch { throw new AutoException(new GameInstallationInfoException(GameInstallationInfoExceptionState.ConfigFileCorrupted), filePath); } if (fileContent == null) { throw new AutoException(new GameInstallationInfoException(GameInstallationInfoExceptionState.ConfigFileEmpty), filePath); } // TODO: set a file watch to reload the files, incase modding is occuring at the same time this is open. // Lock the load during this time, in case it happens multiple times. // Report a friendly error if this load fails. } #endregion #region FetchCubeBlockMass
<<<<<<< public static readonly int[] _DBufferTexture = { Shader.PropertyToID("_DBufferTexture0"), Shader.PropertyToID("_DBufferTexture1"), Shader.PropertyToID("_DBufferTexture2"), Shader.PropertyToID("_DBufferTexture3") }; ======= public static readonly int[] _SSSBufferTexture = { Shader.PropertyToID("_SSSBufferTexture0"), Shader.PropertyToID("_SSSBufferTexture1"), Shader.PropertyToID("_SSSBufferTexture2"), Shader.PropertyToID("_SSSBufferTexture3"), }; >>>>>>> public static readonly int[] _DBufferTexture = { Shader.PropertyToID("_DBufferTexture0"), Shader.PropertyToID("_DBufferTexture1"), Shader.PropertyToID("_DBufferTexture2"), Shader.PropertyToID("_DBufferTexture3") }; public static readonly int[] _SSSBufferTexture = { Shader.PropertyToID("_SSSBufferTexture0"), Shader.PropertyToID("_SSSBufferTexture1"), Shader.PropertyToID("_SSSBufferTexture2"), Shader.PropertyToID("_SSSBufferTexture3"), };
<<<<<<< using UnityEngine.Experimental.UIElements; ======= using System.Reflection; >>>>>>> using System.Reflection; using UnityEngine.Experimental.UIElements; <<<<<<< public static void Add<T>(this VisualElement visualElement, T elementToAdd, Action<T> action) where T : VisualElement { visualElement.Add(elementToAdd); action(elementToAdd); } ======= public static IEnumerable<Type> GetTypesOrNothing(this Assembly assembly) { try { return assembly.GetTypes(); } catch { return Enumerable.Empty<Type>(); } } >>>>>>> public static void Add<T>(this VisualElement visualElement, T elementToAdd, Action<T> action) where T : VisualElement { visualElement.Add(elementToAdd); action(elementToAdd); } public static IEnumerable<Type> GetTypesOrNothing(this Assembly assembly) { try { return assembly.GetTypes(); } catch { return Enumerable.Empty<Type>(); } }
<<<<<<< /// <summary> /// Sample implementation of a token cache which persists tokens specific to a user to Redis to be used in multi-tenanted scenarios /// the key is the users object unique object identifier. /// </summary> ======= // sample implementation of a token cache which persists tokens specific to a user to redis to be used in multi tenanted scenarios >>>>>>> /// <summary> /// Sample implementation of a token cache which persists tokens specific to a user to Redis to be used in multi-tenanted scenarios /// the key is the users object unique object identifier. /// </summary> <<<<<<< /// <summary> /// Factory method to create instances of <see cref="MultiTenantSurveyApp.TokenStorage.RedisTokenCache"/>. The constructor /// is intentionally made private. Since we need to do some async initialization, the instance of the class is not ready /// for use at the completion of the constructor. /// </summary> /// <param name="connection">An instance of <see cref="StackExchange.Redis.IConnectionMultiplexer"/> to use for a connection to Redis.</param> /// <param name="key">An instance of <see cref="MultiTenantSurveyApp.TokenStorage.TokenCacheKey"/> containing the key for the new cache.</param> /// <param name="logger">An instance of <see cref="Microsoft.Extensions.Logging.ILogger"/> to use for logging.</param> /// <returns>An initialized instance of <see cref="MultiTenantSurveyApp.TokenStorage.TokenCacheKey"/>.</returns> ======= /// <summary> /// This factory method loads up the dictionary in the base TokenCache class with the tokens read from redis. /// Read http://www.cloudidentity.com/blog/2014/07/09/the-new-token-cache-in-adal-v2/ for more details on writing a custom token cache. /// The post above explains why we need to load up the base class token cache dictionary as soon as the cache is created. /// We want to do this asynchronously and this requires the factory method. /// </summary> /// <param name="connection"></param> /// <param name="key"></param> /// <param name="logger"></param> /// <returns></returns> >>>>>>> /// <summary> /// This factory method loads up the dictionary in the base TokenCache class with the tokens read from redis. /// Read http://www.cloudidentity.com/blog/2014/07/09/the-new-token-cache-in-adal-v2/ for more details on writing a custom token cache. /// The post above explains why we need to load up the base class token cache dictionary as soon as the cache is created. /// This factory method is used to create instances of <see cref="MultiTenantSurveyApp.TokenStorage.RedisTokenCache"/>. The constructor /// is intentionally made private, since we need to do some async initialization and the instance of the class is not ready /// for use at the completion of the constructor. /// </summary> /// <param name="connection">An instance of <see cref="StackExchange.Redis.IConnectionMultiplexer"/> to use for a connection to Redis.</param> /// <param name="key">An instance of <see cref="MultiTenantSurveyApp.TokenStorage.TokenCacheKey"/> containing the key for the new cache.</param> /// <param name="logger">An instance of <see cref="Microsoft.Extensions.Logging.ILogger"/> to use for logging.</param> /// <returns>An initialized instance of <see cref="MultiTenantSurveyApp.TokenStorage.TokenCacheKey"/>.</returns> <<<<<<< var cache = new RedisTokenCache(connection, key, logger); await cache.InitializeAsync(); return cache; ======= Guard.ArgumentNotNull(connection, "IConnectionMultiplexer"); Guard.ArgumentNotNull(key, "key"); Guard.ArgumentNotNull(logger, "logger"); var redisTokenCache = new RedisTokenCache(); await redisTokenCache.InitializeAsync(connection, key, logger).ConfigureAwait(false); return redisTokenCache; >>>>>>> Guard.ArgumentNotNull(connection, "IConnectionMultiplexer"); Guard.ArgumentNotNull(key, "key"); Guard.ArgumentNotNull(logger, "logger"); var cache = new RedisTokenCache(connection, key, logger); await cache.InitializeAsync() .ConfigureAwait(false); return cache; <<<<<<< ======= _cache = _connection.GetDatabase(); >>>>>>> <<<<<<< ======= await LoadFromStoreAsync().ConfigureAwait(false); >>>>>>> <<<<<<< /// <summary> /// Handles the AfterAccessNotification event, which is triggered right after ADAL accesses the cache. /// </summary> /// <param name="args">An instance of <see cref="Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCacheNotificationArgs"/> containing information for this event.</param> ======= // Triggered right after ADAL accessed the cache. >>>>>>> /// <summary> /// Handles the AfterAccessNotification event, which is triggered right after ADAL accesses the cache. /// </summary> /// <param name="args">An instance of <see cref="Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCacheNotificationArgs"/> containing information for this event.</param>
<<<<<<< public class Synchronization : IResponseHolder ======= public class NodeWaitInterval : Durable { public int Count { get; set; } public Durable NodeInterval { get; set; } public SyncReason Reason { get; set; } public double Percent { get { long nodeTime = (NodeInterval.Finish - NodeInterval.Start); long waitTime = (this.Finish - this.Start); double percent = ((double)waitTime / (double)nodeTime) * 100.0; return percent; } } public string Desc { get { return Percent.ToString("F3") + "%, " + DurationF3 + " ms, " + Count; } } public NodeWaitInterval() { } } public class Synchronization >>>>>>> public class NodeWaitInterval : Durable { public int Count { get; set; } public Durable NodeInterval { get; set; } public SyncReason Reason { get; set; } public double Percent { get { long nodeTime = (NodeInterval.Finish - NodeInterval.Start); long waitTime = (this.Finish - this.Start); double percent = ((double)waitTime / (double)nodeTime) * 100.0; return percent; } } public string Desc { get { return Percent.ToString("F3") + "%, " + DurationF3 + " ms, " + Count; } } public NodeWaitInterval() { } } public class Synchronization : IResponseHolder
<<<<<<< var cookie = new Cookie { Name = httpCookie.Name, Value = httpCookie.Value, Domain = webRequest.RequestUri.Host }; ======= #if FRAMEWORK Cookie cookie = new Cookie { Name = httpCookie.Name, Value = httpCookie.Value, Domain = webRequest.RequestUri.Host }; >>>>>>> var cookie = new Cookie { Name = httpCookie.Name, Value = httpCookie.Value, Domain = webRequest.RequestUri.Host }; <<<<<<< if (HasFiles || AlwaysMultipartFormData) ======= bool needsContentType = String.IsNullOrEmpty(webRequest.ContentType); if (this.HasFiles || this.AlwaysMultipartFormData) >>>>>>> if (HasFiles || AlwaysMultipartFormData) bool needsContentType = String.IsNullOrEmpty(webRequest.ContentType); if (this.HasFiles || this.AlwaysMultipartFormData) <<<<<<< webRequest.ContentType = "application/x-www-form-urlencoded"; RequestBody = EncodeParameters(); ======= if (needsContentType) webRequest.ContentType = "application/x-www-form-urlencoded"; this.RequestBody = this.EncodeParameters(); >>>>>>> if (needsContentType) webRequest.ContentType = "application/x-www-form-urlencoded"; this.RequestBody = this.EncodeParameters(); RequestBody = EncodeParameters(); <<<<<<< webRequest.ContentType = RequestContentType; ======= if (needsContentType) webRequest.ContentType = this.RequestContentType; >>>>>>> if (needsContentType) webRequest.ContentType = this.RequestContentType; <<<<<<< { Comment = cookie.Comment, CommentUri = cookie.CommentUri, Discard = cookie.Discard, Domain = cookie.Domain, Expired = cookie.Expired, Expires = cookie.Expires, HttpOnly = cookie.HttpOnly, Name = cookie.Name, Path = cookie.Path, Port = cookie.Port, Secure = cookie.Secure, TimeStamp = cookie.TimeStamp, Value = cookie.Value, Version = cookie.Version }); foreach (var headerName in webResponse.Headers.AllKeys) ======= { Comment = cookie.Comment, CommentUri = cookie.CommentUri, Discard = cookie.Discard, Domain = cookie.Domain, Expired = cookie.Expired, Expires = cookie.Expires, HttpOnly = cookie.HttpOnly, Name = cookie.Name, Path = cookie.Path, Port = cookie.Port, Secure = cookie.Secure, TimeStamp = cookie.TimeStamp, Value = cookie.Value, Version = cookie.Version }); } } foreach (string headerName in webResponse.Headers.AllKeys) >>>>>>> { Comment = cookie.Comment, CommentUri = cookie.CommentUri, Discard = cookie.Discard, Domain = cookie.Domain, Expired = cookie.Expired, Expires = cookie.Expires, HttpOnly = cookie.HttpOnly, Name = cookie.Name, Path = cookie.Path, Port = cookie.Port, Secure = cookie.Secure, TimeStamp = cookie.TimeStamp, Value = cookie.Value, Version = cookie.Version }); foreach (var headerName in webResponse.Headers.AllKeys)
<<<<<<< /// <summary> /// /// </summary> public interface IRestClient { /// <summary> /// /// </summary> #if !PocketPC CookieContainer CookieContainer { get; set; } #endif /// <summary> /// /// </summary> string UserAgent { get; set; } /// <summary> /// /// </summary> int Timeout { get; set; } /// <summary> /// /// </summary> int ReadWriteTimeout { get; set; } /// <summary> /// /// </summary> bool UseSynchronizationContext { get; set; } /// <summary> /// /// </summary> IAuthenticator Authenticator { get; set; } /// <summary> /// /// </summary> string BaseUrl { get; set; } /// <summary> /// /// </summary> bool PreAuthenticate { get; set; } /// <summary> /// /// </summary> IList<Parameter> DefaultParameters { get; } /// <summary> /// /// </summary> /// <param name="request"></param> /// <param name="callback"></param> RestRequestAsyncHandle ExecuteAsync(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback); /// <summary> /// /// </summary> /// <param name="request"></param> /// <param name="callback"></param> RestRequestAsyncHandle ExecuteAsync<T>(IRestRequest request, Action<IRestResponse<T>, RestRequestAsyncHandle> callback); #if FRAMEWORK || PocketPC IRestResponse Execute(IRestRequest request); IRestResponse<T> Execute<T>(IRestRequest request) where T : new(); #endif ======= /// <summary> /// /// </summary> public interface IRestClient { /// <summary> /// /// </summary> CookieContainer CookieContainer { get; set; } /// <summary> /// /// </summary> string UserAgent { get; set; } /// <summary> /// /// </summary> int Timeout { get; set; } /// <summary> /// /// </summary> bool UseSynchronizationContext { get; set; } /// <summary> /// /// </summary> IAuthenticator Authenticator { get; set; } /// <summary> /// /// </summary> Uri BaseUrl { get; set; } /// <summary> /// /// </summary> IList<Parameter> DefaultParameters { get; } /// <summary> /// /// </summary> /// <param name="request"></param> RestRequestAsyncHandle ExecuteAsync(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback); /// <summary> /// /// </summary> /// <param name="request"></param> RestRequestAsyncHandle ExecuteAsync<T>(IRestRequest request, Action<IRestResponse<T>, RestRequestAsyncHandle> callback); >>>>>>> /// <summary> /// /// </summary> public interface IRestClient { /// <summary> /// /// </summary> #if !PocketPC CookieContainer CookieContainer { get; set; } #endif /// <summary> /// /// </summary> string UserAgent { get; set; } /// <summary> /// /// </summary> int Timeout { get; set; } /// <summary> /// /// </summary> int ReadWriteTimeout { get; set; } /// <summary> /// /// </summary> bool UseSynchronizationContext { get; set; } /// <summary> /// /// </summary> IAuthenticator Authenticator { get; set; } /// <summary> /// /// </summary> Uri BaseUrl { get; set; } /// <summary> /// /// </summary> bool PreAuthenticate { get; set; } /// <summary> /// /// </summary> IList<Parameter> DefaultParameters { get; } /// <summary> /// /// </summary> /// <param name="request"></param> /// <param name="callback"></param> RestRequestAsyncHandle ExecuteAsync(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback); /// <summary> /// /// </summary> /// <param name="request"></param> /// <param name="callback"></param> RestRequestAsyncHandle ExecuteAsync<T>(IRestRequest request, Action<IRestResponse<T>, RestRequestAsyncHandle> callback); #if FRAMEWORK || PocketPC IRestResponse Execute(IRestRequest request); IRestResponse<T> Execute<T>(IRestRequest request) where T : new(); #endif
<<<<<<< foreach(var file in Files) { // Add just the first part of this param, since we will write the file data directly to the Stream WriteStringTo(requestStream, GetMultipartFileHeader(file)); // Write the file data directly to the Stream, rather than serializing it to a string. file.Writer(requestStream); WriteStringTo(requestStream, Environment.NewLine); } foreach(var param in Parameters) ======= var encoding = Encoding.UTF8; foreach (var param in Parameters) >>>>>>> foreach (var param in Parameters) <<<<<<< WriteStringTo(requestStream, GetMultipartFooter()); ======= foreach (var file in Files) { // Add just the first part of this param, since we will write the file data directly to the Stream var header = GetMultipartFileHeader(file); requestStream.Write(encoding.GetBytes(header), 0, header.Length); // Write the file data directly to the Stream, rather than serializing it to a string. file.Writer(requestStream); var lineEnding = Environment.NewLine; requestStream.Write(encoding.GetBytes(lineEnding), 0, lineEnding.Length); } var footer = GetMultipartFooter(); requestStream.Write(encoding.GetBytes(footer), 0, footer.Length); >>>>>>> foreach (var file in Files) { // Add just the first part of this param, since we will write the file data directly to the Stream WriteStringTo(requestStream, GetMultipartFileHeader(file)); // Write the file data directly to the Stream, rather than serializing it to a string. file.Writer(requestStream); WriteStringTo(requestStream, Environment.NewLine); } WriteStringTo(requestStream, GetMultipartFooter());
<<<<<<< ======= bool UnsafeAuthenticatedConnectionSharing { get; set; } #if FRAMEWORK >>>>>>> bool UnsafeAuthenticatedConnectionSharing { get; set; }
<<<<<<< _interceptor = interceptor; ======= _serviceFactory.Services = services; >>>>>>> _interceptor = interceptor; _serviceFactory.Services = services;
<<<<<<< string imageUrl; double scale; Color bgColor = new Color(); ======= >>>>>>> <<<<<<< ImageCommentParser.TryParse(matchedText, out imageUrl, out scale, ref bgColor, out xmlParseException); ======= string imageUrl; double scale; ImageCommentParser.TryParse(matchedText, out imageUrl, out scale, out xmlParseException); >>>>>>> string imageUrl; double scale; Color bgColor = new Color(); ImageCommentParser.TryParse(matchedText, out imageUrl, out scale, ref bgColor, out xmlParseException);
<<<<<<< using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; ======= using System.Linq; >>>>>>> using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; <<<<<<< protected ITestRunner GetRunnerFor(string assemblyName, IGrouping<string, TestCase> testCases) ======= /// <summary> /// If a directory matches one of the forbidden folders, then we should reroute, so we return true in that case /// </summary> public bool CheckDirectory(string dir) { var checkdir = (dir.EndsWith("\\") ? dir : dir + "\\"); return ForbiddenFolders.Any(o => checkdir.StartsWith(o, StringComparison.OrdinalIgnoreCase)); } protected ITestRunner GetRunnerFor(string assemblyName) >>>>>>> /// <summary> /// If a directory matches one of the forbidden folders, then we should reroute, so we return true in that case /// </summary> public bool CheckDirectory(string dir) { var checkdir = (dir.EndsWith("\\") ? dir : dir + "\\"); return ForbiddenFolders.Any(o => checkdir.StartsWith(o, StringComparison.OrdinalIgnoreCase)); } protected ITestRunner GetRunnerFor(string assemblyName, IGrouping<string, TestCase> testCases)
<<<<<<< DiscoveryMethod DiscoveryMethod { get; } ======= bool SkipNonTestAssemblies { get; } >>>>>>> DiscoveryMethod DiscoveryMethod { get; } bool SkipNonTestAssemblies { get; } <<<<<<< public DiscoveryMethod DiscoveryMethod { get; private set; } = DiscoveryMethod.Old; ======= public bool SkipNonTestAssemblies { get; private set; } >>>>>>> public DiscoveryMethod DiscoveryMethod { get; private set; } = DiscoveryMethod.Old; public bool SkipNonTestAssemblies { get; private set; }
<<<<<<< while (true) { methodDef = typeDef.Methods.FirstOrDefault(o => o.Name == methodName); if (methodDef != null) break; var baseType = typeDef.BaseType; if (baseType == null || baseType.FullName == "System.Object") return NavigationData.Invalid; typeDef = typeDef.BaseType.Resolve(); } var sequencePoint = FirstOrDefaultSequencePoint(methodDef); if (sequencePoint != null) return new NavigationData(sequencePoint.Document.Url, sequencePoint.StartLine); return NavigationData.Invalid; #else var navigationData = GetMethods(className) .Where(m => m.Name == methodName) .Select(FirstOrDefaultSequencePoint) ======= var sequencePoint = GetTypeLineage(className) .Select(typeDef => typeDef.GetMethods().FirstOrDefault(o => o.Name == methodName)) >>>>>>> var sequencePoint = GetTypeLineage(className) .Select(typeDef => typeDef.Methods.FirstOrDefault(o => o.Name == methodName))
<<<<<<< MaxCpuCount = GetInnerTextAsInt(runConfiguration, "MaxCpuCount", -1); ResultsDirectory = GetInnerText(runConfiguration, "ResultsDirectory"); TargetPlatform = GetInnerText(runConfiguration, "TargetPlatform"); TargetFrameworkVersion = GetInnerText(runConfiguration, "TargetFrameworkVersion"); TestAdapterPaths = GetInnerText(runConfiguration, "TestAdapterPaths"); CollectSourceInformation = GetInnerTextAsBool(runConfiguration, "CollectSourceInformation", true); DisableAppDomain = GetInnerTextAsBool(runConfiguration, "DisableAppDomain", false); DisableParallelization = GetInnerTextAsBool(runConfiguration, "DisableParallelization", false); DesignMode = GetInnerTextAsBool(runConfiguration, "DesignMode", false); ======= MaxCpuCount = GetInnerTextAsInt(runConfiguration, nameof(MaxCpuCount), -1); ResultsDirectory = GetInnerTextWithLog(runConfiguration, nameof(ResultsDirectory)); TargetPlatform = GetInnerTextWithLog(runConfiguration, nameof(TargetPlatform)); TargetFrameworkVersion = GetInnerTextWithLog(runConfiguration, nameof(TargetFrameworkVersion)); TestAdapterPaths = GetInnerTextWithLog(runConfiguration, nameof(TestAdapterPaths)); CollectSourceInformation = GetInnerTextAsBool(runConfiguration, nameof(CollectSourceInformation), true); >>>>>>> MaxCpuCount = GetInnerTextAsInt(runConfiguration, "MaxCpuCount", -1); ResultsDirectory = GetInnerTextWithLog(runConfiguration, "ResultsDirectory"); TargetPlatform = GetInnerTextWithLog(runConfiguration, "TargetPlatform"); TargetFrameworkVersion = GetInnerTextWithLog(runConfiguration, "TargetFrameworkVersion"); TestAdapterPaths = GetInnerTextWithLog(runConfiguration, "TestAdapterPaths"); CollectSourceInformation = GetInnerTextAsBool(runConfiguration, "CollectSourceInformation", true); DisableAppDomain = GetInnerTextAsBool(runConfiguration, "DisableAppDomain", false); DisableParallelization = GetInnerTextAsBool(runConfiguration, "DisableParallelization", false); DesignMode = GetInnerTextAsBool(runConfiguration, "DesignMode", false); <<<<<<< private void UpdateNumberOfTestWorkers() { // Overriding the NumberOfTestWorkers if DisableParallelization is true. if(DisableParallelization && NumberOfTestWorkers < 0) { NumberOfTestWorkers = 0; } else if(DisableParallelization && NumberOfTestWorkers > 0) { if(_logger.Verbosity > 0) { _logger.Warning(string.Format("DisableParallelization:{0} & NumberOfTestWorkers:{1} are conflicting settings, hence not running in parallel", DisableParallelization, NumberOfTestWorkers)); } NumberOfTestWorkers = 0; } } private string GetInnerText(XmlNode startNode, string xpath, params string[] validValues) ======= private string GetInnerTextWithLog(XmlNode startNode, string xpath, params string[] validValues) >>>>>>> private void UpdateNumberOfTestWorkers() { // Overriding the NumberOfTestWorkers if DisableParallelization is true. if(DisableParallelization && NumberOfTestWorkers < 0) { NumberOfTestWorkers = 0; } else if(DisableParallelization && NumberOfTestWorkers > 0) { if(_logger.Verbosity > 0) { _logger.Warning(string.Format("DisableParallelization:{0} & NumberOfTestWorkers:{1} are conflicting settings, hence not running in parallel", DisableParallelization, NumberOfTestWorkers)); } NumberOfTestWorkers = 0; } } private string GetInnerTextWithLog(XmlNode startNode, string xpath, params string[] validValues)
<<<<<<< using System; using System.Collections.Generic; using System.Data.Entity.Infrastructure; using System.Linq; using System.Text; using System.Linq.Expressions; using System.Collections; using System.Threading; using System.Threading.Tasks; using System.Data.Entity; namespace LinqKit { /// <summary> /// An IQueryable wrapper that allows us to visit the query's expression tree just before LINQ to SQL gets to it. /// This is based on the excellent work of Tomas Petricek: http://tomasp.net/blog/linq-expand.aspx /// </summary> public class ExpandableQuery<T> : IQueryable<T>, IOrderedQueryable<T>, IOrderedQueryable, IDbAsyncEnumerable<T> { readonly ExpandableQueryProvider<T> _provider; readonly IQueryable<T> _inner; internal IQueryable<T> InnerQuery { get { return _inner; } } // Original query, that we're wrapping internal ExpandableQuery (IQueryable<T> inner) { _inner = inner; _provider = new ExpandableQueryProvider<T> (this); } Expression IQueryable.Expression { get { return _inner.Expression; } } Type IQueryable.ElementType { get { return typeof (T); } } IQueryProvider IQueryable.Provider { get { return _provider; } } public IEnumerator<T> GetEnumerator () { return _inner.GetEnumerator (); } IEnumerator IEnumerable.GetEnumerator () { return _inner.GetEnumerator (); } public override string ToString() { return _inner.ToString(); } public IDbAsyncEnumerator<T> GetAsyncEnumerator() { var asyncEnumerable = _inner as IDbAsyncEnumerable<T>; if (asyncEnumerable != null) return asyncEnumerable.GetAsyncEnumerator(); return new ExpandableDbAsyncEnumerator<T>(_inner.GetEnumerator()); } IDbAsyncEnumerator IDbAsyncEnumerable.GetAsyncEnumerator() { return this.GetAsyncEnumerator(); } } public static class ExpandableQueryIncludeExtension { public static IQueryable<T> Include<T>(this ExpandableQuery<T> ex, string path) where T : class { return ex.InnerQuery.Include(path).AsExpandable(); } } class ExpandableQueryProvider<T> : IQueryProvider, IDbAsyncQueryProvider { readonly ExpandableQuery<T> _query; internal ExpandableQueryProvider (ExpandableQuery<T> query) { _query = query; } // The following four methods first call ExpressionExpander to visit the expression tree, then call // upon the inner query to do the remaining work. IQueryable<TElement> IQueryProvider.CreateQuery<TElement> (Expression expression) { return new ExpandableQuery<TElement> (_query.InnerQuery.Provider.CreateQuery<TElement> (expression.Expand())); } IQueryable IQueryProvider.CreateQuery (Expression expression) { return _query.InnerQuery.Provider.CreateQuery (expression.Expand()); } TResult IQueryProvider.Execute<TResult> (Expression expression) { return _query.InnerQuery.Provider.Execute<TResult> (expression.Expand()); } object IQueryProvider.Execute (Expression expression) { return _query.InnerQuery.Provider.Execute (expression.Expand()); } public Task<object> ExecuteAsync(Expression expression, CancellationToken cancellationToken) { var asyncProvider = _query.InnerQuery.Provider as IDbAsyncQueryProvider; if (asyncProvider != null) return asyncProvider.ExecuteAsync(expression.Expand(), cancellationToken); return Task.FromResult(_query.InnerQuery.Provider.Execute(expression.Expand())); } public Task<TResult> ExecuteAsync<TResult>(Expression expression, CancellationToken cancellationToken) { var asyncProvider = _query.InnerQuery.Provider as IDbAsyncQueryProvider; if (asyncProvider != null) return asyncProvider.ExecuteAsync<TResult>(expression.Expand(), cancellationToken); return Task.FromResult(_query.InnerQuery.Provider.Execute<TResult>(expression.Expand())); } } } ======= using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Linq.Expressions; using System.Collections; using System.Threading; #if !NET35 using System.Data.Entity.Infrastructure; using System.Threading.Tasks; #endif namespace LinqKit { /// <summary> /// An IQueryable wrapper that allows us to visit the query's expression tree just before LINQ to SQL gets to it. /// This is based on the excellent work of Tomas Petricek: http://tomasp.net/blog/linq-expand.aspx /// </summary> #if NET35 public class ExpandableQuery<T> : IQueryable<T>, IOrderedQueryable<T>, IOrderedQueryable #else public class ExpandableQuery<T> : IQueryable<T>, IOrderedQueryable<T>, IOrderedQueryable, IDbAsyncEnumerable<T> #endif { readonly ExpandableQueryProvider<T> _provider; readonly IQueryable<T> _inner; internal IQueryable<T> InnerQuery { get { return _inner; } } // Original query, that we're wrapping internal ExpandableQuery(IQueryable<T> inner) { _inner = inner; _provider = new ExpandableQueryProvider<T>(this); } Expression IQueryable.Expression { get { return _inner.Expression; } } Type IQueryable.ElementType { get { return typeof(T); } } IQueryProvider IQueryable.Provider { get { return _provider; } } public IEnumerator<T> GetEnumerator() { return _inner.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return _inner.GetEnumerator(); } public override string ToString() { return _inner.ToString(); } #if !NET35 public IDbAsyncEnumerator<T> GetAsyncEnumerator() { var asyncEnumerable = _inner as IDbAsyncEnumerable<T>; if (asyncEnumerable != null) return asyncEnumerable.GetAsyncEnumerator(); return new ExpandableDbAsyncEnumerator<T>(_inner.GetEnumerator()); } IDbAsyncEnumerator IDbAsyncEnumerable.GetAsyncEnumerator() { return this.GetAsyncEnumerator(); } #endif } #if NET35 class ExpandableQueryProvider<T> : IQueryProvider #else class ExpandableQueryProvider<T> : IQueryProvider, IDbAsyncQueryProvider #endif { readonly ExpandableQuery<T> _query; internal ExpandableQueryProvider(ExpandableQuery<T> query) { _query = query; } // The following four methods first call ExpressionExpander to visit the expression tree, then call // upon the inner query to do the remaining work. IQueryable<TElement> IQueryProvider.CreateQuery<TElement>(Expression expression) { return new ExpandableQuery<TElement>(_query.InnerQuery.Provider.CreateQuery<TElement>(expression.Expand())); } IQueryable IQueryProvider.CreateQuery(Expression expression) { return _query.InnerQuery.Provider.CreateQuery(expression.Expand()); } TResult IQueryProvider.Execute<TResult>(Expression expression) { return _query.InnerQuery.Provider.Execute<TResult>(expression.Expand()); } object IQueryProvider.Execute(Expression expression) { return _query.InnerQuery.Provider.Execute(expression.Expand()); } #if !NET35 public Task<object> ExecuteAsync(Expression expression, CancellationToken cancellationToken) { var asyncProvider = _query.InnerQuery.Provider as IDbAsyncQueryProvider; if (asyncProvider != null) return asyncProvider.ExecuteAsync(expression.Expand(), cancellationToken); return Task.FromResult(_query.InnerQuery.Provider.Execute(expression.Expand())); } public Task<TResult> ExecuteAsync<TResult>(Expression expression, CancellationToken cancellationToken) { var asyncProvider = _query.InnerQuery.Provider as IDbAsyncQueryProvider; if (asyncProvider != null) return asyncProvider.ExecuteAsync<TResult>(expression.Expand(), cancellationToken); return Task.FromResult(_query.InnerQuery.Provider.Execute<TResult>(expression.Expand())); } #endif } } >>>>>>> using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Linq.Expressions; using System.Collections; using System.Threading; using System.Data.Entity; #if !NET35 using System.Data.Entity.Infrastructure; using System.Threading.Tasks; #endif namespace LinqKit { /// <summary> /// An IQueryable wrapper that allows us to visit the query's expression tree just before LINQ to SQL gets to it. /// This is based on the excellent work of Tomas Petricek: http://tomasp.net/blog/linq-expand.aspx /// </summary> #if NET35 public class ExpandableQuery<T> : IQueryable<T>, IOrderedQueryable<T>, IOrderedQueryable #else public class ExpandableQuery<T> : IQueryable<T>, IOrderedQueryable<T>, IOrderedQueryable, IDbAsyncEnumerable<T> #endif { readonly ExpandableQueryProvider<T> _provider; readonly IQueryable<T> _inner; internal IQueryable<T> InnerQuery { get { return _inner; } } // Original query, that we're wrapping internal ExpandableQuery(IQueryable<T> inner) { _inner = inner; _provider = new ExpandableQueryProvider<T>(this); } Expression IQueryable.Expression { get { return _inner.Expression; } } Type IQueryable.ElementType { get { return typeof(T); } } IQueryProvider IQueryable.Provider { get { return _provider; } } public IEnumerator<T> GetEnumerator() { return _inner.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return _inner.GetEnumerator(); } public override string ToString() { return _inner.ToString(); } #if !NET35 public IDbAsyncEnumerator<T> GetAsyncEnumerator() { var asyncEnumerable = _inner as IDbAsyncEnumerable<T>; if (asyncEnumerable != null) return asyncEnumerable.GetAsyncEnumerator(); return new ExpandableDbAsyncEnumerator<T>(_inner.GetEnumerator()); } IDbAsyncEnumerator IDbAsyncEnumerable.GetAsyncEnumerator() { return this.GetAsyncEnumerator(); } #endif } public static class ExpandableQueryIncludeExtension { public static IQueryable<T> Include<T>(this ExpandableQuery<T> ex, string path) where T : class { return ex.InnerQuery.Include(path).AsExpandable(); } } #if NET35 class ExpandableQueryProvider<T> : IQueryProvider #else class ExpandableQueryProvider<T> : IQueryProvider, IDbAsyncQueryProvider #endif { readonly ExpandableQuery<T> _query; internal ExpandableQueryProvider(ExpandableQuery<T> query) { _query = query; } // The following four methods first call ExpressionExpander to visit the expression tree, then call // upon the inner query to do the remaining work. IQueryable<TElement> IQueryProvider.CreateQuery<TElement>(Expression expression) { return new ExpandableQuery<TElement>(_query.InnerQuery.Provider.CreateQuery<TElement>(expression.Expand())); } IQueryable IQueryProvider.CreateQuery(Expression expression) { return _query.InnerQuery.Provider.CreateQuery(expression.Expand()); } TResult IQueryProvider.Execute<TResult>(Expression expression) { return _query.InnerQuery.Provider.Execute<TResult>(expression.Expand()); } object IQueryProvider.Execute(Expression expression) { return _query.InnerQuery.Provider.Execute(expression.Expand()); } #if !NET35 public Task<object> ExecuteAsync(Expression expression, CancellationToken cancellationToken) { var asyncProvider = _query.InnerQuery.Provider as IDbAsyncQueryProvider; if (asyncProvider != null) return asyncProvider.ExecuteAsync(expression.Expand(), cancellationToken); return Task.FromResult(_query.InnerQuery.Provider.Execute(expression.Expand())); } public Task<TResult> ExecuteAsync<TResult>(Expression expression, CancellationToken cancellationToken) { var asyncProvider = _query.InnerQuery.Provider as IDbAsyncQueryProvider; if (asyncProvider != null) return asyncProvider.ExecuteAsync<TResult>(expression.Expand(), cancellationToken); return Task.FromResult(_query.InnerQuery.Provider.Execute<TResult>(expression.Expand())); } #endif } }
<<<<<<< var sut = CampaignAdminControllerBuilder.AllNullParamsInstance().Build(); ======= var sut = new CampaignController(null, null); sut.SetClaims(new List<Claim>()); >>>>>>> var sut = CampaignAdminControllerBuilder.AllNullParamsInstance().Build(); sut.SetClaims(new List<Claim>()); <<<<<<< var sut = CampaignAdminControllerBuilder.AllNullParamsInstance().WithToday(() => dateTimeNow).Build(); ======= var sut = new CampaignController(null, null) { DateTimeNow = () => dateTimeNow }; sut.SetClaims(new List<Claim>{new Claim(ClaimTypes.TimeZoneId, TimeZoneId) }); >>>>>>> var sut = CampaignAdminControllerBuilder.AllNullParamsInstance().WithToday(() => dateTimeNow).Build(); sut.SetClaims(new List<Claim>{new Claim(ClaimTypes.TimeZoneId, TimeZoneId) });
<<<<<<< using Microsoft.EntityFrameworkCore; ======= using AllReady.ViewModels.Home; using Microsoft.Data.Entity; >>>>>>> using Microsoft.EntityFrameworkCore; using AllReady.ViewModels.Home;
<<<<<<< using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; ======= using Microsoft.Data.Entity.Migrations; >>>>>>> using Microsoft.EntityFrameworkCore.Migrations;
<<<<<<< using AllReady.Providers; using System.IO; ======= >>>>>>> using System.IO;
<<<<<<< using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; ======= using Microsoft.Data.Entity.Migrations; >>>>>>> using Microsoft.EntityFrameworkCore.Migrations;
<<<<<<< using System; using System.Collections.Generic; using AllReady.Models; using Microsoft.EntityFrameworkCore.Migrations; ======= using Microsoft.Data.Entity.Migrations; >>>>>>> using Microsoft.EntityFrameworkCore.Migrations;
<<<<<<< public DbSet<FileAttachment> Attachments { get; set; } ======= public DbSet<CampaignManager> CampaignManagers { get; set; } public DbSet<EventManager> EventManagers { get; set; } public DbSet<EventManagerInvite> EventManagerInvites { get; set; } public DbSet<CampaignManagerInvite> CampaignManagerInvites { get; set; } >>>>>>> public DbSet<CampaignManager> CampaignManagers { get; set; } public DbSet<EventManager> EventManagers { get; set; } public DbSet<EventManagerInvite> EventManagerInvites { get; set; } public DbSet<CampaignManagerInvite> CampaignManagerInvites { get; set; } public DbSet<FileAttachment> Attachments { get; set; } <<<<<<< Map(modelBuilder.Entity<FileAttachment>()); ======= Map(modelBuilder.Entity<CampaignManager>()); Map(modelBuilder.Entity<EventManager>()); Map(modelBuilder.Entity<EventManagerInvite>()); Map(modelBuilder.Entity<CampaignManagerInvite>()); >>>>>>> Map(modelBuilder.Entity<CampaignManager>()); Map(modelBuilder.Entity<EventManager>()); Map(modelBuilder.Entity<EventManagerInvite>()); Map(modelBuilder.Entity<CampaignManagerInvite>()); Map(modelBuilder.Entity<FileAttachment>()); <<<<<<< public void Map(EntityTypeBuilder<FileAttachment> builder) { builder.HasKey(a => a.Id); builder.HasOne(a => a.Task); builder.Property(a => a.Name).IsRequired(); } ======= private void Map(EntityTypeBuilder<CampaignManager> builder) { builder.HasKey(x => new { x.UserId, x.CampaignId }); builder.HasOne(x => x.User) .WithMany(u => u.ManagedCampaigns) .HasForeignKey(x => x.UserId); builder.HasOne(x => x.Campaign) .WithMany(u => u.CampaignManagers) .HasForeignKey(x => x.CampaignId); } private void Map(EntityTypeBuilder<EventManager> builder) { builder.HasKey(x => new { x.UserId, x.EventId }); builder.HasOne(x => x.User) .WithMany(u => u.ManagedEvents) .HasForeignKey(x => x.UserId); builder.HasOne(x => x.Event) .WithMany(u => u.EventManagers) .HasForeignKey(x => x.EventId); } private void Map(EntityTypeBuilder<EventManagerInvite> builder) { builder.HasKey(x => x.Id); builder.Property(a => a.InviteeEmailAddress).IsRequired(); builder.Property(a => a.SenderUserId).IsRequired(); builder.HasOne(x => x.SenderUser) .WithMany(u => u.SentEventManagerInvites) .HasForeignKey(x => x.SenderUserId) .IsRequired(); builder.HasOne(x => x.Event) .WithMany(u => u.ManagementInvites) .HasForeignKey(x => x.EventId) .IsRequired(); builder.Ignore(x => x.IsAccepted); builder.Ignore(x => x.IsRejected); builder.Ignore(x => x.IsRevoked); builder.Ignore(x => x.IsPending); } private void Map(EntityTypeBuilder<CampaignManagerInvite> builder) { builder.HasKey(x => x.Id); builder.Property(a => a.InviteeEmailAddress).IsRequired(); builder.Property(a => a.SenderUserId).IsRequired(); builder.HasOne(x => x.SenderUser) .WithMany(u => u.SentCampaignManagerInvites) .HasForeignKey(x => x.SenderUserId) .IsRequired(); builder.HasOne(x => x.Campaign) .WithMany(u => u.ManagementInvites) .HasForeignKey(x => x.CampaignId) .IsRequired(); builder.Ignore(x => x.IsAccepted); builder.Ignore(x => x.IsRejected); builder.Ignore(x => x.IsRevoked); builder.Ignore(x => x.IsPending); } >>>>>>> private void Map(EntityTypeBuilder<CampaignManager> builder) { builder.HasKey(x => new { x.UserId, x.CampaignId }); builder.HasOne(x => x.User) .WithMany(u => u.ManagedCampaigns) .HasForeignKey(x => x.UserId); builder.HasOne(x => x.Campaign) .WithMany(u => u.CampaignManagers) .HasForeignKey(x => x.CampaignId); } private void Map(EntityTypeBuilder<EventManager> builder) { builder.HasKey(x => new { x.UserId, x.EventId }); builder.HasOne(x => x.User) .WithMany(u => u.ManagedEvents) .HasForeignKey(x => x.UserId); builder.HasOne(x => x.Event) .WithMany(u => u.EventManagers) .HasForeignKey(x => x.EventId); } private void Map(EntityTypeBuilder<EventManagerInvite> builder) { builder.HasKey(x => x.Id); builder.Property(a => a.InviteeEmailAddress).IsRequired(); builder.Property(a => a.SenderUserId).IsRequired(); builder.HasOne(x => x.SenderUser) .WithMany(u => u.SentEventManagerInvites) .HasForeignKey(x => x.SenderUserId) .IsRequired(); builder.HasOne(x => x.Event) .WithMany(u => u.ManagementInvites) .HasForeignKey(x => x.EventId) .IsRequired(); builder.Ignore(x => x.IsAccepted); builder.Ignore(x => x.IsRejected); builder.Ignore(x => x.IsRevoked); builder.Ignore(x => x.IsPending); } private void Map(EntityTypeBuilder<CampaignManagerInvite> builder) { builder.HasKey(x => x.Id); builder.Property(a => a.InviteeEmailAddress).IsRequired(); builder.Property(a => a.SenderUserId).IsRequired(); builder.HasOne(x => x.SenderUser) .WithMany(u => u.SentCampaignManagerInvites) .HasForeignKey(x => x.SenderUserId) .IsRequired(); builder.HasOne(x => x.Campaign) .WithMany(u => u.ManagementInvites) .HasForeignKey(x => x.CampaignId) .IsRequired(); builder.Ignore(x => x.IsAccepted); builder.Ignore(x => x.IsRejected); builder.Ignore(x => x.IsRevoked); builder.Ignore(x => x.IsPending); } public void Map(EntityTypeBuilder<FileAttachment> builder) { builder.HasKey(a => a.Id); builder.HasOne(a => a.Task); builder.Property(a => a.Name).IsRequired(); }
<<<<<<< using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using AllReady.Models; using MediatR; using Microsoft.Data.Entity; using Microsoft.Extensions.OptionsModel; namespace AllReady.Features.Notifications { public class NotifyAdminForTaskSignupStatusChange : INotificationHandler<TaskSignupStatusChanged> { public void Handle(TaskSignupStatusChanged notification) { // TODO: handle event } } } ======= using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using AllReady.Models; using MediatR; using Microsoft.Data.Entity; using Microsoft.Framework.OptionsModel; namespace AllReady.Features.Notifications { public class NotifyAdminForTaskSignupStatusChange : INotificationHandler<TaskSignupStatusChanged> { private readonly AllReadyContext _context; private readonly IMediator _bus; private readonly IOptions<GeneralSettings> _options; public NotifyAdminForTaskSignupStatusChange(AllReadyContext context, IMediator bus, IOptions<GeneralSettings> options) { _context = context; _bus = bus; _options = options; } public void Handle(TaskSignupStatusChanged notification) { var taskSignup = _context.TaskSignups .Include(ts => ts.Task) .ThenInclude(t => t.Activity).ThenInclude(a => a.Organizer) .Include(ts => ts.Task) .ThenInclude(t => t.Activity).ThenInclude(a => a.Campaign).ThenInclude(c => c.Organizer) .Include(ts => ts.User) .Single(ts => ts.Id == notification.SignupId); var volunteer = taskSignup.User; var task = taskSignup.Task; var activity = task.Activity; var campaign = activity.Campaign; //Prefer activity organizer email; fallback to campaign organizer email var adminEmail = taskSignup.Task.Activity.Organizer?.Email; if (string.IsNullOrWhiteSpace(adminEmail)) { adminEmail = taskSignup.Task.Activity.Campaign.Organizer?.Email; } if (!string.IsNullOrWhiteSpace(adminEmail)) { var link = $"View activity: http://{_options.Value.SiteBaseUrl}/Admin/Task/Details/{taskSignup.Task.Id}"; var subject = $"Task status changed ({taskSignup.Status}) for volunteer {volunteer.Name ?? volunteer.Email}"; var message = $@"A volunteer's status has changed for a task. Volunteer: {volunteer.Name} ({volunteer.Email}) New status: {taskSignup.Status} Task: {task.Name} {link} Activity: {activity.Name} Campaign: {campaign.Name}"; var command = new NotifyVolunteersCommand { ViewModel = new NotifyVolunteersViewModel { EmailMessage = message, HtmlMessage = message, EmailRecipients = new List<string> { adminEmail }, Subject = subject } }; _bus.Send(command); } } } } >>>>>>> using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using AllReady.Models; using MediatR; using Microsoft.Data.Entity; using Microsoft.Extensions.OptionsModel; namespace AllReady.Features.Notifications { public class NotifyAdminForTaskSignupStatusChange : INotificationHandler<TaskSignupStatusChanged> { private readonly AllReadyContext _context; private readonly IMediator _bus; private readonly IOptions<GeneralSettings> _options; public NotifyAdminForTaskSignupStatusChange(AllReadyContext context, IMediator bus, IOptions<GeneralSettings> options) { _context = context; _bus = bus; _options = options; } public void Handle(TaskSignupStatusChanged notification) { var taskSignup = _context.TaskSignups .Include(ts => ts.Task) .ThenInclude(t => t.Activity).ThenInclude(a => a.Organizer) .Include(ts => ts.Task) .ThenInclude(t => t.Activity).ThenInclude(a => a.Campaign).ThenInclude(c => c.Organizer) .Include(ts => ts.User) .Single(ts => ts.Id == notification.SignupId); var volunteer = taskSignup.User; var task = taskSignup.Task; var activity = task.Activity; var campaign = activity.Campaign; //Prefer activity organizer email; fallback to campaign organizer email var adminEmail = taskSignup.Task.Activity.Organizer?.Email; if (string.IsNullOrWhiteSpace(adminEmail)) { adminEmail = taskSignup.Task.Activity.Campaign.Organizer?.Email; } if (!string.IsNullOrWhiteSpace(adminEmail)) { var link = $"View activity: http://{_options.Value.SiteBaseUrl}/Admin/Task/Details/{taskSignup.Task.Id}"; var subject = $"Task status changed ({taskSignup.Status}) for volunteer {volunteer.Name ?? volunteer.Email}"; var message = $@"A volunteer's status has changed for a task. Volunteer: {volunteer.Name} ({volunteer.Email}) New status: {taskSignup.Status} Task: {task.Name} {link} Activity: {activity.Name} Campaign: {campaign.Name}"; var command = new NotifyVolunteersCommand { ViewModel = new NotifyVolunteersViewModel { EmailMessage = message, HtmlMessage = message, EmailRecipients = new List<string> { adminEmail }, Subject = subject } }; _bus.Send(command); } } } }
<<<<<<< var refactoringContext = new OmniSharpRefactoringContext(doc, resolver, location); refactoringContext.Services.AddService (typeof(NamingConventionService), new DefaultNameService ()); ======= OmniSharpRefactoringContext refactoringContext; if(request is CodeActionRequest) { var car = request as CodeActionRequest; var startLocation = new TextLocation(car.SelectionStartLine.Value, car.SelectionStartColumn.Value); System.Console.WriteLine(startLocation); var endLocation = new TextLocation(car.SelectionEndLine.Value, car.SelectionEndColumn.Value); refactoringContext = new OmniSharpRefactoringContext(doc, resolver, location, startLocation, endLocation); } else { refactoringContext = new OmniSharpRefactoringContext(doc, resolver, location); } >>>>>>> OmniSharpRefactoringContext refactoringContext; if(request is CodeActionRequest) { var car = request as CodeActionRequest; var startLocation = new TextLocation(car.SelectionStartLine.Value, car.SelectionStartColumn.Value); System.Console.WriteLine(startLocation); var endLocation = new TextLocation(car.SelectionEndLine.Value, car.SelectionEndColumn.Value); refactoringContext = new OmniSharpRefactoringContext(doc, resolver, location, startLocation, endLocation); } else { refactoringContext = new OmniSharpRefactoringContext(doc, resolver, location); } refactoringContext.Services.AddService (typeof(NamingConventionService), new DefaultNameService ());

MergeLlama is a unique dataset that encapsulates real-world merge conflicts alongside their corresponding resolutions. Developed from the foundational dataset shared in "Anonymous. (2022). Data set for FSE 2022 Submission Program Merge Conflict Resolution via Neural Transformers", MergeLlama provides a comprehensive collection of conflict scenarios and how they were resolved. With potential multiple conflicts in a single entry followed by its respective resolution, this dataset serves as a rich resource for understanding merge conflicts and developing automated resolution strategies.

For those using this dataset, please cite as follows:

"MergeLlama Dataset. (2023). Merge Conflicts Fused with Their Resolutions. Based on: Anonymous. (2022). Data set for FSE 2022 Submission Program Merge Conflict Resolution via Neural Transformers (1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.6366908".

Downloads last month
49
Edit dataset card

Models trained or fine-tuned on codys12/MergeLlama