- Timestamp:
- 06/03/08 15:50:30 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/digitalme/launchers/csharp/Novell.IdentityModel.Selectors/DigitalMeSelector.cs
r1892 r1900 10 10 public class DigitalMeSelector 11 11 { 12 13 12 private static string DM_TEST_ARG_STR = "--test"; 14 13 private static string DM_GET_TOKEN_ARG_STR = "--gettoken "; … … 59 58 } 60 59 61 public static voidGetToken(String sRelyingParty,60 public static byte[] GetToken(String sRelyingParty, 62 61 String[] saRequiredClaims, 63 62 String[] saOptionalClaims, 64 63 String sTokenType) 65 64 { 66 Console.WriteLine("Looking for DigitalMe");67 65 String sExePath = GetExePath(); 68 66 if (null != sExePath) … … 116 114 File.Delete(sTempFileName); 117 115 118 Console.WriteLine("Token: " + System.Text.Encoding.ASCII.GetString(baToken)); 116 DbgLog("Token: " + System.Text.Encoding.ASCII.GetString(baToken)); 117 return baToken; 119 118 } 120 119 else 121 120 { 122 Console.WriteLine("DigitalMe application not found"); 123 } 121 DbgLog("DigitalMe application not found"); 122 } 123 return null; 124 124 } 125 125 126 126 private static void LaunchSelector(String sExePath, StringBuilder sbArgs) 127 127 { 128 129 128 try 130 129 { … … 133 132 StreamReader myStreamReader = null; 134 133 135 136 134 myProcess = new Process(); 137 135 ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(sExePath); … … 140 138 { 141 139 myProcessStartInfo.Arguments = sbArgs.ToString(); 142 Console.WriteLine("Args: {0}",myProcessStartInfo.Arguments);140 DbgLog("Args:" + myProcessStartInfo.Arguments); 143 141 } 144 142 … … 173 171 174 172 175 Console.WriteLine("Platform: {0}", platform);176 Console.WriteLine("OSVersion: {0}",Environment.OSVersion.Version.ToString());173 DbgLog("Platform: " + platform.ToString()); 174 DbgLog("OSVersion: " + Environment.OSVersion.Version.ToString()); 177 175 178 176 foreach (string path in paths) 179 177 { 180 Console.WriteLine("Checking: {0}", path);181 178 if (File.Exists(path)) 182 179 { 180 DbgLog(path); 183 181 return path; 184 182 } … … 192 190 else 193 191 { 194 Console.WriteLine("Platform: {0}" + platform);192 DbgLog("Platform: " + platform.ToString()); 195 193 } 196 194 197 195 return null; 196 } 197 198 private static void DbgLog(String sMessage) 199 { 200 #if DEBUG 201 Console.WriteLine(sMessage); 202 #endif 198 203 } 199 204 }