public static List <Group> PrepareCompressedData(List <Group> list) { string cData = DataCompressionHelper.CompressGroupMembership(list); List <Group> compressedList = new List <Group>(); Group dummyGroup = new Group(); AttributesHelper.SetAttributeValue("CompressedData", cData, dummyGroup.get_AttributesBusinessObject(), 3); compressedList.Add(dummyGroup); return(compressedList); }
public static List <IdentityStoreObject> PrepareCompressedData(List <IdentityStoreObject> list) { string cData = DataCompressionHelper.CompressObjects <List <IdentityStoreObject> >(list); List <IdentityStoreObject> compressedList = new List <IdentityStoreObject>(); IdentityStoreObject dummyGroup = new IdentityStoreObject(); AttributesHelper.SetAttributeValue("CompressedData", cData, dummyGroup.get_AttributesBusinessObject(), 3); compressedList.Add(dummyGroup); return(compressedList); }
private void SortByParent(string parentId, Dictionary <string, IdentityStoreObject> childDict, ref Dictionary <string, IdentityStoreObject> sortedDict) { IEnumerable <KeyValuePair <string, IdentityStoreObject> > childList = from c in childDict where (!StringUtility.EqualsIgnoreCase(AttributesHelper.GetValueAsString("IMSGObjectParentKey", c.Value.get_AttributesBusinessObject(), ""), parentId) ? false : true) select c; foreach (KeyValuePair <string, IdentityStoreObject> pair in childList) { if (!sortedDict.ContainsKey(pair.Key)) { sortedDict.Add(pair.Key, pair.Value); } this.SortByParent(pair.Key, childDict, ref sortedDict); } }
public static bool SetAttributeValue(string attributeName, string value, AttributeCollection attributes, AttributeActionType action = 3) { bool flag; if (attributes != null) { if (!attributes.HasValue(attributeName)) { Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute attribute1 = new Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute(); attribute1.set_Value(value); attribute1.set_Action(action); Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute attribute = attribute1; if (!attributes.IsIn(attributeName)) { attributes.Add(attributeName, new List <Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute>() { attribute }); } else { attributes.get_AttributesCollection()[attributeName] = new List <Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute>() { attribute }; } } else { AttributesHelper.GetAttribute(attributeName, attributes).set_Value(value); } flag = true; } else { flag = false; } return(flag); }
public static List <string> GetAttributeValues(string attributeName, AttributeCollection attributes) { List <string> strs; List <string> values = new List <string>(); List <Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute> attributesList = AttributesHelper.GetAttributes(attributeName, attributes); if (attributesList != null) { foreach (Imanami.GroupID.DataTransferObjects.DataContracts.Services.Attribute attribute in attributesList) { if (!StringUtility.IsBlank(attribute.get_Value())) { values.Add(attribute.get_Value()); } } strs = values; } else { strs = values; } return(strs); }
public static string GetValueAsFormattedDatetime(string attributeName, AttributeCollection attributes) { return(AttributesHelper.GetValueAsFormattedDatetime(AttributesHelper.GetAttributes(attributeName, attributes))); }