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


C# FieldCollection类代码示例

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


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

示例1: GetBoolValue

        public bool GetBoolValue(FieldCollection fc, string fieldName, bool defaultValue)
        {
            if (!IsEmptyStrField(fc, fieldName))
                return fc[fieldName].GetValueAsBool();

            return defaultValue;
        }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:7,代码来源:FieldCollectionFormat.cs

示例2: GetTypedFields

        protected virtual IEnumerable<Field> GetTypedFields(ClientContext context, FieldCollection items)
        {
            context.Load(items);
            context.ExecuteQueryWithTrace();

            return items.ToArray();
        }
开发者ID:SubPointSolutions,项目名称:spmeta2-reverse,代码行数:7,代码来源:FieldReverseHandler.cs

示例3: GetTypedFields

        protected override IEnumerable<Field> GetTypedFields(ClientContext context, FieldCollection items)
        {
            var typedFields = context.LoadQuery(items.Where(i => i.FieldTypeKind == FieldType.User));
            context.ExecuteQueryWithTrace();

            return typedFields;
        }
开发者ID:SubPointSolutions,项目名称:spmeta2-reverse,代码行数:7,代码来源:UserFieldReverseHandler.cs

示例4: GetTypedFields

        protected override IEnumerable<Field> GetTypedFields(ClientContext context, FieldCollection items)
        {
            var typedFields = context.LoadQuery(items.Where(i => i.TypeAsString == BuiltInPublishingFieldTypes.HTML));
            context.ExecuteQueryWithTrace();

            return typedFields;
        }
开发者ID:SubPointSolutions,项目名称:spmeta2-reverse,代码行数:7,代码来源:HTMLFieldReverseHandler.cs

示例5: DataOperation_Complex

 /// <summary>
 /// 自动读数据库载入数据的构造函数
 /// </summary>
 /// <param name="tablename">表名</param>
 /// <param name="db">操作数据类</param>
 /// <param name="IsLoadDt">是否从数据库载入数据到类中</param>
 /// <param name="fields">Field集合</param>
 public DataOperation_Complex(string DefConnID, string DefTableID, FieldCollection fc)
 {
     _dbConn_fc_Dir = new Dictionary<string, Dictionary<string, FieldCollection>>();
     _fields = fc.Clone();
     defaultConnID = DefConnID;
     defaultTableID = DefTableID;
     decompose(_fields);
 }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:15,代码来源:DataOperation_Complex.cs

示例6: Validate

 public bool Validate(FieldCollection sourceCollection, FieldCollection targetCollection, TokenParser tokenParser)
 {
     Dictionary<string, string[]> parserSettings = new Dictionary<string, string[]>();
     parserSettings.Add("SchemaXml", new string[] { "~sitecollection", "~site", "{sitecollectiontermstoreid}", "{termsetid}" });
     bool isFieldMatch = ValidateObjectsXML(sourceCollection, targetCollection, "SchemaXml", new List<string> { "ID" }, tokenParser, parserSettings);
     Console.WriteLine("-- Field validation " + isFieldMatch);
     return isFieldMatch;
 }
开发者ID:stijnbrouwers,项目名称:PnP-Sites-Core,代码行数:8,代码来源:FieldValidator.cs

示例7: RegisterWAPMessage

 public static void RegisterWAPMessage(FieldCollection fc)
 {
     if (fc == null)
         return;
     if(MessageDict.ContainsKey(GetWAPMessageID(fc)))
         return;
     MessageDict.Add(GetWAPMessageID(fc), fc);
 }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:8,代码来源:WAPMessageHelper.cs

示例8: GetDateTimeValue

        public DateTime GetDateTimeValue(FieldCollection fc, string fieldName, DateTime defaultValue)
        {
            if (!IsEmptyStrField(fc, fieldName))
                //if (fc[fieldName].AllowModify)
                    return fc[fieldName].GetValueAsDateTime();

            return defaultValue;
        }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:8,代码来源:FieldCollectionFormat.cs

示例9: GetDecimalValue

        public decimal GetDecimalValue(FieldCollection fc, string fieldName, decimal defaultValue)
        {
            if (!IsEmptyStrField(fc, fieldName))
                //if (fc[fieldName].AllowModify)
                    return fc[fieldName].GetValueAsDecimal();

            return defaultValue;
        }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:8,代码来源:FieldCollectionFormat.cs

示例10: Add

 public void Add(FieldCollection fcp)
 {
     FieldCollection tmpfc = fcp.Clone();
     decompose(tmpfc);
     if (isLoadDT)
     {
         _fields = tmpfc;
     }
 }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:9,代码来源:DataOperation_Complex.cs

示例11: AppendFieldInfo

 private static void AppendFieldInfo(StringBuilder sb, FieldCollection fields, string header, Func<Field, bool> predicate)
 {
   sb.AppendLine(string.Empty);
   sb.AppendLine(header);
   foreach (var field in fields.Where(predicate))
   {
     sb.AppendLine(string.Format("\"{0}\":\"{1}\"", field.Name, field.Value));
   }
 }
开发者ID:dharnitski,项目名称:Sitecore.FakeDb,代码行数:9,代码来源:FieldCollectionExtensions.cs

示例12: GetWAPMessageID

 public static UInt32 GetWAPMessageID(FieldCollection fc)
 {
     if(fc!=null)
     {
         var fcFormat = new FieldCollectionFormat();
         if(!fcFormat.IsEmptyStrField(fc,"MessageID"))
             return (UInt32)fc["MessageID"].GetValueAsInt();
     }
     return 0;
 }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:10,代码来源:WAPMessageHelper.cs

示例13: GetTypedFields

        protected override IEnumerable<Field> GetTypedFields(ClientContext context, FieldCollection items)
        {
            var typedFields = context.LoadQuery(
                items.Where(i => i.FieldTypeKind == FieldType.Number)
                     .IncludeWithDefaultProperties());

            context.ExecuteQueryWithTrace();

            return typedFields;
        }
开发者ID:SubPointSolutions,项目名称:spmeta2-reverse,代码行数:10,代码来源:NumberFieldReverseHandler.cs

示例14: GetClassName

 public static string GetClassName(FieldCollection fc)
 {
     if (fc != null)
     {
         var fcFormat = new FieldCollectionFormat();
         if (!fcFormat.IsEmptyStrField(fc, "ClassName"))
             return fc["ClassName"].GetValueAsString();
     }
     return "";
 }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:10,代码来源:WAPException.cs

示例15: GetExceptionDescription

 public static string GetExceptionDescription(FieldCollection fc)
 {
     if (fc != null)
     {
         var fcFormat = new FieldCollectionFormat();
         if (!fcFormat.IsEmptyStrField(fc, "ExceptionDescription"))
             return fc["ExceptionDescription"].GetValueAsString();
     }
     return "";
 }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:10,代码来源:WAPException.cs


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