Exemplo n.º 1
0
            internal static void WriteXmlSerializerTypeGenerationHelp()
            {
                HelpCategory helpCategory = new HelpCategory(SR.Format(SR.HelpXmlSerializerTypeGenerationCategory));

                helpCategory.Description = SR.Format(SR.HelpXmlSerializerTypeGenerationDescription, ThisAssembly.Title);
                helpCategory.Syntax      = SR.Format(SR.HelpXmlSerializerTypeGenerationSyntax, ThisAssembly.Title, SR.Format(SR.HelpInputAssemblyPath));

                helpCategory.Inputs = new ArgumentInfo[1];

                helpCategory.Inputs[0]          = ArgumentInfo.CreateInputHelpInfo(SR.Format(SR.HelpInputAssemblyPath));
                helpCategory.Inputs[0].HelpText = SR.Format(SR.HelpXmlSerializerTypeGenerationSyntaxInput1);

                helpCategory.Options = new ArgumentInfo[3];

                helpCategory.Options[0]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Reference, SR.Format(SR.ParametersReference));
                helpCategory.Options[0].HelpText = SR.Format(SR.HelpXmlSerializerTypeGenerationSyntaxInput2, Options.Abbr.Reference);

                helpCategory.Options[1]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.ExcludeType, SR.Format(SR.ParametersExcludeType));
                helpCategory.Options[1].HelpText = SR.Format(SR.HelpXmlSerializerTypeGenerationSyntaxInput3, Options.Abbr.ExcludeType);

                helpCategory.Options[2]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Out, SR.Format(SR.ParametersOut));
                helpCategory.Options[2].HelpText = SR.Format(SR.HelpXmlSerializerTypeGenerationSyntaxInput4, Options.Abbr.Out);

                helpCategory.WriteHelp();
            }
Exemplo n.º 2
0
            internal static void WriteCommonOptionsHelp()
            {
                HelpCategory helpCategory = new HelpCategory(SR.Format(SR.HelpCommonOptionsCategory));
                var          options      = new List <ArgumentInfo>();
                ArgumentInfo option;

                option          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Target, SR.Format(SR.ParametersOutputType));
                option.HelpText = SR.Format(SR.HelpTargetOutputType, Options.Targets.Code, Options.Targets.Metadata, Options.Targets.XmlSerializer);
                options.Add(option);

                option          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Directory, SR.Format(SR.ParametersDirectory));
                option.HelpText = SR.Format(SR.HelpDirectory, Options.Abbr.Directory);
                options.Add(option);

                option          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.NoLogo);
                option.HelpText = SR.Format(SR.HelpNologo);
                options.Add(option);

                option          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.Help);
                option.HelpText = SR.Format(SR.HelpHelp, Options.Abbr.Help);
                options.Add(option);

                helpCategory.Options = options.ToArray();
                helpCategory.WriteHelp();
            }
Exemplo n.º 3
0
            internal static void WriteValidationHelp()
            {
                HelpCategory helpCategory = new HelpCategory(SR.Format(SR.HelpValidationCategory));

                helpCategory.Description = SR.Format(SR.HelpValidationDescription, Options.Cmd.ServiceName);
                helpCategory.Syntax      = SR.Format(SR.HelpValidationSyntax, ThisAssembly.Title, Options.Cmd.Validate,
                                                     Options.Cmd.ServiceName, SR.Format(SR.ParametersServiceName), SR.Format(SR.HelpInputAssemblyPath));

                helpCategory.Inputs = new ArgumentInfo[1];

                helpCategory.Inputs[0]          = ArgumentInfo.CreateInputHelpInfo(SR.Format(SR.HelpInputAssemblyPath));
                helpCategory.Inputs[0].HelpText = SR.Format(SR.HelpValidationSyntaxInput1);

                helpCategory.Options = new ArgumentInfo[5];

                helpCategory.Options[0]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.Validate);
                helpCategory.Options[0].HelpText = SR.Format(SR.HelpValidate, Options.Cmd.ServiceName, Options.Abbr.Validate);

                helpCategory.Options[1]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.ServiceName, SR.Format(SR.ParametersServiceName));
                helpCategory.Options[1].HelpText = SR.Format(SR.HelpServiceNameValidate, Options.Abbr.Reference);

                helpCategory.Options[2]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Reference, SR.Format(SR.ParametersReference));
                helpCategory.Options[2].HelpText = SR.Format(SR.HelpReferenceOther, Options.Abbr.Reference);

                helpCategory.Options[3]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.DataContractOnly);
                helpCategory.Options[3].HelpText = SR.Format(SR.HelpDataContractOnly, Options.Abbr.DataContractOnly);

                helpCategory.Options[4]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.ExcludeType, SR.Format(SR.ParametersExcludeType));
                helpCategory.Options[4].HelpText = SR.Format(SR.HelpValidationExcludeTypeExport, Options.Abbr.ExcludeType, Options.Abbr.DataContractOnly);

                helpCategory.WriteHelp();
            }
