• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# VariableType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: FunctionSymbol

 /// <summary>
 /// Constuctor for function symbol
 /// </summary>
 /// <param name="name"></param>
 /// <param name="symbolType"></param>
 /// <param name="label"></param>
 /// <param name="paramList"></param>
 /// <param name="returnVar"></param>
 public FunctionSymbol(string name,SymbolType symbolType,string label,
     List<Parameter> paramList,VariableType returnVar)
     : base(name,symbolType,label,paramList)
 {
     this.returnVar = returnVar;
     this.variableType = returnVar;
 }
开发者ID:mikeabrahamsen,项目名称:uPascalCompiler,代码行数:15,代码来源:FunctionSymbol.cs


示例2: ParameterSymbol

 /// <summary>
 /// Constructor for parameter symbol
 /// </summary>
 /// <param name="name"></param>
 /// <param name="symbolType"></param>
 /// <param name="parameter"></param>
 public ParameterSymbol(string name,SymbolType symbolType, Parameter parameter,
     VariableType variableType)
     : base(name,symbolType)
 {
     base.variableType = variableType;
     this.parameter = parameter;
 }
开发者ID:mikeabrahamsen,项目名称:uPascalCompiler,代码行数:13,代码来源:ParameterSymbol.cs


示例3: GVar

        /**
         * The main Constructor.
         * An array of ID numbers is required, to ensure its own ID is unique.
         */
        public GVar(int[] idArray)
        {
            val = 0;
            floatVal = 0f;
            textVal = "";
            type = VariableType.Boolean;
            id = 0;
            link = VarLink.None;
            pmVar = "";
            popUps = null;
            updateLinkOnStart = false;
            backupVal = 0;
            backupFloatVal = 0f;

            // Update id based on array
            foreach (int _id in idArray)
            {
                if (id == _id)
                {
                    id ++;
                }
            }

            label = "Variable " + (id + 1).ToString ();
        }
开发者ID:mcbodge,项目名称:eidolon,代码行数:29,代码来源:GVar.cs


示例4: Method

 /// <summary>
 /// Main constructor
 /// </summary>
 /// <param name="superBlock">Super block</param>
 /// <param name="name">Method name</param>
 /// <param name="returnType">Method return type</param>
 /// <param name="parameters">Method parameters</param>
 public Method(Block superBlock, string name, VariableType returnType, Parameter[] parameters) : base(superBlock)
 {
     Name = name;
     ReturnType = returnType;
     Parameters = parameters;
     ReturnValue = null;
 }
开发者ID:PlatypusLanguage,项目名称:PlatypusSharp,代码行数:14,代码来源:Method.cs


示例5: Parameter

 /// <summary>
 /// Constructor for a parameter
 /// </summary>
 /// <param name="mode"></param>
 /// <param name="variableType"></param>
 public Parameter(string name,IOMode mode, VariableType variableType,int size)
 {
     this.mode = mode;
     this.variableType = variableType;
     this.name = name;
     this.size = size;
 }
开发者ID:mikeabrahamsen,项目名称:uPascalCompiler,代码行数:12,代码来源:Parameter.cs


示例6: Template

 public Template(string[] iden, VariableType[] layout, bool casesens, VariableType infinitism)
 {
     _iden=iden;
     _layout=layout;
     _casesens=casesens;
     _infinitism=infinitism;
 }
开发者ID:komiga,项目名称:duct-sharp,代码行数:7,代码来源:Template.cs


示例7: CreateVariableParameters

   public static Offset<VariableParameters> CreateVariableParameters(FlatBufferBuilder builder,
 VariableType type = (VariableType)0)
   {
       builder.StartObject(1);
       VariableParameters.AddType(builder, type);
       return VariableParameters.EndVariableParameters(builder);
   }
开发者ID:wuyuntao,项目名称:Synchronica,代码行数:7,代码来源:VariableParameters.cs


