LynnaLab.WarpSourceData.GetPointedChainLength C# (CSharp) Method

GetPointedChainLength() public method

public GetPointedChainLength ( ) : int
return int
        public int GetPointedChainLength()
        {
            if (WarpSourceType == WarpSourceType.PointerWarp)
                return GetPointedWarp().GetPointedChainLength();

            WarpSourceData next = GetNextWarp();
            if (next == null) return 1;

            return 1+next.GetPointedChainLength();
        }

Usage Example

示例#1
0
        // Returns the number of PointedWarps there are after and including
        // this one. This is the number of times (plus one) that you can call
        // GetNextWarp() before you get a null value.
        //
        // If called on a PointerWarp, it returns the corresponding value for
        // its PointedWarp.
        public int GetPointedChainLength()
        {
            if (WarpSourceType == WarpSourceType.PointerWarp)
            {
                return(GetPointedWarp().GetPointedChainLength());
            }

            WarpSourceData next = GetNextWarp();

            if (next == null)
            {
                return(1);
            }

            return(1 + next.GetPointedChainLength());
        }
All Usage Examples Of LynnaLab.WarpSourceData::GetPointedChainLength