Produced by Araxis Merge on 2/1/2017 2:57:16 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\Tools\DeviceRegistration | Program.cs | Tue Dec 20 19:52:28 2016 UTC |
| 2 | Wed Feb 1 19:57:16 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 1 | 65 |
| 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 | using Syst em; | |||||
| 2 | using Syst em.Service Model.Desc ription; | |||||
| 3 | ||||||
| 4 | namespace Microsoft. Crm.Servic es.Utility | |||||
| 5 | { | |||||
| 6 | in ternal sea led class LiveDevice IdUtil | |||||
| 7 | { | |||||
| 8 | publ ic static void Main( string[] a rgs) | |||||
| 9 | { | |||||
| 10 | Comman dLineParam eters para meters = n ew Command LineParame ters(); | |||||
| 11 | if (!p arameters. Parse(args )) | |||||
| 12 | { | |||||
| 13 | paramete rs.ShowHel p(); | |||||
| 14 | return; | |||||
| 15 | } | |||||
| 16 | ||||||
| 17 | Client Credential s credenti als; | |||||
| 18 | switch (paramete rs.Operati on) | |||||
| 19 | { | |||||
| 20 | case Ope rationType .Register: | |||||
| 21 | credential s = Device IdManager. LoadDevice Credential s(paramete rs.IssuerU ri); | |||||
| 22 | if (null ! = credenti als && !pa rameters.F orceRegist ration) | |||||
| 23 | { | |||||
| 24 | Co nsole.Erro r.WriteLin e("Error: Device is already re gistered." ); | |||||
| 25 | br eak; | |||||
| 26 | } | |||||
| 27 | ||||||
| 28 | try | |||||
| 29 | { | |||||
| 30 | cr edentials = DeviceId Manager.Re gisterDevi ce(Guid.Ne wGuid(), p arameters. IssuerUri, | |||||
| 31 | para meters.Dev iceName, p arameters. DevicePass word); | |||||
| 32 | } | |||||
| 33 | catch (Dev iceRegistr ationFaile dException ex) | |||||
| 34 | { | |||||
| 35 | Co nsoleColor originalC olor = Con sole.Foreg roundColor ; | |||||
| 36 | tr y | |||||
| 37 | { | |||||
| 38 | Cons ole.Foregr oundColor = ConsoleC olor.Red; | |||||
| 39 | Cons ole.Error. WriteLine( "Error - { 1}", ex.Re gistration ErrorCode, ex.Messag e); | |||||
| 40 | } | |||||
| 41 | fi nally | |||||
| 42 | { | |||||
| 43 | Cons ole.Foregr oundColor = original Color; | |||||
| 44 | } | |||||
| 45 | } | |||||
| 46 | break; | |||||
| 47 | case Ope rationType .Show: | |||||
| 48 | credential s = Device IdManager. LoadDevice Credential s(paramete rs.IssuerU ri); | |||||
| 49 | break; | |||||
| 50 | default: | |||||
| 51 | throw new NotImpleme ntedExcept ion("Opera tion = " + parameter s.Operatio n); | |||||
| 52 | } | |||||
| 53 | ||||||
| 54 | if (nu ll == cred entials) | |||||
| 55 | { | |||||
| 56 | Console. Out.WriteL ine("Devic e is not r egistered. "); | |||||
| 57 | } | |||||
| 58 | else | |||||
| 59 | { | |||||
| 60 | Console. Out.WriteL ine("Devic e ID: {0}" , credenti als.UserNa me.UserNam e); | |||||
| 61 | Console. Out.WriteL ine("Devic e Password : {0}", cr edentials. UserName.P assword); | |||||
| 62 | } | |||||
| 63 | } | |||||
| 64 | } | |||||
| 65 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.