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


C# FieldType类代码示例

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


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


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