示例8: LocationPreviewItem

        public LocationPreviewItem(VsProjectAnalyzer analyzer, FilePreviewItem parent, AnalysisLocation locationInfo, VariableType type) {
            _lineNo = locationInfo.Line;
            _columnNo = locationInfo.Column;            
            _parent = parent;
            var analysis = analyzer.GetAnalysisEntryFromPath(locationInfo.FilePath);
            _type = type;
            if (analysis != null) {
                string text = analysis.GetLine(locationInfo.Line);
                string trimmed = text.TrimStart(_whitespace);
                _text = trimmed;
                _span = new Span(_columnNo - (text.Length - trimmed.Length) - 1, parent.Engine.OriginalName.Length);
                if (String.Compare(_text, _span.Start, parent.Engine.OriginalName, 0, parent.Engine.OriginalName.Length) != 0) {
                    // we are renaming a name mangled name (or we have a bug where the names aren't lining up).
                    Debug.Assert(_text.Substring(_span.Start, _span.Length + 1 + parent.Engine.PrivatePrefix.Length) == "_" + parent.Engine.PrivatePrefix + parent.Engine.OriginalName);


                    if (parent.Engine.Request.Name.StartsWith("__")) {
                        // if we're renaming to a private prefix name then we just rename the non-prefixed portion
                        _span = new Span(_span.Start + 1 + parent.Engine.PrivatePrefix.Length, _span.Length);
                        _columnNo += 1 + parent.Engine.PrivatePrefix.Length;
                    } else {
                        // otherwise we renmae the prefixed and non-prefixed portion
                        _span = new Span(_span.Start, _span.Length + 1 + parent.Engine.PrivatePrefix.Length);
                    }
                }
            } else {
                _text = String.Empty;
            }
        }
开发者ID:RussBaz,项目名称:PTVS,代码行数:29,代码来源:LocationPreviewItem.cs


