Example #1
0
        public virtual IdentityStoreObject CloneObjectForUpdate(List <string> attributeNamesToClone, IdentityStoreObject objectToClone, IdentityStoreObject objectOrignal)
        {
            IdentityStoreObject identityStoreObject = new IdentityStoreObject();

            identityStoreObject.set_ObjectIdFromIdentityStore(objectToClone.get_ObjectIdFromIdentityStore());
            identityStoreObject.set_ObjectName(objectToClone.get_ObjectName());
            identityStoreObject.set_ObjectDisplayName(objectToClone.get_ObjectDisplayName());
            identityStoreObject.set_ObjectType(objectToClone.get_ObjectType());
            identityStoreObject.set_AttributesBusinessObject(new AttributeCollection());
            IdentityStoreObject newObject = identityStoreObject;

            foreach (string attributeName in attributeNamesToClone)
            {
                List <Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute> values = this.GetAttributeValues(attributeName, objectToClone.get_AttributesBusinessObject());
                if ((values == null ? false : values.Any <Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute>()))
                {
                    if (objectOrignal != null)
                    {
                        List <Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute> origValues = this.GetAttributeValues(attributeName, objectOrignal.get_AttributesBusinessObject());
                        if ((origValues == null || origValues.Count != 1 ? false : StringUtility.EqualsIgnoreCase(origValues[0].get_Value(), values[0].get_Value())))
                        {
                            continue;
                        }
                    }
                    newObject.get_AttributesBusinessObject().Add(attributeName, values);
                }
            }
            return(newObject);
        }
 private static void AddInNotification(List <MembershipLifecycleGroup> listToModifiy, IdentityStoreObject lObject, MembershipLifecycleMember _notifyObject)
 {
     if (!listToModifiy.Any <MembershipLifecycleGroup>((MembershipLifecycleGroup z) => z.get_GUID().Equals(lObject.get_ObjectIdFromIdentityStore())))
     {
         MembershipLifecycleGroup membershipLifecycleGroup = new MembershipLifecycleGroup();
         membershipLifecycleGroup.set_GUID(lObject.get_ObjectIdFromIdentityStore());
         membershipLifecycleGroup.set_DisplayName(lObject.get_ObjectDisplayName());
         membershipLifecycleGroup.set_ObjectType(lObject.get_ObjectType());
         membershipLifecycleGroup.set_MembershiplifeCycleMembers(new List <MembershipLifecycleMember>());
         listToModifiy.Add(membershipLifecycleGroup);
     }
     listToModifiy.First <MembershipLifecycleGroup>((MembershipLifecycleGroup z) => z.get_GUID().Equals(lObject.get_ObjectIdFromIdentityStore())).get_MembershiplifeCycleMembers().Add(_notifyObject);
 }
Example #3
0
        private Group ConvertToGroup(IdentityStoreObject identityStoreObject)
        {
            Group group1;

            if (!(identityStoreObject is Group))
            {
                Group group = new Group();
                group.set_ObjectIdFromIdentityStore(identityStoreObject.get_ObjectIdFromIdentityStore());
                group.set_ObjectName(identityStoreObject.get_ObjectName());
                group.set_ObjectDisplayName(identityStoreObject.get_ObjectDisplayName());
                group.set_DisplayName(identityStoreObject.get_ObjectDisplayName());
                group.set_ObjectType(identityStoreObject.get_ObjectType());
                group.set_AttributesBusinessObject(identityStoreObject.get_AttributesBusinessObject());
                group.set_StopNotification(identityStoreObject.get_StopNotification());
                group1 = group;
            }
            else
            {
                group1 = identityStoreObject as Group;
            }
            return(group1);
        }
 private static void AddInNotification(List <MembershipLifecycleGroup> AddMemberGroups, IdentityStoreObject lGroup, MembershipLifecycleMember _notifyMember)
 {
     if (!AddMemberGroups.Any <MembershipLifecycleGroup>((MembershipLifecycleGroup z) => z.get_GUID().Equals(lGroup.get_ObjectIdFromIdentityStore())))
     {
         MembershipLifecycleGroup membershipLifecycleGroup = new MembershipLifecycleGroup();
         membershipLifecycleGroup.set_GUID(lGroup.get_ObjectIdFromIdentityStore());
         membershipLifecycleGroup.set_DisplayName(lGroup.get_ObjectDisplayName());
         membershipLifecycleGroup.set_ObjectType(lGroup.get_ObjectType());
         membershipLifecycleGroup.set_MembershiplifeCycleMembers(new List <MembershipLifecycleMember>());
         AddMemberGroups.Add(membershipLifecycleGroup);
     }
     AddMemberGroups.First <MembershipLifecycleGroup>((MembershipLifecycleGroup z) => z.get_GUID().Equals(lGroup.get_ObjectIdFromIdentityStore())).get_MembershiplifeCycleMembers().Add(_notifyMember);
 }