From cfeb2d399e3fb95d33e6022651bea3709d58aa19 Mon Sep 17 00:00:00 2001 From: Matt Beard Date: Fri, 14 Aug 2020 18:43:04 +0100 Subject: [PATCH] Init Commit --- MBeard.MergeFixPlugin.sln | 25 ++++++ .../MBeard.MergeFixPlugin.csproj | 73 ++++++++++++++++++ MBeard.MergeFixPlugin/MBeard.snk | Bin 0 -> 596 bytes MBeard.MergeFixPlugin/MergeFixPlugin.cs | 24 ++++++ .../Properties/AssemblyInfo.cs | 36 +++++++++ MBeard.MergeFixPlugin/packages.config | 4 + 6 files changed, 162 insertions(+) create mode 100644 MBeard.MergeFixPlugin.sln create mode 100644 MBeard.MergeFixPlugin/MBeard.MergeFixPlugin.csproj create mode 100644 MBeard.MergeFixPlugin/MBeard.snk create mode 100644 MBeard.MergeFixPlugin/MergeFixPlugin.cs create mode 100644 MBeard.MergeFixPlugin/Properties/AssemblyInfo.cs create mode 100644 MBeard.MergeFixPlugin/packages.config diff --git a/MBeard.MergeFixPlugin.sln b/MBeard.MergeFixPlugin.sln new file mode 100644 index 0000000..a2cff26 --- /dev/null +++ b/MBeard.MergeFixPlugin.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MBeard.MergeFixPlugin", "MBeard.MergeFixPlugin\MBeard.MergeFixPlugin.csproj", "{595172BE-6F00-4221-A140-56B4FB553578}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {595172BE-6F00-4221-A140-56B4FB553578}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {595172BE-6F00-4221-A140-56B4FB553578}.Debug|Any CPU.Build.0 = Debug|Any CPU + {595172BE-6F00-4221-A140-56B4FB553578}.Release|Any CPU.ActiveCfg = Release|Any CPU + {595172BE-6F00-4221-A140-56B4FB553578}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FF034D08-D492-4033-B2D1-91B82A03A942} + EndGlobalSection +EndGlobal diff --git a/MBeard.MergeFixPlugin/MBeard.MergeFixPlugin.csproj b/MBeard.MergeFixPlugin/MBeard.MergeFixPlugin.csproj new file mode 100644 index 0000000..929eaad --- /dev/null +++ b/MBeard.MergeFixPlugin/MBeard.MergeFixPlugin.csproj @@ -0,0 +1,73 @@ + + + + + Debug + AnyCPU + {595172BE-6F00-4221-A140-56B4FB553578} + Library + Properties + MBeard.MergeFixPlugin + MBeard.MergeFixPlugin + v4.6.2 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + + + MBeard.snk + + + + ..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.26\lib\net462\Microsoft.Crm.Sdk.Proxy.dll + + + ..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.26\lib\net462\Microsoft.Xrm.Sdk.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MBeard.MergeFixPlugin/MBeard.snk b/MBeard.MergeFixPlugin/MBeard.snk new file mode 100644 index 0000000000000000000000000000000000000000..5e5fede997c5781f71f76b5fc2fed503d981f359 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096AV!|Au?qHR0IiX6D1~G zfM$G1DaH9KFd->JJXlx}v*LPTHGzI2(a%!{+;fd%0#WFkpWFwVfOAIHFOH{7pN&NP zduLvl#;$X1qhsLdz3GHAquJ&ftq`uMTP@{4c@;dbcYLZI?6z5H0I1P_w5RC$>hABq zl&(^j8Nv_xjJiA4E}f`dYT-eJ}j_N_pa_A^(?+FsvQ$pw=N=S75q-oZwV zPQ64+kLPtsQ9SZD(;1|A*xg}tdfwk+kQuXvfC`UGzIh;7Pz!KEUKW+utYH#waTi4& ze{aY>gt`vi=J_TaIVe^86El1K8}{z{$&YM{k35E0~4F)(ibWIeL0;9RH=wN(7eVgT1Y5mGD0`rC#L)3Hj24 zuHKMQ0@Q^UWcp`6*Y1+Oiix6cx}ojz#FK+)zI3*cjJ1(5FV|z!npJNlqd7W0w>TZn#V&UsUtU6FY24X(ZIe~L#RaR_3=CvUEF>|toB{|9V` z0U{oMTP9}w>JUoI6|+7hbvho6h@s{*{UD7}SZ}`H#gRJ_dt5O92xjUh9uKK1>GCaZ io0ebplsmzwC^A0R&t9=KcDTopm-){C4V3}Ge;zEilO7ZR literal 0 HcmV?d00001 diff --git a/MBeard.MergeFixPlugin/MergeFixPlugin.cs b/MBeard.MergeFixPlugin/MergeFixPlugin.cs new file mode 100644 index 0000000..2121559 --- /dev/null +++ b/MBeard.MergeFixPlugin/MergeFixPlugin.cs @@ -0,0 +1,24 @@ +using Microsoft.Crm.Sdk.Messages; +using Microsoft.Xrm.Sdk; +using System; + + +namespace MBeard +{ + public class MergeFixPlugin : IPlugin + { + public void Execute(IServiceProvider serviceProvider) + { + var context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); + + if (context.MessageName != "Merge") + return; + + var mergeReq = new MergeRequest() + { + Parameters = context.InputParameters + }; + mergeReq.PerformParentingChecks = false; + } + } +} diff --git a/MBeard.MergeFixPlugin/Properties/AssemblyInfo.cs b/MBeard.MergeFixPlugin/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..391e6af --- /dev/null +++ b/MBeard.MergeFixPlugin/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MBeard.MergeFixPlugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MBeard.MergeFixPlugin")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("595172be-6f00-4221-a140-56b4fb553578")] + +// 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.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MBeard.MergeFixPlugin/packages.config b/MBeard.MergeFixPlugin/packages.config new file mode 100644 index 0000000..7166ce5 --- /dev/null +++ b/MBeard.MergeFixPlugin/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file