public static void RemoveAnimation( ImageSource source, RepeatBehavior repeatBehavior, ObjectAnimationUsingKeyFrames _) { AnimationCache.CacheKey key = new AnimationCache.CacheKey(source, repeatBehavior); AnimationCache._animationCache.Remove(key); }
public static void AddAnimation( ImageSource source, RepeatBehavior repeatBehavior, ObjectAnimationUsingKeyFrames animation) { AnimationCache.CacheKey index = new AnimationCache.CacheKey(source, repeatBehavior); AnimationCache._animationCache[index] = animation; }
public static ObjectAnimationUsingKeyFrames GetAnimation( ImageSource source, RepeatBehavior repeatBehavior) { AnimationCache.CacheKey key = new AnimationCache.CacheKey(source, repeatBehavior); ObjectAnimationUsingKeyFrames animationUsingKeyFrames; AnimationCache._animationCache.TryGetValue(key, out animationUsingKeyFrames); return(animationUsingKeyFrames); }
public static void IncrementReferenceCount(ImageSource source, RepeatBehavior repeatBehavior) { AnimationCache.CacheKey key = new AnimationCache.CacheKey(source, repeatBehavior); int num1; AnimationCache._referenceCount.TryGetValue(key, out num1); int num2 = num1 + 1; AnimationCache._referenceCount[key] = num2; }
public static void DecrementReferenceCount(ImageSource source, RepeatBehavior repeatBehavior) { AnimationCache.CacheKey key = new AnimationCache.CacheKey(source, repeatBehavior); int num; AnimationCache._referenceCount.TryGetValue(key, out num); if (num > 0) { --num; AnimationCache._referenceCount[key] = num; } if (num != 0) { return; } AnimationCache._animationCache.Remove(key); AnimationCache._referenceCount.Remove(key); }
private bool Equals(AnimationCache.CacheKey other) { return(AnimationCache.CacheKey.ImageEquals(this._source, other._source) && object.Equals((object)this._repeatBehavior, (object)other._repeatBehavior)); }