System.Internal.HandleCollector.RegisterType C# (CSharp) Method

RegisterType() static private method

static private RegisterType ( string typeName, int expense, int initialThreshold ) : int
typeName string
expense int
initialThreshold int
return int
        internal static int RegisterType(string typeName, int expense, int initialThreshold) {
            lock (internalSyncObject){
                if (handleTypeCount == 0 || handleTypeCount == handleTypes.Length) {
                    HandleType[] newTypes = new HandleType[handleTypeCount + 10];
                    if (handleTypes != null) {
                        Array.Copy(handleTypes, 0, newTypes, 0, handleTypeCount);
                    }
                    handleTypes = newTypes;
                }

                handleTypes[handleTypeCount++] = new HandleType(typeName, expense, initialThreshold);
                return handleTypeCount;
            }
        }