Exemplo n.º 1
0
        public object GetExamples()
        {
            ProviderResultSummary providerResultSummary = JsonConvert.DeserializeObject <ProviderResultSummary>(Properties.Resources.V1_Sample_Provider_Results);

            providerResultSummary.Provider.ProviderVariation = ProviderVariationExample.GetProviderVariationExample();

            return(providerResultSummary);
        }
Exemplo n.º 2
0
        public object GetExamples()
        {
            AllocationModel allocation = JsonConvert.DeserializeObject <AllocationModel>(Properties.Resources.V2_Sample_Allocation);

            // Provider ID is XML ignored and json ignored, so provider ID does not get set from the value in the resources sample json
            allocation.Provider.ProviderId = allocation.Provider.UkPrn;

            allocation.Provider.ProviderVariation = ProviderVariationExample.GetProviderVariationExample();

            return(allocation);
        }
        public object GetExamples()
        {
            AtomFeed <AllocationModel> feeds = JsonConvert.DeserializeObject <AtomFeed <AllocationModel> >(Properties.Resources.V2_Sample_Allocation_Feeds);

            // Provider ID is XML ignored and json ignored, so provider ID does not get set from the value in the resources sample json
            foreach (var atomEntry in feeds.AtomEntry)
            {
                atomEntry.Content.Allocation.Provider.ProviderId        = atomEntry.Content.Allocation.Provider.UkPrn;
                atomEntry.Content.Allocation.Provider.ProviderVariation = ProviderVariationExample.GetProviderVariationExample();
            }

            return(feeds);
        }
Exemplo n.º 4
0
        public object GetExamples()
        {
            LocalAuthorityResultsSummary summary = JsonConvert.DeserializeObject <LocalAuthorityResultsSummary>(Properties.Resources.V1_Sample_LocalAuthority_Results);

            foreach (LocalAuthorityResultSummary localAuthorityResultSummary in summary.LocalAuthorities)
            {
                foreach (LocalAuthorityProviderResultSummary localAuthorityProviderResultSummary in localAuthorityResultSummary.Providers)
                {
                    localAuthorityProviderResultSummary.Provider.ProviderVariation = ProviderVariationExample.GetProviderVariationExample();
                }
            }
            return(summary);
        }