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

C# MetaAttribute类代码示例

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

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



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

示例1: CreateRangeFromRawValues

        private void CreateRangeFromRawValues(string lowerBound, string upperBound, MetaAttribute.MetaAttributeDataType type, FormattedOrRaw format)
        {
            Contract.Assert(IsValidValues(lowerBound, upperBound, type, format), "Invalid ValueRange.");

            _lowerBound = (lowerBound.Length > 0) ? ValueContainer.Create(lowerBound, type, format) : null;
            _upperBound = (upperBound.Length > 0) ? ValueContainer.Create(upperBound, type, format) : null;
        }
开发者ID:liammclennan,项目名称:Herald,代码行数:7,代码来源:ValueRange.cs


示例2: IsValidValues

 /// <summary>
 /// To be valid a value must be valid for its type or empty.
 /// </summary>
 /// <param name="lowerBound"></param><param name="upperBound"></param><param name="type"></param><param name="format"></param>
 /// <returns></returns>
 public static bool IsValidValues(string lowerBound, string upperBound, MetaAttribute.MetaAttributeDataType type, FormattedOrRaw format)
 {
     if (lowerBound.Contains("-") || upperBound.Contains("-")) return false;
     if (!lowerBound.Equals(String.Empty) && !ValueContainerValidator.Validate(type, lowerBound, format)) return false;
     if (!upperBound.Equals(String.Empty) && !ValueContainerValidator.Validate(type, upperBound, format)) return false;
     return true;
 }
开发者ID:liammclennan,项目名称:Herald,代码行数:12,代码来源:ValueRange.cs


示例3: ValueRange

 public ValueRange(string rawValues, MetaAttribute.MetaAttributeDataType type)
 {
     Contract.Assert(rawValues.IndexOf("-") == rawValues.LastIndexOf("-"),
         "A range RawValue cannot have more than one '-' symbol.");
     string[] range = rawValues.Split('-');
     CreateRangeFromRawValues(range[0], range[1], type, FormattedOrRaw.RAW);
 }
开发者ID:liammclennan,项目名称:Herald,代码行数:7,代码来源:ValueRange.cs


示例4: ValueSet

        /// <summary>Build a ValueSet using the value string that comes from the UI listbox. ie value,value</summary>
        public ValueSet(string rawValues, MetaAttribute.MetaAttributeDataType type)
        {
            Contract.Assert(IsValidRawValues(rawValues, type), "Invalid ValueSet.");

            if (rawValues == String.Empty) return;
            string[] values = rawValues.Split(',');

            foreach (string value in values) _values.Add(ValueContainer.Create(value, type, FormattedOrRaw.RAW));
        }
开发者ID:liammclennan,项目名称:Herald,代码行数:10,代码来源:ValueSet.cs


示例5: IsValidRawValues

 public static bool IsValidRawValues(string rawValues, MetaAttribute.MetaAttributeDataType type)
 {
     if (rawValues.Equals(String.Empty)) return true;
     string[] values = rawValues.Split(',');
     foreach (string value in values)
     {
         if (!ValueContainerValidator.Validate(type, value, FormattedOrRaw.RAW)) return false;
     }
     return true;
 }
开发者ID:liammclennan,项目名称:Herald,代码行数:10,代码来源:ValueSet.cs


示例6: LastMsgSeqNumProcessedMetaAttribute

    public static string LastMsgSeqNumProcessedMetaAttribute(MetaAttribute metaAttribute)
    {
        switch (metaAttribute)
        {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "SeqNum";
        }

        return "";
    }
开发者ID:rachnasha,项目名称:simple-binary-encoding,代码行数:11,代码来源:SnapshotFullRefresh.cs


示例7: QuoteReqIDMetaAttribute

    public static string QuoteReqIDMetaAttribute(MetaAttribute metaAttribute)
    {
        switch (metaAttribute)
        {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "String";
        }

        return "";
    }
开发者ID:rachnasha,项目名称:simple-binary-encoding,代码行数:11,代码来源:MassQuote.cs


示例8: HeartBtIntMetaAttribute

    public static string HeartBtIntMetaAttribute(MetaAttribute metaAttribute)
    {
        switch (metaAttribute)
        {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "int";
        }

        return "";
    }
开发者ID:nivertech,项目名称:simple-binary-encoding,代码行数:11,代码来源:AdminLogin.cs


示例9: TokenOffsetMetaAttribute

    public static string TokenOffsetMetaAttribute(MetaAttribute metaAttribute)
    {
        switch (metaAttribute)
        {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "";
        }

        return "";
    }
开发者ID:rachnasha,项目名称:simple-binary-encoding,代码行数:11,代码来源:TokenCodec.cs


示例10: TransactTimeMetaAttribute

    public static string TransactTimeMetaAttribute(MetaAttribute metaAttribute)
    {
        switch (metaAttribute)
        {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "UTCTimestamp";
        }

        return "";
    }
开发者ID:Kelindar,项目名称:misakai-storage-sbe,代码行数:11,代码来源:MDIncrementalRefreshDailyStatistics.cs


