/// <summary>
 /// Starts an asynchronous download of all available sector market quotes.
 /// </summary>
 /// <param name="rankedBy">The property the list is ranked by</param>
 /// <param name="rankDir">The direction of ranking</param>
 /// <param name="userArgs">Individual user argument</param>
 /// <remarks></remarks>
 public void DownloadAllSectorQuotesAysnc(MarketQuoteProperty rankedBy = MarketQuoteProperty.Name, ListSortDirection rankDir = ListSortDirection.Ascending, object userArgs = null)
 {
     base.DownloadAsync(new MarketQuotesDownloadSettings()
     {
         RankedBy = rankedBy, RankDirection = rankDir
     }, userArgs);
 }
 /// <summary>
 /// Starts an asynchronous download of all available company quotes of a special industry.
 /// </summary>
 /// <param name="industyID">The ID of the industry</param>
 /// <param name="rankedBy">The property the list is ranked by</param>
 /// <param name="rankDir">The direction of ranking</param>
 /// <param name="userArgs">Individual user argument</param>
 /// <remarks></remarks>
 public void DownloadCompanyQuotesAsync(Industry industy, MarketQuoteProperty rankedBy = MarketQuoteProperty.Name, ListSortDirection rankDir = ListSortDirection.Ascending, object userArgs = null)
 {
     base.DownloadAsync(new MarketQuotesDownloadSettings()
     {
         Industry = industy, RankedBy = rankedBy, RankDirection = rankDir
     }, userArgs);
 }
Beispiel #3
0
 /// <summary>
 /// Downloads all available sector market quotes.
 /// </summary>
 /// <param name="rankedBy">The property, the list is ranked by</param>
 /// <param name="rankDir">The direction of ranking</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public Base.Response <MarketQuotesResult> DownloadAllSectorQuotes(MarketQuoteProperty rankedBy = MarketQuoteProperty.Name, ListSortDirection rankDir = ListSortDirection.Ascending)
 {
     return(this.Download(new MarketQuotesDownloadSettings()
     {
         RankedBy = rankedBy, RankDirection = rankDir
     }));
 }
        public static string MarketQuotesRankingTypeString(MarketQuoteProperty rankedBy)
        {
            switch (rankedBy)
            {
            case MarketQuoteProperty.Name:
                return("coname");

            case MarketQuoteProperty.DividendYieldPercent:
                return("yie");

            case MarketQuoteProperty.LongTermDeptToEquity:
                return("qto");

            case MarketQuoteProperty.MarketCapitalizationInMillion:
                return("mkt");

            case MarketQuoteProperty.NetProfitMarginPercent:
                return("qpm");

            case MarketQuoteProperty.OneDayPriceChangePercent:
                return("pr1");

            case MarketQuoteProperty.PriceEarningsRatio:
                return("pee");

            case MarketQuoteProperty.PriceToBookValue:
                return("pri");

            case MarketQuoteProperty.PriceToFreeCashFlow:
                return("prf");

            case MarketQuoteProperty.ReturnOnEquityPercent:
                return("ttm");

            default:
                return(string.Empty);
            }
        }
