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


C# IField类代码示例

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


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

示例1: OrderBy

        public static SqlQuery OrderBy(this SqlQuery query, IField field, bool desc = false)
        {
            if (field == null)
                throw new ArgumentNullException("field");

            return query.OrderBy(field.Expression, desc);
        }
开发者ID:ganeshan,项目名称:Serenity,代码行数:7,代码来源:EntitySqlQueryExtensions.cs

示例2: PrintGameField

        /// <summary>
        /// Prints the game field.
        /// </summary>
        /// <param name="gameField">The field to be printed.</param>
        /// <param name="hasBoomed">check if player has explode</param>
        public void PrintGameField(IField gameField, bool hasBoomed)
        {
            if (gameField == null)
            {
                throw new ArgumentNullException("Game field is null!");
            }

            string[,] fieldMatrix = gameField.Matrix;

            Console.WriteLine();
            Console.WriteLine("     0 1 2 3 4 5 6 7 8 9");
            Console.WriteLine("   ---------------------");

            for (int row = 0; row < gameField.Rows; row++)
            {
                Console.Write("{0} | ", row);
                for (int col = 0; col < gameField.Cols; col++)
                {
                    string currentSymbol = fieldMatrix[row, col];
                    PrintCurrentSymbol(currentSymbol, hasBoomed);
                }

                Console.WriteLine("|");
            }

            Console.WriteLine("   ---------------------");
        }
开发者ID:bobbykolev,项目名称:team-astatine,代码行数:32,代码来源:ConsoleIOManager.cs

示例3: GenericAccountFieldViewModel

 public GenericAccountFieldViewModel(IField field)
 {
     FieldName = field.Name;
     FieldValue = field.Value as string;
     CopyButtonText = "copy " + FieldName;
     IsCopyButtonVisible = true;
 }
开发者ID:Cyarix,项目名称:PassFruit,代码行数:7,代码来源:GenericAccountFieldViewModel.cs

示例4: GroupBy

        public static SqlQuery GroupBy(this SqlQuery query, IField field)
        {
            if (field == null)
                throw new ArgumentNullException("field");

            return query.GroupBy(field.Expression);
        }
开发者ID:ganeshan,项目名称:Serenity,代码行数:7,代码来源:EntitySqlQueryExtensions.cs

示例5: Criteria

        /// <summary>
        ///   Creates a new criteria that contains field name of the metafield.</summary>
        /// <param name="field">
        ///   Field (required).</param>
        public Criteria(IField field)
        {
            if (field == null)
                throw new ArgumentNullException("field");

            this.expression = field.Expression;
        }
开发者ID:volkanceylan,项目名称:Serenity,代码行数:11,代码来源:Criteria.cs

示例6: FieldCondition

 public FieldCondition(Range operand, IField field)
     : base(operand, field)
 {
     // Field can't be null when using a range
     if (field == null)
         throw new ArgumentNullException("field");
 }
开发者ID:BarryDahlberg,项目名称:Comb,代码行数:7,代码来源:FieldCondition.cs

示例7: AddNewField

 private void AddNewField(IField field)
 {
     var newFields = new IField[_fields.Length + 1];
     newFields[_fields.Length] = field;
     Array.Copy(_fields, 0, newFields, 0, _fields.Length);
     _fields = newFields;
 }
开发者ID:KevWK314,项目名称:Natter,代码行数:7,代码来源:FieldData.cs

示例8: GetDefaultValueForField

        public static object GetDefaultValueForField(IRow row, IField fld)
        {
            object defaultValue = DBNull.Value;
            if (!fld.IsNullable)
                defaultValue = string.Empty;

            if (row != null && fld != null)
            {
                IClass cls = row.Table;
                if (HasSubtype(cls))
                {
                    ISubtypes subTypes = (ISubtypes)cls;
                    string subTypeFieldName = GetSubTypeFieldName(cls);
                    if (string.IsNullOrEmpty(subTypeFieldName) == false)
                    {
                        object o = GetFieldValue(row, subTypeFieldName);
                        int subTypeCode = ToInteger(o, -1);
                        if (subTypeCode != -1)
                            defaultValue = subTypes.get_DefaultValue(subTypeCode, fld.Name);
                    }
                }

                if (defaultValue == DBNull.Value && fld.Type == esriFieldType.esriFieldTypeDate)
                    defaultValue = fld.DefaultValue;
            }
            return defaultValue;
        }
开发者ID:Ramakrishnapv,项目名称:FuturaNetwork,代码行数:27,代码来源:Database.cs

示例9: GameMechanics

 public GameMechanics(IField field, IBlockFactory blockFactory)
 {
     this.field = field;
     this.blockFactory = blockFactory;
     this.currentBlock = blockFactory.MakeBlock();
     field.SetBlock(currentBlock, new Vector2(0, 0));
 }
开发者ID:elroyp,项目名称:TddTetris,代码行数:7,代码来源:GameMechanics.cs

