public ScobeLimits FindLimitsOfNextBracketExpression(int start)
 {
     ScobeLimits result = new ScobeLimits();
     result.OpenScobeIndex = FindFirstOpenBracket(start);
     result.CloseScobeIndex = FindMatchingScobe(result.OpenScobeIndex);
     return result;
 }
        private static ScobeLimits FindClassLimits(Match classMatch, string code)
        {
            ScobeLimits classScobeLimits = ScobeExpressionFinder.
                FindLimitsOfNextBracketExpression(classMatch.Index, code);

            // Класс ScobeLimits использован для хранения границ всего внутреннего класса
            ScobeLimits classLimits = new ScobeLimits();
            classLimits.OpenScobeIndex = FindClassStartAccordingType(classMatch, code);
            classLimits.CloseScobeIndex = classScobeLimits.CloseScobeIndex;

            return classLimits;
        }
 public static string DeleteCodePart(ScobeLimits descriptionLimits, string code)
 {
     int descriptionLen = descriptionLimits.CloseScobeIndex - descriptionLimits.OpenScobeIndex + 1;
     return code.Remove(descriptionLimits.OpenScobeIndex, descriptionLen);
 }
 public static string DeleteDescription(ScobeLimits descriptionLimits, string code)
 {
     return DeleteCodePart(descriptionLimits, code);
 }
 private static void DeleteClassFromCode(ScobeLimits classLimits, ref string code)
 {
     code = CodePartsDeleter.DeleteCodePart(classLimits, code);
 }
 private static string getSubStrAccordingLimits(ScobeLimits limits, string code)
 {
     int subStrLen = limits.CloseScobeIndex - limits.OpenScobeIndex + 1;
     return code.Substring(limits.OpenScobeIndex, subStrLen);
 }
 private static string GetClassCode(ScobeLimits classLimits, string code)
 {                
     return getSubStrAccordingLimits(classLimits, code);
 }