public static InformationSource Create(string provider)
        {
            var informationSource = new InformationSource
            {
                rateSource = InformationProviderHelper.Create(provider)
            };

            return(informationSource);
        }
        public static InformationSource[] CreateArray(string provider)
        {
            var informationSource = new InformationSource
            {
                rateSource = InformationProviderHelper.Create(provider)
            };
            var result = new[] { informationSource };

            return(result);
        }
        public static InformationSource Create(string provider, string rateSource, string rateSourcePage)
        {
            var informationSource = new InformationSource
            {
                rateSource     = InformationProviderHelper.Create(provider),
                rateSourcePage = RateSourcePageHelper.Create(rateSourcePage)
            };

            return(informationSource);
        }
        public static InformationSource Copy(InformationSource baseSource)
        {
            InformationSource result = null;

            if (baseSource != null)
            {
                result = new InformationSource();
                if (baseSource.rateSource != null)
                {
                    result.rateSource = InformationProviderHelper.Create(baseSource.rateSource.Value);
                }
                if (baseSource.rateSourcePage != null)
                {
                    result.rateSourcePage = RateSourcePageHelper.Create(baseSource.rateSourcePage.Value);
                }
                if (baseSource.rateSourcePageHeading != null)
                {
                    result.rateSourcePageHeading = baseSource.rateSourcePageHeading;
                }
            }
            return(result);
        }