예제 #1
0
        public static InformationSource Create(string provider, string rateSource, string rateSourcePage)
        {
            var informationSource = new InformationSource
            {
                rateSource     = InformationProviderHelper.Create(provider),
                rateSourcePage = RateSourcePageHelper.Create(rateSourcePage)
            };

            return(informationSource);
        }
예제 #2
0
        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);
        }