示例9: VariableConstructorTest1

 public void VariableConstructorTest1()
 {
     string name = string.Empty; // TODO: Initialize to an appropriate value
     VariableType type = new VariableType(); // TODO: Initialize to an appropriate value
     object value = null; // TODO: Initialize to an appropriate value
     Variable target = new Variable(name, type, value);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
开发者ID:ericrrichards,项目名称:fps,代码行数:8,代码来源:VariableTest.cs


示例10: ParameterDefinition

        public ParameterDefinition(LittleBigCParser.FormalParameterContext context)
        {
            _context = context;

            var type = _context.variableType().simpleVariableType().GetText().ToString();

            _variableType = VariableDefinition.VariableTypes[type];
        }
开发者ID:mdelol,项目名称:Compiler,代码行数:8,代码来源:ParameterDefinition.cs


示例11: VariableSymbol

 /// <summary>
 /// Constructor for Variable Symbol
 /// </summary>
 /// <param name="name"></param>
 /// <param name="size"></param>
 /// <param name="offset"></param>
 public VariableSymbol( string name, SymbolType symbolType, VariableType var,int size, 
     int offset)
     : base(name,symbolType)
 {
     this.size = size;
     this.offset = offset;
     this.variableType = var;
 }
开发者ID:mikeabrahamsen,项目名称:uPascalCompiler,代码行数:14,代码来源:VariableSymbol.cs


示例12: zero

        private static readonly ExpressionNode DefaultIntValueExpression = ExpressionNode.CreateConstantExpression(0); //the default value for an int is zero (0).

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Creates a new instance of the VariableDeclarationNode class.
        /// </summary>
        /// <param name="type">The type of the variable.</param>
        /// <param name="name">The name of the variable.</param>
        /// <param name="initialValue">A expression used to initialise the variable initially or null to use the default value.</param>
        public VariableDeclarationNode(VariableType type, string name, ExpressionNode initialValue)
        {
            Type = type;
            Name = name;

            initialValue = initialValue ?? DefaultIntValueExpression;
            InitialValueExpression = initialValue;
        }
开发者ID:nrother,项目名称:simple-c,代码行数:20,代码来源:VariableDeclarationNode.cs


示例13: CreateVariable

 /// <summary>
 /// Creates the correct implementation of variable for the evaluation.
 /// </summary>
 /// <param name="variable">The oval definitions variable.</param>
 /// <returns></returns>
 public Evaluator CreateVariable(VariableType variable, oval_system_characteristics sytemCharacteristics, IEnumerable<VariableType> variablesOfDefinitions, oval_variables externalVariables)
 {
     if (variable is VariablesTypeVariableConstant_variable)
         return new ConstantVariableEvaluator((VariablesTypeVariableConstant_variable)variable);
     else if (variable is VariablesTypeVariableLocal_variable)
         return new LocalVariableEvaluator((VariablesTypeVariableLocal_variable)variable, sytemCharacteristics, variablesOfDefinitions, externalVariables);
     else if (variable is VariablesTypeVariableExternal_variable)
         return new ExternalVariableEvaluator((VariablesTypeVariableExternal_variable)variable, externalVariables);
        return null;
 }
开发者ID:ywcsz,项目名称:modSIC,代码行数:15,代码来源:EvaluatorFactory.cs


示例14: VerifyVariableInformation

        /// <summary>
        /// Verifies Variable information in Burn_Manifest.xml.
        /// </summary>
        /// <param name="embededResourcesDirectoryPath">Output folder where all the embeded resources are.</param>
        /// <param name="variableName">Expected name of the variable.</param>
        /// <param name="variableValue">Expected value of the variable.</param>
        /// <param name="variableType">Expected Type of the variable.</param>
        public static void VerifyVariableInformation(string embededResourcesDirectoryPath, string variableName, string variableValue, VariableType variableType)
        {
            string expectedVariableTypeName = GetVariableTypeName(variableType);

            string burnManifestXPath = string.Format(@"//burn:Variable[@Id='{0}']", variableName);
            XmlNodeList burnManifestNodes = BundleTests.QueryBurnManifest(embededResourcesDirectoryPath, burnManifestXPath);
            Assert.True(1 == burnManifestNodes.Count, String.Format("No Variable with the name: '{0}' was found in Burn_Manifest.xml.", variableName));
            BundleTests.VerifyAttributeValue(burnManifestNodes[0], "Value", variableValue);
            BundleTests.VerifyAttributeValue(burnManifestNodes[0], "Type", expectedVariableTypeName);
        }
开发者ID:bleissem,项目名称:wix3,代码行数:17,代码来源:Bundle.VariableTests.cs


示例15: defineType

 private void defineType(string value)
 {
     int i = 0;
     if(int.TryParse(value, out i))
         this.Type = VariableType.Number;
     else if(value.Equals("false") || value.Equals("true"))
         this.Type = VariableType.Boolean;
     else
         this.Type = VariableType.String;
 }
开发者ID:armed10,项目名称:GeenCompilerOfzo,代码行数:10,代码来源:Variable.cs


示例16: GetDefaultValue

 public static Variable GetDefaultValue(VariableType v)
 {
     switch (v)
      {
     case VariableType.Boolean:
        return new Variable(bool.FalseString);
     case VariableType.Integer:
        return new Variable("0 ");
     default:
        throw new Exception("Invalid variable type.");
      }
 }
开发者ID:jorgejavierfm,项目名称:Wall-E,代码行数:12,代码来源:Variables.cs


示例17: CompilerFunctionCall

        public CompilerFunctionCall(Compiler compiler, CompilerFunction caller, Operand target, CallingConvention callingConvention, VariableType[] arguments, VariableType returnValue)
            : base(compiler)
        {
            Contract.Requires(arguments != null);

            _caller = caller;
            _target = target;

            _functionPrototype = new FunctionDeclaration(callingConvention, arguments, returnValue);
            if (arguments != null && arguments.Length > 0)
                _args = new Operand[arguments.Length];
        }
开发者ID:modulexcite,项目名称:nasmjit,代码行数:12,代码来源:CompilerFunctionCall.cs


示例18: LocalVariableVariablesComponent

 public LocalVariableVariablesComponent(
     VariableType localVariable, 
     VariableComponentType variable, 
     IEnumerable<VariableType> variablesOfOvalDefinitions, 
     oval_system_characteristics systemCharacteristics,
     Modulo.Collect.OVAL.Variables.oval_variables externalVariables = null)
 {
     this.variablesOfDefinitions = variablesOfOvalDefinitions;
     this.variable = variable;
     this.systemCharacteristics = systemCharacteristics;
     this.localVariable = localVariable;
     this.variableEvaluator = new VariableEvaluator(variablesOfDefinitions, systemCharacteristics, externalVariables);
 }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:13,代码来源:LocalVariableVariablesComponent.cs


示例19: FunctionDeclaration

        internal FunctionDeclaration(CallingConvention callingConvention, VariableType[] arguments, VariableType returnValue)
        {
            Contract.Requires(arguments != null);

            if (callingConvention == CallingConvention.Default)
                callingConvention = CallingConventionInfo.DefaultCallingConvention;

            _callingConvention = callingConvention;
            if (arguments.Length > 32)
                throw new ArgumentException();

            SetPrototype(arguments, returnValue);
        }
开发者ID:modulexcite,项目名称:nasmjit,代码行数:13,代码来源:FunctionDeclaration.cs


示例20: GetVariableTypeName

 /// <summary>
 /// Get the string value for a corresponding VariableType value.
 /// </summary>
 /// <param name="value">The variable type to convert</param>
 /// <returns>String representation</returns>
 public static string GetVariableTypeName(VariableType value)
 {
     switch (value)
     {
         case VariableType.Numeric:
             return "numeric";
         case VariableType.String:
             return "string";
         case VariableType.Version:
             return "version";
         default:
             throw new ArgumentOutOfRangeException("value", string.Format("Variable Type: '{0}' is not defined.", value.ToString()));
     };
 }
开发者ID:bleissem,项目名称:wix3,代码行数:19,代码来源:Bundle.VariableTests.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Variables类代码示例发布时间:2022-05-24
下一篇:
C# VariableState类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap