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 | CommandLineParameters.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 | 118 |
| 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.Diagnos tics; | |||||
| 3 | ||||||
| 4 | namespace Microsoft. Crm.Servic es.Utility | |||||
| 5 | { | |||||
| 6 | in ternal sea led class CommandLin eParameter s | |||||
| 7 | { | |||||
| 8 | priv ate const char Start Character = '/'; | |||||
| 9 | priv ate const char Separ atorCharac ter = ':'; | |||||
| 10 | ||||||
| 11 | #reg ion Proper ties | |||||
| 12 | publ ic Operati onType Ope ration { g et; privat e set; } | |||||
| 13 | ||||||
| 14 | publ ic string DeviceName { get; pr ivate set; } | |||||
| 15 | ||||||
| 16 | publ ic string DevicePass word { get ; private set; } | |||||
| 17 | ||||||
| 18 | publ ic bool Fo rceRegistr ation { ge t; private set; } | |||||
| 19 | ||||||
| 20 | publ ic Uri Iss uerUri { g et; privat e set; } | |||||
| 21 | #end region | |||||
| 22 | ||||||
| 23 | #reg ion Method s | |||||
| 24 | publ ic bool Pa rse(string [] args) | |||||
| 25 | { | |||||
| 26 | if (nu ll == args ) | |||||
| 27 | { | |||||
| 28 | throw ne w Argument NullExcept ion("args" ); | |||||
| 29 | } | |||||
| 30 | ||||||
| 31 | bool i sValid = t rue; | |||||
| 32 | bool i sOperation Valid = fa lse; | |||||
| 33 | foreac h (string arg in arg s) | |||||
| 34 | { | |||||
| 35 | if (stri ng.IsNullO rWhiteSpac e(arg)) | |||||
| 36 | { | |||||
| 37 | continue; | |||||
| 38 | } | |||||
| 39 | ||||||
| 40 | if (Star tCharacter == arg[0] ) | |||||
| 41 | { | |||||
| 42 | int separa torPositio n = arg.In dexOf(Sepa ratorChara cter, 1); | |||||
| 43 | if (-1 != separatorP osition) | |||||
| 44 | { | |||||
| 45 | st ring name = arg.Subs tring(1, s eparatorPo sition - 1 ); | |||||
| 46 | st ring value = arg.Sub string(sep aratorPosi tion + 1); | |||||
| 47 | if (!string. IsNullOrWh iteSpace(v alue)) | |||||
| 48 | { | |||||
| 49 | swit ch (name.T oUpperInva riant()) | |||||
| 50 | { | |||||
| 51 | case " OPERATION" : | |||||
| 52 | case " O": | |||||
| 53 | { | |||||
| 54 | OperationT ype result ; | |||||
| 55 | if (Enum.T ryParse<Op erationTyp e>(value, true, out result)) | |||||
| 56 | { | |||||
| 57 | th is.Operati on = resul t; | |||||
| 58 | is OperationV alid = tru e; | |||||
| 59 | co ntinue; | |||||
| 60 | } | |||||
| 61 | } | |||||
| 62 | break; | |||||
| 63 | case " NAME": | |||||
| 64 | case " N": | |||||
| 65 | this.Dev iceName = value; | |||||
| 66 | continue ; | |||||
| 67 | case " PASSWORD": | |||||
| 68 | case " P": | |||||
| 69 | this.Dev icePasswor d = value; | |||||
| 70 | continue ; | |||||
| 71 | case " ISSUER": | |||||
| 72 | case " URL": | |||||
| 73 | try | |||||
| 74 | { | |||||
| 75 | this.Issue rUri = new Uri(value ); | |||||
| 76 | } | |||||
| 77 | catch (U riFormatEx ception) | |||||
| 78 | { | |||||
| 79 | //Ignore t his except ion | |||||
| 80 | } | |||||
| 81 | continue ; | |||||
| 82 | case " FORCE": | |||||
| 83 | case " F": | |||||
| 84 | this.For ceRegistra tion = tru e; | |||||
| 85 | continue ; | |||||
| 86 | } | |||||
| 87 | } | |||||
| 88 | } | |||||
| 89 | } | |||||
| 90 | ||||||
| 91 | Console. Error.Writ eLine("Inv alid Argum ent: \"{0} \"", arg); | |||||
| 92 | isValid = false; | |||||
| 93 | } | |||||
| 94 | ||||||
| 95 | if (is Valid && ( !isOperati onValid || string.Is NullOrWhit eSpace(thi s.DeviceNa me) != str ing.IsNull OrWhiteSpa ce(this.De vicePasswo rd))) | |||||
| 96 | { | |||||
| 97 | isValid = false; | |||||
| 98 | } | |||||
| 99 | ||||||
| 100 | return isValid; | |||||
| 101 | } | |||||
| 102 | ||||||
| 103 | publ ic void Sh owHelp() | |||||
| 104 | { | |||||
| 105 | Consol e.Out.Writ eLine("{0} ", Process .GetCurren tProcess() .ProcessNa me); | |||||
| 106 | Consol e.Out.Writ eLine(" /o peration:< operation> - Valid O ptions are Register or Show. R equired.") ; | |||||
| 107 | Consol e.Out.Writ eLine(" /n ame:<devic e name> - Optional." ); | |||||
| 108 | Consol e.Out.Writ eLine(" /p assword:<d evice pass word> - Op tional."); | |||||
| 109 | } | |||||
| 110 | #end region | |||||
| 111 | } | |||||
| 112 | ||||||
| 113 | in ternal enu m Operatio nType | |||||
| 114 | { | |||||
| 115 | Regi ster, | |||||
| 116 | Show | |||||
| 117 | } | |||||
| 118 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.