Exemplo n.º 4
0
            internal static void WriteCodeGenerationHelp()
            {
                HelpCategory helpCategory = new HelpCategory(SR.Format(SR.HelpCodeGenerationCategory));

                helpCategory.Description = SR.Format(SR.HelpCodeGenerationDescription, ThisAssembly.Title);
                helpCategory.Syntax      = SR.Format(SR.HelpCodeGenerationSyntax, ThisAssembly.Title, Options.Abbr.Target, Options.Targets.Code,
                                                     SR.Format(SR.HelpInputMetadataDocumentPath), SR.Format(SR.HelpInputUrl), SR.Format(SR.HelpInputEpr));

                helpCategory.Inputs = new ArgumentInfo[3];

                helpCategory.Inputs[0]          = ArgumentInfo.CreateInputHelpInfo(SR.Format(SR.HelpInputMetadataDocumentPath));
                helpCategory.Inputs[0].HelpText = SR.Format(SR.HelpCodeGenerationSyntaxInput1);

                helpCategory.Inputs[1]          = ArgumentInfo.CreateInputHelpInfo(SR.Format(SR.HelpInputUrl));
                helpCategory.Inputs[1].HelpText = SR.Format(SR.HelpCodeGenerationSyntaxInput2);

                helpCategory.Inputs[2]          = ArgumentInfo.CreateInputHelpInfo(SR.Format(SR.HelpInputEpr));
                helpCategory.Inputs[2].HelpText = SR.Format(SR.HelpCodeGenerationSyntaxInput3);

                helpCategory.Options = new ArgumentInfo[26];

                helpCategory.Options[0]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Out, SR.Format(SR.ParametersOut));
                helpCategory.Options[0].HelpText = SR.Format(SR.HelpOut, Options.Abbr.Out);

                helpCategory.Options[1]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Namespace, SR.Format(SR.ParametersNamespace));
                helpCategory.Options[1].HelpText = SR.Format(SR.HelpNamespace, Options.Abbr.Namespace);

                helpCategory.Options[2]            = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Reference, SR.Format(SR.ParametersReference));
                helpCategory.Options[2].BeginGroup = true;
                helpCategory.Options[2].HelpText   = SR.Format(SR.HelpReferenceCodeGeneration, Options.Abbr.Reference);

                helpCategory.Options[3]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.CollectionType, SR.Format(SR.ParametersCollectionType));
                helpCategory.Options[3].HelpText = SR.Format(SR.HelpCollectionType, Options.Abbr.CollectionType);

                helpCategory.Options[4]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.ExcludeType, SR.Format(SR.ParametersExcludeType));
                helpCategory.Options[4].HelpText = SR.Format(SR.HelpExcludeTypeCodeGeneration, Options.Abbr.ExcludeType);

                helpCategory.Options[5]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.Nostdlib);
                helpCategory.Options[5].HelpText = SR.Format(SR.HelpNostdlib);

                helpCategory.WriteHelp();
            }
