Пример #1
0
        static private void GenerateSortingLayersClass()
        {
            CodeGenerator.GenerateStaticClass("SortingLayers", delegate(CSTextDocumentBuilder builder) {
                SortingLayerEXExtensions.GetAllSortingLayers().Process(delegate(SortingLayerEX layer) {
                    CSTextDocumentWriter writer = builder.CreateWriterWithVariablePairs(
                        "NAME", layer.GetName().StyleAsConstantName(),
                        "VALUE", layer.GetName().StyleAsDoubleQuoteLiteral()
                        );

                    writer.Write("static public readonly SortingLayerEX ?NAME = new SortingLayerEX(?VALUE);");
                });
            }, GeneratedCodeType.RuntimeDefinition);
        }
Пример #2
0
 public override IEnumerable <SortingLayerEX> GetOptions()
 {
     return(SortingLayerEXExtensions.GetAllSortingLayers());
 }