当前位置: 首页>>代码示例>>C#>>正文


C# ArgumentType类代码示例

本文整理汇总了C#中ArgumentType的典型用法代码示例。如果您正苦于以下问题:C# ArgumentType类的具体用法?C# ArgumentType怎么用?C# ArgumentType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ArgumentType类属于命名空间,在下文中一共展示了ArgumentType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CommandLineArgumentAttribute

 internal CommandLineArgumentAttribute(ArgumentType argType, string name)
 {
     _argumentType = argType;
     Name = name;
     Shortcut = string.Empty;
     Description = string.Empty;
     ParameterDescription = string.Empty;
 }
开发者ID:snugglesftw,项目名称:Crm,代码行数:8,代码来源:CommandLineArgumentAttribute.cs

示例2: ToggleArgument

 // ----------------------------------------------------------------------
 public ToggleArgument( ArgumentType argumentType, string name, bool defaultValue )
     : base(argumentType | ArgumentType.HasName | ArgumentType.ContainsValue, name, defaultValue)
 {
     if ( name == null )
     {
         throw new ArgumentNullException( "name" );
     }
 }
开发者ID:Shereef,项目名称:RTF-to-HTML-Converter-Class-Library-DLL,代码行数:9,代码来源:ToggleArgument.cs

示例3: OnProcessArgument

        protected virtual void OnProcessArgument( ArgumentType type, string value )
        {
            ProcessArgumentHandler handler = null;

            if ( type == ArgumentType.Parameter )
                handler = ProcessParameter;
            else
                handler = ProcessOption;

            if ( handler != null ) handler( this, new ProcessArgumentEventArgs( type, value ) );
        }
开发者ID:And-G,项目名称:Magellan,代码行数:11,代码来源:ParsedArguments.cs

示例4: GenericInst

        public Instruction GenericInst(OpCodes code, AddressingModes addrMode, Action<GenericInstruction, int, int> exec, ArgumentType param1type = ArgumentType.None, ArgumentType param2type = ArgumentType.None)
        {
            var inst = new GenericInstruction(cpu, code, addrMode, param1type != ArgumentType.None) { runFunction = exec };

            if (param1type != ArgumentType.None)
            {
                inst.decodeArgumentsFunction = delegate(GenericInstruction sender, Memory.MemoryBin bin, ref InstructionDecodeContext context, ref int offset, ref int param1, ref int param2)
                {
                    switch (param1type)
                    {
                        case ArgumentType.None:
                            break;
                        default:
                        case ArgumentType.I1:
                            param1 = inst.DecodeInt1Argument(bin, ref offset);
                            break;
                        case ArgumentType.I2:
                            param1 = inst.DecodeInt2Argument(bin, ref offset);
                            break;
                        case ArgumentType.I3:
                            param1 = inst.DecodeInt3Argument(bin, ref offset);
                            break;
                    }

                    switch (param2type)
                    {
                        case ArgumentType.None:
                            break;
                        default:
                        case ArgumentType.I1:
                            param2 = inst.DecodeInt1Argument(bin, ref offset);
                            break;
                        case ArgumentType.I2:
                            param2 = inst.DecodeInt2Argument(bin, ref offset);
                            break;
                        case ArgumentType.I3:
                            param2 = inst.DecodeInt3Argument(bin, ref offset);
                            break;
                    }
                };
            }

            return inst;
        }
开发者ID:DINKIN,项目名称:snes,代码行数:44,代码来源:InstructionsDecodeTable.cs

示例5: ParseCommandLine

        internal List<string> ParseCommandLine(List<ProgramOption> optionList, string[] args)
        {
            /* initialize for new parsing */
            expectedArgType = ArgumentType.ANY;
            ProcessOptions(optionList);
            List<string> arguments = new List<string>();

            for (int argsPosition = 0; argsPosition < args.Length; argsPosition++) {
                string arg = args[argsPosition];
                ArgumentType currentArgType = GetArgumentType(arg);
                switch (currentArgType) {
                    case ArgumentType.ARGUMENT:
                        ParseArgument(arg, arguments);
                        break;

                    case ArgumentType.OPTION_SHORT:
                        ParseShortOption(arg);
                        break;

                    case ArgumentType.OPTION_LONG:
                        bool continueParsing = ParseLongOption(arg);
                        if (!continueParsing) {
                            arguments.AddRange(args.Skip(argsPosition + 1));
                            argsPosition = args.Length;
                        }
                        break;

                    default:
                        /* should not happen as GetArgumentType(arg) returns only one from the above options (cases) */
                        throw new NotSupportedException("Unexpected currentArgType");
                }
            }
            Log("\nPLAIN ARGUMENTS:");
            Log(string.Join("\n", arguments.ToArray()));
            return arguments;// as they are local variable for now (and not private parser field), we dont need to: new List<string>(arguments);
        }
