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

C# FieldType类代码示例

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

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



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

示例1: SetDataName

 public void SetDataName(string DataName, FieldType type)
 {
     if (this.Type == type)
     {
         this.Dataname = DataName;
     }
 }
开发者ID:ichynul,项目名称:vowstag,代码行数:7,代码来源:FieldTag.cs


示例2: FieldBase

 public FieldBase(FieldType Type, FieldBase Base)
 {
     this.Type = Type;
     this.Name = Type.Name;
     this.TenantID = Configure.GetTenantResolutionProvider().GetTenantID();
     LoadUpValues(Base);
 }
开发者ID:emisaacson,项目名称:EffectFramework,代码行数:7,代码来源:FieldBase.cs


示例3: OGRTypeToBufferType

        public DataType OGRTypeToBufferType(FieldType OGRFieldType)
        {
            DataType BufferDataType;

            switch (OGRFieldType)
            {
                //case FieldType.OFTBinary:
                //    BufferDataType = DataType.DT_IMAGE;
                //    break;
                case FieldType.OFTDate:
                    BufferDataType = DataType.DT_DBDATE;
                    break;
                case FieldType.OFTDateTime:
                    BufferDataType = DataType.DT_DBTIMESTAMP;
                    break;
                case FieldType.OFTInteger:
                    BufferDataType = DataType.DT_I4;
                    break;
                case FieldType.OFTReal:
                    BufferDataType = DataType.DT_R8;
                    break;
                case FieldType.OFTString:
                    BufferDataType = DataType.DT_WSTR;
                    break;
                case FieldType.OFTTime:
                    BufferDataType = DataType.DT_DBTIME;
                    break;
                default:
                    BufferDataType = DataType.DT_NTEXT;
                    break;
            }

            return BufferDataType;
        }
开发者ID:scoobird,项目名称:SSIS-GDAL,代码行数:34,代码来源:OGRAdapter.cs


示例4: BondFieldMappingAttribute

 public BondFieldMappingAttribute(BondField field_, Focus focus_=Focus.None, FieldType fieldType_=FieldType.None, CellColourScheme colourScheme_=CellColourScheme.None)
 {
   Field = field_;
   Focus = focus_;
   FieldType = fieldType_;
   ColourScheme = colourScheme_;
 }
开发者ID:heimanhon,项目名称:researchwork,代码行数:7,代码来源:BondFieldMappingAttribute.cs


示例5: Read

        public static object Read(this BinaryReader reader, FieldType fieldType)
        {
            if (reader == null) throw new ArgumentNullException("reader");
            switch (fieldType)
            {
            case FieldType.UInt8:
                return reader.ReadByte();
            case FieldType.UInt16:
                return reader.ReadUInt16();
            case FieldType.UInt32:
                return reader.ReadUInt32();
            case FieldType.UInt64:
                return reader.ReadUInt64();

            case FieldType.Int8:
                return reader.ReadSByte();
            case FieldType.Int16:
                return reader.ReadInt16();
            case FieldType.Int32:
                return reader.ReadInt32();
            case FieldType.Int64:
                return reader.ReadInt64();

            case FieldType.Float:
                return reader.ReadSingle();
            case FieldType.Double:
                return reader.ReadDouble();

            case FieldType.NetDecimal:
                return reader.ReadDecimal();

            default:
                throw new ArgumentOutOfRangeException("Reading FieldType '{0}' from the stream failed, the type is not supported.".Formatted(fieldType));
            }
        }
开发者ID:ShaneCastle,项目名称:TeaFiles.Net,代码行数:35,代码来源:Extensions.cs


示例6: Type

 public AddFieldDialog Type(FieldType type)
 {
     var element = FindElement("field-type");
     var select = new SelectElement(element);
     select.SelectByValue(type.ToText());
     return this;
 }
开发者ID:backand,项目名称:SeleniumAutomation,代码行数:7,代码来源:AddFieldDialog.cs


示例7: StructField

 public StructField(string name, FieldType type)
 {
     VarLength = -1;
     VarArrayLength = 0;
     Name = name;
     _type = type;
 }
开发者ID:john-peterson,项目名称:processhacker,代码行数:7,代码来源:StructField.cs


示例8: QField

 // Constructors
 internal QField(int fieldId, string value, FieldType type, IQRecord record)
 {
     FieldId = fieldId;
     Type = type;
     Record = record; // needs to be before Value.
     Value = value;
 }
开发者ID:pwdennis2,项目名称:QuickBase-C-Sharp-SDK,代码行数:8,代码来源:QField.cs


