Run() public méthode

Gets user input and sets CultureInfo accordingly. Then outputs some text to demonstrate the text that is obtained from the satellite assemblies.
public Run ( ) : void
Résultat void
    /// <summary>
    /// Entry point for sample application.
    /// The Main method gets the current command-line options by calling GetArgs().
    /// It then uses the current options to determine which method to call.
    /// </summary>
    /// <param name="args"></param>
    public static void Main(string [] args)
    {
        //Get arguments.
        Options currentOptions = GetArgs(args);

        //Execute relevant portion of program depending on arguments.
        switch (currentOptions)
        {
        case Options.GenerateResourceFiles:
            GenerateResources gr = new GenerateResources();
            gr.ResourceFileUsage();
            gr.GenerateResourceFiles();
            gr.BuildSatelliteAssemblies();
            return;

        case Options.GenerateTextFiles:
            GenerateText g = new GenerateText();
            g.TextFileUsage();
            g.GenerateTextFiles();
            return;

        case Options.UseResources:
            UseResources u = new UseResources();
            u.Run();
            return;

        case Options.Help:
            Usage();
            return;

        case Options.None:
            goto case Options.Help;

        case Options.Invalid: //Prompt for
            Console.WriteLine("Invalid option, please try again.");
            Usage();
            break;

        default:
            //Should not get here.
            Console.WriteLine("Invalid option in Main()");
            return;
        } //switch
    }     //Main()
Exemple #2
0
  /// <summary>
  /// Entry point for sample application.
  /// The Main method gets the current command-line options by calling GetArgs().
  /// It then uses the current options to determine which method to call.
  /// </summary>
  /// <param name="args"></param>
  public static void Main(string [] args) 
  {
    //Get arguments.
    Options currentOptions = GetArgs(args);
    //Execute relevant portion of program depending on arguments.
    switch (currentOptions)
    {
      case Options.GenerateResourceFiles:
        GenerateResources gr = new GenerateResources();
        gr.ResourceFileUsage();
        gr.GenerateResourceFiles();
        gr.BuildSatelliteAssemblies();
        return;

      case Options.GenerateTextFiles:
        GenerateText g = new GenerateText();
        g.TextFileUsage();
        g.GenerateTextFiles();
        return;

      case Options.UseResources:
        UseResources u = new UseResources();
        u.Run();
        return;

      case Options.Help:
        Usage();
        return;

      case Options.None:
        goto case Options.Help;

      case Options.Invalid:  //Prompt for 
        Console.WriteLine("Invalid option, please try again.");
        Usage();
        break;

      default:
        //Should not get here.
        Console.WriteLine("Invalid option in Main()");
        return;
    }//switch
  }//Main()