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


C# IQuery.SetInt64方法代码示例

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


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

示例1: OnEvent

 public void OnEvent(IQuery query)
 {
     switch (ctorType)
     {
         case CtorType.PositionVal:
             query.SetInt64(position, val);
             break;
         case CtorType.NameVal:
             query.SetInt64(name, val);
             break;
         default:
             throw new ShardedSessionException(
                 "Unknown ctor type in SetLongEvent: " + ctorType);
     }
 }
开发者ID:spib,项目名称:nhcontrib,代码行数:15,代码来源:SetLongEvent.cs

示例2: SetParameters

 public void SetParameters(IQuery query)
 {
     if (Parms != null && Parms.Count > 0)
         foreach (IList item in Parms)
         {
             if (item[1] is Int16)
                 query.SetInt16(item[0].ToString(), (Int16)item[1]);
             else if (item[1] is Int32)
                 query.SetInt32(item[0].ToString(), (Int32)item[1]);
             else if (item[1] is Int64)
                 query.SetInt64(item[0].ToString(), (Int64)item[1]);
             else if (item[1] is String)
                 query.SetString(item[0].ToString(), (String)item[1]);
             else if (item[1] is Double)
                 query.SetDouble(item[0].ToString(), (Double)item[1]);
             else if (item[1] is DateTime)
                 query.SetDateTime(item[0].ToString(), (DateTime)item[1]);
             else if (item[1] is Guid)
                 query.SetGuid(item[0].ToString(), (Guid)item[1]);
             else if (item[1] is Boolean)
                 query.SetBoolean(item[0].ToString(), (Boolean)item[1]);
             else if (item[1] is Byte)
                 query.SetByte(item[0].ToString(), (Byte)item[1]);
             else if (item[1] is Decimal)
                 query.SetDecimal(item[0].ToString(), (Decimal)item[1]);
             else if (item[1] is Char)
                 query.SetCharacter(item[0].ToString(), (Char)item[1]);
         }
 }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:29,代码来源:DaoService.cs


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