public static Dictionary <PropDef, object> getFilePropertiesDefs(VDF.Vault.Currency.Connections.Connection connection, File selectedFile) { Dictionary <PropDef, object> dictionary = new Dictionary <PropDef, object>(); try { using (WebServiceManager manager = connection.WebServiceManager) { FileIteration entity = new FileIteration(connection, selectedFile); PropDef[] propertyDefinitionsByEntityClassId = manager.PropertyService.GetPropertyDefinitionsByEntityClassId("FILE"); PropertyDefinitionDictionary dictionary2 = connection.PropertyManager.GetPropertyDefinitions("FILE", null, PropertyDefinitionFilter.IncludeAll); foreach (PropDef def in propertyDefinitionsByEntityClassId) { object obj2 = connection.PropertyManager.GetPropertyValue(entity, dictionary2[def.Id], null); dictionary.Add(def, (obj2 == null) ? "" : obj2); //Log.logger(string.Format("== LIB pro DICT == >> '{0}' = '{1}'", def.DispName.ToString(), (obj2 == null) ? "" : obj2.ToString())); } } } catch (SystemException exception) { //Log.logger(exception.ToString()); } return(dictionary); }
public void PreGetPropertyValues(Connection connection, IEnumerable <IEntity> entities, PropertyDefinitionDictionary propDefs, PropertyValues resultValues, PropertyValueSettings settings) { if (_propInsts == null) { return; } foreach (var entity in entities) { var propInstOrderFileId = _propInsts.FirstOrDefault(p => p.Val != null && p.Val.ToString() == entity.EntityIterationId.ToString() && p.PropDefId == _propDefIdOrderFileId); if (propInstOrderFileId != null) { var propInstOrderNumber = _propInsts.FirstOrDefault(p => p.EntityId == propInstOrderFileId.EntityId && p.PropDefId == _propDefIdOrderNumber); if (propInstOrderNumber != null) { resultValues.SetValue(new PropertyValue(entity, _orderPropertyDefinition, propInstOrderNumber.Val)); } } } }
public void PostGetPropertyValues(Connection connection, IEnumerable <IEntity> entities, PropertyDefinitionDictionary propDefs, PropertyValues resultValues, PropertyValueSettings settings) { }
public IEnumerable <PropertyDefinition> GetCustomPropertyDefinitions(Connection connection, PropertyDefinitionDictionary existingPropDefs) { return(new[] { _orderPropertyDefinition }); }
public void DecoratePropertyDefinitions(Connection connection, PropertyDefinitionDictionary existingPropDefs) { }