Commit 1bfef3a2 authored by Marvin S. Addison's avatar Marvin S. Addison
Browse files

Get attribute list from program input.

git-svn-id: https://svn.middleware.vt.edu/svn/ed/edsamples@10070 fa4a4108-76f2-0310-9f0d-ba9fffaf4ff6
parent cacec983
...@@ -10,12 +10,13 @@ namespace EdLiteTest ...@@ -10,12 +10,13 @@ namespace EdLiteTest
{ {
static void Main(string[] args) static void Main(string[] args)
{ {
if (args.Length < 1) if (args.Length < 2)
{ {
Console.WriteLine("USAGE: EdLiteTest query"); Console.WriteLine("USAGE: EdLiteTest query attributeList");
return; return;
} }
string ldapQuery = args[0]; string ldapQuery = args[0];
string[] attributes = args[1].Split(',');
string ldapHost = EdConstants.ED_LITE; string ldapHost = EdConstants.ED_LITE;
int ldapPort = 389; int ldapPort = 389;
...@@ -36,8 +37,7 @@ namespace EdLiteTest ...@@ -36,8 +37,7 @@ namespace EdLiteTest
// Query for authId (i.e. PID) and name parts // Query for authId (i.e. PID) and name parts
// Suppressed entries/attributes not available in ED-Lite // Suppressed entries/attributes not available in ED-Lite
SearchResponse response = (SearchResponse)conn.SendRequest( SearchResponse response = (SearchResponse)conn.SendRequest(
new SearchRequest(EdConstants.SEARCH_BASE, ldapQuery, SearchScope.Subtree, new SearchRequest(EdConstants.SEARCH_BASE, ldapQuery, SearchScope.Subtree, attributes));
"authId", "givenName", "middleName", "sn"));
// Print attributes of result entries // Print attributes of result entries
Console.WriteLine(); Console.WriteLine();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment