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


C# Field.Equals方法代码示例

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


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

示例1: EnumerateColumnValues

        public void EnumerateColumnValues(string columnName, int rowOffset, object expected)
        {
            var table = AdminQuery.Access().GetTable(tableName);

            Assert.IsNotNull(table);

            var column = table.GetColumn(columnName);
            Assert.IsNotNull(column);
            Assert.IsNotNull(column.ColumnInfo);
            Assert.IsNotNull(column.Table);
            Assert.IsNotNull(column.Index);
            Assert.AreEqual(columnName, column.Name);

            var cellValue = column.ElementAt(rowOffset);
            var fieldValue = new Field(column.Type, column.Type.CreateFrom(expected));

            Assert.IsFalse(Field.IsNullField(cellValue));
            Assert.IsTrue(fieldValue.Equals(cellValue));
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:19,代码来源:ColumnTests.cs

示例2: IsVisibleEffect

        bool IsVisibleEffect(IPTAnalysisNode n, Field f)
        {
            bool isVisibleEffect = true;
            if (IsVisibleNode(n))
            {
                if (n.IsParameterNode)
                {
                    PNode pn = (PNode)n;
                    if (pn.IsByValue && (f.Equals(PTGraph.asterisk) || pn.IsStruct))
                        isVisibleEffect = false;
                }
            }
            else
                isVisibleEffect = false;
            return isVisibleEffect;

        }
开发者ID:tapicer,项目名称:resource-contracts-.net,代码行数:17,代码来源:PurityAnalysis.cs

示例3: ApplyFieldName

 /// <summary>
 /// Used to give format to a field dereference (.f, [.], *)
 /// </summary>
 /// <param name="pathString"></param>
 /// <param name="f"></param>
 /// <returns></returns>
 private static string ApplyFieldName(string pathString, Field f)
 {
     if (f.Equals(PTGraph.arrayField))
     {
         pathString += "[.]";
     }
     else
     {
         if (f.Equals(PTGraph.allFields))
         {
             pathString = pathString + "." + "*";
         }
         else if (f.Equals(PTGraph.allFieldsNotOwned))
         {
             pathString = pathString + "." + "$";
         }
         else
         {
             if (!f.Equals(PTGraph.asterisk))
             {
                 pathString = pathString + "." + f.Name.Name;
             }
             else
             {
                 pathString = "*(" + pathString + ")";
             }
         }
     }
     return pathString;
 }
开发者ID:tapicer,项目名称:resource-contracts-.net,代码行数:36,代码来源:PurityAnalysis.cs

示例4: ResolveCell

            /// <summary>
            /// Resolves a cell.
            /// </summary>
            /// <param name="ob"></param>
            /// <returns></returns>
            private Field ResolveCell(Field ob)
            {
                if (ob.Equals(IndexRange.FirstInSet)) {
                    ResolveSortedSet();
                    return scheme.GetValue(sortedSet.First());

                }
                if (ob.Equals(IndexRange.LastInSet)) {
                    ResolveSortedSet();
                    return scheme.GetValue(sortedSet.Last());
                }

                return ob;
            }
开发者ID:deveel,项目名称:deveeldb,代码行数:19,代码来源:BlindSearchIndex.cs

示例5: Search

 //////////
 // search a key word in mutiple fields
 //////////
 public List<BookInfo> Search( List<string> texts, Field field)
 {
     if (field.Equals(Field.TIME))
     {
         List<int> times = new List<int>();
         foreach(string time in texts)
         {
             times.Add(Int32.Parse(time));
         }
         return Search(times,Global.Field2String(field), 2);
     }
     return Search(texts,Global.Field2String(field));
 }
开发者ID:fdu5526,项目名称:LibViz,代码行数:16,代码来源:SQLConnector.cs

示例6: PositionOfRangePoint

        private int PositionOfRangePoint(RangeFieldOffset position, Field val)
        {
            int p;
            Field cell;

            switch (position) {

                case RangeFieldOffset.FirstValue:
                    if (val.Equals(IndexRange.FirstInSet)) {
                        return 0;
                    }
                    if (val.Equals(IndexRange.LastInSet)) {
                        // Get the last value and search for the first instance of it.
                        cell = Last;
                    } else {
                        cell = val;
                    }

                    p = SearchFirst(cell);

                    // (If value not found)
                    if (p < 0)
                        return -(p + 1);

                    return p;

                case RangeFieldOffset.LastValue:
                    if (val.Equals(IndexRange.LastInSet))
                        return Count - 1;

                    if (val.Equals(IndexRange.FirstInSet)) {
                        // Get the first value.
                        cell = First;
                    } else {
                        cell = val;
                    }

                    p = SearchLast(cell);

                    // (If value not found)
                    if (p < 0) {
                        return -(p + 1) - 1;
                    }
                    return p;

                case RangeFieldOffset.BeforeFirstValue:
                    if (val.Equals(IndexRange.FirstInSet))
                        return -1;

                    if (val.Equals(IndexRange.LastInSet)) {
                        // Get the last value and search for the first instance of it.
                        cell = Last;
                    } else {
                        cell = val;
                    }

                    p = SearchFirst(cell);
                    // (If value not found)
                    if (p < 0) {
                        return -(p + 1) - 1;
                    }
                    return p - 1;

                case RangeFieldOffset.AfterLastValue:
                    if (val.Equals(IndexRange.LastInSet)) {
                        return Count;
                    }
                    if (val.Equals(IndexRange.FirstInSet)) {
                        // Get the first value.
                        cell = First;
                    } else {
                        cell = val;
                    }
                    p = SearchLast(cell);
                    // (If value not found)
                    if (p < 0) {
                        return -(p + 1);
                    }
                    return p + 1;

                default:
                    throw new InvalidOperationException("Unrecognised position.");
            }
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:84,代码来源:CollatedSearchIndex.cs


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