Produced by Araxis Merge on 2/1/2017 2:56:51 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\Araxis_Merge_Comprasion\Pub_un\BTSSS_CIF_122016.zip\BTSSS_CIF_12_20_16\clean\CRM\trunk\SDK\SampleCode\CS\Plug-ins | SharedVariablesPlugin.cs | Tue Dec 20 19:51:42 2016 UTC |
| 2 | Wed Feb 1 19:56:51 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 1 | 70 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | // ======= ========== ========== ========== ========== ========== ========== == | |||||
| 2 | // This f ile is par t of the M icrosoft C RM SDK Cod e Samples. | |||||
| 3 | // | |||||
| 4 | // Copyri ght (C) Mi crosoft Co rporation. All righ ts reserve d. | |||||
| 5 | // | |||||
| 6 | // This s ource code is intend ed only as a supplem ent to Mic rosoft | |||||
| 7 | // Develo pment Tool s and/or o n-line doc umentation . See the se other | |||||
| 8 | // materi als for de tailed inf ormation r egarding M icrosoft c ode sample s. | |||||
| 9 | // | |||||
| 10 | // THIS C ODE AND IN FORMATION ARE PROVID ED "AS IS" WITHOUT W ARRANTY OF ANY | |||||
| 11 | // KIND, EITHER EXP RESSED OR IMPLIED, I NCLUDING B UT NOT LIM ITED TO TH E | |||||
| 12 | // IMPLIE D WARRANTI ES OF MERC HANTABILIT Y AND/OR F ITNESS FOR A | |||||
| 13 | // PARTIC ULAR PURPO SE. | |||||
| 14 | // ======= ========== ========== ========== ========== ========== ========== == | |||||
| 15 | ||||||
| 16 | //<snippet SharedVari ablesPlugi n> | |||||
| 17 | using Syst em; | |||||
| 18 | ||||||
| 19 | // Microso ft Dynamic s CRM name space(s) | |||||
| 20 | using Micr osoft.Xrm. Sdk; | |||||
| 21 | ||||||
| 22 | namespace Microsoft. Crm.Sdk.Sa mples | |||||
| 23 | { | |||||
| 24 | /// <s ummary> | |||||
| 25 | /// A plug-in th at sends d ata to ano ther plug- in through the Share dVariables | |||||
| 26 | /// pr operty of IPluginExe cutionCont ext. | |||||
| 27 | /// </ summary> | |||||
| 28 | /// <r emarks>Reg ister the PreEventPl ugin for a pre-opera tion stage and the | |||||
| 29 | /// Po stEventPlu gin plug-i n on a pos t-operatio n stage. | |||||
| 30 | /// </ remarks> | |||||
| 31 | public class Pre EventPlugi n : IPlugi n | |||||
| 32 | { | |||||
| 33 | pu blic void Execute(IS erviceProv ider servi ceProvider ) | |||||
| 34 | { | |||||
| 35 | // Obtai n the exec ution cont ext from t he service provider. | |||||
| 36 | Microsof t.Xrm.Sdk. IPluginExe cutionCont ext contex t = (Micro soft.Xrm.S dk.IPlugin ExecutionC ontext) | |||||
| 37 | serv iceProvide r.GetServi ce(typeof( Microsoft. Xrm.Sdk.IP luginExecu tionContex t)); | |||||
| 38 | ||||||
| 39 | // Creat e or retri eve some d ata that w ill be nee ded by the post even t | |||||
| 40 | // plug- in. You co uld run a query, cre ate an ent ity, or pe rform a ca lculation. | |||||
| 41 | //In thi s sample, the data t o be passe d to the p ost plug-i n is | |||||
| 42 | // repre sented by a GUID. | |||||
| 43 | Guid con tact = new Guid("{74 882D5C-381 A-4863-A5B 9-B8604615 C2D0}"); | |||||
| 44 | ||||||
| 45 | // Pass the data t o the post event plu g-in in an execution context s hared | |||||
| 46 | // varia ble named PrimaryCon tact. | |||||
| 47 | context. SharedVari ables.Add( "PrimaryCo ntact", (O bject)cont act.ToStri ng()); | |||||
| 48 | } | |||||
| 49 | } | |||||
| 50 | ||||||
| 51 | public class Pos tEventPlug in : IPlug in | |||||
| 52 | { | |||||
| 53 | pu blic void Execute(IS erviceProv ider servi ceProvider ) | |||||
| 54 | { | |||||
| 55 | // Obtai n the exec ution cont ext from t he service provider. | |||||
| 56 | Microsof t.Xrm.Sdk. IPluginExe cutionCont ext contex t = (Micro soft.Xrm.S dk.IPlugin ExecutionC ontext) | |||||
| 57 | serv iceProvide r.GetServi ce(typeof( Microsoft. Xrm.Sdk.IP luginExecu tionContex t)); | |||||
| 58 | ||||||
| 59 | // Obtai n the cont act from t he executi on context shared va riables. | |||||
| 60 | if (cont ext.Shared Variables. Contains(" PrimaryCon tact")) | |||||
| 61 | { | |||||
| 62 | Guid contact = | |||||
| 63 | new Guid(( string)con text.Share dVariables ["PrimaryC ontact"]); | |||||
| 64 | ||||||
| 65 | // D o somethin g with the contact. | |||||
| 66 | } | |||||
| 67 | } | |||||
| 68 | } | |||||
| 69 | } | |||||
| 70 | //</snippe tSharedVar iablesPlug in> |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.