/// <summary> /// Initializes a new instance of the <see cref="ClassCacheConfiguration"/> class. /// </summary> /// <param name="clazz">The class full name.</param> /// <param name="usage">Cache strategy.</param> /// <exception cref="ArgumentException">When <paramref name="clazz"/> is null or empty.</exception> public ClassCacheConfiguration(string clazz, ClassCacheUsage usage) { if (string.IsNullOrEmpty(clazz)) throw new ArgumentException("clazz is null or empty.", "clazz"); this.clazz = clazz; this.usage = usage; }
/// <summary> /// Initializes a new instance of the <see cref="CollectionCacheConfiguration"/> class. /// </summary> /// <param name="collection">The cache role.</param> /// <param name="usage">Cache strategy.</param> /// <exception cref="ArgumentException">When <paramref name="collection"/> is null or empty.</exception> public CollectionCacheConfiguration(string collection, ClassCacheUsage usage) { if (String.IsNullOrEmpty(collection)) throw new ArgumentException("collection is null or empty.", "collection"); this.collection = collection; this.usage = usage; }
/// <summary> /// Initializes a new instance of the <see cref="ClassCacheConfiguration"/> class. /// </summary> /// <param name="clazz">The class full name.</param> /// <param name="usage">Cache strategy.</param> /// <exception cref="ArgumentException">When <paramref name="clazz"/> is null or empty.</exception> public ClassCacheConfiguration(string clazz, ClassCacheUsage usage) { if (string.IsNullOrEmpty(clazz)) { throw new ArgumentException("clazz is null or empty.", "clazz"); } this.clazz = clazz; this.usage = usage; }
/// <summary> /// Initializes a new instance of the <see cref="CollectionCacheConfiguration"/> class. /// </summary> /// <param name="collection">The cache role.</param> /// <param name="usage">Cache strategy.</param> /// <exception cref="ArgumentException">When <paramref name="collection"/> is null or empty.</exception> public CollectionCacheConfiguration(string collection, ClassCacheUsage usage) { if (String.IsNullOrEmpty(collection)) { throw new ArgumentException("collection is null or empty.", "collection"); } this.collection = collection; this.usage = usage; }
internal static string ClassCacheUsageConvertToString(ClassCacheUsage usage) { switch (usage) { case ClassCacheUsage.Readonly: return("read-only"); case ClassCacheUsage.ReadWrite: return("read-write"); case ClassCacheUsage.NonStrictReadWrite: return("nonstrict-read-write"); case ClassCacheUsage.Transactional: return("transactional"); default: return(string.Empty); } }
internal static string ClassCacheUsageConvertToString(ClassCacheUsage usage) { switch (usage) { case ClassCacheUsage.Readonly: return "read-only"; case ClassCacheUsage.ReadWrite: return "read-write"; case ClassCacheUsage.NonStrictReadWrite: return "nonstrict-read-write"; case ClassCacheUsage.Transactional: return "transactional"; default: return string.Empty; } }
/// <summary> /// Initializes a new instance of the <see cref="CollectionCacheConfiguration"/> class. /// </summary> /// <param name="collection">The cache role.</param> /// <param name="usage">Cache strategy.</param> /// <param name="region">The cache region.</param> /// <exception cref="ArgumentException">When <paramref name="collection"/> is null or empty.</exception> public CollectionCacheConfiguration(string collection, ClassCacheUsage usage, string region) :this(collection,usage) { this.region = region; }
/// <summary> /// Initializes a new instance of the <see cref="ClassCacheConfiguration"/> class. /// </summary> /// <param name="clazz">The class full name.</param> /// <param name="usage">Cache strategy.</param> /// <param name="include">Values for class-cache include.</param> /// <param name="region">The cache region.</param> /// <exception cref="ArgumentException">When <paramref name="clazz"/> is null or empty.</exception> public ClassCacheConfiguration(string clazz, ClassCacheUsage usage, ClassCacheInclude include, string region) : this(clazz, usage, include) { this.region = region; }
/// <summary> /// Initializes a new instance of the <see cref="ClassCacheConfiguration"/> class. /// </summary> /// <param name="clazz">The class full name.</param> /// <param name="usage">Cache strategy.</param> /// <param name="include">Values for class-cache include.</param> /// <exception cref="ArgumentException">When <paramref name="clazz"/> is null or empty.</exception> public ClassCacheConfiguration(string clazz, ClassCacheUsage usage, ClassCacheInclude include) : this(clazz, usage) { this.include = include; }
/// <summary> /// Initializes a new instance of the <see cref="ClassCacheConfiguration"/> class. /// </summary> /// <param name="clazz">The class full name.</param> /// <param name="usage">Cache strategy.</param> /// <param name="include">Values for class-cache include.</param> /// <param name="region">The cache region.</param> /// <exception cref="ArgumentException">When <paramref name="clazz"/> is null or empty.</exception> public ClassCacheConfiguration(string clazz, ClassCacheUsage usage, ClassCacheInclude include, string region) : this(clazz, usage, include) { this.region = region; }
/// <summary> /// Initializes a new instance of the <see cref="ClassCacheConfiguration"/> class. /// </summary> /// <param name="clazz">The class full name.</param> /// <param name="usage">Cache strategy.</param> /// <param name="include">Values for class-cache include.</param> /// <exception cref="ArgumentException">When <paramref name="clazz"/> is null or empty.</exception> public ClassCacheConfiguration(string clazz, ClassCacheUsage usage, ClassCacheInclude include) : this(clazz, usage) { this.include = include; }
/// <summary> /// Initializes a new instance of the <see cref="CollectionCacheConfiguration"/> class. /// </summary> /// <param name="collection">The cache role.</param> /// <param name="usage">Cache strategy.</param> /// <param name="region">The cache region.</param> /// <exception cref="ArgumentException">When <paramref name="collection"/> is null or empty.</exception> public CollectionCacheConfiguration(string collection, ClassCacheUsage usage, string region) : this(collection, usage) { this.region = region; }