Esempio n. 1
0
        /// <summary>
        /// Gets a persistent attribute setting. If there was no direct hit, the type, session and database settings are consulted.
        /// </summary>
        /// <param name="context">The context of the database</param>
        /// <param name="type">The related type of the attribute</param>
        /// <param name="attribute">The attribute</param>
        /// <returns>A setting</returns>
        private Exceptional<ADBSettingsBase> GetPersistentAttributeSetting(DBContext context, GraphDBType type, TypeAttribute attribute)
        {
            var attributeSetting = attribute.GetPersistentSetting(this.Name);

            if (attributeSetting != null)
            {
                return new Exceptional<ADBSettingsBase>(attributeSetting);
            }
            else
            {
                return GetPersistentTypeSetting(context, type);
            }
        }