Rosetta.Translation.NestedElementTranslationUnit.OnNestingLevelChanged C# (CSharp) Method

OnNestingLevelChanged() protected method

When the indentation level changes, we need to apply a different formatter. When the nesting level changes, this procedure will adjust it in case the automatic nesting level has been set to automatic.
protected OnNestingLevelChanged ( ) : void
return void
        protected virtual void OnNestingLevelChanged()
        {
            this.nestingLevel = this.NestingLevel == AutomaticNestingLevel ? 0 : this.NestingLevel;
            this.Formatter = this.FormatterProvider(this.nestingLevel);
        }