Exemplo n.º 1
0
        static OffsetAndCachedColors()
        {
            var coll = new CachedTextColorsCollection();

            coll.Freeze();
            Default = new OffsetAndCachedColors(0, coll);
        }
Exemplo n.º 2
0
		public void AddOrUpdate(int docOffset, CachedTextColorsCollection newCachedTextColorsCollection) {
			for (int i = 0; i < cachedColorsList.Count; i++) {
				int mi = (previousReturnedIndex + i) % cachedColorsList.Count;
				var info = cachedColorsList[mi];
				if (info.Offset == docOffset) {
					cachedColorsList[mi] = new OffsetAndCachedColors(docOffset, newCachedTextColorsCollection);
					return;
				}
			}
			Add(docOffset, newCachedTextColorsCollection);
		}
Exemplo n.º 3
0
 public void AddOrUpdate(int docOffset, CachedTextColorsCollection newCachedTextColorsCollection)
 {
     for (int i = 0; i < cachedColorsList.Count; i++)
     {
         int mi   = (previousReturnedIndex + i) % cachedColorsList.Count;
         var info = cachedColorsList[mi];
         if (info.Offset == docOffset)
         {
             cachedColorsList[mi] = new OffsetAndCachedColors(docOffset, newCachedTextColorsCollection);
             return;
         }
     }
     Add(docOffset, newCachedTextColorsCollection);
 }