示例#1
0
    /// <summary>
    /// Getting all groups which have managedBy set out of a text file and storing it in a Dictionary.
    /// </summary>
    /// <param name="aDGroupsStatic">D</param>
    protected bool ADGroups_Load(ref Dictionary <string, string> aDGroupsStatic)
    {
        int    retval;
        string objContentMsg = "";

        FSGetFileContent fileCont = new FSGetFileContent();

        fileCont.SourceFile = WbGetParams.getValue("ADGroupsFile");

        List <string> rtnList = fileCont.rtnValues(out retval, ref objContentMsg);

        if (retval == 0)
        {
            foreach (var itm in rtnList)
            {
                string[] itms = itm.Split('#');
                aDGroupsStatic.Add(itms[0], itms[1]);
            }
            return(true);
        }
        else
        {
            return(false);
        }
    } // end ADGroups_Load()
示例#2
0
    public string[] GetUser(string filterIn)
    {
        int    retvalfr;
        string retMsgrf = "";

        FSGetFileContent fileCont = new FSGetFileContent();

        fileCont.SourceFile = WbGetParams.getValue("ADUsersFile");

        List <string> rtnList = fileCont.rtnValues(out retvalfr, ref retMsgrf, filterIn);

        rtnList.Sort();

        if (retvalfr == 0)
        {
            return(rtnList.ToArray());
        }
        else
        {
            List <string> foundkeys = new List <string>();
            foundkeys.Add("no keys" + ',' + " in cache ");
            return(foundkeys.ToArray());
        }
    } //end GetUser