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


C# Field.ToString方法代码示例

本文整理汇总了C#中Field.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Field.ToString方法的具体用法?C# Field.ToString怎么用?C# Field.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Field的用法示例。


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

示例1: FilterDisplayName

 public static string FilterDisplayName(Field filter)
 {
     switch (filter)
     {
         case Field.CompanyName:
             return "Company";
         case Field.Date:
             return "Date";
         case Field.EducationCode:
             return "Education Code";
         case Field.FieldOfStudy:
             return "Field of Study";
         case Field.JobTitle:
             return "Job Title";
         case Field.Keyword:
             return "Keyword";
         case Field.Location:
             return "Location";
         case Field.Salary:
             return "Salary";
         case Field.Source:
             return "Source";
         case Field.JobType:
             return "Job Type";
         default:
             return filter.ToString();
     }
 }
开发者ID:cray1,项目名称:jobsalt,代码行数:28,代码来源:FilterUtility.cs

示例2: Create_Field

        public void Create_Field()
        {
            var field = new Field("Create_Field");

            var expected = Comparer.Create_Field();
            var actual = field.ToString();

            Assert.AreEqual(expected, actual);
            Console.WriteLine(actual);
        }
开发者ID:biqas,项目名称:roslynsimplified,代码行数:10,代码来源:Test.Field.cs

示例3: Create_Field_ReadOnly

        public void Create_Field_ReadOnly()
        {
            var field = new Field("Create_Field_ReadOnly")
                .AddModifiers(MODIFIER.READ_ONLY);

            var expected = Comparer.Create_Field_ReadOnly();
            var actual = field.ToString();

            Assert.AreEqual(expected, actual);
            Console.WriteLine(actual);
        }
开发者ID:biqas,项目名称:roslynsimplified,代码行数:11,代码来源:Test.Field.cs

示例4: Create_Field_With_Modifier_Type_And_Value

        public void Create_Field_With_Modifier_Type_And_Value()
        {
            var field = new Field("Create_Field_With_Modifier_Type_And_Value")
                .WithModifiers(MODIFIER.PROTECTED)
                .WithType<Int32>()
                .WithInitializer("42");

            var expected = Comparer.Create_Field_With_Modifier_Type_And_Value();
            var actual = field.ToString();

            Assert.AreEqual(expected, actual);
            Console.WriteLine(actual);
        }
开发者ID:biqas,项目名称:roslynsimplified,代码行数:13,代码来源:Test.Field.cs

示例5: BuildParameterString

        private string BuildParameterString(Field argName, Field argType, Field inOut)
        {
            var sb = new StringBuilder();
            sb.Append(argName.ToString());
            sb.Append(" ");
            sb.Append(argType.ToString());

            if (!inOut.IsNull)
                sb.Append(" ")
                    .Append(inOut.Value);

            return sb.ToString();
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:13,代码来源:RoutinesTableContainer.cs

示例6: SetTrackerVal

 public void SetTrackerVal(Field fieldName, object value){
   handler._set(fieldName.ToString(), value);
 }
开发者ID:dgkae,项目名称:google-analytics-plugin-for-unity,代码行数:3,代码来源:GoogleAnalyticsiOSV3.cs

示例7: ToString_FieldIsBlack_ContainsTheColorInString

 public void ToString_FieldIsBlack_ContainsTheColorInString()
 {
     fTestObj = new Field(uiNumber, Field.Black);
     StringAssert.Contains("black", fTestObj.ToString());
 }
开发者ID:Salizer,项目名称:AllMyTempProjects,代码行数:5,代码来源:FieldTests.cs

示例8: ToString_FieldIsRed_ContainsTheColorInString

 public void ToString_FieldIsRed_ContainsTheColorInString()
 {
     fTestObj = new Field(uiNumber, Field.Red);
     StringAssert.Contains("red", fTestObj.ToString());
 }
开发者ID:Salizer,项目名称:AllMyTempProjects,代码行数:5,代码来源:FieldTests.cs

示例9: ToString_FieldIsGreen_ContainsTheColorInString

 public void ToString_FieldIsGreen_ContainsTheColorInString()
 {
     fTestObj = new Field(uiNumber, Field.Green);
     StringAssert.Contains("green", fTestObj.ToString());
 }
开发者ID:Salizer,项目名称:AllMyTempProjects,代码行数:5,代码来源:FieldTests.cs

示例10: SetTrackerVal

 internal void SetTrackerVal(Field fieldName, object value)
 {
     object[] args = new object[] { fieldName.ToString(), value };
     tracker.Call("set", args);
 }
开发者ID:kayetea,项目名称:EntertainmentApp,代码行数:5,代码来源:GoogleAnalyticsAndroidV4.cs

示例11: handleAConstantInTerm

        /// <summary>
        /// OBSOLETE: Handles a scenario where there is a term in the condition
        /// </summary>
        /// <param name="left"></param>
        /// <param name="right"></param>
        /// <param name="binOp"></param>
        /// <param name="fmt"></param>
        private void handleAConstantInTerm(TermManager termManager, Term left, Term right,
            BinaryOperator binOp, bool bNegated, SafeDictionary<Field, FieldValueHolder> fieldValues, Field culpritField,
            out FieldModificationType fmt, out int fitnessval)
        {
            fitnessval = Int32.MaxValue;
            fmt = FieldModificationType.UNKNOWN;
            Term non_constant_term = null;
            Term constant_term = null;

            bool bleftRightMaintainted = true;
            if (termManager.IsValue(left))
            {
                non_constant_term = right;
                constant_term = left;
                bleftRightMaintainted = true;
            }
            else if (termManager.IsValue(right))
            {
                non_constant_term = left;
                constant_term = right;
                bleftRightMaintainted = false;
            }

            int value;
            if (termManager.TryGetI4Constant(constant_term, out value))
            {
                fmt = FieldModificationType.INCREMENT;

                FieldValueHolder fvh;
                if (fieldValues.TryGetValue(culpritField, out fvh))
                {
                    int non_constant_field_value = fvh.intValue;    //TODO: Assuming that the fieldType is Int32
                    if (bleftRightMaintainted)
                        fitnessval = FitnessMeasure.ComputeFitnessValue(this.host, binOp, value, non_constant_field_value, bNegated);
                    else
                        fitnessval = FitnessMeasure.ComputeFitnessValue(this.host, binOp, non_constant_field_value, value, bNegated);
                }
                else
                    this.host.Log.LogWarning(WikiTopics.MissingWikiTopic, "fitness measure",
                        "Failed to retrieve value for field " + culpritField.ToString());
            }
            else if (termManager.IsDefaultValue(constant_term))
            {
                if (binOp == BinaryOperator.Ceq)
                {
                    if (culpritField.Type.ToString() == "System.Boolean")
                    {
                        fmt = bNegated ? FieldModificationType.TRUE_SET : FieldModificationType.FALSE_SET;
                    }
                    else
                        fmt = bNegated ? FieldModificationType.NON_NULL_SET : FieldModificationType.NULL_SET;
                }
            }

            Term objectValue;
            ObjectProperty objectProperty;
            if (termManager.TryGetObjectProperty(constant_term, out objectValue, out objectProperty))
            {
                //TODO??? How to handle this scenario?
            }
        }
开发者ID:spati2,项目名称:ICSE-2011-Covana,代码行数:68,代码来源:TargetBranchAnalyzer.cs


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