Example #1
0
        public static List <SmartObjectProperty> SmartObjectPropertiesExplorer(Guid SmartObjectGUID)
        {
            List <SmartObjectProperty>  list   = new List <SmartObjectProperty>();
            SmartObjectManagementServer smomgt = new SmartObjectManagementServer();

            smomgt.CreateConnection();
            try
            {
                smomgt.Connection.Open(ConnectToK2());

                Properties prop = new Properties();

                list = prop.GetSmartObjectProperties(smomgt.GetSmartObjectInfo(smomgt.GetSmartObjectDefinition(SmartObjectGUID).ToString()).Properties);
            }
            catch (Exception ex)
            {
                list.Add(new SmartObjectProperty
                {
                    Description = ex.Message,
                    Name        = ex.Source,
                    displayname = "SmartObject Property Error"
                });
            }
            finally
            {
                smomgt.Connection.Close();
            }
            return(list);
        }