开发者ID:elenfant,项目名称:mff-programming-practices,代码行数:36,代码来源:ArgumentParser.cs

示例6: GetArgumentExpression

        private static Expression GetArgumentExpression(CallSignature signature, ArgumentType kind, ref int unusedCount, DynamicMetaObject/*!*/[]/*!*/ args) {
            int index = signature.IndexOf(kind);
            if (index != -1) {
                unusedCount--;
                return args[index].Expression;
            }

            return AstUtils.Constant(null);
        }
开发者ID:techarch,项目名称:ironruby,代码行数:9,代码来源:MetaOldClass.cs

示例7: ArgumentAttribute

 /// <summary>
 ///     Allows control of command line parsing.
 /// </summary>
 /// <param name="type"> Specifies the error checking to be done on the argument. </param>
 public ArgumentAttribute(ArgumentType type)
 {
     _type = type;
 }
开发者ID:Jacky1,项目名称:cassandra-sharp,代码行数:8,代码来源:CommandLineArguments.cs

示例8: ProcessArgumentEventArgs

 public ProcessArgumentEventArgs( ArgumentType type, string value )
     : this(type, value, "")
 {
 }
开发者ID:And-G,项目名称:Magellan,代码行数:4,代码来源:HandleArgumentEventArgs.cs

示例9: ArgumentAttribute

 /// <summary>
 /// Allows control of command line parsing.
 /// </summary>
 /// <param name="type"> Specifies the error checking to be done on the argument. </param>
 public ArgumentAttribute(ArgumentType type)
 {
     this.type = type;
 }
开发者ID:jaensen,项目名称:BrightstarDB,代码行数:8,代码来源:CommandLineArguments.cs

示例10: CommandLineArgument

 /// <summary>
 /// Creates a new CommandLineArgument instance
 /// </summary>
 /// <param name="name">The name of the argument</param>
 /// <param name="type">The argument type</param>
 public CommandLineArgument(string name, ArgumentType type)
     : this(name)
 {
     m_type = type;
 }
开发者ID:ZlayaZhaba,项目名称:XervBackup,代码行数:10,代码来源:CommandLineArgument.cs

示例11: ArgumentInstance

 public ArgumentInstance(AbstractConstraint constraint, object value)
 {
     Constraint = constraint;
     Type = ArgumentType.ArgumentRef;
     ReturnValue = value;
 }
开发者ID:bytedreamer,项目名称:rhino-mocks,代码行数:6,代码来源:ArgumentManager.cs

示例12: ValueArgument

 // ----------------------------------------------------------------------
 public ValueArgument( ArgumentType argumentType )
     : base(argumentType | ArgumentType.ContainsValue, null, null)
 {
 }
开发者ID:CodeFork,项目名称:RtfConverter,代码行数:5,代码来源:ValueArgument.cs

示例13: NamedValueArgument

 // ----------------------------------------------------------------------
 public NamedValueArgument( ArgumentType argumentType, string name, object defaultValue )
     : base(argumentType | ArgumentType.ContainsValue | ArgumentType.HasName, name, defaultValue)
 {
 }
开发者ID:BGCX261,项目名称:zoominsumo-svn-to-git,代码行数:5,代码来源:NamedValueArgument.cs

示例14: LocalizedArgumentAttribute

 /// <summary>
 ///     Allows control of command line parsing.
 /// </summary>
 /// <param name="type"> Specifies the error checking to be done on the argument. </param>
 public LocalizedArgumentAttribute(ArgumentType type) : base(type)
 {
 }
开发者ID:RSchwoerer,项目名称:Terminals,代码行数:7,代码来源:LocalizedArgumentAttribute.cs

示例15: Variable

 public Variable(string name, ArgumentType type)
 {
     this.name = name;
     this.type = type;
 }
开发者ID:akostiv,项目名称:pub,代码行数:5,代码来源:Variable.cs


注:本文中的ArgumentType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。