Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public override IEnumerable <SortingLayerEX> GetOptions()
 {
     return(SortingLayerEXExtensions.GetAllSortingLayers());
 }