Inheritance: GenericContent, IGroup, IADSyncable
Example #1
0
        private void CreateNewPortalGroup(DirectoryEntry entry, string parentPath, Guid guid, SyncTree syncTree)
        {
            try
            {
                AdLog.LogADObject(string.Format("New portal group - creating under {0}", parentPath), entry.Path);
                var newGroup = new Group(Node.LoadNode(parentPath));

                UpdatePortalGroupProperties(entry, newGroup, syncTree);

                Common.UpdateLastSync(newGroup, guid);
                //newGroup.Save(); - update lastsync already saves node

                if (_portalGroups != null)
                {
                    if (!_portalGroups.ContainsKey(guid.ToString()))
                        _portalGroups.Add(guid.ToString(), newGroup.Id);
                }
            }
            catch (Exception ex)
            {
                AdLog.LogException(ex);
            }
        }