kOS.Module.kOSProcessor.AllInstances C# (CSharp) Method

AllInstances() public static method

Return a list of all existing runtime instances of this PartModule. The list is guaranteed to be ordered by the Vessel that it's on. (i.e. all the instances of no vessel are first ,then all the module instances on vessel A, then all the instances on vessel B, and so on)
public static AllInstances ( ) : List
return List
        public static List<kOSProcessor> AllInstances()
        {
            // Doing it this way to force return value to be a shallow-level copy,
            // rather than an exact reference to the internal private list.
            // So if the caller adds/removes from it, it won't mess with the
            // private list we're internally maintaining:
            return allMyInstances.GetRange(0, allMyInstances.Count);
        }