示例9: AppendFormat

 private void AppendFormat(StringBuilder sb, string tableName, string elementName, string fieldName, FieldType fieldType, ScriptItem item)
 {
     switch (fieldType) {
     case FieldType.Boolean:
         sb.AppendFormat("{0}[\"{1}\"].{2} = {3}",
                         tableName,
                         DialogueLua.StringToTableIndex(elementName),
                         DialogueLua.StringToTableIndex(fieldName),
                         (item.booleanValue == BooleanType.True) ? "true" : "false");
         break;
     case FieldType.Number:
         if (item.valueSetMode == ValueSetMode.To) {
             sb.AppendFormat("{0}[\"{1}\"].{2} = {3}",
                             tableName,
                             DialogueLua.StringToTableIndex(elementName),
                             DialogueLua.StringToTableIndex(fieldName),
                             item.floatValue);
         } else {
             sb.AppendFormat("{0}[\"{1}\"].{2} = {0}[\"{1}\"].{2} + {3}",
                             tableName,
                             DialogueLua.StringToTableIndex(elementName),
                             DialogueLua.StringToTableIndex(fieldName),
                             item.floatValue);
         }
         break;
     default:
         sb.AppendFormat("{0}[\"{1}\"].{2} = \"{3}\"",
                         tableName,
                         DialogueLua.StringToTableIndex(elementName),
                         DialogueLua.StringToTableIndex(fieldName),
                         item.stringValue);
         break;
     }
 }
开发者ID:farreltr,项目名称:OneLastSunset,代码行数:34,代码来源:LuaScriptWizard.cs