Exemplo n.º 5
0
        private static void WriteCodeGenerationHelp()
        {
            HelpCategory helpCategory = new HelpCategory(SR.HelpUsageCategory)
            {
                Inputs = new ArgumentInfo[] {
                    ArgumentInfo.CreateInputHelpInfo(SR.HelpInputMetadataDocumentPath, SR.HelpCodeGenerationSyntaxInput1),
                    ArgumentInfo.CreateInputHelpInfo(SR.HelpInputUrl, SR.HelpCodeGenerationSyntaxInput2),
                    ArgumentInfo.CreateInputHelpInfo(SR.HelpInputEpr, SR.HelpCodeGenerationSyntaxInput3)
                },

                Options = new ArgumentInfo[] {
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.OutputDirectory.Name, SR.ParametersDirectory, string.Format(SR.HelpDirectoryFormat, CommandProcessorOptions.Switches.OutputDirectory.Abbreviation)),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.NoLogo.Name, string.Format(SR.HelpNologoFormat, CommandProcessorOptions.Switches.NoLogo.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.Verbosity.Name, SR.ParametersVerbosity, string.Format(SR.HelpVerbosityFormat, string.Join(", ", System.Enum.GetNames(typeof(Verbosity))), CommandProcessorOptions.Switches.Verbosity.Abbreviation)),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.Help.Name, string.Format(SR.HelpHelpFormat, CommandProcessorOptions.Switches.Help.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.ProjectFile.Name, SR.ParametersProjectFile, string.Format(SR.HelpProjectFileFormat, CommandProcessorOptions.Switches.ProjectFile.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.OutputFile.Name, SR.ParametersOut, string.Format(SR.HelpOutFormat, CommandProcessorOptions.Switches.OutputFile.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.Namespace.Name, SR.ParametersNamespace, string.Format(SR.HelpNamespaceFormat, CommandProcessorOptions.Switches.Namespace.Abbreviation), true),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.MessageContract.Name, string.Format(SR.HelpMessageContractFormat, CommandProcessorOptions.Switches.MessageContract.Abbreviation), true),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.EnableDataBinding.Name, string.Format(SR.HelpEnableDataBindingFormat, CommandProcessorOptions.Switches.EnableDataBinding.Abbreviation)),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.Internal.Name, string.Format(SR.HelpInternalFormat, CommandProcessorOptions.Switches.Internal.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.Reference.Name, SR.ParametersReference, string.Format(SR.HelpReferenceCodeGenerationFormat, CommandProcessorOptions.Switches.Reference.Abbreviation), true),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.NoTypeReuse.Name, string.Format(SR.HelpNoTypeReuseFormat, CommandProcessorOptions.Switches.NoTypeReuse.Abbreviation, CommandProcessorOptions.Switches.Reference.Name, CommandProcessorOptions.Switches.CollectionType.Name)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.CollectionType.Name, SR.ParametersCollectionType, string.Format(SR.HelpCollectionTypeFormat, CommandProcessorOptions.Switches.CollectionType.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.ExcludeType.Name, SR.ParametersExcludeType, string.Format(SR.HelpExcludeTypeCodeGenerationFormat, CommandProcessorOptions.Switches.ExcludeType.Abbreviation)),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.NoStdlib.Name, string.Format(SR.HelpNostdlibFormat, CommandProcessorOptions.Switches.NoStdlib.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.Serializer.Name, SerializerMode.Auto.ToString(), string.Format(SR.HelpAutoSerializerFormat, CommandProcessorOptions.Switches.Serializer.Abbreviation), true),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.Serializer.Name, SerializerMode.DataContractSerializer.ToString(), SR.HelpDataContractSerializer),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.Serializer.Name, SerializerMode.XmlSerializer.ToString(), SR.HelpXmlSerializer),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.Sync.Name, string.Format(SR.HelpSyncFormat, CommandProcessorOptions.Switches.Sync.Abbreviation)),
                    ArgumentInfo.CreateFlagHelpInfo(CommandProcessorOptions.Switches.Wrapped.Name, string.Format(SR.HelpWrappedFormat, CommandProcessorOptions.Switches.Wrapped.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.Update.Name, SR.ParametersWebServiceReferenceName, string.Format(SR.HelpUpdateWebServiceReferenceFormat, CommandProcessorOptions.Switches.Update.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.RuntimeIdentifier.Name, SR.ParametersRuntimeIdentifier, string.Format(SR.HelpRuntimeIdentifierFormat, CommandProcessorOptions.Switches.RuntimeIdentifier.Abbreviation)),
                    ArgumentInfo.CreateParameterHelpInfo(CommandProcessorOptions.Switches.TargetFramework.Name, SR.ParametersTargetFramework, string.Format(SR.HelpTargetFrameworkFormat, CommandProcessorOptions.Switches.TargetFramework.Abbreviation)),
                }
            };

            helpCategory.WriteHelp();
        }
