Based on the C# Avalon implementation.
基于C#的Avalon实现。