250. Araxis Merge File Comparison Report

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

250.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\BusinessDataModel\ScheduleAndAppointment QueryWorkingHoursOfMultipleUsers.cs Tue Dec 20 19:51:43 2016 UTC
2 Wed Feb 1 19:56:27 2017 UTC

250.2 Comparison summary

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

250.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

250.4 Active regular expressions

No regular expressions were active.

250.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 n-line doc umentation .  See the se 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 QueryWorki ngHoursOfM ultipleUse rs>        
18   using Syst em;        
19   using Syst em.Service Model;        
20   using Syst em.Service Model.Desc ription;        
21          
22   // These n amespaces  are found  in the Mic rosoft.Xrm .Sdk.dll a ssembly        
23   // found i n the SDK\ bin folder .        
24   using Micr osoft.Xrm. Sdk;        
25   using Micr osoft.Xrm. Sdk.Client ;        
26   using Micr osoft.Xrm. Sdk.Query;        
27   using Micr osoft.Xrm. Sdk.Discov ery;        
28   using Micr osoft.Xrm. Sdk.Messag es;        
29          
30   // This na mespace is  found in  Microsoft. Crm.Sdk.Pr oxy.dll as sembly        
31   // found i n the SDK\ bin folder .        
32   using Micr osoft.Crm. Sdk.Messag es;        
33          
34   namespace  Microsoft. Crm.Sdk.Sa mples        
35   {        
36       /// <s ummary>        
37       /// Th is sample  shows how  to retriev e the work ing hours  of multipl e users.        
38       /// </ summary>        
39       public  class Que ryWorkingH oursOfMult ipleUsers        
40       {        
41           #r egion Clas s Level Me mbers        
42          
43           // / <summary >        
44           // / Stores t he organiz ation serv ice proxy.        
45           // / </summar y>        
46           pr ivate Orga nizationSe rviceProxy  _serviceP roxy;        
47          
48           //  Define th e IDs need ed for thi s sample.        
49           pr ivate Guid  _currentU serId;        
50           pr ivate Guid  _otherUse rId;        
51          
52           #e ndregion C lass Level  Members        
53          
54           #r egion How  To Sample  Code        
55           // / <summary >        
56           // / Create a nd configu re the org anization  service pr oxy.        
57           // / Retrieve  the worki ng hours o f multiple  users.                 
58           // / Optional ly delete  any entity  records t hat were c reated for  this samp le.        
59           // / </summar y>        
60           // / <param n ame="serve rConfig">C ontains se rver conne ction info rmation.</ param>                 
61           // / <param n ame="promp tforDelete ">When Tru e, the use r will be  prompted t o delete a ll        
62           // / created  entities.< /param>        
63           pu blic void  Run(Server Connection .Configura tion serve rConfig, b ool prompt ForDelete)        
64           {        
65                try        
66                {        
67          
68                    // C onnect to  the Organi zation ser vice.         
69                    // T he using s tatement a ssures tha t the serv ice proxy  will be pr operly dis posed.        
70                    usin g (_servic eProxy = n ew Organiz ationServi ceProxy(se rverConfig .Organizat ionUri, se rverConfig .HomeRealm Uri,server Config.Cre dentials,  serverConf ig.DeviceC redentials ))        
71                    {        
72                         // This st atement is  required  to enable  early-boun d type sup port.        
73                         _servicePr oxy.Enable ProxyTypes ();        
74          
75                         // Call th e method t o create a ny data th at this sa mple requi res.        
76                         CreateRequ iredRecord s();        
77          
78                         //<snippet QueryWorki ngHoursOfM ultipleUse rs1>                       
79          
80                         // Retriev e the work ing hours  of the cur rent and t he other u ser.                                                          
81                         QueryMulti pleSchedul esRequest  scheduleRe quest = ne w QueryMul tipleSched ulesReques t();        
82                         scheduleRe quest.Reso urceIds =  new Guid[2 ];        
83                         scheduleRe quest.Reso urceIds[0]  = _curren tUserId;        
84                         scheduleRe quest.Reso urceIds[1]  = _otherU serId;        
85                         scheduleRe quest.Star t = DateTi me.Now;        
86                         scheduleRe quest.End  = DateTime .Today.Add Days(7);        
87                         scheduleRe quest.Time Codes = ne w TimeCode [] { TimeC ode.Availa ble };        
88          
89                         QueryMulti pleSchedul esResponse  scheduleR esponse =  (QueryMult ipleSchedu lesRespons e)_service Proxy.Exec ute(schedu leRequest) ;        
90          
91                         // Verify  if some da ta is retu rned for t he availab ility of t he users        
92                         if (schedu leResponse .TimeInfos .Length >  0)        
93                         {        
94                             Consol e.WriteLin e("Success fully quer ied the wo rking hour s of multi ple users. ");        
95                         }        
96                         //</snippe tQueryWork ingHoursOf MultipleUs ers1>                              
97                    }        
98                }        
99                // Catch  any servi ce fault e xceptions  that Micro soft Dynam ics CRM th rows.        
100                catch (F aultExcept ion<Micros oft.Xrm.Sd k.Organiza tionServic eFault>)        
101                {        
102                    // Y ou can han dle an exc eption her e or pass  it back to  the calli ng method.        
103                    thro w;        
104                }        
105           }        
106          
107           // / <summary >        
108           // / This met hod create s any enti ty records  that this  sample re quires.                 
109           // / </summar y>        
110           pu blic void  CreateRequ iredRecord s()        
111           {        
112                // Get t he current  user's in formation.        
113                WhoAmIRe quest user Request =  new WhoAmI Request();        
114                WhoAmIRe sponse use rResponse  = (WhoAmIR esponse)_s erviceProx y.Execute( userReques t);        
115                _current UserId = u serRespons e.UserId;        
116          
117                // Creat e another  user, Kevi n Cook.        
118                _otherUs erId = Sys temUserPro vider.Retr ieveSalesM anager(_se rviceProxy );         
119           }                          
120          
121           #e ndregion H ow To Samp le Code        
122          
123           #r egion Main        
124           // / <summary >        
125           // / Standard  Main() me thod used  by most SD K samples.        
126           // / </summar y>        
127           // / <param n ame="args" ></param>        
128           st atic publi c void Mai n(string[]  args)        
129           {        
130                try        
131                {        
132                    // O btain the  target org anization' s Web addr ess and cl ient logon          
133                    // c redentials  from the  user.        
134                    Serv erConnecti on serverC onnect = n ew ServerC onnection( );        
135                    Serv erConnecti on.Configu ration con fig = serv erConnect. GetServerC onfigurati on();        
136          
137                    Quer yWorkingHo ursOfMulti pleUsers a pp = new Q ueryWorkin gHoursOfMu ltipleUser s();        
138                    app. Run(config , true);        
139                }        
140          
141                catch (F aultExcept ion<Micros oft.Xrm.Sd k.Organiza tionServic eFault> ex )        
142                {        
143                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
144                    Cons ole.WriteL ine("Times tamp: {0}" , ex.Detai l.Timestam p);        
145                    Cons ole.WriteL ine("Code:  {0}", ex. Detail.Err orCode);        
146                    Cons ole.WriteL ine("Messa ge: {0}",  ex.Detail. Message);        
147                    Cons ole.WriteL ine("Plugi n Trace: { 0}", ex.De tail.Trace Text);        
148                    Cons ole.WriteL ine("Inner  Fault: {0 }",        
149                         null == ex .Detail.In nerFault ?  "No Inner  Fault" :  "Has Inner  Fault");        
150                }        
151                catch (S ystem.Time outExcepti on ex)        
152                {        
153                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
154                    Cons ole.WriteL ine("Messa ge: {0}",  ex.Message );        
155                    Cons ole.WriteL ine("Stack  Trace: {0 }", ex.Sta ckTrace);        
156                    Cons ole.WriteL ine("Inner  Fault: {0 }",        
157                         null == ex .InnerExce ption.Mess age ? "No  Inner Faul t" : ex.In nerExcepti on.Message );        
158                }        
159                catch (S ystem.Exce ption ex)        
160                {        
161                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
162                    Cons ole.WriteL ine(ex.Mes sage);        
163          
164                    // D isplay the  details o f the inne r exceptio n.        
165                    if ( ex.InnerEx ception !=  null)        
166                    {        
167                         Console.Wr iteLine(ex .InnerExce ption.Mess age);        
168          
169                         FaultExcep tion<Micro soft.Xrm.S dk.Organiz ationServi ceFault> f e        
170                             = ex.I nnerExcept ion        
171                             as Fau ltExceptio n<Microsof t.Xrm.Sdk. Organizati onServiceF ault>;        
172                         if (fe !=  null)        
173                         {        
174                             Consol e.WriteLin e("Timesta mp: {0}",  fe.Detail. Timestamp) ;        
175                             Consol e.WriteLin e("Code: { 0}", fe.De tail.Error Code);        
176                             Consol e.WriteLin e("Message : {0}", fe .Detail.Me ssage);        
177                             Consol e.WriteLin e("Plugin  Trace: {0} ", fe.Deta il.TraceTe xt);        
178                             Consol e.WriteLin e("Inner F ault: {0}" ,        
179                                 nu ll == fe.D etail.Inne rFault ? " No Inner F ault" : "H as Inner F ault");        
180                         }        
181                    }        
182                }        
183                // Addit ional exce ptions to  catch: Sec urityToken Validation Exception,  ExpiredSe curityToke nException ,        
184                // Secur ityAccessD eniedExcep tion, Mess ageSecurit yException , and Secu rityNegoti ationExcep tion.        
185          
186                finally        
187                {        
188          
189                    Cons ole.WriteL ine("Press  <Enter> t o exit.");        
190                    Cons ole.ReadLi ne();        
191                }        
192          
193           }        
194           #e ndregion M ain        
195       }        
196   }        
197   //</snippe tQueryWork ingHoursOf MultipleUs ers>