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


C# VariableType类代码示例

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


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


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