Beispiel #5
0
        /// <summary>
        /// All market quote properties.
        /// </summary>
        /// <param name="prp">The market quote property you want to get or set.</param>
        /// <value></value>
        /// <returns>A value representing and depending on the passed property.</returns>
        /// <remarks></remarks>
        public object this[MarketQuoteProperty prp]
        {
            get
            {
                switch (prp)
                {
                case MarketQuoteProperty.Name:
                    return(this.Name);

                case MarketQuoteProperty.DividendYieldPercent:
                    return(this.DividendYieldPercent);

                case MarketQuoteProperty.LongTermDeptToEquity:
                    return(this.LongTermDeptToEquity);

                case MarketQuoteProperty.MarketCapitalizationInMillion:
                    return(this.MarketCapitalizationInMillion);

                case MarketQuoteProperty.NetProfitMarginPercent:
                    return(this.NetProfitMarginPercent);

                case MarketQuoteProperty.OneDayPriceChangePercent:
                    return(this.OneDayPriceChangePercent);

                case MarketQuoteProperty.PriceEarningsRatio:
                    return(this.PriceEarningsRatio);

                case MarketQuoteProperty.PriceToBookValue:
                    return(this.PriceToBookValue);

                case MarketQuoteProperty.PriceToFreeCashFlow:
                    return(this.PriceToFreeCashFlow);

                case MarketQuoteProperty.ReturnOnEquityPercent:
                    return(this.ReturnOnEquityPercent);

                default:
                    return(null);
                }
            }
            set
            {
                switch (prp)
                {
                case MarketQuoteProperty.Name:
                    this.Name = value.ToString();
                    break;

                case MarketQuoteProperty.DividendYieldPercent:
                    double t1;
                    if (double.TryParse(value.ToString(), out t1))
                    {
                        this.DividendYieldPercent = t1;
                    }
                    break;

                case MarketQuoteProperty.LongTermDeptToEquity:
                    double t2;
                    if (double.TryParse(value.ToString(), out t2))
                    {
                        this.LongTermDeptToEquity = t2;
                    }
                    break;

                case MarketQuoteProperty.MarketCapitalizationInMillion:
                    double t3;
                    if (double.TryParse(value.ToString(), out t3))
                    {
                        this.MarketCapitalizationInMillion = t3;
                    }
                    break;

                case MarketQuoteProperty.NetProfitMarginPercent:
                    double t4;
                    if (double.TryParse(value.ToString(), out t4))
                    {
                        this.NetProfitMarginPercent = t4;
                    }
                    break;

                case MarketQuoteProperty.OneDayPriceChangePercent:
                    double t5;
                    if (double.TryParse(value.ToString(), out t5))
                    {
                        this.OneDayPriceChangePercent = t5;
                    }
                    break;

                case MarketQuoteProperty.PriceEarningsRatio:
                    double t6;
                    if (double.TryParse(value.ToString(), out t6))
                    {
                        this.PriceEarningsRatio = t6;
                    }
                    break;

                case MarketQuoteProperty.PriceToBookValue:
                    double t7;
                    if (double.TryParse(value.ToString(), out t7))
                    {
                        this.PriceToBookValue = t7;
                    }
                    break;

                case MarketQuoteProperty.PriceToFreeCashFlow:
                    double t8;
                    if (double.TryParse(value.ToString(), out t8))
                    {
                        this.PriceToFreeCashFlow = t8;
                    }
                    break;

                case MarketQuoteProperty.ReturnOnEquityPercent:
                    double t9;
                    if (double.TryParse(value.ToString(), out t9))
                    {
                        this.ReturnOnEquityPercent = t9;
                    }
                    break;
                }
            }
        }
 public static string MarketQuotesRankingTypeString(MarketQuoteProperty rankedBy)
 {
     switch (rankedBy)
     {
         case MarketQuoteProperty.Name:
             return "coname";
         case MarketQuoteProperty.DividendYieldPercent:
             return "yie";
         case MarketQuoteProperty.LongTermDeptToEquity:
             return "qto";
         case MarketQuoteProperty.MarketCapitalizationInMillion:
             return "mkt";
         case MarketQuoteProperty.NetProfitMarginPercent:
             return "qpm";
         case MarketQuoteProperty.OneDayPriceChangePercent:
             return "pr1";
         case MarketQuoteProperty.PriceEarningsRatio:
             return "pee";
         case MarketQuoteProperty.PriceToBookValue:
             return "pri";
         case MarketQuoteProperty.PriceToFreeCashFlow:
             return "prf";
         case MarketQuoteProperty.ReturnOnEquityPercent:
             return "ttm";
         default:
             return string.Empty;
     }
 }
Beispiel #7
0
 /// <summary>
 /// Downloads all available company quotes of a special industry.
 /// </summary>
 /// <param name="industyID">The ID of the industry</param>
 /// <param name="rankedBy">The property the list is ranked by</param>
 /// <param name="rankDir">The direction of ranking</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public YahooManaged.Base.Response <MarketQuotesResult> DownloadCompanyQuotes(Industry industyID, MarketQuoteProperty rankedBy = MarketQuoteProperty.Name, System.ComponentModel.ListSortDirection rankDir = System.ComponentModel.ListSortDirection.Ascending)
 {
     return(this.Download(new MarketQuotesDownloadSettings()
     {
         Industry = industyID, RankedBy = rankedBy, RankDirection = rankDir
     }));
 }
Beispiel #8
0
 /// <summary>
 /// Downloads all available industries of a special sector.
 /// </summary>
 /// <param name="sector">The sector of the industries</param>
 /// <param name="rankedBy">The property the list is ranked by</param>
 /// <param name="rankDir">The direction of ranking</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public YahooManaged.Base.Response <MarketQuotesResult> DownloadIndustryQuotes(Sector sector, MarketQuoteProperty rankedBy = MarketQuoteProperty.Name, ListSortDirection rankDir = ListSortDirection.Ascending)
 {
     return(this.Download(new MarketQuotesDownloadSettings()
     {
         Sector = sector, RankedBy = rankedBy, RankDirection = rankDir
     }));
 }
 /// <summary>
 /// Downloads all available company quotes of a special industry.
 /// </summary>
 /// <param name="industyID">The ID of the industry</param>
 /// <param name="rankedBy">The property the list is ranked by</param>
 /// <param name="rankDir">The direction of ranking</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public Base.Response<MarketQuotesResult> DownloadCompanyQuotes(Industry industyID, MarketQuoteProperty rankedBy = MarketQuoteProperty.Name, System.ComponentModel.ListSortDirection rankDir = System.ComponentModel.ListSortDirection.Ascending)
 {
     return this.Download(new MarketQuotesDownloadSettings() { Industry = industyID, RankedBy = rankedBy, RankDirection = rankDir });
 }
 /// <summary>
 /// Downloads all available industries of a special sector.
 /// </summary>
 /// <param name="sector">The sector of the industries</param>
 /// <param name="rankedBy">The property the list is ranked by</param>
 /// <param name="rankDir">The direction of ranking</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public Base.Response<MarketQuotesResult> DownloadIndustryQuotes(Sector sector, MarketQuoteProperty rankedBy = MarketQuoteProperty.Name, ListSortDirection rankDir = ListSortDirection.Ascending)
 {
     return this.Download(new MarketQuotesDownloadSettings() { Sector = sector, RankedBy = rankedBy, RankDirection = rankDir });
 }