コード例 #1
0
 public LogicalDatabaseCache([NotNull] string name, [NotNull] string fallbackSettingName, [CanBeNull] CacheSize size, [CanBeNull] XmlNode definition = null)
 {
     Name = name;
     Size = size;
     FallbackSettingName = fallbackSettingName;
     Definition          = definition;
 }
コード例 #2
0
        public static CacheSize Parse([NotNull] string value, ISitecoreVersion version)
        {
            var bytes = GetSizeInBytes(value, version);
            var size  = new CacheSize(Size.FromBytes(bytes), value);

            return(size);
        }
コード例 #3
0
        public static LogicalDatabaseCache Parse([NotNull] string name, [NotNull] string fallbackSettingName, [CanBeNull] XmlNode definition, ISitecoreVersion version)
        {
            if (definition == null)
            {
                return(new LogicalDatabaseCache(name, fallbackSettingName, null));
            }

            var size  = CacheSize.Parse(definition.InnerText, version);
            var cache = new LogicalDatabaseCache(name, fallbackSettingName, size, definition);

            return(cache);
        }