Exemplo n.º 6
0
            internal static void WriteCodeGenerationHelp()
            {
                HelpCategory helpCategory = new HelpCategory(SR.Format(SR.HelpCodeGenerationCategory));

                helpCategory.Description = SR.Format(SR.HelpCodeGenerationDescription, ThisAssembly.Title);
                helpCategory.Syntax      = SR.Format(SR.HelpCodeGenerationSyntax, ThisAssembly.Title, Options.Abbr.Target, Options.Targets.Code,
                                                     SR.Format(SR.HelpInputMetadataDocumentPath), SR.Format(SR.HelpInputUrl), SR.Format(SR.HelpInputEpr));

                helpCategory.Inputs = new ArgumentInfo[3];

                helpCategory.Inputs[0]          = ArgumentInfo.CreateInputHelpInfo(SR.Format(SR.HelpInputMetadataDocumentPath));
                helpCategory.Inputs[0].HelpText = SR.Format(SR.HelpCodeGenerationSyntaxInput1);

                helpCategory.Inputs[1]          = ArgumentInfo.CreateInputHelpInfo(SR.Format(SR.HelpInputUrl));
                helpCategory.Inputs[1].HelpText = SR.Format(SR.HelpCodeGenerationSyntaxInput2);

                helpCategory.Inputs[2]          = ArgumentInfo.CreateInputHelpInfo(SR.Format(SR.HelpInputEpr));
                helpCategory.Inputs[2].HelpText = SR.Format(SR.HelpCodeGenerationSyntaxInput3);

                helpCategory.Options = new ArgumentInfo[26];

                helpCategory.Options[0]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Out, SR.Format(SR.ParametersOut));
                helpCategory.Options[0].HelpText = SR.Format(SR.HelpOut, Options.Abbr.Out);

                helpCategory.Options[1]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Config, SR.Format(SR.ParametersConfig));
                helpCategory.Options[1].HelpText = SR.Format(SR.HelpConfig);

                helpCategory.Options[2]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.MergeConfig);
                helpCategory.Options[2].HelpText = SR.Format(SR.HelpMergeConfig);

                helpCategory.Options[3]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.NoConfig);
                helpCategory.Options[3].HelpText = SR.Format(SR.HelpNoconfig);

                helpCategory.Options[4]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.DataContractOnly);
                helpCategory.Options[4].HelpText = SR.Format(SR.HelpCodeGenerationDataContractOnly, Options.Abbr.DataContractOnly);

                helpCategory.Options[5]            = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Language, SR.Format(SR.ParametersLanguage));
                helpCategory.Options[5].BeginGroup = true;
                helpCategory.Options[5].HelpText   = SR.Format(SR.HelpLanguage, Options.Abbr.Language);

                helpCategory.Options[6]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Namespace, SR.Format(SR.ParametersNamespace));
                helpCategory.Options[6].HelpText = SR.Format(SR.HelpNamespace, Options.Abbr.Namespace);

                helpCategory.Options[7]            = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.MessageContract);
                helpCategory.Options[7].BeginGroup = true;
                helpCategory.Options[7].HelpText   = SR.Format(SR.HelpMessageContract, Options.Abbr.MessageContract);

                helpCategory.Options[8]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.EnableDataBinding);
                helpCategory.Options[8].HelpText = SR.Format(SR.HelpEnableDataBinding, Options.Abbr.EnableDataBinding);

                helpCategory.Options[9]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.Serializable);
                helpCategory.Options[9].HelpText = SR.Format(SR.HelpSerializable, Options.Abbr.Serializable);

                helpCategory.Options[10]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.Async);
                helpCategory.Options[10].HelpText = SR.Format(SR.HelpAsync, Options.Abbr.Async);

                helpCategory.Options[11]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.Internal);
                helpCategory.Options[11].HelpText = SR.Format(SR.HelpInternal, Options.Abbr.Internal);

                helpCategory.Options[12]            = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Reference, SR.Format(SR.ParametersReference));
                helpCategory.Options[12].BeginGroup = true;
                helpCategory.Options[12].HelpText   = SR.Format(SR.HelpReferenceCodeGeneration, Options.Abbr.Reference);

                helpCategory.Options[13]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.CollectionType, SR.Format(SR.ParametersCollectionType));
                helpCategory.Options[13].HelpText = SR.Format(SR.HelpCollectionType, Options.Abbr.CollectionType);

                helpCategory.Options[14]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.ExcludeType, SR.Format(SR.ParametersExcludeType));
                helpCategory.Options[14].HelpText = SR.Format(SR.HelpExcludeTypeCodeGeneration, Options.Abbr.ExcludeType);

                helpCategory.Options[15]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.Nostdlib);
                helpCategory.Options[15].HelpText = SR.Format(SR.HelpNostdlib);

                helpCategory.Options[16]            = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Serializer, SerializerMode.Auto.ToString());
                helpCategory.Options[16].BeginGroup = true;
                helpCategory.Options[16].HelpText   = SR.Format(SR.HelpAutoSerializer, Options.Abbr.Serializer);

                helpCategory.Options[17]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Serializer, SerializerMode.DataContractSerializer.ToString());
                helpCategory.Options[17].HelpText = SR.Format(SR.HelpDataContractSerializer);

                helpCategory.Options[18]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.Serializer, SerializerMode.XmlSerializer.ToString());
                helpCategory.Options[18].HelpText = SR.Format(SR.HelpXmlSerializer);

                helpCategory.Options[19]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.ImportXmlTypes);
                helpCategory.Options[19].HelpText = SR.Format(SR.HelpImportXmlType, Options.Abbr.ImportXmlTypes);

                helpCategory.Options[20]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.UseSerializerForFaults);
                helpCategory.Options[20].HelpText = SR.Format(SR.HelpUseSerializerForFaults, Options.Abbr.UseSerializerForFaults);

                helpCategory.Options[21]            = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.TargetClientVersion, TargetClientVersionMode.Version30.ToString());
                helpCategory.Options[21].BeginGroup = true;
                helpCategory.Options[21].HelpText   = SR.Format(SR.HelpVersion30TargetClientVersion, Options.Abbr.TargetClientVersion);

                helpCategory.Options[22]          = ArgumentInfo.CreateParameterHelpInfo(Options.Cmd.TargetClientVersion, TargetClientVersionMode.Version35.ToString());
                helpCategory.Options[22].HelpText = SR.Format(SR.HelpVersion35TargetClientVersion, Options.Abbr.TargetClientVersion);

                helpCategory.Options[23]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.Wrapped);
                helpCategory.Options[23].HelpText = SR.Format(SR.HelpWrapped);

                helpCategory.Options[24]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.ServiceContract);
                helpCategory.Options[24].HelpText = SR.Format(SR.HelpCodeGenerationServiceContract, Options.Abbr.ServiceContract);

                helpCategory.Options[25]          = ArgumentInfo.CreateFlagHelpInfo(Options.Cmd.SyncOnly);
                helpCategory.Options[25].HelpText = SR.Format(SR.HelpSyncOnly);

                helpCategory.WriteHelp();
            }