1 instantiation of Options
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (1)
70
return new
Options
(arguments);
88 references to Options
dotnet-svcutil.xmlserializer (88)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (5)
45
internal static InputModule LoadInputs(
Options
options)
60
private readonly
Options
_options;
62
internal InputModuleLoader(InputModule newInputModule,
Options
options)
191
if (_options.ModeSettingOption ==
Options
.Cmd.Target)
193
return new ToolInputException(SR.Format(SR.ErrInputConflictsWithTarget,
Options
.Cmd.Target, _options.ModeSettingValue, inputSrc));
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (33)
59
internal static
Options
ParseArguments(string[] args)
64
arguments = CommandParser.ParseCommand(args,
Options
.Switches.All);
125
return OptionProcessingHelper.IsTypeSpecified(type, _excludedTypes,
Options
.Cmd.ExcludeType);
130
private
Options
_parent;
136
internal OptionProcessingHelper(
Options
options, ArgumentDictionary arguments)
159
if (_arguments.ContainsArgument(
Options
.Cmd.Help) || _arguments.Count == 0)
161
_parent.SetAllowedModes(ToolMode.DisplayHelp, ToolMode.DisplayHelp,
Options
.Cmd.Help, null);
169
_parent._quiet = _arguments.ContainsArgument(
Options
.Cmd.Quiet);
175
_parent._noLogo = _arguments.ContainsArgument(
Options
.Cmd.NoLogo);
177
ToolConsole.SetOptions(_arguments.ContainsArgument(
Options
.Cmd.Debug));
185
if (_arguments.ContainsArgument(
Options
.Cmd.Directory))
187
string directoryArgValue = _arguments.GetArgument(
Options
.Cmd.Directory);
191
ValidateIsDirectoryPathOnly(
Options
.Cmd.Directory, directoryArgValue);
208
throw new ToolArgumentException(SR.Format(SR.ErrInvalidPath, directoryArgValue,
Options
.Cmd.Directory), e);
238
if (_arguments.ContainsArgument(
Options
.Cmd.Out))
240
_parent._outputFileArg = _arguments.GetArgument(
Options
.Cmd.Out);
244
SetAllowedModesFromOption(ToolMode.XmlSerializerGeneration, ToolMode.XmlSerializerGeneration,
Options
.Cmd.Out, "");
246
ValidatePath(
Options
.Cmd.Out, _parent._outputFileArg);
262
IList<string> namespaceMappingsArgs = _arguments.GetArguments(
Options
.Cmd.Namespace);
270
throw new ToolOptionException(SR.Format(SR.ErrInvalidNamespaceArgument,
Options
.Cmd.Namespace, namespaceMapping));
280
Options
.Cmd.Namespace, targetNamespace, prevClrNamespace, clrNamespace));
291
IList<string> referencedAssembliesArgs = _arguments.GetArguments(
Options
.Cmd.Reference);
292
IList<string> excludeTypesArgs = _arguments.GetArguments(
Options
.Cmd.ExcludeType);
293
IList<string> referencedCollectionTypesArgs = _arguments.GetArguments(
Options
.Cmd.CollectionType);
294
bool nostdlib = _arguments.ContainsArgument(
Options
.Cmd.Nostdlib);
297
SetAllowedModesFromOption(ToolMode.XmlSerializerGeneration, ToolMode.XmlSerializerGeneration,
Options
.Cmd.ExcludeType, null);
314
if (_parent._modeSettingOption ==
Options
.Cmd.Target)
316
throw new ToolOptionException(SR.Format(SR.ErrOptionConflictsWithTarget,
Options
.Cmd.Target, _parent.ModeSettingValue, optionStr));
336
_parent._excludedTypes = AddSpecifiedTypesToDictionary(excludedTypeArgs,
Options
.Cmd.ExcludeType);
339
Dictionary<string, Type> foundCollectionTypes = AddSpecifiedTypesToDictionary(collectionTypesArgs,
Options
.Cmd.CollectionType);
368
throw new ToolOptionException(SR.Format(SR.ErrDuplicateReferenceValues,
Options
.Cmd.Reference, assembly.Location));
417
string smReferenceArg = _arguments.GetArgument(
Options
.Cmd.SMReference);
509
static TypeResolver CreateTypeResolver(
Options
options)
Microsoft\Tools\ServiceModel\SvcUtil\OptionsStatics.cs (14)
53
public static readonly CommandSwitch Directory = new CommandSwitch(
Options
.Cmd.Directory, Abbr.Directory, SwitchType.SingletonValue);
54
public static readonly CommandSwitch Help = new CommandSwitch(
Options
.Cmd.Help, Abbr.Help, SwitchType.Flag);
55
public static readonly CommandSwitch NoLogo = new CommandSwitch(
Options
.Cmd.NoLogo,
Options
.Cmd.NoLogo, SwitchType.Flag);
56
public static readonly CommandSwitch Out = new CommandSwitch(
Options
.Cmd.Out, Abbr.Out, SwitchType.SingletonValue);
57
public static readonly CommandSwitch Reference = new CommandSwitch(
Options
.Cmd.Reference, Abbr.Reference, SwitchType.ValueList);
58
public static readonly CommandSwitch SMReference = new CommandSwitch(
Options
.Cmd.SMReference, Abbr.SMReference, SwitchType.ValueList);
59
public static readonly CommandSwitch Nostdlib = new CommandSwitch(
Options
.Cmd.Nostdlib,
Options
.Cmd.Nostdlib, SwitchType.Flag);
60
public static readonly CommandSwitch ExcludeType = new CommandSwitch(
Options
.Cmd.ExcludeType, Abbr.ExcludeType, SwitchType.ValueList);
61
public static readonly CommandSwitch Namespace = new CommandSwitch(
Options
.Cmd.Namespace, Abbr.Namespace, SwitchType.ValueList);
62
public static readonly CommandSwitch Quiet = new CommandSwitch(
Options
.Cmd.Quiet, Abbr.Quiet, SwitchType.Flag);
64
public static readonly CommandSwitch Debug = new CommandSwitch(
Options
.Cmd.Debug,
Options
.Cmd.Debug, SwitchType.Flag);
Microsoft\Tools\ServiceModel\SvcUtil\OutputModule.cs (3)
22
protected OutputModule(
Options
options)
83
throw new ToolArgumentException(SR.Format(SR.ErrPathTooLong, path,
Options
.Cmd.Directory, option), ptle);
87
throw new ToolArgumentException(SR.Format(SR.ErrPathTooLongDirOnly, path,
Options
.Cmd.Directory), ptle);
Microsoft\Tools\ServiceModel\SvcUtil\Tool.cs (2)
26
Options
options =
Options
.ParseArguments(args);
Microsoft\Tools\ServiceModel\SvcUtil\ToolConsole.cs (25)
73
ToolConsole.WriteLine(SR.Format(SR.MoreHelp,
Options
.Abbr.Help));
166
helpCategory.Options[0] = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.Reference, SR.Format(SR.ParametersReference));
167
helpCategory.Options[0].HelpText = SR.Format(SR.HelpXmlSerializerTypeGenerationSyntaxInput2,
Options
.Abbr.Reference);
169
helpCategory.Options[1] = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.ExcludeType, SR.Format(SR.ParametersExcludeType));
170
helpCategory.Options[1].HelpText = SR.Format(SR.HelpXmlSerializerTypeGenerationSyntaxInput3,
Options
.Abbr.ExcludeType);
172
helpCategory.Options[2] = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.Out, SR.Format(SR.ParametersOut));
173
helpCategory.Options[2].HelpText = SR.Format(SR.HelpXmlSerializerTypeGenerationSyntaxInput4,
Options
.Abbr.Out);
184
option = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.Directory, SR.Format(SR.ParametersDirectory));
185
option.HelpText = SR.Format(SR.HelpDirectory,
Options
.Abbr.Directory);
188
option = ArgumentInfo.CreateFlagHelpInfo(
Options
.Cmd.NoLogo);
192
option = ArgumentInfo.CreateFlagHelpInfo(
Options
.Cmd.Help);
193
option.HelpText = SR.Format(SR.HelpHelp,
Options
.Abbr.Help);
205
helpCategory.Syntax = SR.Format(SR.HelpCodeGenerationAbbreviationSyntax, ThisAssembly.Title,
Options
.Abbr.Target,
Options
.Targets.Code,
221
helpCategory.Options[0] = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.Out, SR.Format(SR.ParametersOut));
222
helpCategory.Options[0].HelpText = SR.Format(SR.HelpOut,
Options
.Abbr.Out);
224
helpCategory.Options[1] = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.Namespace, SR.Format(SR.ParametersNamespace));
225
helpCategory.Options[1].HelpText = SR.Format(SR.HelpNamespace,
Options
.Abbr.Namespace);
227
helpCategory.Options[2] = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.Reference, SR.Format(SR.ParametersReference));
229
helpCategory.Options[2].HelpText = SR.Format(SR.HelpReferenceCodeGeneration,
Options
.Abbr.Reference);
231
helpCategory.Options[3] = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.CollectionType, SR.Format(SR.ParametersCollectionType));
232
helpCategory.Options[3].HelpText = SR.Format(SR.HelpCollectionType,
Options
.Abbr.CollectionType);
234
helpCategory.Options[4] = ArgumentInfo.CreateParameterHelpInfo(
Options
.Cmd.ExcludeType, SR.Format(SR.ParametersExcludeType));
235
helpCategory.Options[4].HelpText = SR.Format(SR.HelpExcludeTypeCodeGeneration,
Options
.Abbr.ExcludeType);
237
helpCategory.Options[5] = ArgumentInfo.CreateFlagHelpInfo(
Options
.Cmd.Nostdlib);
Microsoft\Tools\ServiceModel\SvcUtil\ToolRuntime.cs (2)
12
private
Options
_options;
14
internal ToolRuntime(
Options
options)
Microsoft\Tools\ServiceModel\SvcUtil\TypeResolver.cs (2)
14
private
Options
_toolOptions;
16
internal TypeResolver(
Options
toolOptions)
Microsoft\Tools\ServiceModel\SvcUtil\XmlSerializerGenerator.cs (2)
24
internal XmlSerializerGenerator(
Options
options)
35
ToolConsole.WriteWarning(SR.Format(SR.WrnOptionConflictsWithInput,
Options
.Cmd.Out));