示例10: CompareTo

        public virtual int CompareTo(IField field)
        {
            int cmp;

            cmp = base.CompareTo((IDecoration)field);
            if (cmp != 0) {
                return cmp;
            }

            if (FullyQualifiedName != null) {
                cmp = FullyQualifiedName.CompareTo(field.FullyQualifiedName);
                if (cmp != 0) {
                    return cmp;
                }
            }

            if (FullyQualifiedName != null) {
                cmp = FullyQualifiedName.CompareTo(field.FullyQualifiedName);
                if (cmp != 0) {
                    return cmp;
                }
            }

            if (ReturnType != null) {
                cmp = ReturnType.CompareTo(field.ReturnType);
                if (cmp != 0) {
                    return cmp;
                }
            }
            if (Region != null) {
                return Region.CompareTo(field.Region);
            }
            return 0;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:34,代码来源:AbstractField.cs

示例11: AddChildProperties

        /// <summary>
        /// Adds any child properties that are linked to the field.
        /// </summary>
        /// <param name="child">The child whose properties are being added.</param>
        public override void AddChildProperties(IField child)
        {
            base.AddChildProperties(child);

            // Position the child within the grid.
            if (_positions.Columns != null)
            {
                Tuple<int, int> rowAndColumn = _positions.GetNextRowAndColumn();
                int column = rowAndColumn.Item2;
                int row = rowAndColumn.Item1;
                child.AddTypedProperty("Grid.Column", column);
                child.AddTypedProperty("Grid.Row", row);
                IList<IProperty> properties = child.Element.Properties.Find("Across");
                _positions.MakeItemUsed(row, column);
                if (properties != null && properties.Count > 0)
                {
                    IProperty across = properties[0];
                    if (across != null)
                    {
                        int columns = across.IntValue;
                        for (int i = 1; i < columns; ++i)
                            _positions.MakeItemUsed(row, column + i);
                        child.AddTypedProperty("Grid.ColumnSpan", columns);
                        if (properties.Count > 1)
                        {
                            int rows = properties[1].IntValue;
                            child.AddTypedProperty("Grid.RowSpan", rows);
                            for (int col = 0; col < columns; ++col)
                                for (int i = 0; i < rows; ++i)
                                    _positions.MakeItemUsed(row + i, column + col);
                        }
                    }
                }
            }
        }
开发者ID:MotorViper,项目名称:FormGenerator,代码行数:39,代码来源:Grid.cs

示例12: resolve

 public FieldInfo resolve(IField fieldRef)
 {
     var resolver = getTypeResolver(fieldRef.DeclaringType);
     if (resolver != null)
         return resolver.resolve(fieldRef);
     return resolveGlobalField(fieldRef);
 }
开发者ID:n017,项目名称:ConfuserDeobfuscator,代码行数:7,代码来源:AssemblyResolver.cs

示例13: MoveableField

		/// <summary>
		/// Initializes a new instance of the MoveableField class.
		/// </summary>
		/// <param name="field">   The field.</param>
		/// <param name="movement">(optional) The movement.</param>
		public MoveableField(IField field, IMovement movement = null)
		{
			Validation.ThrowIfNull(field);

			this._field = field;
			this._movement = movement ?? new BackwardMovement(field);
		}
开发者ID:nikolay-radkov,项目名称:Telerik-Academy,代码行数:12,代码来源:MoveableField.cs

示例14: AlterRasterFieldSR

 public static IField AlterRasterFieldSR(IField pField, ISpatialReference sr)
 {
     IFieldEdit2 pEdit = pField as IFieldEdit2;
     IRasterDef pRDef = pEdit.RasterDef;
     pRDef.SpatialReference = sr;
     return pField;
 }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:7,代码来源:FieldHelper.cs

示例15: Validate

        public void Validate(IField field)
        {
            var thisHindrRecMes = new KeyData<Rectangle, string>(
                Rect,
                "hindrance (" + ToString() + ")");
            if (!field.Rect.Contains(thisHindrRecMes.Key))
                throw new RectIsNotInsideAnotherRectException(
                    thisHindrRecMes.Data,
                    string.Format("field (Panel with Size = ({0}, {1}))", field.Size.Width, field.Size.Height)
                );

            var anotherRectMes = new KeyData<Rectangle, string>();

            foreach (var tank in field.Tanks)
            {
                    anotherRectMes.Key = tank.Rect;
                    anotherRectMes.Data = "tank (" + tank.ToString() + ")";
                    rectValidator.Validate(thisHindrRecMes, anotherRectMes);
            }

            foreach (var hindr in field.Hindrances)
                if (ID != hindr.ID)
                {
                    anotherRectMes.Key = hindr.Rect;
                    anotherRectMes.Data = "hindrance (" + hindr.ToString() + ")";
                    rectValidator.Validate(thisHindrRecMes, anotherRectMes);
                }
        }
开发者ID:efgefg0001,项目名称:Tanks,代码行数:28,代码来源:Hindrance.cs


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