315. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2/1/2017 2:56:29 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.

315.1 Files compared

# 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\CrmSvcUtilExtensions\GeneratePicklistEnums CodeCustomizationService.cs Tue Dec 20 19:51:44 2016 UTC
2 Wed Feb 1 19:56:29 2017 UTC

315.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 0 0
Removed 1 86

315.3 Comparison options

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

315.4 Active regular expressions

No regular expressions were active.

315.5 Comparison detail

1   // ======= ========== ========== ========== ========== ========== ========== ==        
2   //        
3   //  This f ile is par t of the M icrosoft D ynamics CR M SDK Code  Samples.        
4   //        
5   //  Copyri ght (C) Mi crosoft Co rporation.   All righ ts reserve d.        
6   //        
7   //  This s ource code  is intend ed only as  a supplem ent to Mic rosoft        
8   //  Develo pment Tool s and/or o nline docu mentation.   See thes e other        
9   //  materi als for de tailed inf ormation r egarding M icrosoft c ode sample s.        
10   //        
11   //  THIS C ODE AND IN FORMATION  ARE PROVID ED "AS IS"  WITHOUT W ARRANTY OF  ANY        
12   //  KIND,  EITHER EXP RESSED OR  IMPLIED, I NCLUDING B UT NOT LIM ITED TO TH E        
13   //  IMPLIE D WARRANTI ES OF MERC HANTABILIT Y AND/OR F ITNESS FOR  A        
14   //  PARTIC ULAR PURPO SE.        
15   //        
16   // ======= ========== ========== ========== ========== ========== ========== ==        
17   //<snippet CodeCustom izationSer vice>        
18          
19   // Define  REMOVE_PRO XY_TYPE_AS SEMBLY_ATT RIBUTE if  you plan o n compilin g the outp ut from        
20   // this Cr mSvcUtil e xtension w ith the ou tput from  the unexte nded CrmSv cUtil in t he same        
21   // assembl y (this as sembly att ribute can  only be d efined onc e in the a ssembly).        
22   #define RE MOVE_PROXY _TYPE_ASSE MBLY_ATTRI BUTE        
23          
24   using Syst em;        
25   using Syst em.CodeDom ;        
26   using Syst em.Diagnos tics;        
27   using Micr osoft.Crm. Services.U tility;        
28          
29   namespace  Microsoft. Crm.Sdk.Sa mples        
30   {        
31       /// <s ummary>        
32       /// Cr eate an im plementati on of ICus tomizeCode DomService  if you wa nt to mani pulate the        
33       /// co de dom aft er ICodeGe nerationSe rvice has  run.        
34       /// </ summary>        
35       public  sealed cl ass CodeCu stomizatio nService :  ICustomiz eCodeDomSe rvice        
36       {        
37           // / <summary >        
38           // / Remove t he unneces sary class es that we  generated  for entit ies.         
39           // / </summar y>        
40           pu blic void  CustomizeC odeDom(Cod eCompileUn it codeUni t, IServic eProvider  services)        
41           {        
42                Trace.Tr aceInforma tion("Ente ring ICust omizeCodeD omService. CustomizeC odeDom");        
43                Trace.Tr aceInforma tion(        
44                    "Num ber of Nam espaces ge nerated: { 0}", codeU nit.Namesp aces.Count );        
45          
46                #if REMO VE_PROXY_T YPE_ASSEMB LY_ATTRIBU TE        
47          
48                foreach  (CodeAttri buteDeclar ation attr ibute in c odeUnit.As semblyCust omAttribut es)        
49                {        
50                    Trac e.TraceInf ormation(" Attribute  BaseType i s {0}",        
51                         attribute. AttributeT ype.BaseTy pe);        
52                    if ( attribute. AttributeT ype.BaseTy pe ==        
53                         "Microsoft .Xrm.Sdk.C lient.Prox yTypesAsse mblyAttrib ute")        
54                    {        
55                         codeUnit.A ssemblyCus tomAttribu tes.Remove (attribute );        
56                         break;        
57                    }        
58                }        
59          
60                #endif        
61          
62                // Itera te over al l of the n amespaces  that were  generated.        
63                for (var  i = 0; i  < codeUnit .Namespace s.Count; + +i)        
64                {        
65                    var  types = co deUnit.Nam espaces[i] .Types;        
66                    Trac e.TraceInf ormation(" Number of  types in N amespace { 0}: {1}",        
67                         codeUnit.N amespaces[ i].Name, t ypes.Count );        
68                    // I terate ove r all of t he types t hat were c reated in  the namesp ace.        
69                    for  (var j = 0 ; j < type s.Count; )        
70                    {        
71                         // Remove  the type i f it is no t an enum  (all Optio nSets are  enums) or  has no mem bers.        
72                         if (!types [j].IsEnum  || types[ j].Members .Count ==  0)        
73                         {        
74                             types. RemoveAt(j );        
75                         }        
76                         else        
77                         {        
78                             j += 1 ;        
79                         }        
80                    }        
81                }        
82                Trace.Tr aceInforma tion("Exit ing ICusto mizeCodeDo mService.C ustomizeCo deDom");        
83           }        
84       }        
85   }        
86   //</snippe tCodeCusto mizationSe rvice>