示例10: TextFieldParser

 public TextFieldParser(Stream stream)
 {
     this.m_CommentTokens = new string[0];
     this.m_LineNumber = 1L;
     this.m_EndOfData = false;
     this.m_ErrorLine = "";
     this.m_ErrorLineNumber = -1L;
     this.m_TextFieldType = FieldType.Delimited;
     this.m_WhitespaceCodes = new int[] { 
         9, 11, 12, 0x20, 0x85, 160, 0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 
         0x2009, 0x200a, 0x200b, 0x2028, 0x2029, 0x3000, 0xfeff
      };
     this.m_WhiteSpaceRegEx = new Regex(@"\s", RegexOptions.CultureInvariant);
     this.m_TrimWhiteSpace = true;
     this.m_Position = 0;
     this.m_PeekPosition = 0;
     this.m_CharsRead = 0;
     this.m_NeedPropertyCheck = true;
     this.m_Buffer = new char[0x1000];
     this.m_HasFieldsEnclosedInQuotes = true;
     this.m_MaxLineSize = 0x989680;
     this.m_MaxBufferSize = 0x989680;
     this.m_LeaveOpen = false;
     this.InitializeFromStream(stream, Encoding.UTF8, true);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:25,代码来源:TextFieldParser.cs


示例11: IndexField

 public IndexField(string fieldName, object value, FieldType type, IndexFieldValueType valueType)
 {
     this.fieldName = fieldName;
     this.value = value;
     this.type = type;
     this.valueType = valueType;
 }
开发者ID:mrkurt,项目名称:mubble-old,代码行数:7,代码来源:ICustomIndexing.cs


示例12: GetFieldList

        public static List<string> GetFieldList(FieldType fieldType, object obj)
        {
            var list = new List<string>();
            Type type = obj.GetType();

            PropertyInfo[] properties = type.GetProperties();
            foreach (PropertyInfo property in properties)
            {
                var attribute = (ValidateFieldAttribute)property.GetCustomAttributes(typeof(ValidateFieldAttribute), true)
                    .FirstOrDefault(r => ((ValidateFieldAttribute)r).Type == fieldType);

                if (attribute == null)
                    continue;

                object value = property.GetValue(obj, null);

                if (value is string)
                {
                    if (string.IsNullOrEmpty((string)value))
                        list.Add(attribute.Name);
                }
            }

            return list;
        }
开发者ID:aytacozkan,项目名称:OGDI-DataLab,代码行数:25,代码来源:ValidateFieldAttribute.cs


示例13: Field

 public Field(string var, string label, FieldType type)
     : this()
 {
     this.Type	= type;
     this.Var	= var;
     this.Label	= label;
 }
开发者ID:SightstoneOfficial,项目名称:agsxmpp,代码行数:7,代码来源:Field.cs


示例14: Field

        public Field(string name, FieldType type)
        {
            if (name == null) throw new ArgumentNullException(nameof(name));

            this.Name = name;
            this.Type = type;
        }
开发者ID:ITNSource,项目名称:ITNSource.AzureSearch,代码行数:7,代码来源:Field.cs


示例15: GetName

        public static string GetName(FieldType type)
        {
            string result = String.Empty;

            switch (type)
            {
                case FieldType.Auto:
                    result = "auto";
                    break;
                case FieldType.String:
                    result = "string";
                    break;
                case FieldType.Int:
                    result = "int";
                    break;
                case FieldType.Float:
                    result = "float";
                    break;
                case FieldType.Boolean:
                    result = "boolean";
                    break;
                case FieldType.Date:
                    result = "date";
                    break;
            }

            return result;
        }
开发者ID:jinwmmail,项目名称:RDFNew,代码行数:28,代码来源:FieldType.cs


示例16: RegisterFieldTypes

        /// <summary>
        /// Gets a list of all <see cref="Rock.Model.FieldType">FieldTypes</see> (all items that implement the <see cref="Rock.Field.IFieldType"/> interface) and registers the 
        /// <see cref="Rock.Model.FieldType">FieldTypes</see> that have not been previously registered.
        /// </summary>
        /// <param name="physWebAppPath">A <see cref="System.String"/> representing the physical path of the web application.</param>
        public static void RegisterFieldTypes( string physWebAppPath )
        {
            var fieldTypes = new Dictionary<string, EntityType>();

            var rockContext = new RockContext();
            var fieldTypeService = new FieldTypeService( rockContext );

            var existingFieldTypes = fieldTypeService.Queryable().ToList();

            foreach ( var type in Rock.Reflection.FindTypes( typeof( Rock.Field.IFieldType ) ) )
            {
                string assemblyName = type.Value.Assembly.GetName().Name;
                string className = type.Value.FullName;

                if ( !existingFieldTypes.Where( f =>
                    f.Assembly == assemblyName &&
                    f.Class == className ).Any() )
                {
                    string fieldTypeName = type.Value.Name.SplitCase();
                    if (fieldTypeName.EndsWith(" Field Type"))
                    {
                        fieldTypeName = fieldTypeName.Substring( 0, fieldTypeName.Length - 11 );
                    }
                    var fieldType = new FieldType();
                    fieldType.Name = fieldTypeName;
                    fieldType.Assembly = assemblyName;
                    fieldType.Class = className;
                    fieldType.IsSystem = false;
                    fieldTypeService.Add( fieldType );
                }
            }

            rockContext.SaveChanges();
        }
开发者ID:Ganon11,项目名称:Rock,代码行数:39,代码来源:FieldTypeService.Partial.cs


示例17: DBField

 /// <summary>
 /// DBField Constructor
 /// </summary>
 /// <param name="name">The name of the field</param>
 /// <param name="type">The data type of the field</param>
 /// <param name="primaryKey">true if this field is part of a primary key, false otherwise</param>
 /// <param name="identity">true if this field is an identity, false otherwise</param>
 public DBField(string name, FieldType type, bool primaryKey, bool identity)
 {
     m_fieldName = name;
     m_fieldType = type;
     m_primaryKey = primaryKey;
     m_identity = identity;
 }
开发者ID:beaujackson,项目名称:Checkbook,代码行数:14,代码来源:DBField.cs


示例18: QColumn

 internal QColumn(int columnId, string columnName, FieldType columnType, bool columnVirtual, bool columnLookup, bool isHidden)
     : this(columnName, columnType)
 {
     ColumnVirtual = columnVirtual;
     ColumnLookup = columnLookup;
     IsHidden = isHidden;
     ColumnId = columnId;
 }
开发者ID:jherig,项目名称:QuickBase-C-Sharp-SDK,代码行数:8,代码来源:QColumn.cs


示例19: FieldAttribute

		public FieldAttribute(FieldType type, FieldRelationship relationship, string foreignParentFieldName, FieldCascades cascades)
		{
			this.location = FieldLocation.Foreign;
			this.type = type;
			this.relationship = relationship;
			this.foreignParentFieldName = foreignParentFieldName;
			this.cascades = cascades;
		}
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:8,代码来源:FieldAttribute.cs


示例20: Field

 public Field(Password password, int id, string name, FieldType type, object value, short order)
     : base(id, name)
 {
     this.Password = password;
     this.Type = type;
     if (IsString) ChangeSecureString(value, false); else this.value = value;
     this.Order = order;
 }
开发者ID:jogibear9988,项目名称:OdysseyWPF,代码行数:8,代码来源:Field.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Fields类代码示例发布时间:2022-05-24
下一篇:
C# FieldTermStack类代码示例发布时间: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