< Summary

Class:FastMigrations.Runtime.MigratableAttribute
Assembly:FastMigrations.Runtime
File(s):/github/workspace/FastMigrations.Unity/Assets/FastMigrations/Runtime/MigratableAttribute.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:31
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0
Covered methods:1
Total methods:1
Method coverage:100% (1 of 1)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
MigratableAttribute(...)0%110100%

File(s)

/github/workspace/FastMigrations.Unity/Assets/FastMigrations/Runtime/MigratableAttribute.cs

#LineLine coverage
 1using System;
 2
 3namespace FastMigrations.Runtime
 4{
 5    /// <summary>
 6    /// All "Migrate_<see cref="MigratableAttribute.Version"/>(JObject data)" methods on object marked with this attribu
 7    /// On serialization value from version field will be added to json (schema: "JsonVersion": int).
 8    /// </summary>
 9    /// <remarks>For unity this attribute inherited from "<see cref="UnityEngine.Scripting.PreserveAttribute"/>" to prev
 10    /// <seealso cref="FastMigrationsConverter"/>
 11    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
 12    public class MigratableAttribute :
 13#if UNITY_2019_4_OR_NEWER
 14        UnityEngine.Scripting.PreserveAttribute
 15#else
 16        System.Attribute
 17#endif
 18    {
 19        /// <summary>Number of current version of model</summary>
 20        /// <remarks>Starts to call Migrate_() methods from version 1. "Migrate_0()" won't be called</remarks>
 21        /// <seealso cref="FastMigrationsConverter"/>
 22        public readonly uint Version;
 23
 24        /// <param name="version">Number of current version of model. Starts to call Migrate_() methods from version 1. 
 25        /// <seealso cref="FastMigrationsConverter"/>
 6526        public MigratableAttribute(uint version)
 6527        {
 6528            Version = version;
 6529        }
 30    }
 31}