SenseNet.ContentRepository.GenericContent.GetFields C# (CSharp) Method

GetFields() protected static method

protected static GetFields ( ContentType contentType, ICollection availableFields, bool rootFields ) : void
contentType SenseNet.ContentRepository.Schema.ContentType
availableFields ICollection
rootFields bool
return void
        protected static void GetFields(ContentType contentType, ICollection<FieldSetting> availableFields, bool rootFields)
        {
            foreach (var fieldSetting in contentType.FieldSettings)
            {
                var fsRoot = rootFields ? FieldSetting.GetRoot(fieldSetting) : fieldSetting;

                if (!availableFields.Contains(fsRoot))
                    availableFields.Add(fsRoot);
            }
        }