< Summary

Class:DCL.GLTFast.Wrappers.GLTFastDisposableDisposableTexturePromise
Assembly:AssetPromiseKeeper
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/AssetManager/GLTFast/Wrappers/GLTFastDisposableDisposableTexturePromise.cs
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:30
Line coverage:100% (9 of 9)
Covered branches:0
Total branches:0
Covered methods:3
Total methods:3
Method coverage:100% (3 of 3)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GLTFastDisposableDisposableTexturePromise(...)0%110100%
Dispose()0%220100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/AssetManager/GLTFast/Wrappers/GLTFastDisposableDisposableTexturePromise.cs

#LineLine coverage
 1using GLTFast;
 2using System;
 3using UnityEngine;
 4
 5namespace DCL.GLTFast.Wrappers
 6{
 7    public class GLTFastDisposableDisposableTexturePromise : IDisposableTexture
 8    {
 9        private readonly AssetPromise_Texture promise;
 10        private readonly AssetPromiseKeeper_Texture assetPromiseKeeper;
 11
 12        private bool isDisposed;
 13
 3414        public GLTFastDisposableDisposableTexturePromise(AssetPromise_Texture promise, AssetPromiseKeeper_Texture assetP
 15        {
 3416            this.promise = promise;
 3417            this.assetPromiseKeeper = assetPromiseKeeper;
 3418        }
 10619        public Texture2D Texture => isDisposed ? throw new ObjectDisposedException(nameof(AssetPromise_Texture)) : promi
 20
 21        public void Dispose()
 22        {
 10223            if (isDisposed) return;
 24
 3425            assetPromiseKeeper.Forget(promise);
 26
 3427            isDisposed = true;
 3428        }
 29    }
 30}