コード例 #1
0
		/// <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;
		}
コード例 #2
0
		/// <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;
		}
コード例 #3
0
 /// <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;
 }
コード例 #4
0
 /// <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;
 }
コード例 #5
0
        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);
            }
        }
コード例 #6
0
		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;
			}
		}
コード例 #7
0
		/// <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;
		}
コード例 #8
0
		/// <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;
		}
コード例 #9
0
		/// <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;
		}
コード例 #10
0
 /// <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;
 }
コード例 #11
0
 /// <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;
 }
コード例 #12
0
 /// <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;
 }