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


C# Country.ToString方法代码示例

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


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

示例1: GetAll

        public List<Question> GetAll(Category category , int count , Country country)
        {
            string catId = "Agreeableness_us";

            if (string.IsNullOrEmpty(catId)) throw new ArgumentNullException();

            switch (country)
            {
                case Country.us:
                    catId = category + "_" + country.ToString();
                    break;
                default:
                    break;

            }

            var  ques = qctx.GetAllForPartition(catId);
            var posQues = ques.Where(q => q.IsPositive == true).Take(count/2);
            var posNeg = ques.Where(q => q.IsPositive == false).Take(count / 2);

            List<Question> questions = new List<Question>();
            questions.AddRange(posQues);
            questions.AddRange(posNeg);

            return questions;
        }
开发者ID:hooookmeup,项目名称:hookmeup,代码行数:26,代码来源:QuestionRepository.cs

示例2: AbstractYahooMarketServer

 public AbstractYahooMarketServer(Country country)
 {
     this.country = country;
     this.stockServer = getStockServer(country);
     /* Hack on Malaysia Market! The format among Yahoo and CIMB are difference. */
     if (country == Country.Malaysia)
     {
         List<Index> tmp = new List<Index>();
         foreach (Index index in Utils.getStockIndices(country))
         {
             if (IndexHelper.Instance().GetIndexCode(index).toString().StartsWith("^"))
             {
                 tmp.Add(index);
             }
         }
         this.indicies = tmp;
     }
     else
     {
         this.indicies = Utils.getStockIndices(country);
     }
     if (this.indicies.Count == 0)
     {
         throw new ArgumentException(country.ToString());
     }
     foreach (Index index in indicies)
     {
         Code curCode = IndexHelper.Instance().GetIndexCode(index);
         codes.Add(curCode);
         codeToIndexMap.Add(curCode, index);
     }
 }
开发者ID:soross,项目名称:stockanalyzer,代码行数:32,代码来源:AbstractYahooMarketServer.cs

示例3: ConvertCountryToString

 protected string ConvertCountryToString(Country country)
 {
     if (country == Country.Default)
     {
         return string.Empty;
     }
     return country.ToString();
 }
开发者ID:grabzit,项目名称:grabzit,代码行数:8,代码来源:BaseOptions.cs

示例4: GoogleMarketServer

 /**
  * Constructs a stock market index server based on country.
  *
  * @param country the country
  */
 public GoogleMarketServer(Country country)
 {
     this.country = country;
     this.indicies = Utils.getStockIndices(country);
     if (this.indicies.Count == 0)
     {
         throw new ArgumentException(country.ToString());
     }
     foreach (Index index in indicies)
     {
         Code curCode = IndexHelper.Instance().GetIndexCode(index);
         codes.Add(curCode);
         codeToIndexMap.Add(curCode, index);
     }
 }
开发者ID:soross,项目名称:stockanalyzer,代码行数:20,代码来源:GoogleMarketServer.cs

示例5: GetByCountry

 public IList<CalendarEvent> GetByCountry(Country country)
 {
     return _calendarEventRepository.GetByCountry(country.ToString(), country.TimeZoneIds);
 }
开发者ID:Mrding,项目名称:Ribbon,代码行数:4,代码来源:CalendarEventModel.cs

示例6: ShowContry

 public static void ShowContry(Country c)
 {
     Logger.Log(c.ToString());
 }
开发者ID:FreshBirdZhe,项目名称:LSharp,代码行数:4,代码来源:Country.cs

示例7: Culture

 public Culture(Language lang, Country cnt)
     : base(lang.ToString().Replace("no", "nn").Replace("tzh", "zh") + "-" + cnt.ToString().Replace("CT", "ES").Replace("UK", "GB"))
 {
     mLanguage = lang;
     mCountry = cnt;
 }
开发者ID:kevinyang72,项目名称:CatchTheFish01,代码行数:6,代码来源:Culture.cs

示例8: DiscoverSubCategories

 public override int DiscoverSubCategories(Category parentCategory)
 {
     Settings.Categories.Clear();
     Settings.DynamicCategoriesDiscovered = false;
     country = (Country)Enum.Parse(typeof(Country), parentCategory.Name);
     List<OnlineVideos.Reflection.FieldPropertyDescriptorByRef> props = GetUserConfigurationProperties();
     OnlineVideos.Reflection.FieldPropertyDescriptorByRef prop = props.First(p => p.DisplayName == "Country");
     SetConfigValueFromString(prop, country.ToString());
     int ret = DiscoverDynamicCategories();
     parentCategory.SubCategories = new List<Category>();
     parentCategory.SubCategories.AddRange(Settings.Categories);
     return ret;
 }
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:13,代码来源:PokemonTvUtil.cs


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