Exemple #1
0
        private IConfigurable PrepareDataObject()
        {
            TaskLogger.LogEnter();
            base.DataObject = (ADUser)base.ResolveDataObject();
            ulong puidNum;

            if (ConsumerIdentityHelper.TryGetPuidByExternalDirectoryObjectId(base.DataObject.ExchangeGuid.ToString(), out puidNum))
            {
                base.Fields[ADUserSchema.NetID] = new NetID(ConsumerIdentityHelper.ConvertPuidNumberToPuidString(puidNum));
                TaskLogger.LogExit();
                return(null);
            }
            throw new InvalidOperationException(string.Format(CultureInfo.CurrentUICulture, "Could not extract puid from ExchangeGuid for this user", new object[0]));
        }
        protected override IConfigurable PrepareDataObject()
        {
            TaskLogger.LogEnter();
            this.DataObject = (ADUser)base.PrepareDataObject();
            ulong puidNum;

            if (ConsumerIdentityHelper.TryGetPuidFromGuid(this.DataObject.ExchangeGuid, out puidNum))
            {
                base.Fields[ADUserSchema.NetID] = new NetID(ConsumerIdentityHelper.ConvertPuidNumberToPuidString(puidNum));
                TaskLogger.LogExit();
                return(null);
            }
            throw new TaskInvalidOperationException(new LocalizedString(string.Format(CultureInfo.CurrentUICulture, "Could not extract puid from ExchangeGuid for this user", new object[0])));
        }