示例11: Validate

        /// <summary>Validate a string representing a value (for a preference or attribute).</summary>
        /// <param name="type"></param><param name="value"></param><param name="representation"></param>
        /// <returns></returns>
        public static bool Validate(MetaAttribute.MetaAttributeDataType type, string value, FormattedOrRaw representation)
        {
            if (value == null) return false;

            switch (type)
            {
                case MetaAttribute.MetaAttributeDataType.STRING: return ValidateString(value, representation);
                case MetaAttribute.MetaAttributeDataType.INTEGER: return ValidateInteger(value, representation);
                case MetaAttribute.MetaAttributeDataType.CURRENCY: return ValidateCurrency(value, representation);
                default: throw new Exception("Unknown MetaAttributeDataType: " + type.ToString());
            }
        }
开发者ID:liammclennan,项目名称:Herald,代码行数:15,代码来源:ValueValidator.cs


示例12: CharacterEncodingMetaAttribute

    public static string CharacterEncodingMetaAttribute(MetaAttribute metaAttribute)
    {
        switch (metaAttribute)
        {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "";
        }

        return "";
    }
开发者ID:rachnasha,项目名称:simple-binary-encoding,代码行数:11,代码来源:TokenCodec.cs


示例13: MdUpdateActionMetaAttribute

        public static string MdUpdateActionMetaAttribute(MetaAttribute metaAttribute)
        {
            switch (metaAttribute)
            {
                case MetaAttribute.Epoch: return "unix";
                case MetaAttribute.TimeUnit: return "nanosecond";
                case MetaAttribute.SemanticType: return "";
            }

            return "";
        }
开发者ID:kingula,项目名称:simple-binary-encoding,代码行数:11,代码来源:MarketDataIncrementalRefreshTrades.cs


示例14: NumberOfOrdersMetaAttribute

        public static string NumberOfOrdersMetaAttribute(MetaAttribute metaAttribute)
        {
            switch (metaAttribute)
            {
                case MetaAttribute.Epoch: return "unix";
                case MetaAttribute.TimeUnit: return "nanosecond";
                case MetaAttribute.SemanticType: return "";
            }

            return "";
        }
开发者ID:kingula,项目名称:simple-binary-encoding,代码行数:11,代码来源:MarketDataIncrementalRefreshTrades.cs


示例15: MdPriceLevelMetaAttribute

        public static string MdPriceLevelMetaAttribute(MetaAttribute metaAttribute)
        {
            switch (metaAttribute)
            {
                case MetaAttribute.Epoch: return "unix";
                case MetaAttribute.TimeUnit: return "nanosecond";
                case MetaAttribute.SemanticType: return "MDPriceLevel";
            }

            return "";
        }
开发者ID:rachnasha,项目名称:simple-binary-encoding,代码行数:11,代码来源:MarketDataIncrementalRefresh.cs


示例16: ManualOrderIndicatorMetaAttribute

        public static string ManualOrderIndicatorMetaAttribute(MetaAttribute metaAttribute)
        {
            switch (metaAttribute)
            {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "";
            }

            return "";
        }
开发者ID:KevinKelley,项目名称:simple-binary-encoding,代码行数:11,代码来源:OrderCancelReplaceRequest.cs


示例17: CustomerOrFirmMetaAttribute

        public static string CustomerOrFirmMetaAttribute(MetaAttribute metaAttribute)
        {
            switch (metaAttribute)
            {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "";
            }

            return "";
        }
开发者ID:KevinKelley,项目名称:simple-binary-encoding,代码行数:11,代码来源:OrderCancelReplaceRequest.cs


示例18: MatchEventIndicatorMetaAttribute

    public static string MatchEventIndicatorMetaAttribute(MetaAttribute metaAttribute)
    {
        switch (metaAttribute)
        {
            case MetaAttribute.Epoch: return "unix";
            case MetaAttribute.TimeUnit: return "nanosecond";
            case MetaAttribute.SemanticType: return "MultipleCharValue";
        }

        return "";
    }
开发者ID:Kelindar,项目名称:misakai-storage-sbe,代码行数:11,代码来源:MDIncrementalRefreshDailyStatistics.cs


示例19: SecurityIDSourceMetaAttribute

                public static string SecurityIDSourceMetaAttribute(MetaAttribute metaAttribute)
                {
                    switch (metaAttribute)
                    {
                    case MetaAttribute.Epoch: return "unix";
                    case MetaAttribute.TimeUnit: return "nanosecond";
                    case MetaAttribute.SemanticType: return "";
                    }

                    return "";
                }
开发者ID:KevinKelley,项目名称:simple-binary-encoding,代码行数:11,代码来源:MassQuote.cs


示例20: TradeIdMetaAttribute

        public static string TradeIdMetaAttribute(MetaAttribute metaAttribute)
        {
            switch (metaAttribute)
            {
                case MetaAttribute.Epoch: return "unix";
                case MetaAttribute.TimeUnit: return "nanosecond";
                case MetaAttribute.SemanticType: return "ExecID";
            }

            return "";
        }
开发者ID:rachnasha,项目名称:simple-binary-encoding,代码行数:11,代码来源:MarketDataIncrementalRefresh.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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